add group highlight to other pages
This commit is contained in:
parent
b1aa77584f
commit
f53a2d6da9
|
@ -145,7 +145,7 @@ function group_side($every="contacts",$each="group",$edit = false, $group_id = 0
|
||||||
|
|
||||||
$createtext = t('Create a new group');
|
$createtext = t('Create a new group');
|
||||||
$linktext= t('Everybody');
|
$linktext= t('Everybody');
|
||||||
$selected = (($group_id == 0 && $every !== 'contacts') ? ' class="group-selected" ' : '');
|
$selected = (($group_id == 0) ? ' class="group-selected" ' : '');
|
||||||
$o .= <<< EOT
|
$o .= <<< EOT
|
||||||
|
|
||||||
<div id="group-sidebar">
|
<div id="group-sidebar">
|
||||||
|
@ -166,7 +166,7 @@ EOT;
|
||||||
);
|
);
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
$selected = (($group_id == $rr['id'] && $every !== 'contacts') ? ' class="group-selected" ' : '');
|
$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 .= ' <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>\r\n</div>";
|
||||||
|
|
|
@ -7,7 +7,7 @@ function validate_members(&$item) {
|
||||||
function group_init(&$a) {
|
function group_init(&$a) {
|
||||||
if(local_user()) {
|
if(local_user()) {
|
||||||
require_once('include/group.php');
|
require_once('include/group.php');
|
||||||
$a->page['aside'] = group_side();
|
$a->page['aside'] = group_side('contacts','group',false,(($a->argc > 1) ? intval($a->argv[1]) : 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue