Initial commit: apps.supersamsev.ru
This commit is contained in:
commit
54475e7d3d
17284 files changed
+98268
No files matched your search
@@ -0,0 +1,149 @@
|
||||
<?php if (!empty($isAuthorized)) { ?>
|
||||
<nav class="navbar sticky-top navbar-expand-lg navbar-light bg-light" data-ng-controller="NavController" >
|
||||
<div class="container">
|
||||
<ul class="navbar-nav">
|
||||
<li class="dropdown navbar-current-app">
|
||||
<?php
|
||||
foreach($jsConfig['appsList'] as $app) {
|
||||
if (!empty($currentApp) && ($currentApp == $app['id']) && !empty($authUserAvailableApps) && in_array($app['id'], $authUserAvailableApps)) {
|
||||
echo '<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">'.$app['label'].'</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="dropdown-menu">
|
||||
<?php
|
||||
foreach($jsConfig['appsList'] as $app) {
|
||||
if (!empty($authUserAvailableApps) && in_array($app['id'], $authUserAvailableApps)) {
|
||||
echo '<a href="' . $app['adminUrl'] . '" class="dropdown-item">' . $app['label'] . '</a>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="navbar-toggler pull-right" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse justify-content-between" id="navbarNavDropdown">
|
||||
<ul class="navbar-nav">
|
||||
|
||||
|
||||
<?php if (!empty($currentApp)) {
|
||||
if ($currentApp == "cut") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "CutOrders" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Заказы", ['controller' => 'CutOrders', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<li class="<?php echo($this->request->getParam('controller') == "CutSettings" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Настройки", ['controller' => 'CutSettings', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<li class="<?php echo($this->request->getParam('controller') == "CutStatistics" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Статистика", ['controller' => 'CutStatistics', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($currentApp == "calcDoors") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "CalcDoorsOrders" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Заказы", ['controller' => 'CalcDoorsOrders', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<li class="<?php echo($this->request->getParam('controller') == "CalcDoorsSettings" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Настройки", ['controller' => 'CalcDoorsSettings', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<li class="<?php echo($this->request->getParam('controller') == "CalcDoorsStatistics" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Статистика", ['controller' => 'CalcDoorsStatistics', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php }
|
||||
|
||||
if ($currentApp == "fasad") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "FasadOrders" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Заказы", ['controller' => 'FasadOrders', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<li class="<?php echo($this->request->getParam('controller') == "FasadSettings" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Настройки", ['controller' => 'FasadSettings', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<li class="<?php echo($this->request->getParam('controller') == "FasadStatistics" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Статистика", ['controller' => 'FasadStatistics', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($currentApp == "smsSubscribes") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "SmsSubscribes" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Список рассылок", ['controller' => 'SmsSubscribes', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php }
|
||||
|
||||
if ($currentApp == "smsOrdersReady") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "SmsOrdersReady" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Поиск", ['controller' => 'SmsOrdersReady', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php }
|
||||
|
||||
if ($currentApp == "emailSubscribes") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "EmailSubscribes" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Список рассылок", ['controller' => 'EmailSubscribes', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php }
|
||||
|
||||
if ($currentApp == "deliveryJournal") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "DeliveryJournal" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Журнал", ['controller' => 'DeliveryJournal', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
<?php }
|
||||
|
||||
if ($currentApp == "ordersInfo") { ?>
|
||||
<li class="<?php echo($this->request->getParam('controller') == "OrdersInfo" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Счета", ['controller' => 'OrdersInfo', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>
|
||||
|
||||
<!--<li class="<?php echo($this->request->getParam('controller') == "OrdersInfoSettings" ? "active" : "") ?>">
|
||||
<?php echo $this->Html->link("Настройки", ['controller' => 'OrdersInfoSettings', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "nav-link"), null); ?>
|
||||
</li>-->
|
||||
<?php }
|
||||
}?>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="navbar-nav">
|
||||
<li class="dropdown">
|
||||
<?php echo $this->Html->link('<i class="fa fa-user"></i> ' . $authUserName, '#', array("escape" => false, "class" => "nav-link dropdown-toggle", "data-toggle" => "dropdown"), null); ?>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<?php
|
||||
if (in_array("cut", $authUserAvailableApps) && ($currentApp == "cut")) {
|
||||
echo '<span class="dropdown-item select-file-button cursor-pointer" ngf-select data-ng-model="nav.convertAstraToBazisFile" name="convertAstraToBazisFile" ngf-accept="\'.xml\'" ngf-max-size="20MB" data-ng-change="nav.convertAstraToBazis()">Астра<i class="fa fa-arrow-right"></i>Базис конвертер</span>';
|
||||
}
|
||||
|
||||
if (in_array("cut", $authUserAvailableApps) || in_array("calcDoors", $authUserAvailableApps)) {
|
||||
echo $this->Html->link("Настройки", ['controller' => 'Settings', 'action' => 'index', 'prefix' => 'manager'], array("escape" => false, "class" => "dropdown-item"), null);
|
||||
}
|
||||
|
||||
if ($authUserRole == "admin") {
|
||||
echo $this->Html->link("Пользователи", ['controller' => 'Users', 'action' => 'users_list' , 'prefix' => 'manager'], array("escape" => false, "class" => "dropdown-item"), null);
|
||||
}
|
||||
|
||||
if ($authUserRole != "kassir") {
|
||||
echo '<div class="dropdown-divider"></div>';
|
||||
}
|
||||
|
||||
echo $this->Html->link("Выход", ['controller' => 'Users', 'action' => 'logout' , 'prefix' => 'manager' ], array("escape" => false, "class" => "dropdown-item", 'confirm' => "Вы уверены?"));
|
||||
?>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="current-time nav-link"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<?php } ?>
|
||||
Reference in new issue
Block a user