aboutsummaryrefslogtreecommitdiffstats
path: root/include/group.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-01 06:14:15 -0700
committerFriendika <info@friendika.com>2011-07-01 06:14:15 -0700
commitb1aa77584f972b8c62fd099fa7fe08c36201b631 (patch)
tree0ffed6312a8f664ac14959b9a6e279d35808f1e3 /include/group.php
parent6e5532149a08b264e958202fa971d35b446fac3b (diff)
downloadvolse-hubzilla-b1aa77584f972b8c62fd099fa7fe08c36201b631.tar.gz
volse-hubzilla-b1aa77584f972b8c62fd099fa7fe08c36201b631.tar.bz2
volse-hubzilla-b1aa77584f972b8c62fd099fa7fe08c36201b631.zip
indicate currently selected group in group picker
Diffstat (limited to 'include/group.php')
-rw-r--r--include/group.php9
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>";