Implement stat indicator for fw header avatar

This commit is contained in:
Hadi Nategh 2019-06-04 15:36:32 +02:00
parent 1f7682d87a
commit 1895eca0df

View File

@ -634,9 +634,12 @@ abstract class Framework extends Framework\Extra
*/
protected static function _user_avatar_menu()
{
$stat = array_pop(Hooks::process('framework_avatar_stat'));
return '<span title="'.Accounts::format_username().'" class="avatar"><img src="'.Egw::link('/api/avatar.php', array(
'account_id' => $GLOBALS['egw_info']['user']['account_id'],
)).'"/></span>';
)).'"/>'.
'<span class="'.$stat['class'].'"/>'.$stat['body'].'</span>';
}
/**
@ -1182,7 +1185,7 @@ abstract class Framework extends Framework\Extra
{
$this->_add_topmenu_info_item(self::_get_notification_bell(), 'notifications');
}
$this->_add_topmenu_info_item($this->_user_avatar_menu(), 'user_avatar');
if (is_array(($current_user = $this->_current_users()))) $this->_add_topmenu_item($current_user);
$this->_add_topmenu_info_item($vars['quick_add'], 'quick_add');
$this->_add_topmenu_info_item($this->_print_menu(), 'print_title');