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.

125 lines
4.1 KiB

  1. <openerp>
  2. <!-- We add the css stylesheet -->
  3. <template id="assets_frontend" name="beesdoo_website_shift_website_assets"
  4. inherit_id="website.assets_frontend">
  5. <xpath expr="." position="inside">
  6. <link rel="stylesheet" type="text/css"
  7. href="/beesdoo_website_shift/static/src/css/design.css"/>
  8. </xpath>
  9. </template>
  10. <!-- Task template page -->
  11. <template id="task_template" name="Task template for regular worker">
  12. <t t-call="website.layout">
  13. <div class="container">
  14. <h1>Available Tasks Templates for Regular Workers</h1>
  15. <p class="text-center">
  16. Subscribe via the member office or via <a href="mailto:membre@bees-coop.be">membre@bees-coop.be</a>
  17. </p>
  18. <table class="table table-striped">
  19. <thead>
  20. <tr>
  21. <th>Week</th>
  22. <th>Task Template</th>
  23. <th>Day</th>
  24. <th>Time</th>
  25. <th>Type of Task</th>
  26. <th>Super Co-operator</th>
  27. <th class="text-center">Available Spaces</th>
  28. </tr>
  29. </thead>
  30. <tbody>
  31. <t t-foreach="task_templates" t-as="template">
  32. <!-- Row with no super coop will be shown in color -->
  33. <tr t-attf-class="{{ 'warning' if not template.super_coop_id else '' }}">
  34. <td>
  35. <t t-esc="template.planning_id.name"/>
  36. </td>
  37. <td>
  38. <t t-esc="template.name"/>
  39. </td>
  40. <td>
  41. <t t-esc="template.day_nb_id.name"/>
  42. </td>
  43. <td>
  44. <t t-esc='float_to_time(template.start_time)' /> -
  45. <t t-esc='float_to_time(template.end_time)'/>
  46. </td>
  47. <td>
  48. <t t-esc="template.task_type_id.name"/>
  49. </td>
  50. <td>
  51. <t t-if="template.super_coop_id">
  52. Yes
  53. </t>
  54. <t t-if="not template.super_coop_id">
  55. Not yet
  56. </t>
  57. </td>
  58. <td class="text-center">
  59. <t t-esc="template.remaining_worker"/>
  60. </td>
  61. </tr>
  62. </t>
  63. </tbody>
  64. </table>
  65. </div>
  66. </t>
  67. </template>
  68. <!-- Shift page -->
  69. <template id="shift_template" name="Shift for irregular worker">
  70. <t t-call="website.layout">
  71. <div class="container">
  72. <h1>Available Shifts for Irregular Workers</h1>
  73. <p class="text-center">
  74. Subscribe via <a href="mailto:volant@bees-coop.be">volant@bees-coop.be</a>
  75. </p>
  76. <table class="table table-striped">
  77. <thead>
  78. <tr>
  79. <th>Day</th>
  80. <th>Date</th>
  81. <th>Time</th>
  82. <th>Shift</th>
  83. <th>Type of Shift</th>
  84. <th class="text-center">Available Spaces</th>
  85. </tr>
  86. </thead>
  87. <tbody>
  88. <t t-foreach="shift_templates" t-as="shift_and_count">
  89. <t t-set="count" t-value="shift_and_count[0]" />
  90. <t t-set="shift" t-value="shift_and_count[1]" />
  91. <tr>
  92. <td>
  93. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  94. </td>
  95. <td>
  96. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  97. </td>
  98. <td>
  99. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  100. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  101. </td>
  102. <td>
  103. <t t-esc="shift.task_template_id.name"/>
  104. </td>
  105. <td>
  106. <t t-esc="shift.task_type_id.name"/>
  107. </td>
  108. <td class="text-center">
  109. <t t-esc="count"/>
  110. </td>
  111. </tr>
  112. </t>
  113. </tbody>
  114. </table>
  115. </div>
  116. </t>
  117. </template>
  118. </openerp>