Rev 61 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
<?php
$currentUser = $this->currentUserHelper();
if( $currentUser->hasIdentity() ) {
$session_user_id = $currentUser->getUserId();
$session_usertype_id = $currentUser->getUserTypeId();
$user = $currentUser->getUser();
$acl = $this->viewModel()->getCurrent()->getVariable('acl');
$container = $this->navigation('menuNavigation')->getContainer();
$image = $this->url('storage', ['type' => 'user', 'code' => $user->uuid, 'filename' => $user->image]);
$isChatPage = $this->viewModel()->getCurrent()->getVariable('is_chat');
$js = <<<JS
const navbarVars={
image: '$image',
isChatPage: '$isChatPage' === '1',
link_admin : '$link_admin',
}
//TODO is_chat
JS;
$this->inlineScript()->appendScript($js);
$this->inlineScript()->appendFile('/react-bundles/navbar/navbarBundle.js');
echo <<<EOT
<link rel="stylesheet" href="/react-bundles/navbar/main.css">
<div id="react_navbar"></div>
EOT;
} else {
}