]> git.mxchange.org Git - friendica.git/commitdiff
template rework: rearrange sidebar widgets for contact related pages
authorrabuzarus <>
Thu, 22 Oct 2015 22:12:00 +0000 (00:12 +0200)
committerrabuzarus <>
Thu, 22 Oct 2015 22:12:00 +0000 (00:12 +0200)
mod/contacts.php
mod/directory.php
mod/dirfind.php
mod/match.php
mod/suggest.php
view/templates/contacts-widget-sidebar.tpl

index bdb25b022b90eb2bec1ee7646cc759089a40b423..3ace8709049f1f393eb67a464f27aa610c7ad38d 100644 (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'] = '';
 
@@ -35,29 +38,28 @@ function contacts_init(&$a) {
                        $vcard_widget = replace_macros(get_markup_template("vcard-widget.tpl"),array(
                                '$name' => htmlentities($a->data['contact']['name']),
                                '$photo' => $a->data['contact']['photo'],
-                               '$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 = '';
+                       $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
        ));
 
index 8ed4c2200776ab49d43895dffd6e76a107e8b2ef..ef80b082a42bb989dc73365cc10a48478a1926ec 100644 (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']);
index 77e86c5db3056f469c7c2b34af88bfbf0f9fd55b..bbd3badebf077b9b1c797b3d4c0691419d03c865 100644 (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();
 }
 
 
index f6174da66cd919d9c6e02effda70bf438e973e2e..5da1e036c358a8eda3a43692f69cd615fa0bb679 100644 (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;
 
index 5241e485ee66af0e40d936a890ff492e9a49eff7..8870c65df8708152eab3681879ad441c8bec2245 100644 (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());
index 5c52f4329a3048f33deaf7c9a94a8e3cd978cd36..5b0610fcbd98f0b1a21d9c5a87fce3e13fe84b7a 100644 (file)
@@ -1,7 +1,7 @@
 
 {{$vcard_widget}}
+{{$findpeople_widget}}
 {{$follow_widget}}
 {{$groups_widget}}
-{{$findpeople_widget}}
 {{$networks_widget}}