template rework: rearrange sidebar widgets for contact related pages
This commit is contained in:
parent
2aad62190f
commit
0c3979720f
6 changed files with 16 additions and 14 deletions
|
@ -27,6 +27,9 @@ function contacts_init(&$a) {
|
||||||
require_once('include/group.php');
|
require_once('include/group.php');
|
||||||
require_once('include/contact_widgets.php');
|
require_once('include/contact_widgets.php');
|
||||||
|
|
||||||
|
if ($_GET['nets'] == "all")
|
||||||
|
$_GET['nets'] = "";
|
||||||
|
|
||||||
if(! x($a->page,'aside'))
|
if(! x($a->page,'aside'))
|
||||||
$a->page['aside'] = '';
|
$a->page['aside'] = '';
|
||||||
|
|
||||||
|
@ -38,26 +41,25 @@ function contacts_init(&$a) {
|
||||||
'$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
|
'$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
|
||||||
));
|
));
|
||||||
$follow_widget = '';
|
$follow_widget = '';
|
||||||
|
$networks_widget = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$vcard_widget = '';
|
$vcard_widget = '';
|
||||||
|
$networks_widget .= networks_widget('contacts',$_GET['nets']);
|
||||||
if (isset($_GET['add']))
|
if (isset($_GET['add']))
|
||||||
$follow_widget = follow_widget($_GET['add']);
|
$follow_widget = follow_widget($_GET['add']);
|
||||||
else
|
else
|
||||||
$follow_widget = follow_widget();
|
$follow_widget = follow_widget();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET['nets'] == "all")
|
|
||||||
$_GET['nets'] = "";
|
|
||||||
|
|
||||||
$groups_widget .= group_side('contacts','group',false,0,$contact_id);
|
|
||||||
$findpeople_widget .= findpeople_widget();
|
$findpeople_widget .= findpeople_widget();
|
||||||
$networks_widget .= networks_widget('contacts',$_GET['nets']);
|
$groups_widget .= group_side('contacts','group',false,0,$contact_id);
|
||||||
|
|
||||||
$a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
|
$a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
|
||||||
'$vcard_widget' => $vcard_widget,
|
'$vcard_widget' => $vcard_widget,
|
||||||
|
'$findpeople_widget' => $findpeople_widget,
|
||||||
'$follow_widget' => $follow_widget,
|
'$follow_widget' => $follow_widget,
|
||||||
'$groups_widget' => $groups_widget,
|
'$groups_widget' => $groups_widget,
|
||||||
'$findpeople_widget' => $findpeople_widget,
|
|
||||||
'$networks_widget' => $networks_widget
|
'$networks_widget' => $networks_widget
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,10 @@ function directory_init(&$a) {
|
||||||
if(local_user()) {
|
if(local_user()) {
|
||||||
require_once('include/contact_widgets.php');
|
require_once('include/contact_widgets.php');
|
||||||
|
|
||||||
$a->page['aside'] .= follow_widget();
|
|
||||||
|
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
|
|
||||||
|
$a->page['aside'] .= follow_widget();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unset($_SESSION['theme']);
|
unset($_SESSION['theme']);
|
||||||
|
|
|
@ -13,9 +13,9 @@ function dirfind_init(&$a) {
|
||||||
if(! x($a->page,'aside'))
|
if(! x($a->page,'aside'))
|
||||||
$a->page['aside'] = '';
|
$a->page['aside'] = '';
|
||||||
|
|
||||||
$a->page['aside'] .= follow_widget();
|
|
||||||
|
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
|
|
||||||
|
$a->page['aside'] .= follow_widget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,8 @@ function match_content(&$a) {
|
||||||
if(! local_user())
|
if(! local_user())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$a->page['aside'] .= follow_widget();
|
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
|
$a->page['aside'] .= follow_widget();
|
||||||
|
|
||||||
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
||||||
|
|
||||||
|
|
|
@ -61,8 +61,8 @@ function suggest_content(&$a) {
|
||||||
|
|
||||||
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
|
||||||
|
|
||||||
$a->page['aside'] .= follow_widget();
|
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
|
$a->page['aside'] .= follow_widget();
|
||||||
|
|
||||||
|
|
||||||
$r = suggestion_query(local_user());
|
$r = suggestion_query(local_user());
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
{{$vcard_widget}}
|
{{$vcard_widget}}
|
||||||
|
{{$findpeople_widget}}
|
||||||
{{$follow_widget}}
|
{{$follow_widget}}
|
||||||
{{$groups_widget}}
|
{{$groups_widget}}
|
||||||
{{$findpeople_widget}}
|
|
||||||
{{$networks_widget}}
|
{{$networks_widget}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue