menu.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. <li>
  47. <a href="<?php echo $this->webApp()->getSite();?>usuario"><i class="fa fa-users fa-fw"></i> <span>Usuarios</span></a>
  48. </li>
  49. <li>
  50. <a href="#" id="contract"></a>
  51. </li>
  52. </ul>
  53. </div>
  54. </div>
  55. </nav>