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.

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