diff options
author | fabrixxm <fabrix.xm@gmail.com> | 2011-07-05 07:11:57 +0200 |
---|---|---|
committer | fabrixxm <fabrix.xm@gmail.com> | 2011-07-05 07:11:57 +0200 |
commit | 4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8 (patch) | |
tree | 84184bd3aa80c896b8dceaf5a017297c7267f2cb /include/group.php | |
parent | cfd59f6ac8848c19a0c451c378d2b770cafcbef0 (diff) | |
parent | 2359783b9f6c0ec754c641453026712cf22e7cb6 (diff) | |
download | volse-hubzilla-4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8.tar.gz volse-hubzilla-4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8.tar.bz2 volse-hubzilla-4e7a5dc56ebb8d99ed06b0b303c4ee24460ae6a8.zip |
Merge branch 'dispy' of github.com:fabrixxm/friendika into dispy
Diffstat (limited to 'include/group.php')
-rw-r--r-- | include/group.php | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/include/group.php b/include/group.php index 804d0c58f..e16c900d9 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,19 +145,15 @@ function group_side($every="contacts",$each="group",$edit = false) { $createtext = t('Create a new group'); $linktext= t('Everybody'); - + $selected = (($group_id == 0) ? ' class="group-selected" ' : ''); $o .= <<< EOT <div id="group-sidebar"> <h3>Groups</h3> -<div id="sidebar-new-group"> -<a href="group/new">$createtext</a> -</div> - <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; @@ -165,10 +161,21 @@ EOT; intval($_SESSION['uid']) ); 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"; + foreach($r as $rr) { + $selected = (($group_id == $rr['id']) ? ' 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>"; + $o .= " </ul>\r\n </div>"; + + $o .= <<< EOT + + <div id="sidebar-new-group"> + <a href="group/new">$createtext</a> + </div> +</div> + +EOT; return $o; } |