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.

267 lines
10 KiB

3 years ago
3 years ago
4 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. <div style="margin-bottom:22px;" >
  15. <a href="https://git.artcode.re/cagetters/cagettepei" target="_blank">
  16. <img src="/img/logo3.png" alt="::NAME::" />
  17. </a>
  18. </div>
  19. ::end::
  20. </div>
  21. <div class="col-md-4 accountBlock">
  22. ::if user != null::
  23. <div class="dropdown pull-right text-right userName" style="margin-top:16px;">
  24. <a class="" style="margin-right:16px;" href="/user/choose?show=1">
  25. <span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
  26. </a>
  27. <a class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
  28. <span class="glyphicon glyphicon-user"></span>
  29. ::user.getName()::
  30. ::if user.firstName2!=null::
  31. ::_("et"):: ::user.lastName2:: ::user.firstName2::
  32. ::end::
  33. </a>
  34. <ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
  35. <li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
  36. </ul>
  37. </div>
  38. ::else::
  39. <div class="pull-right text-right">
  40. <a href="/user/login" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
  41. <a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
  42. </div>
  43. ::end::
  44. </div>
  45. </div>
  46. ::if user != null && noGroup!=true::
  47. <nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
  48. <div class="navbar-header">
  49. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
  50. <span class="sr-only">Toggle navigation</span>
  51. <span class="icon-bar"></span>
  52. <span class="icon-bar"></span>
  53. <span class="icon-bar"></span>
  54. </button>
  55. </div>
  56. <div class="collapse navbar-collapse" id="cagette-navbar">
  57. <ul class="nav navbar-nav navbar-left">
  58. <li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
  59. <li ::attr class if(category=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
  60. <li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
  61. </ul>
  62. <ul class="nav navbar-nav navbar-right">
  63. <li id="member" ::attr class if(category=="members") 'active' ::>
  64. <a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
  65. <li id="contractadmin" ::attr class if(category=="contractadmin") 'active' ::>
  66. <a href="/contractAdmin" ::cond user.isContractManager(null)::>::_("Contracts")::</a></li>
  67. <li id="messages" ::attr class if(category=="messages") 'active' ::>
  68. <a href="/messages" ::cond user.canAccessMessages()::>::_("Messaging")::</a></li>
  69. <li id="amapadmin" ::attr class if(category=="amapadmin") 'active' ::>
  70. <a href="/amapadmin" ::cond user.isAmapManager()::>::_("Group")::</a></li>
  71. <li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
  72. <a href="/admin" >::_("Admin")::</a></li>
  73. </ul>
  74. </div>
  75. </nav>
  76. ::end::
  77. <!-- Notifications -->
  78. <div class="row">
  79. <div id="content" class="col-md-12">
  80. ::foreach notification getMessages()::
  81. <div class="alert ::if notification.error:: alert-danger ::else:: alert-success ::end::" ::cond notification::>
  82. ::if notification.error::
  83. <span class="glyphicon glyphicon-exclamation-sign"></span>
  84. ::else::
  85. <span class="glyphicon glyphicon-ok"></span>
  86. ::end::
  87. ::raw notification.text::
  88. </div>
  89. ::end::
  90. </div>
  91. </div>
  92. <!-- extra notification block for plugins -->
  93. ::if extraNotifBlock!=null::
  94. ::raw extraNotifBlock::
  95. ::end::
  96. <div class="row">
  97. ::raw __content__::
  98. </div>
  99. <!--<div class="row">
  100. <div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
  101. <span class="glyphicon glyphicon-cog"></span>
  102. Attention : CagettePéi sera indisponible le <b>mardi 7 août de 9:00 à 11:00</b>.
  103. <br/>
  104. Nous déménageons sur un nouveau serveur pour plus de rapidité et de fiabilité.
  105. </div>
  106. </div>-->
  107. <div class="row" id="footer">
  108. <div class="col-md-9" >
  109. <a href="https://git.artcode.re/cagetters/cagette" target="_blank">
  110. <img src="/img/logo.png" alt="::_("Cagette.net")::"/>
  111. </a>
  112. </div>
  113. <div class="col-md-3" >
  114. ::_("HELP")::
  115. <ul>
  116. <li>
  117. <a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
  118. </li>
  119. <li>
  120. <a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
  121. </li>
  122. <li>
  123. <a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
  124. </li>
  125. </ul>
  126. <!--<p style="position: absolute;display: block;top: 96px;width: 700px;">
  127. <b>::raw _("Vous êtes producteur ?")::</b>
  128. ::raw _("Découvrez nos formations gratuites pour utiliser <b>Cagette Pro</b> ")::
  129. &nbsp;&nbsp;<a href="http://alilo.fr/formations-producteurs" target="_blank" class="btn btn-xs btn-info">C'est parti !</a>
  130. </p>-->
  131. </div>
  132. <!--
  133. <div class="col-md-3" >
  134. ::_("FOLLOW US")::
  135. <ul class="cagsocialmedia">
  136. <li class="cagfb">
  137. <a title="Facebook" href="https://www.facebook.com/cagette" target="_blank"> <i class="fa fa-facebook"></i></a>
  138. </li>
  139. <li class="cagtwitter">
  140. <a title="Twitter" href="https://twitter.com/Cagettenet" target="_blank"> <i class="fa fa-twitter"></i></a>
  141. </li>
  142. <li class="cagyoutube">
  143. <a title="Youtube" href="https://www.youtube.com/channel/UC3cvGxAUrbN9oSZmr1oZEaw" target="_blank"> <i class="fa fa-youtube"></i></a>
  144. </li>
  145. <li style="background-color:#333;">
  146. <a title="Github" href="https://github.com/bablukid/cagette" target="_blank"> <i class="fa fa-github"></i></a>
  147. </li>
  148. </ul>
  149. </div>
  150. -->
  151. <!--
  152. <div class="col-md-3">
  153. ::_("CONTACT US")::
  154. <ul>
  155. <li>
  156. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
  157. <input type="hidden" name="cmd" value="_s-xclick"/>
  158. <input type="hidden" name="hosted_button_id" value="S9KT7FQS7P622"/>
  159. <input type="image" src="https://www.paypalobjects.com/fr_FR/FR/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal, le réflexe sécurité pour payer en ligne"/>
  160. <img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1"/>
  161. </form>
  162. </li>
  163. </ul>
  164. </div>
  165. -->
  166. </div>
  167. <div class="row" id="subfooter">
  168. <!--
  169. ::raw _("Cagette.net is made by <a href='https://www.alilo.fr' target='_blank'><img src='/img/alilo-trans-black.png' /></a>")::<br/>
  170. -->
  171. <span>version cagettepei-<a href="https://git.artcode.re/cagetters/cagettepei/src/tag/::VERSION::">::VERSION::</a></span>
  172. </div>
  173. <div class="row">
  174. <div class="col-md-12">
  175. <!-- SQL LOG -->
  176. <table class="sqlLog table table-bordered" ::cond sqlLog::>
  177. ::foreach r sqlLog::
  178. <tr ::attr class if(r.bad) 'badSql'::>
  179. <td>::r.t::ms</td>
  180. <td>::r.length::</td>
  181. <td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
  182. <td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
  183. <td>::r.sql::</td>
  184. </tr>
  185. ::end::
  186. </table>
  187. </div>
  188. </div>
  189. ::if (false && user!=null && user.isAmapManager())::
  190. <script>
  191. // Include the UserVoice JavaScript SDK (only needed once on a page)
  192. UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/sayZ1eIZLfSZUa3IwslHCw.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})();
  193. //
  194. // UserVoice Javascript SDK developer documentation:
  195. // https://www.uservoice.com/o/javascript-sdk
  196. //
  197. // Set colors
  198. UserVoice.push(['set', {
  199. accent_color: '#6aba2e',
  200. trigger_color: 'white',
  201. trigger_background_color: '#e2753a'
  202. }]);
  203. // Identify the user and pass traits
  204. // To enable, replace sample data with actual user traits and uncomment the line
  205. UserVoice.push(['identify', {
  206. //email: 'john.doe@example.com', // User’s email address
  207. //name: 'John Doe', // User’s real name
  208. //created_at: 1364406966, // Unix timestamp for the date the user signed up
  209. //id: 123, // Optional: Unique id of the user (if set, this should not change)
  210. //type: 'Owner', // Optional: segment your users by type
  211. //account: {
  212. // id: 123, // Optional: associate multiple users with a single account
  213. // name: 'Acme, Co.', // Account name
  214. // created_at: 1364406966, // Unix timestamp for the date the account was created
  215. // monthly_rate: 9.99, // Decimal; monthly rate of the account
  216. // ltv: 1495.00, // Decimal; lifetime value of the account
  217. // plan: 'Enhanced' // Plan name for the account
  218. //}
  219. }]);
  220. // Add default trigger to the bottom-right corner of the window:
  221. UserVoice.push(['addTrigger', { mode: 'smartvote', trigger_position: 'bottom-right' }]);
  222. // Or, use your own custom trigger:
  223. //UserVoice.push(['addTrigger', '#id', { mode: 'smartvote' }]);
  224. // Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
  225. UserVoice.push(['autoprompt', {}]);
  226. </script>
  227. ::end::
  228. ::end::