mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 15:33:23 +01:00
Add my account to Top Menu, only show when user is allowed to maintain his own data
This commit is contained in:
parent
cb7cc5a71d
commit
e5b789693e
@ -1244,7 +1244,7 @@ abstract class Framework extends Framework\Extra
|
||||
}
|
||||
|
||||
// array of topmenu preferences items (orders of the items matter)
|
||||
$topmenu_preferences = ['darkmode','prefs', 'acl', 'cats', 'security'];
|
||||
$topmenu_preferences = ['darkmode','prefs', 'acl','useraccount', 'cats', 'security'];
|
||||
|
||||
// set topmenu preferences items
|
||||
if($GLOBALS['egw_info']['user']['apps']['preferences'])
|
||||
@ -1307,6 +1307,10 @@ abstract class Framework extends Framework\Extra
|
||||
'title' => 'Access',
|
||||
'hook' => 'acl_rights',
|
||||
),
|
||||
'useraccount' => array(
|
||||
'title' => 'My Account',
|
||||
'hook' => 'user_account',
|
||||
),
|
||||
'cats' => array(
|
||||
'title' => 'Categories',
|
||||
'hook' => 'categories',
|
||||
@ -1363,6 +1367,18 @@ abstract class Framework extends Framework\Extra
|
||||
));
|
||||
}
|
||||
break;
|
||||
case 'useraccount':
|
||||
$config = Config::read('phpgwapi');
|
||||
if ($config['own_account_acl'] && is_array($config['own_account_acl']) && count($config['own_account_acl'])>0){
|
||||
$this->_add_topmenu_item(array(
|
||||
'id' => $type,
|
||||
'name' => 'useraccount',
|
||||
'title' => lang($types[$type]['title']),
|
||||
'url' => "javascript:egw.open_link('".
|
||||
self::link('/index.php?menuaction=addressbook.addressbook_ui.edit&account_id='.$GLOBALS['egw_info']['user']['account_id'])."','_blank','850x580')",
|
||||
));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
$this->_add_topmenu_item(array(
|
||||
'id' => $type,
|
||||
@ -1371,6 +1387,7 @@ abstract class Framework extends Framework\Extra
|
||||
'url' => "javascript:egw.show_preferences(\"$type\",".json_encode($apps).')',
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -7116,6 +7116,12 @@ table.egwGridView_grid img.et2_appicon {
|
||||
#egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items ul a#topmenu_acl {
|
||||
background-image: url(../../api/templates/default/images/topmenu_items/access.svg);
|
||||
}
|
||||
#egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items ul a#topmenu_useraccount {
|
||||
background-image: url(../../api/templates/default/images/accounts.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 18px;
|
||||
background-position-x: -2px;
|
||||
}
|
||||
#egw_fw_header #egw_fw_topmenu #egw_fw_topmenu_items ul a#topmenu_calls {
|
||||
background-image: url(../../api/templates/default/images/phone.svg);
|
||||
background-repeat: no-repeat;
|
||||
|
@ -365,6 +365,12 @@
|
||||
ul a#topmenu_acl {
|
||||
background-image: url(../../api/templates/default/images/topmenu_items/access.svg);
|
||||
}
|
||||
ul a#topmenu_useraccount {
|
||||
background-image: url(../../api/templates/default/images/accounts.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 18px;
|
||||
background-position-x: -2px;
|
||||
}
|
||||
ul a#topmenu_calls {
|
||||
background-image: url(../../api/templates/default/images/phone.svg);
|
||||
background-repeat: no-repeat;
|
||||
|
Loading…
Reference in New Issue
Block a user