menu.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 class="divider"></li>
  35. <li><a href="usuario/miperfil"><i class="fa fa-user fa-fw"></i> Mi perfil</a></li>
  36. <li class="divider"></li>
  37. <li><a href="site/logout"><i class="fa fa-sign-out fa-fw"></i> Cerrar sesión</a></li>
  38. </ul>
  39. </li>
  40. </ul>
  41. <!-- Sidebar -->
  42. <div class="navbar-default sidebar" role="navigation">
  43. <div class="sidebar-nav navbar-collapse">
  44. <ul class="nav" id="side-menu">
  45. <?php $this->renderBusinessInclude('menu');?>
  46. <?php if ($this->webApp()->getRole() == webApp::ROLE_ADMIN) { ?>
  47. <li>
  48. <a href="<?php echo $this->webApp()->getSite();?>usuario"><i class="fa fa-users fa-fw"></i> <span>Usuarios</span></a>
  49. </li>
  50. <?php } ?>
  51. <li>
  52. <a href="#" id="contract"></a>
  53. </li>
  54. </ul>
  55. </div>
  56. </div>
  57. </nav>