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.

130 lines
4.4 KiB

3 years ago
2 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. ::use 'footer.mtt'::
  104. ::end::
  105. ::end::