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.

223 lines
6.1 KiB

  1. ::use 'design.mtt'::
  2. <div class="col-md-4">
  3. <h2>::_("Contact informations")::</h2>
  4. <div class="article">
  5. <div style="font-weight:bold;font-size:120%;">
  6. ::member.firstName:: ::member.lastName::
  7. ::if member.firstName2!=null && member.lastName2!=null::
  8. & ::member.firstName2:: ::member.lastName2::
  9. ::end::
  10. </div>
  11. $$nullSafe(::member.address1::)<br/>
  12. $$nullSafe(::member.address2::)<br/>
  13. $$nullSafe(::member.zipCode::)
  14. $$nullSafe(::member.city::)<br/>
  15. <br/>
  16. ::if member.phone!=null::
  17. ::_("Téléphone"):: : ::member.phone::<br/>
  18. ::end::
  19. ::if member.email!=null::
  20. ::_("E-mail"):: : <a href="mailto: ::member.email::">::member.email::</a><br/>
  21. ::end::
  22. ::if member.email2!=null::
  23. ::_("E-mail"):: : <a href="mailto: ::member.email2::">::member.email2::</a><br/>
  24. ::end::
  25. <hr/>
  26. <p style="font-size:11px;">
  27. ::_("Last login"):: :
  28. ::if member.ldate!=null::
  29. ::member.ldate.toString()::
  30. ::else::
  31. <b>::_("This member never logged in")::</b>
  32. ::end::
  33. <br/>
  34. ::_("Registred since"):: :
  35. ::if member.cdate!=null::
  36. ::member.cdate.toString()::
  37. ::else::
  38. ???
  39. ::end::
  40. <br/>
  41. ::if member.pass==""::
  42. <div class="alert alert-danger">::_("This member has not set a password"):: </div>
  43. ::end::
  44. </p>
  45. <p>
  46. $$edit(::_("Edit")::,/member/edit/::member.id::)
  47. $$delete(::_("Remove from group")::,/member/delete/::member.id::?token=::token::)
  48. <a href="/member/movetowl/::member.id::" class="btn btn-default btn-sm">::_("Put on waiting list")::</a>
  49. <a onclick="_.overlay('/member/lastMessages/::member.id::','Message reçus')" class="btn btn-default btn-sm">
  50. <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
  51. ::_("Received messages")::</a>
  52. ::if !member.isFullyRegistred()::
  53. <a href="/member/inviteMember/::member.id::?token=::token::" class="btn btn-default btn-sm">
  54. <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
  55. ::_("Send an invitation")::</a>
  56. ::end::
  57. </p>
  58. <p ::cond canLoginAs::>
  59. <a href="/member/loginas/::member.id::/::userAmap._amap.id::" class="btn btn-danger btn-xs">::_("Log in as this member")::</a>
  60. </p>
  61. </div>
  62. ::if user._amap.hasMembership()::
  63. <h2>::_("Membership fee")::</h2>
  64. <div class="article">
  65. ::if userAmap.hasValidMembership()::
  66. $$bool(true) ::_("Membership up to date")::
  67. ::else::
  68. $$bool(false) ::_("Membership to renew")::
  69. ::end::
  70. ::_("for the period||full sentence : Membership up to date for the period 2017-2018"):: <b>::user._amap.getPeriodName(null)::</b>
  71. <br/>
  72. <a href="/membership/::member.id::" class="btn btn-default btn-sm">::_("Manage membership fees")::</a>
  73. </div>
  74. ::end::
  75. </div>
  76. <div class="col-md-8">
  77. <h2>::_("Current orders")::</h2>
  78. <div class="article">
  79. ::set o = userContracts::
  80. ::if o.constOrders.length>0::
  81. <h4>::_("CSA contracts")::</h4>
  82. <table class="table table-bordered table-condensed" >
  83. <tr>
  84. <th>::_("Qty||short version for quantity")::</th>
  85. <th>::_("Product")::</th>
  86. <th>::_("Price")::</th>
  87. <th>::_("Contract")::</th>
  88. </tr>
  89. ::foreach p o.constOrders::
  90. <tr>
  91. <td>::raw p.smartQt::</td>
  92. <td>::p.productName::
  93. ::if p.userId2 != null::
  94. <br /><span class="glyphicon glyphicon-refresh"></span> ::_("Order alternated with")::
  95. ::if member.id == p.userId::
  96. <a href="/member/view/::p.userId2::">::p.userName2::</a>
  97. ::else::
  98. <a href="/member/view/::p.userId::">::p.userName::</a>
  99. ::end::
  100. ::end::
  101. </td>
  102. <td>::p.subTotal:: ::currency()::</td>
  103. <td>
  104. <a href="/contract/view/::p.contractId::">::p.contractName::</a>
  105. </td>
  106. </tr>
  107. ::end::
  108. </table>
  109. ::end::
  110. ::if count(o.varOrders)>0::
  111. ::foreach d o.varOrders.keys()::
  112. <h4>::__("Order for ::date::",{date:d})::</h4>
  113. <table class="table table-bordered table-condensed" >
  114. <tr>
  115. <th>::_("Qty||short version for quantity")::</th>
  116. <th>::_("Product")::</th>
  117. <th><a href="#" data-toggle="tooltip" data-placement="top" title="::_('Unit price including taxes')::">::_("U.P||short version of unit price")::</a></th>
  118. <th>::_("Sub-total")::</th>
  119. <th>::_("Fees")::</th>
  120. <th>::_("Total")::</th>
  121. <th>::_("Contract")::</th>
  122. </tr>
  123. ::set total = 0::
  124. ::foreach p o.varOrders.get(d)::
  125. <tr>
  126. <td>::raw p.smartQt::</td>
  127. <td>::p.productName::</td>
  128. <td>::p.productPrice::&nbsp;::currency()::</td>
  129. <td>::p.subTotal::&nbsp;::currency()::</td>
  130. <td>
  131. <!-- frais -->
  132. ::if p.percentageValue!=null::
  133. <a href="#" data-toggle="tooltip" data-placement="top" title="::p.percentageName:: : ::p.percentageValue:: %">
  134. ::formatNum(p.fees)::&nbsp;::currency()::
  135. </a>
  136. ::end::
  137. </td>
  138. <td>
  139. <!-- total -->
  140. ::formatNum(p.total)::&nbsp;::currency()::
  141. ::set total = total + p.total::
  142. </td>
  143. <td>
  144. <a href="/contract/view/::p.contractId::">::p.contractName::</a>
  145. </td>
  146. </tr>
  147. ::end::
  148. <tr>
  149. <td colspan="4"></td>
  150. <td>::_("TOTAL")::</td>
  151. <td><b>::formatNum(total)::&nbsp;::currency()::</b></td>
  152. </tr>
  153. </table>
  154. ::end::
  155. ::end::
  156. </div>
  157. </div>
  158. <div ::cond user.getAmap().hasPayments():: class="col-md-8">
  159. <div class="article">
  160. <span style="font-size:1.3em;">
  161. ::_("Balance"):: :
  162. ::if userAmap.balance<0::
  163. ::set color = "C00"::
  164. ::else::
  165. ::set color = "0C0"::
  166. ::end::
  167. <span style="color:#::color::;">
  168. ::userAmap.balance:: ::currency()::
  169. </span>
  170. </span>
  171. <span style="margin-left:30px;">
  172. <a href="/member/payments/::member.id::" class="btn btn-default btn-small">
  173. <i class="fa fa-credit-card" aria-hidden="true"></i>
  174. ::_("Payments details")::
  175. </a>
  176. </span>
  177. </div>
  178. </div>
  179. <div class="col-md-4" ::cond userAmap.rights!=null && userAmap._rights!=null::>
  180. <h3>::_("Rights")::</h3>
  181. <div class="article">
  182. <ul>
  183. ::foreach r userAmap._rights::
  184. <li>::userAmap.getRightName(r)::</li>
  185. ::end::
  186. </ul>
  187. </div>
  188. </div>
  189. ::end::