You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

182 lines
6.1 KiB

3 years ago
4 years ago
  1. ::use 'base.mtt'::
  2. ::if getParam('__redirect')!=null::
  3. <!-- need to login to go to this page-->
  4. <script>$(function(){
  5. _.loginBox('::raw getParam("__redirect")::');
  6. });</script>
  7. ::end::
  8. <div class="row header" style="margin-top:10px;">
  9. <div class="col-md-8">
  10. ::set groupName = getCurrentGroup()::
  11. ::if groupName!=null && noGroup!=true::
  12. <h1>::groupName::</h1>
  13. ::else::
  14. <h1>::_("Cagette.net")::</h1>
  15. ::end::
  16. </div>
  17. <div class="col-md-4 accountBlock">
  18. ::if user != null::
  19. <div class="dropdown pull-right text-right userName" style="margin-top:16px;">
  20. <a class="" style="margin-right:16px;" href="/user/choose?show=1">
  21. <span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
  22. </a>
  23. <a class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
  24. <span class="glyphicon glyphicon-user"></span>
  25. ::user.getName()::
  26. ::if user.firstName2!=null::
  27. ::_("et"):: ::user.lastName2:: ::user.firstName2::
  28. ::end::
  29. </a>
  30. <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
  31. <li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
  32. </ul>
  33. </div>
  34. ::else::
  35. <div class="pull-right text-right">
  36. <a href="/user/login" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
  37. <a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
  38. </div>
  39. ::end::
  40. </div>
  41. </div>
  42. ::if user != null && noGroup!=true::
  43. <nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
  44. <div class="navbar-header">
  45. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
  46. <span class="sr-only">Toggle navigation</span>
  47. <span class="icon-bar"></span>
  48. <span class="icon-bar"></span>
  49. <span class="icon-bar"></span>
  50. </button>
  51. </div>
  52. <div class="collapse navbar-collapse" id="cagette-navbar">
  53. <ul class="nav navbar-nav navbar-left">
  54. <li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
  55. <li ::attr class if(category=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
  56. <li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
  57. </ul>
  58. <ul class="nav navbar-nav navbar-right">
  59. <li id="member" ::attr class if(category=="members") 'active' ::>
  60. <a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
  61. <li id="contractadmin" ::attr class if(category=="contractadmin") 'active' ::>
  62. <a href="/contractAdmin" ::cond user.isContractManager(null)::>::_("Contracts")::</a></li>
  63. <li id="messages" ::attr class if(category=="messages") 'active' ::>
  64. <a href="/messages" ::cond user.canAccessMessages()::>::_("Messaging")::</a></li>
  65. <li id="amapadmin" ::attr class if(category=="amapadmin") 'active' ::>
  66. <a href="/amapadmin" ::cond user.isAmapManager()::>::_("Group")::</a></li>
  67. <li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
  68. <a href="/admin" >::_("Admin")::</a></li>
  69. </ul>
  70. </div>
  71. </nav>
  72. ::end::
  73. <!-- Notifications -->
  74. <div class="row">
  75. <div id="content" class="col-md-12">
  76. ::foreach notification getMessages()::
  77. <div class="alert ::if notification.error:: alert-danger ::else:: alert-success ::end::" ::cond notification::>
  78. ::if notification.error::
  79. <span class="glyphicon glyphicon-exclamation-sign"></span>
  80. ::else::
  81. <span class="glyphicon glyphicon-ok"></span>
  82. ::end::
  83. ::raw notification.text::
  84. </div>
  85. ::end::
  86. </div>
  87. </div>
  88. <!-- extra notification block for plugins -->
  89. ::if extraNotifBlock!=null::
  90. ::raw extraNotifBlock::
  91. ::end::
  92. <div class="row">
  93. ::raw __content__::
  94. </div>
  95. <!--<div class="row">
  96. <div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
  97. <span class="glyphicon glyphicon-cog"></span>
  98. Attention : CagettePéi sera indisponible le <b>mardi 7 août de 9:00 à 11:00</b>.
  99. <br/>
  100. Nous déménageons sur un nouveau serveur pour plus de rapidité et de fiabilité.
  101. </div>
  102. </div>-->
  103. <div class="row" id="footer">
  104. <div class="col-md-2" >
  105. <img width="120" style="border: white 5px solid;" src="/img/logo-mini.jpg" alt="::_("Cagette.net")::" title="Logo ::_("Cagette.net")::"/>
  106. </div>
  107. <div class="col-md-7" style="padding-top:1em">
  108. Cagette Péi est un logiciel libre qui favorise les circuits courts.<br/>
  109. Il a été adapté pour les besoins des AMAPs sur le marché réunionnais.<br/>
  110. </div>
  111. <div class="col-md-3" >
  112. ::_("HELP")::
  113. <ul>
  114. <li>
  115. <a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
  116. </li>
  117. <li>
  118. <a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
  119. </li>
  120. <li>
  121. <a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
  122. </li>
  123. </ul>
  124. </div>
  125. </div>
  126. <div class="row" id="subfooter">
  127. <p>
  128. version cagettepei-<a target="_blank" href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a>
  129. </p>
  130. ::if BANDEAU_REGION::
  131. <img src='/img/bandeau_region.png' alt='bandeau Région Réunion' width='250'></img>
  132. ::end::
  133. </div>
  134. <div class="row">
  135. <div class="col-md-12">
  136. <!-- SQL LOG -->
  137. <table class="sqlLog table table-bordered" ::cond sqlLog::>
  138. ::foreach r sqlLog::
  139. <tr ::attr class if(r.bad) 'badSql'::>
  140. <td>::r.t::ms</td>
  141. <td>::r.length::</td>
  142. <td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
  143. <td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
  144. <td>::r.sql::</td>
  145. </tr>
  146. ::end::
  147. </table>
  148. </div>
  149. </div>
  150. ::end::