diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/group.php | 9 |
1 files changed, 5 insertions, 4 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>"; |