aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/group.php9
-rw-r--r--mod/network.php5
-rw-r--r--view/theme/duepuntozero/style.css6
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
<div id="group-sidebar">
@@ -157,7 +157,7 @@ $o .= <<< EOT
<div id="sidebar-group-list">
<ul id="sidebar-group-ul">
- <li class="sidebar-group-li" ><a href="$every" >$linktext</a></li>
+ <li class="sidebar-group-li" ><a href="$every" $selected >$linktext</a></li>
EOT;
@@ -166,7 +166,8 @@ EOT;
);
if(count($r)) {
foreach($r as $rr)
- $o .= ' <li class="sidebar-group-li">' . (($edit) ? "<a href=\"group/{$rr['id']}\" title=\"" . t('Edit') . "\" ><img src=\"images/spencil.gif\" alt=\"" . t('Edit') . "\"></a> " : "") . "<a href=\"$each/{$rr['id']}\">{$rr['name']}</a></li>\r\n";
+ $selected = (($group_id == $rr['id'] && $every !== 'contacts') ? ' class="group-selected" ' : '');
+ $o .= ' <li class="sidebar-group-li">' . (($edit) ? "<a href=\"group/{$rr['id']}\" title=\"" . t('Edit') . "\" ><img src=\"images/spencil.gif\" alt=\"" . t('Edit') . "\"></a> " : "") . "<a href=\"$each/{$rr['id']}\" $selected >{$rr['name']}</a></li>\r\n";
}
$o .= " </ul>\r\n </div>\r\n</div>";
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'] .= '</div>';
- $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;