template rework: rearrange sidebar widgets for contact related pages

This commit is contained in:
rabuzarus 2015-10-23 00:12:00 +02:00
parent 2aad62190f
commit 0c3979720f
6 changed files with 16 additions and 14 deletions

View file

@ -27,6 +27,9 @@ function contacts_init(&$a) {
require_once('include/group.php');
require_once('include/contact_widgets.php');
if ($_GET['nets'] == "all")
$_GET['nets'] = "";
if(! x($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']
));
$follow_widget = '';
$networks_widget = '';
}
else {
$vcard_widget = '';
$networks_widget .= networks_widget('contacts',$_GET['nets']);
if (isset($_GET['add']))
$follow_widget = follow_widget($_GET['add']);
else
$follow_widget = follow_widget();
}
if ($_GET['nets'] == "all")
$_GET['nets'] = "";
$groups_widget .= group_side('contacts','group',false,0,$contact_id);
$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(
'$vcard_widget' => $vcard_widget,
'$findpeople_widget' => $findpeople_widget,
'$follow_widget' => $follow_widget,
'$groups_widget' => $groups_widget,
'$findpeople_widget' => $findpeople_widget,
'$networks_widget' => $networks_widget
));

View file

@ -6,10 +6,10 @@ function directory_init(&$a) {
if(local_user()) {
require_once('include/contact_widgets.php');
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
}
else {
unset($_SESSION['theme']);

View file

@ -13,9 +13,9 @@ function dirfind_init(&$a) {
if(! x($a->page,'aside'))
$a->page['aside'] = '';
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
}

View file

@ -19,8 +19,8 @@ function match_content(&$a) {
if(! local_user())
return;
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;

View file

@ -61,8 +61,8 @@ function suggest_content(&$a) {
$_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
$a->page['aside'] .= follow_widget();
$a->page['aside'] .= findpeople_widget();
$a->page['aside'] .= follow_widget();
$r = suggestion_query(local_user());

View file

@ -1,7 +1,7 @@
{{$vcard_widget}}
{{$findpeople_widget}}
{{$follow_widget}}
{{$groups_widget}}
{{$findpeople_widget}}
{{$networks_widget}}