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.

195 lines
5.0 KiB

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