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.

203 lines
5.0 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. ::use 'base.mtt'::
  2. <div class="row header" style="margin-top:10px;">
  3. <div class="col-md-8 col-md-offset-2" style="margin-top:12px;">
  4. <!-- Notifications -->
  5. <div class="row">
  6. <div id="content" class="col-md-12">
  7. ::foreach notification getMessages()::
  8. <div class="alert ::if notification.error:: alert-danger ::else:: alert-success ::end::" ::cond notification::>
  9. ::if notification.error::
  10. <span class="glyphicon glyphicon-exclamation-sign"></span>
  11. ::else::
  12. <span class="glyphicon glyphicon-ok"></span>
  13. ::end::
  14. ::raw notification.text::
  15. </div>
  16. ::end::
  17. </div>
  18. </div>
  19. <div class="article">
  20. <div class="row">
  21. <div class="col-md-4">
  22. <p>
  23. ::if group._image!=null::
  24. ::if group.extUrl!=null && group.extUrl!=""::
  25. <a href="::group.extUrl::"><img src="::file(group._image)::" class="img-responsive img-thumbnail" /></a><br/>
  26. ::else::
  27. <img src="::file(group._image)::" class="img-responsive img-thumbnail" /><br/>
  28. ::end::
  29. ::end::
  30. </p>
  31. <p>
  32. ::if isMember::
  33. <!-- connected and member of the group-->
  34. <a href="/user/choose?amap=::group.id::" class="btn btn-primary">
  35. <span class="glyphicon glyphicon-chevron-right"></span>
  36. ::_("Go to my account")::
  37. </a>
  38. ::else::
  39. <h4>Inscriptions :</h4>
  40. ::switch group._regOption::
  41. ::case::
  42. <p>
  43. ::_("Contact the person in charge in order to subscribe to this group and get to know membership conditions.")::
  44. </p>
  45. <p>
  46. <a href="::"mailto:"+group._contact.email+"?subject=Adhésion"::" class="btn btn-primary">
  47. <span class="glyphicon glyphicon-envelope"></span>
  48. ::_("Membership request")::
  49. </a>
  50. </p>
  51. ::case::
  52. <p>
  53. ::_("This group accepts subscriptions on waiting list. A coordinator will contact you.")::
  54. </p>
  55. <p>
  56. <a href="/group/list/::group.id::" class="btn btn-primary">
  57. <span class="glyphicon glyphicon-chevron-right"></span>
  58. ::_("Subscription on waiting list")::
  59. </a>
  60. </p>
  61. ::case::
  62. <p>
  63. <a href="/group/register/::group.id::" class="btn btn-primary">
  64. <span class="glyphicon glyphicon-chevron-right"></span>
  65. ::_("Free subscription")::
  66. </a>
  67. </p>
  68. ::case::
  69. <p>
  70. ::_("This group is full and do not accept any more subscription.")::
  71. </p>
  72. ::end::
  73. ::end::
  74. </p>
  75. ::if user==null::
  76. <hr />
  77. <h4>::_("Already member? Log in:")::</h4>
  78. <div class="text-center">
  79. <a href="#" onclick="_.loginBox('/group/::group.id::')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
  80. </div>
  81. ::end::
  82. </div>
  83. <div class="col-md-8">
  84. <h2>
  85. ::group.name::
  86. </h2>
  87. <p>
  88. ::if group.txtIntro!=null && group.txtIntro!=""::
  89. ::raw nl2br(group.txtIntro)::
  90. ::end::
  91. </p>
  92. <p>
  93. <h3> ::_("Next deliveries")::</h3>
  94. ::foreach d group.getDeliveries(4)::
  95. <div style="display:inline-block;margin-right:8px;vertical-align:top;">
  96. ::set s = getDate( d.date )::
  97. ::if isToday(d.date)::
  98. $$today(::s.dow::,::s.d::,::s.m::,::s.y::,::s.h::,::d._place::)
  99. ::else::
  100. $$date(::s.dow::,::s.d::,::s.m::,::s.y::,::d._place::)
  101. ::end::
  102. </div>
  103. ::end::
  104. </p>
  105. <hr/>
  106. <p ::cond group._contact!=null::>
  107. <h3>::_("Contact")::</h3>
  108. <i class="icon-user"></i>
  109. <b>::group._contact.firstName:: ::group._contact.lastName::</b><br/>
  110. <span ::cond group._contact.email!=null::>
  111. <span class="glyphicon glyphicon-envelope"></span>
  112. <a href="::"mailto:"+group._contact.email::">::group._contact.email::</a><br/>
  113. </span>
  114. <span ::cond group._contact.phone!=null && (isMember || group.canExposePhone())::>
  115. <span class="glyphicon glyphicon-phone-alt"></span> ::group._contact.phone::<br/>
  116. </span>
  117. </p>
  118. <hr/>
  119. <p>
  120. <h3>::_("Suppliers and products")::</h3>
  121. <p>
  122. ::_("Non-complete extract of available products:")::
  123. </p>
  124. ::foreach c contracts::
  125. <p>
  126. <b>::c.name::</b><br/>
  127. ::c._vendor.name::, $$nullSafe(::c._vendor.zipCode::) $$nullSafe(::c._vendor.city::)
  128. <div class="row">
  129. ::foreach p c.getProductsPreview(6)::
  130. <div class="col-md-2" data-toggle="tooltip" data-placement="top" title="::p.name::" >
  131. <div style="background-image:url('::p.getImage()::')" class="productImg"/>
  132. </div>
  133. ::end::
  134. </div>
  135. </p>
  136. ::end::
  137. </p>
  138. </div>
  139. </div>
  140. <div class="col-md-4">
  141. </div>
  142. </div>
  143. </div>
  144. ::if user == null::
  145. <script language="javascript">
  146. if (document.cookie.includes("rgpd=true")) console.log("RGPD consent OK");
  147. else {
  148. console.log("no consent YET");
  149. _.cookieConsentBox('::redirect::');
  150. }
  151. </script>
  152. ::end::
  153. </div>
  154. ::use 'footer.mtt'::
  155. ::end::
  156. ::end::