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.

218 lines
15 KiB

5 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="vracoop_wizard_checkout" inherit_id="website_sale.wizard_checkout">
  4. <xpath expr="//div[@class='row']" position="replace">
  5. <div class="row">
  6. <div class="col-xl">
  7. <div class="wizard">
  8. <div class="progress-wizard">
  9. <a class="no-decoration" t-att-href="step&gt;=10 and '/shop/cart' or '#'">
  10. <div id="wizard-step10" t-att-class="'progress-wizard-step %s' % (step == 10 and 'active' or step&gt;10 and 'complete' or 'disabled')">
  11. <div class="progress-wizard-bar d-none d-md-block"/>
  12. <span class="progress-wizard-dot d-none d-md-inline-block"></span>
  13. <div class="text-center progress-wizard-steplabel">Review Order</div>
  14. </div>
  15. </a>
  16. <a class="no-decoration" t-att-href="step&gt;=20 and '/shop/checkout' or '#'">
  17. <div id="wizard-step20" t-att-class="'progress-wizard-step %s' % (step == 20 and 'active' or step&gt;20 and 'complete' or 'disabled')">
  18. <div class="progress-wizard-bar d-none d-md-block"/>
  19. <span class="progress-wizard-dot d-none d-md-inline-block"></span>
  20. <div class="text-center progress-wizard-steplabel">Address</div>
  21. </div>
  22. </a>
  23. <a class="no-decoration" t-att-href="step&gt;=30 and '/shop/retrait' or '#'">
  24. <div id="wizard-step30" t-att-class="'progress-wizard-step %s' % (step == 30 and 'active' or step&gt;30 and 'complete' or 'disabled')">
  25. <div class="progress-wizard-bar d-none d-md-block"/>
  26. <span class="progress-wizard-dot d-none d-md-inline-block"></span>
  27. <div class="text-center progress-wizard-steplabel">Retrait</div>
  28. </div>
  29. </a>
  30. <a class="no-decoration" t-att-href="step&gt;=40 and '/shop/payment' or '#'">
  31. <div id="wizard-step40" t-att-class="'progress-wizard-step %s' % (step == 40 and 'active' or step&gt;40 and 'complete' or 'disabled')">
  32. <div class="progress-wizard-bar d-none d-md-block"/>
  33. <span class="progress-wizard-dot d-none d-md-inline-block"></span>
  34. <div class="text-center progress-wizard-steplabel">Confirm Order</div>
  35. </div>
  36. </a>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </xpath>
  42. </template>
  43. <template id="vracoop_retrait" name="Retrait">
  44. <t t-set="no_footer">1</t>
  45. <t t-call="website.layout">
  46. <div id="wrap">
  47. <div class="container oe_website_sale py-2">
  48. <div class="row">
  49. <div class="col-12">
  50. <t t-call="website_sale.wizard_checkout">
  51. <t t-set="step" t-value="30" />
  52. </t>
  53. </div>
  54. </div>
  55. <div class="row">
  56. <div class="col-12 col-xl-auto order-xl-2 d-none d-xl-block">
  57. <!-- <t t-call="website_sale.cart_summary"/> -->
  58. </div>
  59. <div class="col-12 col-xl order-xl-1 oe_cart">
  60. <div>
  61. <form action="/shop/retrait" method="post" class="checkout_autoformat">
  62. <h2>Selectionner un point de retrait</h2>
  63. <div class="row all_shipping">
  64. <div class="col-lg-12">
  65. <div class="row mt8">
  66. <t t-foreach="points_retrait" t-as="point_retrait">
  67. <div class="col-md-12 col-lg-6 one_kanban">
  68. <div t-attf-class="card #{selected and 'border_primary' or 'js_change_shipping'}">
  69. <div class='card-body' style='min-height: 130px;'>
  70. <t t-esc="point_retrait.name" /><br/>
  71. <t t-esc="point_retrait.street" /><br/>
  72. <t t-esc="point_retrait.street2" /><br/>
  73. <t t-esc="point_retrait.zip" /><t t-esc="point_retrait.city" />
  74. </div>
  75. <div class='card-footer' t-if='not readonly'>
  76. <span class='btn-ship' t-att-style="'' if not selected else 'display:none;'">
  77. <a role="button" t-attf-href="##{point_retrait}" class="btn btn-block btn-secondary">
  78. Sélectonner ce point de relais
  79. </a>
  80. </span>
  81. </div>
  82. </div>
  83. </div>
  84. </t>
  85. </div>
  86. </div>
  87. </div>
  88. <h3>Selectionner un jour de retrait</h3>
  89. <t t-foreach="points_retrait" t-as="point_retrait">
  90. <!-- <div class="container"> -->
  91. <!-- <div id="carouselExample" class="carousel slide w-100 " data-ride="carousel" data-interval="false">
  92. <div class="carousel-inner w-100 d-flex" role="listbox">
  93. <t t-set="list_slots" t-value="point_retrait.slot_calculate()"/>
  94. <t t-foreach="list_slots" t-as="slot">
  95. <t t-if="slot_first">
  96. <div class="carousel-item active">
  97. <a data-toggle="tab" class="nav-link active btn btn-primary" t-attf-href='##{slot[1].strftime("%A")}#{point_retrait.id}'>
  98. <t class="week_day" t-esc="slot[0]"/><br/>
  99. <t t-esc="slot[1].day"/><br/>
  100. <t t-esc="slot[2]"/>
  101. </a>
  102. </div>
  103. </t>
  104. <t t-else="">
  105. <div class="carousel-item ">
  106. <a data-toggle="tab" class="nav-link active btn btn-primary" t-attf-href='##{slot[1].strftime("%A")}#{point_retrait.id}'>
  107. <t class="week_day" t-esc="slot[0]"/><br/>
  108. <t t-esc="slot[1].day"/><br/>
  109. <t t-esc="slot[2]"/>
  110. </a>
  111. </div>
  112. </t>
  113. </t>
  114. </div>
  115. <a class="carousel-control-prev" href="#carouselExample" role="button" data-slide="prev">
  116. <i class="fa fa-chevron-left fa-lg text-muted"></i>
  117. <span class="sr-only">Previous</span>
  118. </a>
  119. <a class="carousel-control-next text-faded" href="#carouselExample" role="button" data-slide="next">
  120. <i class="fa fa-chevron-right fa-lg text-muted"></i>
  121. <span class="sr-only">Next</span>
  122. </a>
  123. </div> -->
  124. <!-- </div> -->
  125. <div class="card">
  126. <t t-set="list_slots" t-value="point_retrait.slot_calculate()"/>
  127. <ul class="nav nav-tabs justify-content-center" role="tablist">
  128. <t t-foreach="list_slots" t-as="slot">
  129. <t t-if="slot_first">
  130. <li class="nav-item">
  131. <a data-toggle="tab" class="nav-link active btn btn-primary" t-attf-href='##{slot[1].strftime("%A")}#{point_retrait.id}'>
  132. <t class="week_day" t-esc="slot[0]"/><br/>
  133. <t t-esc="slot[1].day"/><br/>
  134. <t t-esc="slot[2]"/>
  135. </a>
  136. </li>
  137. </t>
  138. <t t-else="">
  139. <li class="nav-item">
  140. <a data-toggle="tab" class="nav-link btn btn-primary" t-attf-href='##{slot[1].strftime("%A")}#{point_retrait.id}'>
  141. <t class="week_day" t-esc="slot[0]"/><br/>
  142. <t t-esc="slot[1].day"/><br/>
  143. <t t-esc="slot[2]"/>
  144. </a>
  145. </li>
  146. </t>
  147. </t>
  148. </ul>
  149. <div class="tab-content">
  150. <t t-foreach="list_slots" t-as="slot">
  151. <t t-if="slot_first">
  152. <div class="container tab-pane active" t-attf-id='#{slot[1].strftime("%A")}#{point_retrait.id}'>
  153. <t t-foreach="slot[3]" t-as="slot_by_day">
  154. <label class="label_radio_button" role="radio">
  155. <input name="hour_select" type="radio" class="radio_hide" value="10:00" t-attf-id="#{slot_by_day_index}"/>
  156. <span class="btn btn-outline-primary span_radio_button">
  157. <t t-esc="slot_by_day[0]"/> :
  158. <t t-esc="slot_by_day[1]"/>
  159. </span>
  160. </label>
  161. </t>
  162. </div>
  163. </t>
  164. <t t-else="">
  165. <div class="container tab-pane fade" t-attf-id='#{slot[1].strftime("%A")}#{point_retrait.id}'>
  166. <t t-foreach="slot[3]" t-as="slot_by_day">
  167. <label class=" label_radio_button" role="radio">
  168. <input t-attf-id="#{slot_by_day_index}" name="hour_select" type="radio" class="radio_hide" value="10:00"/>
  169. <span class="btn btn-outline-primary span_radio_button">
  170. <t t-esc="slot_by_day[0]"/> :
  171. <t t-esc="slot_by_day[1]"/>
  172. </span>
  173. </label>
  174. </t>
  175. </div>
  176. </t>
  177. </t>
  178. </div>
  179. </div>
  180. </t>
  181. <input type="hidden" name="submitted" value="1" />
  182. <div class="d-flex justify-content-between">
  183. <a role="button" t-att-href="mode == ('new', 'billing') and '/shop/cart' or '/shop/checkout'" class="btn btn-secondary mb32">
  184. <i class="fa fa-chevron-left"/>
  185. <span>Back</span>
  186. </a>
  187. <a role="button" href="/shop/confirm_order" class="btn btn-primary mb32">
  188. <span>Confirm</span>
  189. <i class="fa fa-chevron-right"/>
  190. </a>
  191. </div>
  192. </form>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </t>
  199. </template>
  200. <template id="vracoop_checkout" inherit_id="website_sale.checkout">
  201. <xpath expr="//div[@class='d-flex justify-content-between mt-3']" position="replace">
  202. <div class="d-flex justify-content-between mt-3">
  203. <a role="button" href="/shop/cart" class="btn btn-secondary mb32">
  204. <i class="fa fa-chevron-left"/>
  205. <span>Return to Cart</span>
  206. </a>
  207. <a role="button" href="/shop/retrait" class="btn btn-primary mb32">
  208. <span>Confirm</span>
  209. <i class="fa fa-chevron-right"/>
  210. </a>
  211. </div>
  212. </xpath>
  213. </template>
  214. </odoo>