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.

265 lines
9.8 KiB

3 years ago
3 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/cagette" 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 : Cagette.net 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. ::if (user!=null && user.isAmapManager()):: <a href="https://cagette.uservoice.com" target="_blank">::_("Propose features")::</a> ::end::
  121. </li>
  122. </ul>
  123. <!--<p style="position: absolute;display: block;top: 96px;width: 700px;">
  124. <b>::raw _("Vous êtes producteur ?")::</b>
  125. ::raw _("Découvrez nos formations gratuites pour utiliser <b>Cagette Pro</b> ")::
  126. &nbsp;&nbsp;<a href="http://alilo.fr/formations-producteurs" target="_blank" class="btn btn-xs btn-info">C'est parti !</a>
  127. </p>-->
  128. </div>
  129. <!--
  130. <div class="col-md-3" >
  131. ::_("FOLLOW US")::
  132. <ul class="cagsocialmedia">
  133. <li class="cagfb">
  134. <a title="Facebook" href="https://www.facebook.com/cagette" target="_blank"> <i class="fa fa-facebook"></i></a>
  135. </li>
  136. <li class="cagtwitter">
  137. <a title="Twitter" href="https://twitter.com/Cagettenet" target="_blank"> <i class="fa fa-twitter"></i></a>
  138. </li>
  139. <li class="cagyoutube">
  140. <a title="Youtube" href="https://www.youtube.com/channel/UC3cvGxAUrbN9oSZmr1oZEaw" target="_blank"> <i class="fa fa-youtube"></i></a>
  141. </li>
  142. <li style="background-color:#333;">
  143. <a title="Github" href="https://github.com/bablukid/cagette" target="_blank"> <i class="fa fa-github"></i></a>
  144. </li>
  145. </ul>
  146. </div>
  147. -->
  148. <!--
  149. <div class="col-md-3">
  150. ::_("CONTACT US")::
  151. <ul>
  152. <li>
  153. <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
  154. <input type="hidden" name="cmd" value="_s-xclick"/>
  155. <input type="hidden" name="hosted_button_id" value="S9KT7FQS7P622"/>
  156. <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"/>
  157. <img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1"/>
  158. </form>
  159. </li>
  160. </ul>
  161. </div>
  162. -->
  163. </div>
  164. <div class="row" id="subfooter">
  165. <!--
  166. ::raw _("Cagette.net is made by <a href='https://www.alilo.fr' target='_blank'><img src='/img/alilo-trans-black.png' /></a>")::<br/>
  167. -->
  168. <span>version ::VERSION::</span>
  169. </div>
  170. <div class="row">
  171. <div class="col-md-12">
  172. <!-- SQL LOG -->
  173. <table class="sqlLog table table-bordered" ::cond sqlLog::>
  174. ::foreach r sqlLog::
  175. <tr ::attr class if(r.bad) 'badSql'::>
  176. <td>::r.t::ms</td>
  177. <td>::r.length::</td>
  178. <td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
  179. <td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
  180. <td>::r.sql::</td>
  181. </tr>
  182. ::end::
  183. </table>
  184. </div>
  185. </div>
  186. ::if (false && user!=null && user.isAmapManager())::
  187. <script>
  188. // Include the UserVoice JavaScript SDK (only needed once on a page)
  189. 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)})();
  190. //
  191. // UserVoice Javascript SDK developer documentation:
  192. // https://www.uservoice.com/o/javascript-sdk
  193. //
  194. // Set colors
  195. UserVoice.push(['set', {
  196. accent_color: '#6aba2e',
  197. trigger_color: 'white',
  198. trigger_background_color: '#e2753a'
  199. }]);
  200. // Identify the user and pass traits
  201. // To enable, replace sample data with actual user traits and uncomment the line
  202. UserVoice.push(['identify', {
  203. //email: 'john.doe@example.com', // User’s email address
  204. //name: 'John Doe', // User’s real name
  205. //created_at: 1364406966, // Unix timestamp for the date the user signed up
  206. //id: 123, // Optional: Unique id of the user (if set, this should not change)
  207. //type: 'Owner', // Optional: segment your users by type
  208. //account: {
  209. // id: 123, // Optional: associate multiple users with a single account
  210. // name: 'Acme, Co.', // Account name
  211. // created_at: 1364406966, // Unix timestamp for the date the account was created
  212. // monthly_rate: 9.99, // Decimal; monthly rate of the account
  213. // ltv: 1495.00, // Decimal; lifetime value of the account
  214. // plan: 'Enhanced' // Plan name for the account
  215. //}
  216. }]);
  217. // Add default trigger to the bottom-right corner of the window:
  218. UserVoice.push(['addTrigger', { mode: 'smartvote', trigger_position: 'bottom-right' }]);
  219. // Or, use your own custom trigger:
  220. //UserVoice.push(['addTrigger', '#id', { mode: 'smartvote' }]);
  221. // Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
  222. UserVoice.push(['autoprompt', {}]);
  223. </script>
  224. ::end::
  225. ::end::