menu.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <?php
  2. $cuenta = $this->webApp()->getCuenta();
  3. ?>
  4. <!-- Navigation -->
  5. <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
  6. <div class="navbar-header">
  7. <a class="navbar-brand" href="<?php echo $this->webApp()->getSite();?>">
  8. <?php echo $this->webApp()->getConfig('TITULO');?>
  9. </a>
  10. </div>
  11. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  12. <span class="sr-only">Toggle navigation</span>
  13. <span class="icon-bar"></span>
  14. <span class="icon-bar"></span>
  15. <span class="icon-bar"></span>
  16. </button>
  17. <!-- Top Navigation: Right Menu -->
  18. <ul class="nav navbar-right navbar-top-links">
  19. <li class="dropdown">
  20. <a class="dropdown-toggle" data-toggle="dropdown" href="#">
  21. <i class="fa fa-line-chart fa-fw"></i> <?php echo !$cuenta ? 'Seleccionar cuenta...' : $cuenta->cuenta;?> <b class="caret"></b>
  22. </a>
  23. <ul class="dropdown-menu dropdown-cuenta">
  24. <?php $usu = new app\models\Usuario(); foreach ($usu->getCuentas() as $c) { ?>
  25. <li><a href="cuenta/select?id=<?php echo $c->id;?>"><?php echo $c->cuenta;?></a></li>
  26. <?php } ?>
  27. </ul>
  28. </li>
  29. <li class="dropdown">
  30. <a class="dropdown-toggle" data-toggle="dropdown" href="#">
  31. <i class="fa fa-user fa-fw"></i> <?php echo $this->webApp()->getUsuarioNombre();?> <b class="caret"></b>
  32. </a>
  33. <ul class="dropdown-menu dropdown-user">
  34. <li><a href="usuario/miperfil"><i class="fa fa-user fa-fw"></i> Mi perfil</a></li>
  35. <li class="divider"></li>
  36. <li><a href="site/logout"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a></li>
  37. </ul>
  38. </li>
  39. </ul>
  40. <!-- Sidebar -->
  41. <div class="navbar-default sidebar" role="navigation">
  42. <div class="sidebar-nav navbar-collapse collapse">
  43. <ul class="nav" id="side-menu">
  44. <?php $this->renderBusinessInclude('menu');?>
  45. <?php if ($this->webApp()->getRole() == oxusmedia\webApp\webApp::ROLE_ADMIN) { ?>
  46. <li>
  47. <a href="usuario"><i class="fa fa-users fa-fw"></i> <span>Usuarios</span></a>
  48. </li>
  49. <?php } ?>
  50. <li>
  51. <a href="#" id="contract"></a>
  52. </li>
  53. </ul>
  54. <div class="theme-selector">
  55. <div class="btn-group">
  56. <a href="usuario/theme?id=<?php echo oxusmedia\webApp\webApp::THEME_LIGHT;?>" id="theme-light" class="btn btn-xs light<?php echo $this->webApp()->getTheme() == oxusmedia\webApp\webApp::THEME_LIGHT ? ' active' : '';?>" title="Cambiar a tema Claro"><i class="fa fa-sun-o"></i></a>
  57. <a href="usuario/theme?id=<?php echo oxusmedia\webApp\webApp::THEME_DARKLY;?>" id="theme-dark" class="btn btn-xs dark<?php echo $this->webApp()->getTheme() == oxusmedia\webApp\webApp::THEME_DARKLY ? ' active' : '';?>" title="Cambiar a tema Oscuro"><i class="fa fa-moon-o"></i></a>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </nav>