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.

257 lines
8.8 KiB

  1. <openerp>
  2. <!-- Add menu entries -->
  3. <data noupdate="1">
  4. <record id="menu_work_irregular" model="website.menu">
  5. <field name="name">Shifts Irregular</field>
  6. <field name="url">/shift_irregular_worker</field>
  7. <field name="parent_id" ref="website.main_menu"/>
  8. <field name="sequence" type="int">50</field>
  9. </record>
  10. <record id="menu_work_regular" model="website.menu">
  11. <field name="name">Shifts Regular</field>
  12. <field name="url">/shift_template_regular_worker</field>
  13. <field name="parent_id" ref="website.main_menu"/>
  14. <field name="sequence" type="int">51</field>
  15. </record>
  16. </data>
  17. <!-- Add the css stylesheet -->
  18. <template id="assets_frontend" name="beesdoo_website_shift_website_assets"
  19. inherit_id="website.assets_frontend">
  20. <xpath expr="." position="inside">
  21. <link rel="stylesheet" type="text/css"
  22. href="/beesdoo_website_shift/static/src/css/design.css"/>
  23. </xpath>
  24. </template>
  25. <!-- Available Tasks Templates for Regular Workers -->
  26. <template
  27. id="task_template"
  28. name="Available Tasks Templates for Regular Workers"
  29. page="True">
  30. <t t-call="website.layout">
  31. <div class="oe_structure"/>
  32. <section class="wrap">
  33. <div class="container">
  34. <div class="row">
  35. <div class="col-md-12">
  36. <h1 class="text-center">
  37. Available Tasks Templates for Regular Workers
  38. </h1>
  39. </div>
  40. </div>
  41. </div>
  42. </section>
  43. <div class="oe_structure"/>
  44. <section class="wrap">
  45. <div class="container">
  46. <div class="row">
  47. <div class="col-md-12">
  48. <p class="text-center">
  49. Subscribe via the member office or via
  50. <a href="mailto:volant@bees-coop.be">volant@bees-coop.be</a>
  51. </p>
  52. </div>
  53. </div>
  54. </div>
  55. </section>
  56. <div class="oe_structure"/>
  57. <section class="wrap">
  58. <div class="container">
  59. <div class="row">
  60. <p class="visible-xs text-center">
  61. <span class="label label-warning">NSC</span> : This flag tells you that the shift needs a Super Co-operator
  62. </p>
  63. <div class="visible-xs" t-foreach="task_templates" t-as="template">
  64. <ul class="list-group">
  65. <li class="list-group-item">
  66. <t t-esc="template.planning_id.name"/> :
  67. <t t-esc="template.day_nb_id.name"/>
  68. <t t-esc='float_to_time(template.start_time)' /> -
  69. <t t-esc='float_to_time(template.end_time)'/>
  70. <span class="label label-warning pull-right"
  71. t-if="not template.super_coop_id">
  72. NSC
  73. </span>
  74. </li>
  75. <li class="list-group-item">
  76. <t t-esc="template.task_type_id.name"/>
  77. <span class="badge"
  78. t-if="template.remaining_worker > 0">
  79. <t t-esc="template.remaining_worker"/> space(s)
  80. </span>
  81. <span class="badge"
  82. t-if="template.remaining_worker == 0">
  83. full
  84. </span>
  85. </li>
  86. </ul>
  87. </div>
  88. <table class="hidden-xs table table-striped">
  89. <thead>
  90. <tr>
  91. <th>Week</th>
  92. <th class="hidden-sm">Task Template</th>
  93. <th>Day</th>
  94. <th>Time</th>
  95. <th>Type of Task</th>
  96. <th>Super Co-operator</th>
  97. <th class="text-center">Available Spaces</th>
  98. </tr>
  99. </thead>
  100. <tbody>
  101. <t t-foreach="task_templates" t-as="template">
  102. <!-- Row with no super coop will be shown in color -->
  103. <tr t-attf-class="{{ 'warning' if not template.super_coop_id else '' }}">
  104. <td>
  105. <t t-esc="template.planning_id.name"/>
  106. </td>
  107. <td class="hidden-sm">
  108. <t t-esc="template.name"/>
  109. </td>
  110. <td>
  111. <t t-esc="template.day_nb_id.name"/>
  112. </td>
  113. <td>
  114. <t t-esc='float_to_time(template.start_time)' /> -
  115. <t t-esc='float_to_time(template.end_time)'/>
  116. </td>
  117. <td>
  118. <t t-esc="template.task_type_id.name"/>
  119. </td>
  120. <td>
  121. <t t-if="template.super_coop_id">
  122. Yes
  123. </t>
  124. <t t-if="not template.super_coop_id">
  125. Not yet
  126. </t>
  127. </td>
  128. <td class="text-center">
  129. <t t-esc="template.remaining_worker"/>
  130. </td>
  131. </tr>
  132. </t>
  133. </tbody>
  134. </table>
  135. </div>
  136. </div>
  137. </section>
  138. </t>
  139. </template>
  140. <!-- Available shifts for irregular workers -->
  141. <template
  142. id="shift_template"
  143. name="Available Shifts for Irregular Workers"
  144. page="True">
  145. <t t-call="website.layout">
  146. <div class="oe_structure"/>
  147. <section class="wrap">
  148. <div class="container">
  149. <div class="row">
  150. <div class="col-md-12">
  151. <h1 class="text-center">
  152. Available Shifts for Irregular Workers
  153. </h1>
  154. </div>
  155. </div>
  156. </div>
  157. </section>
  158. <div class="oe_structure"/>
  159. <section class="wrap">
  160. <div class="container">
  161. <div class="row">
  162. <div class="col-md-12">
  163. <p class="text-center">
  164. Subscribe via <a href="mailto:volant@bees-coop.be">volant@bees-coop.be</a>
  165. </p>
  166. </div>
  167. </div>
  168. </div>
  169. </section>
  170. <div class="oe_structure"/>
  171. <section class="wrap">
  172. <div class="container">
  173. <div class="row">
  174. <div class="visible-xs" t-foreach="shift_templates" t-as="shift_and_count">
  175. <t t-set="count" t-value="shift_and_count[0]" />
  176. <t t-set="shift" t-value="shift_and_count[1]" />
  177. <ul class="list-group">
  178. <li class="list-group-item">
  179. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  180. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  181. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  182. </li>
  183. <li class="list-group-item">
  184. <t t-esc="shift.task_type_id.name"/>
  185. <span class="badge">
  186. <t t-esc="count"/> space(s)
  187. </span>
  188. </li>
  189. </ul>
  190. </div>
  191. <table class="hidden-xs table table-striped">
  192. <thead>
  193. <tr>
  194. <th>Day</th>
  195. <th>Date</th>
  196. <th>Time</th>
  197. <th class="hidden-sm">Shift</th>
  198. <th>Type of Shift</th>
  199. <th class="text-center">Available Spaces</th>
  200. </tr>
  201. </thead>
  202. <tbody>
  203. <t t-foreach="shift_templates" t-as="shift_and_count">
  204. <t t-set="count" t-value="shift_and_count[0]" />
  205. <t t-set="shift" t-value="shift_and_count[1]" />
  206. <tr>
  207. <td>
  208. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  209. </td>
  210. <td>
  211. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  212. </td>
  213. <td>
  214. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  215. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  216. </td>
  217. <td class="hidden-sm">
  218. <t t-esc="shift.task_template_id.name"/>
  219. </td>
  220. <td>
  221. <t t-esc="shift.task_type_id.name"/>
  222. </td>
  223. <td class="text-center">
  224. <t t-esc="count"/>
  225. </td>
  226. </tr>
  227. </t>
  228. </tbody>
  229. </table>
  230. </div> <!-- row -->
  231. </div> <!-- container -->
  232. </section>
  233. </t>
  234. </template>
  235. </openerp>