menu.tpl 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <nav id="menubar" class="navbar navbar-default">
  2. <div class="container">
  3. <!-- Brand and toggle get grouped for better mobile display -->
  4. <div class="navbar-header">
  5. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#menuone"
  6. aria-expanded="false">
  7. <span class="sr-only">Toggle navigation</span>
  8. <span class="icon-bar"></span>
  9. <span class="icon-bar"></span>
  10. <span class="icon-bar"></span>
  11. </button>
  12. <a class="navbar-brand" href="{{ _p.web }}">{{ _s.site_name }}</a>
  13. </div>
  14. <div class="collapse navbar-collapse" id="menuone">
  15. <ul class="nav navbar-nav">
  16. {% for item in menu %}
  17. <li class="{{ item.key }} {{ item.current }}">
  18. <a href="{{ item.url }}" {{ item.target ? 'target="' ~ item.target ~ '"' : '' }} title="{{ item.title }}">
  19. {{ item.title }}
  20. </a>
  21. </li>
  22. {% endfor %}
  23. </ul>
  24. {% if _u.logged == 1 %}
  25. <script>
  26. $(document).ready(function () {
  27. $.get('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_count_message', function(data){
  28. var message = data;
  29. if( message === "0"){
  30. $("#count_message_li").addClass('hidden');
  31. } else {
  32. $("#count_message_li").removeClass('hidden');
  33. $("#count_message").append(message);
  34. }
  35. });
  36. });
  37. </script>
  38. <ul class="nav navbar-nav navbar-right">
  39. <li id="count_message_li" class="hidden">
  40. <a href="{{ message_url }}">
  41. <span id="count_message" class="badge badge-warning"></span>
  42. </a>
  43. </li>
  44. {% if _u.status != 6 %}
  45. <li class="dropdown avatar-user">
  46. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
  47. aria-expanded="false">
  48. <img class="img-circle" src="{{ _u.avatar_small }}" alt="{{ _u.complete_name }}"/>
  49. <span class="username-movil">{{ _u.complete_name }}</span>
  50. <span class="caret"></span>
  51. </a>
  52. <ul class="dropdown-menu" role="menu">
  53. <li class="user-header">
  54. <div class="text-center">
  55. <img class="img-circle" src="{{ _u.avatar_medium }}"
  56. alt="{{ _u.complete_name }}"/>
  57. <p class="name"><a href="{{ profile_url }}">{{ _u.complete_name }}</a></p>
  58. <p><i class="fa fa-envelope-o" aria-hidden="true"></i> {{ _u.email }}</p>
  59. </div>
  60. </li>
  61. <li role="separator" class="divider"></li>
  62. <li class="user-body">
  63. <a title="{{ "Inbox"|get_lang }}" href="{{ message_url }}">
  64. <em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|get_lang }}
  65. </a>
  66. </li>
  67. {% if certificate_url %}
  68. <li class="user-body">
  69. <a title="{{ "MyCertificates"|get_lang }}" href="{{ certificate_url }}">
  70. <em class="fa fa-graduation-cap"
  71. aria-hidden="true"></em> {{ "MyCertificates"|get_lang }}
  72. </a>
  73. </li>
  74. {% endif %}
  75. <li class="user-body">
  76. <a id="logout_button" title="{{ "Logout"|get_lang }}" href="{{ logout_link }}">
  77. <em class="fa fa-sign-out"></em> {{ "Logout"|get_lang }}
  78. </a>
  79. </li>
  80. </ul>
  81. </li>
  82. {% endif %}
  83. </ul>
  84. {% endif %}
  85. </div>
  86. </div>
  87. </nav>