N°2847 Add bottom menu part :

* Notifications icon
* User icon
* Extended user data
Still todo:
* Initialize Newsroom and feed infos to template
* Initialize User popover menu
This commit is contained in:
Stephen Abello
2020-08-03 17:07:21 +02:00
parent e2e62eca5e
commit ed1f3aa950
7 changed files with 135 additions and 16 deletions

View File

@@ -168,6 +168,14 @@ class NavigationMenu extends UIBlock
return [$this->oUserMenu->GetId() => $this->oUserMenu];
}
/**
* @return boolean
*/
public function GetIsNewsroomEnabled()
{
return MetaModel::GetConfig()->Get('newsroom_enabled');
}
/**
* Compute if the menu is expanded or collapsed
*
@@ -212,11 +220,12 @@ class NavigationMenu extends UIBlock
];
// Logon message
$sLogonMessageDictCode = (UserRights::IsAdministrator()) ? 'UI:LoggedAsMessage+Admin' : 'UI:LoggedAsMessage';
$aData['sLogonMessage'] = Dict::Format($sLogonMessageDictCode, UserRights::GetUser());
$sLogonMessageDictCode = (UserRights::IsAdministrator()) ? 'UI:LoggedAsMessage' : 'UI:LoggedAsMessage';
$aData['sLogonMessage'] = Dict::Format($sLogonMessageDictCode, UserRights::GetContactFirstname());
$this->aUserData = $aData;
return $this;
}
}