From b1aa77584f972b8c62fd099fa7fe08c36201b631 Mon Sep 17 00:00:00 2001 From: Friendika Date: Fri, 1 Jul 2011 06:14:15 -0700 Subject: [PATCH] indicate currently selected group in group picker --- include/group.php | 9 +++++---- mod/network.php | 5 +++-- view/theme/duepuntozero/style.css | 6 ++++++ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/include/group.php b/include/group.php index 804d0c58f..fd3439b85 100644 --- a/include/group.php +++ b/include/group.php @@ -136,7 +136,7 @@ function group_public_members($gid) { -function group_side($every="contacts",$each="group",$edit = false) { +function group_side($every="contacts",$each="group",$edit = false, $group_id = 0) { $o = ''; @@ -145,7 +145,7 @@ function group_side($every="contacts",$each="group",$edit = false) { $createtext = t('Create a new group'); $linktext= t('Everybody'); - + $selected = (($group_id == 0 && $every !== 'contacts') ? ' class="group-selected" ' : ''); $o .= <<< EOT
@@ -157,7 +157,7 @@ $o .= <<< EOT \r\n
"; diff --git a/mod/network.php b/mod/network.php index 9c5202ad2..6169b5083 100644 --- a/mod/network.php +++ b/mod/network.php @@ -7,7 +7,8 @@ function network_init(&$a) { return; } - + $group_id = (($a->argc > 1 && intval($a->argv[1])) ? intval($a->argv[1]) : 0); + require_once('include/group.php'); if(! x($a->page,'aside')) $a->page['aside'] = ''; @@ -29,7 +30,7 @@ function network_init(&$a) { $a->page['aside'] .= ''; - $a->page['aside'] .= group_side('network','network',true); + $a->page['aside'] .= group_side('network','network',true,$group_id); } diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index a99d7530f..d07538b87 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -249,6 +249,12 @@ div.wall-item-content-wrapper.shiny { cursor: pointer; } +.group-selected { + padding: 3px; + border: 2px solid #CCCCCC; + font-weight: bold; +} + .fakelink:hover { color: #3465a4; text-decoration: underline;