| 1 |
www |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
$currentUser = $this->currentUserHelper();
|
|
|
4 |
if( $currentUser->hasIdentity() ) {
|
|
|
5 |
|
|
|
6 |
$session_user_id = $currentUser->getUserId();
|
|
|
7 |
$session_usertype_id = $currentUser->getUserTypeId();
|
|
|
8 |
$user = $currentUser->getUser();
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
$acl = $this->viewModel()->getCurrent()->getVariable('acl');
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
$container = $this->navigation('menuNavigation')->getContainer();
|
|
|
15 |
|
|
|
16 |
$image = $this->url('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]);
|
|
|
17 |
|
|
|
18 |
$isChatPage = $this->viewModel()->getCurrent()->getVariable('is_chat');
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
$js = <<<JS
|
|
|
22 |
const navbarVars={
|
|
|
23 |
image: '$image',
|
|
|
24 |
isChatPage: '$isChatPage' === '1',
|
|
|
25 |
link_admin : '$link_admin',
|
|
|
26 |
}
|
|
|
27 |
//TODO is_chat
|
|
|
28 |
JS;
|
|
|
29 |
$this->inlineScript()->appendScript($js);
|
|
|
30 |
$this->inlineScript()->appendFile('/react-bundles/navbar/navbarBundle.js');
|
|
|
31 |
|
|
|
32 |
echo <<<EOT
|
|
|
33 |
<link rel="stylesheet" href="/react-bundles/navbar/main.css">
|
|
|
34 |
<div id="react_navbar"></div>
|
|
|
35 |
EOT;
|
|
|
36 |
} else {
|
|
|
37 |
|
|
|
38 |
}
|