top.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. $listMenu = [];
  3. // $listMenu[] = [ 'label' => "Faktury", 'url' => "index.php?_route=ViewTableAjax&namespace=default_db/api_produkty_103075_view", 'ns' => "default_db/api_produkty_103075_view" ];
  4. $activeViewTableNS = ('ViewTableAjax' === V::get('_route', '', $_GET)) ? V::get('namespace', '', $_GET) : '';
  5. ?>
  6. <nav class="navbar navbar-inverse" style="border-radius:0">
  7. <div class="container-fluid">
  8. <div class="navbar-header">
  9. <a href="index.php" class="navbar-brand" style="padding:2px">
  10. <img src="<?= $this->asset("assets/logo-biall-net.png"); ?>" alt="BIALL-NET" style="height:46px"/>
  11. </a>
  12. </div>
  13. <div class="collapse navbar-collapse">
  14. <?= UI::h('ul', [ 'class' => "nav navbar-nav" ], array_map(function ($itemMenu) use ($activeViewTableNS) {
  15. $ns = $itemMenu['ns'];
  16. return UI::h('li', array_merge(
  17. [],
  18. (!empty($activeViewTableNS) && $ns === $activeViewTableNS) ? [ 'class' => "active" ] : []
  19. ), [
  20. UI::h('a', [ 'href' => $itemMenu['url'] ], $itemMenu['label']),
  21. ]);
  22. }, $listMenu)); ?>
  23. <div class="navbar-form navbar-right">
  24. <div class="btn-group">
  25. <button type="button" class="btn btn-link" style="margin:0; padding:6px 8px 4px 8px;"><?php S::show_session_timer(); ?></button>
  26. <!-- <a href="index.php?_route=UserMsgs" class="btn btn-link" style="margin:0; padding:6px 8px 0 8px; font-size:20px; line-height:24px;"><i class="glyphicon glyphicon-envelope"></i></a> -->
  27. <div class="btn-group">
  28. <button id="ProcesMenuLoginDropdownLink" type="button" class="btn btn-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><?= User::getName(); ?> <span class="caret"></span></button>
  29. <ul class="dropdown-menu" role="menu">
  30. <li><a href="index.php?_route=UrlAction_ChangePassword"><i class="glyphicon glyphicon-lock"></i> Zmień hasło</a></li>
  31. <li class="divider"></li>
  32. <!-- <li><a href="index.php?_route=UserMsgs" title="Wiadomości systemowe"><i class="glyphicon glyphicon-envelope"></i> Wiadomości</a></li> -->
  33. <!-- <li><a href="index.php?_route=Notify" title="Powiadomienia"><i class="glyphicon glyphicon-bell"></i> Powiadomienia</a></li> -->
  34. <!-- <li><a href="index.php?_route=Users&amp;_task=reloadPerms" title="Przeładuj uprawnienia"><i class="glyphicon glyphicon-refresh"></i> Przeładuj uprawnienia</a></li> -->
  35. <!-- <li class="divider"></li> -->
  36. <li><a href="index.php?LOGIN=LOGOUT"><i class="glyphicon glyphicon-off"></i> Wyloguj</a></li>
  37. </ul>
  38. </div>
  39. <div class="btn-group">
  40. <a class="btn btn-link" href="index.php?LOGIN=LOGOUT"><i class="glyphicon glyphicon-off"></i> Wyloguj</a>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. </nav>