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.

685 lines
22 KiB

[ADD] website_shift: Personal page for working information (#33) * [ADD] website_shift: Add configuration irregular_shift_limit: Maximum shift that will be shown highlight_rule: Treshold of available space in a shift that trigger the highlight of the shift hide_rule: Treshold ((available space)/(max space)) in percentage of available space under wich the shift is hidden The last one replaces the old hide filter. * [FIX] website_shift: Wrong mail on regular shift Fix the wrong email address that is shown on the public page that show available shift for irregular worker. * [ADD] website_shift: Irregular personal work page Add personal shift page for irregular worker that allows you to subscribe to a shift. * [ADD] website_shift: Personal page for non-worker Add a personal page for non-worker that shows a simple message telling them that they don't have to do a shift. * [ADD] website_shift: Regular personal work page Add personal shift page for regular worker. * [ADD] website_shift: Exempted personal work page Add personal shift page for exempted worker. * [IMP] website_shift: Shopping status personal page This add a label that shows the shopping status of a user. If the label is green the user can shop. If the label is red the user cannot shop. There is also icons for disambiguation. * [ADD] website_shift: Config en & dis shift sign up This add a configuration boolean that enable or disable the shift sign up for irregular worker. * [IMP] website_shift: Status on personal pages Show dates properly. Hide what's useless. Give meaningful name. * [IMP] website_shift: Design of personal pages * Lower size of h2 title. * Add top margin to h1. * Change highlight color. * Change position of explanation test. * [IMP] website_shift: Refactor templates Refactor templates to avoid dupplicate code. Refactor the controller to match with new templates. Add license. * [ADD] website_shift: Past shifts on personal page Add a list of the previous shifts for a worker. * [ADD] website_shift: Super Coop info Add a button to show email and phone of the super cooperator of a shift. Tell you if you are a Super Co-operator * [IMP] website_shift: Next shifts regular worker Add configuration to specify how many next shifts for regular worker must be shown to them on their personal web page. This config is called `regular_next_shift_limit`. Improve the view that shows the next shifts on the personal page for a regular worker regarding to the `regular_next_shift_limit`. Because all the next shifts are not created in the database, we need to create 'fictive' one that are not stored. * [ADD] website_shift: Warning about holidays Add a warning message on the personal page for a regular worker that tells that public holidays are not taken into account for the moment. * [IMP] website_theme: colors for warnings * [FIX] website_shift: 403 when subscribing Fix the case when an irregular worker that doesn't have write access to beesdoo.shift.shift try to subscribe to a shift and got a 403 error. * [FIX] website_theme: Theme must be an application As wrote in this document : https://www.odoo.com/documentation/9.0/howtos/themes.html#create-a-theme-module a theme module must be an application. * [FIX] webs_shift: Wrong display of date last shift Fix the case when an irregular worker is in alert and that the date before last shift is displayed. The `date_before_last_shift` is renamed in `future_alert_start_time`. This name better represent what this variable contains. It also explains why this information does not have to be displayed when the worker is already in alert mode as this date is the date in the future on which the worker will be in alert. * [FIX] website_shift: Co-operator -> Cooperator * [FIX] website_shift: Past shifts not ordered desc The past shift was not properly ordered. This fix by ordering the past shifts from the newest to the oldest. * [FIX] website_shift: Holiday shown after end of it Before: The holiday is shown even if the holiday is in the past. After: The holiday is shown only if the holiday is now or in the future.
6 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2017-2018 Rémy Taymans <remytaymans@gmail.com>
  4. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  5. -->
  6. <openerp>
  7. <!-- Add menu entries -->
  8. <template id="my_shift_link" name="Link to frontend portal" inherit_id="website.layout">
  9. <xpath expr="//li[@id='o_logout']" position="before">
  10. <li><a href="/my/shift" role="menuitem">My Shift</a></li>
  11. </xpath>
  12. </template>
  13. <!-- Reusable templates -->
  14. <template
  15. id="my_shift_title"
  16. name="My Shift Title">
  17. <div class="oe_structure"/>
  18. <section class="wrap">
  19. <div class="container">
  20. <div class="row">
  21. <div class="col-md-12">
  22. <h1 class="text-center">
  23. Your shifts
  24. </h1>
  25. </div>
  26. </div>
  27. </div>
  28. </section>
  29. <div class="oe_structure"/>
  30. </template>
  31. <template
  32. id="my_shift_worker_status_title"
  33. name="My Shift Worker Status Title">
  34. <div class="oe_structure"/>
  35. <section class="wrap">
  36. <div class="container">
  37. <div class="row">
  38. <div class="col-md-12">
  39. <h2>
  40. Worker status
  41. <span t-att-class="'label %s pull-right' % ('label-success' if status.can_shop else 'label-danger',)">
  42. <span class="fa fa-shopping-cart"></span>
  43. <t t-if="status.can_shop">
  44. <span class="fa fa-check"></span>
  45. </t>
  46. <t t-if="not status.can_shop">
  47. <span class="fa fa-times"></span>
  48. </t>
  49. </span>
  50. </h2>
  51. </div>
  52. </div>
  53. </div>
  54. </section>
  55. <div class="oe_structure"/>
  56. </template>
  57. <template
  58. id="my_shift_worker_status_common"
  59. name="My Shift Worker Status Common">
  60. <p>
  61. <label>Working Mode:</label>
  62. <t t-esc="dict(status.fields_get(allfields=['working_mode'])['working_mode']['selection'])[status.working_mode]"/>
  63. </p>
  64. <p t-if="status.super">
  65. You are a Super Cooperator
  66. </p>
  67. <p>
  68. <label>Status:</label>
  69. <t t-esc="dict(status.fields_get(allfields=['status'])['status']['selection'])[status.status]"/>
  70. </p>
  71. <p t-if="status.holiday_start_time and status.holiday_start_time > status.today or status.status == 'holiday'">
  72. <label>Begin of Holiday:</label>
  73. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.holiday_start_time, '%Y-%m-%d'))"/>
  74. </p>
  75. <p t-if="status.holiday_end_time and status.holiday_end_time > status.today or status.status == 'holiday'">
  76. <label>End of Holiday:</label>
  77. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.holiday_end_time, '%Y-%m-%d'))"/>
  78. </p>
  79. </template>
  80. <template
  81. id="my_shift_next_shifts"
  82. name="My Shift : Next Shifts">
  83. <div class="oe_structure"/>
  84. <section class="wrap">
  85. <div class="container">
  86. <div class="row">
  87. <div class="col-md-12">
  88. <h2>
  89. Your next shifts
  90. </h2>
  91. </div>
  92. </div>
  93. </div>
  94. </section>
  95. <div class="oe_structure"/>
  96. <section class="wrap" t-if="is_regular">
  97. <div class="container">
  98. <div class="row">
  99. <div class="col-md-12">
  100. <div class="alert alert-warning">
  101. <strong>Warning !</strong> For the moment public holidays are not taken into account. If your shift
  102. occures during a public holiday, you do not have to do it.
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </section>
  108. <div class="oe_structure"/>
  109. <div class="visible-xs" t-foreach="subscribed_shifts" t-as="shift">
  110. <div class="panel panel-default">
  111. <div class="panel-heading clearfix">
  112. <div class="panel-title">
  113. <t t-esc="'%s %s' % (shift.start_day, shift.start_date)"/>
  114. <span t-esc="shift.start_time"/> -
  115. <span t-esc="shift.end_time"/>
  116. </div>
  117. </div>
  118. <div class="panel-body">
  119. <t t-esc="shift.task_type_name"/>
  120. <button type="button" class="btn btn-default btn-sm pull-right"
  121. t-if="shift.super_coop_name"
  122. data-toggle="modal"
  123. t-att-data-target="'#super_coop-shift-%s' % shift.id">
  124. <span class="fa fa-info" aria-hidden="true"></span>
  125. Super Cooperator Info
  126. </button>
  127. </div>
  128. </div>
  129. </div>
  130. <table class="hidden-xs table table-striped" t-if="subscribed_shifts">
  131. <thead>
  132. <tr>
  133. <th>Day</th>
  134. <th>Date</th>
  135. <th>Time</th>
  136. <th>Type of Shift</th>
  137. <th class="text-center">Super Cooperator Info</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. <t t-foreach="subscribed_shifts" t-as="shift">
  142. <tr>
  143. <td>
  144. <t t-esc="shift.start_day"/>
  145. </td>
  146. <td>
  147. <t t-esc="shift.start_date"/>
  148. </td>
  149. <td>
  150. <span t-esc="shift.start_time"/> -
  151. <span t-esc="shift.end_time"/>
  152. </td>
  153. <td>
  154. <t t-esc="shift.task_type_name"/>
  155. </td>
  156. <td class="text-center">
  157. <button type="button" class="btn btn-default btn-sm"
  158. t-if="shift.super_coop_name"
  159. data-toggle="modal"
  160. t-att-data-target="'#super_coop-shift-%s' % shift.id">
  161. <span class="fa fa-info" aria-hidden="true"></span>
  162. </button>
  163. </td>
  164. </tr>
  165. </t>
  166. </tbody>
  167. </table>
  168. <!-- Super Cooperator info modal -->
  169. <t t-foreach="subscribed_shifts" t-as="shift">
  170. <div class="modal fade" t-if="shift.super_coop_name" t-att-id="'super_coop-shift-%s' % shift.id" tabindex="-1" role="dialog"
  171. t-att-aria-labelledby="'super_coop-shift-%s-label' % shift.id">
  172. <div class="modal-dialog" role="document">
  173. <div class="modal-content">
  174. <div class="modal-header">
  175. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  176. <span aria-hidden="true">×</span>
  177. </button>
  178. <h4 class="modal-title" t-att-id="'super_coop-shift-%s-label' % shift.id">
  179. <t t-esc="shift.super_coop_name"/>
  180. </h4>
  181. </div>
  182. <div class="modal-body">
  183. <i class="fa fa-phone" aria-hidden="true"></i> <t t-esc="shift.super_coop_phone"/><br/>
  184. <i class="fa fa-envelope" aria-hidden="true"></i>
  185. <a t-att-href="'mailto:%s' % shift.super_coop_email">
  186. <t t-esc="shift.super_coop_email"/>
  187. </a>
  188. </div>
  189. <div class="modal-footer">
  190. <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </t>
  196. <section class="wrap" t-if="not subscribed_shifts">
  197. <div class="container">
  198. <div class="row">
  199. <div class="col-md-12">
  200. <div class="alert alert-warning">
  201. <strong>Warning !</strong> You have not yet signed up to a shift.
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. </section>
  207. <div class="oe_structure"/>
  208. </template>
  209. <template
  210. id="my_shift_past_shifts"
  211. name="My Shift : Past Shifts">
  212. <div class="oe_structure"/>
  213. <section class="wrap">
  214. <div class="container">
  215. <div class="row">
  216. <div class="col-md-12">
  217. <h2>
  218. Your past shifts
  219. </h2>
  220. </div>
  221. </div>
  222. </div>
  223. </section>
  224. <div class="oe_structure"/>
  225. <div class="visible-xs" t-foreach="past_shifts" t-as="shift">
  226. <div class="panel panel-default">
  227. <div class="panel-heading clearfix">
  228. <div class="panel-title">
  229. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  230. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  231. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  232. </div>
  233. </div>
  234. <div class="panel-body">
  235. <t t-esc="shift.task_type_id.name"/>
  236. </div>
  237. </div>
  238. </div>
  239. <table class="hidden-xs table table-striped" t-if="past_shifts">
  240. <thead>
  241. <tr>
  242. <th>Day</th>
  243. <th>Date</th>
  244. <th>Time</th>
  245. <th>Type of Shift</th>
  246. <th>Status</th>
  247. </tr>
  248. </thead>
  249. <tbody>
  250. <t t-foreach="past_shifts" t-as="shift">
  251. <tr>
  252. <td>
  253. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  254. </td>
  255. <td>
  256. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  257. </td>
  258. <td>
  259. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  260. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  261. </td>
  262. <td>
  263. <t t-esc="shift.task_type_id.name"/>
  264. </td>
  265. <td>
  266. <t t-esc="shift.stage_id.name"/>
  267. </td>
  268. </tr>
  269. </t>
  270. </tbody>
  271. </table>
  272. <section class="wrap" t-if="not past_shifts">
  273. <div class="container">
  274. <div class="row">
  275. <div class="col-md-12">
  276. <div class="alert alert-info">
  277. <strong>Info !</strong> You don't have any past shift.
  278. </div>
  279. </div>
  280. </div>
  281. </div>
  282. </section>
  283. <div class="oe_structure"/>
  284. </template>
  285. <template
  286. id="available_shift_irregular_worker"
  287. name="Available Shift for Irregular Worker">
  288. <div class="oe_structure"/>
  289. <div class="visible-xs" t-foreach="shift_templates" t-as="shift_count_subscribed">
  290. <t t-set="shift" t-value="shift_count_subscribed[0]" />
  291. <t t-set="count" t-value="shift_count_subscribed[1]" />
  292. <t t-set="is_subscribed" t-value="shift_count_subscribed[2]" />
  293. <t t-set="highlight_class" t-value="'panel-warning' if count >= highlight_rule else 'panel-default'"/>
  294. <div t-att-class="'panel %s' % highlight_class">
  295. <div class="panel-heading clearfix">
  296. <div class="panel-title pull-left">
  297. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  298. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  299. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  300. </div>
  301. <div class="label label-default pull-right">
  302. <t t-esc="count"/> space(s)
  303. </div>
  304. </div>
  305. <div class="panel-body clearfix">
  306. <t t-esc="shift.task_type_id.name"/>
  307. <t t-if="is_subscribed">
  308. <div class="label label-success pull-right">
  309. <span class="fa fa-check" aria-hidden="true"></span>
  310. Subscribed
  311. </div>
  312. </t>
  313. <t t-if="irregular_enable_sign_up and not is_subscribed">
  314. <button type="button" class="btn btn-default btn-sm pull-right" data-toggle="modal"
  315. t-att-data-target="'#subscribe-shift-%s' % shift.id">
  316. <span class="fa fa-user-plus" aria-hidden="true"></span>
  317. Subscribe
  318. </button>
  319. </t>
  320. </div>
  321. </div>
  322. </div>
  323. <table class="hidden-xs table table-striped">
  324. <thead>
  325. <tr>
  326. <th>Day</th>
  327. <th>Date</th>
  328. <th>Time</th>
  329. <th>Type of Shift</th>
  330. <th class="text-center">Available Spaces</th>
  331. <th class="text-center" t-if="irregular_enable_sign_up">Subscribed</th>
  332. </tr>
  333. </thead>
  334. <tbody>
  335. <t t-foreach="shift_templates" t-as="shift_count_subscribed">
  336. <t t-set="shift" t-value="shift_count_subscribed[0]" />
  337. <t t-set="count" t-value="shift_count_subscribed[1]" />
  338. <t t-set="is_subscribed" t-value="shift_count_subscribed[2]" />
  339. <tr t-attf-class="{{ 'warning' if count >= highlight_rule else '' }}">
  340. <td>
  341. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  342. </td>
  343. <td>
  344. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  345. </td>
  346. <td>
  347. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  348. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/>
  349. </td>
  350. <td>
  351. <t t-esc="shift.task_type_id.name"/>
  352. </td>
  353. <td class="text-center">
  354. <t t-esc="count"/>
  355. </td>
  356. <td class="text-center" t-if="irregular_enable_sign_up">
  357. <t t-if="is_subscribed">
  358. <div class="label label-success">
  359. <span class="fa fa-check" aria-hidden="true"></span>
  360. Subscribed
  361. </div>
  362. </t>
  363. <t t-if="not is_subscribed">
  364. <button type="button" class="btn btn-default btn-sm" data-toggle="modal"
  365. t-att-data-target="'#subscribe-shift-%s' % shift.id">
  366. <span class="fa fa-user-plus" aria-hidden="true"></span>
  367. Subscribe
  368. </button>
  369. </t>
  370. </td>
  371. </tr>
  372. </t>
  373. </tbody>
  374. </table>
  375. <!-- Subscribe check -->
  376. <t t-foreach="shift_templates" t-as="shift_count_subscribed">
  377. <t t-set="shift" t-value="shift_count_subscribed[0]" />
  378. <t t-set="count" t-value="shift_count_subscribed[1]" />
  379. <t t-set="is_subscribed" t-value="shift_count_subscribed[2]" />
  380. <div class="modal fade" t-att-id="'subscribe-shift-%s' % shift.id" tabindex="-1" role="dialog"
  381. t-att-aria-labelledby="'subscribe-shift-%s-label' % shift.id">
  382. <div class="modal-dialog" role="document">
  383. <div class="modal-content">
  384. <div class="modal-header">
  385. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  386. <span aria-hidden="true">×</span>
  387. </button>
  388. <h4 class="modal-title" t-att-id="'subscribe-shift-%s-label' % shift.id">
  389. Are you shure you want to subscribe to this shift?
  390. </h4>
  391. </div>
  392. <div class="modal-body">
  393. <t t-esc="time.strftime('%A', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  394. <t t-esc="time.strftime('%d %B %Y', time.strptime(shift.start_time, '%Y-%m-%d %H:%M:%S'))"/>
  395. <span t-field="shift.start_time" t-field-options='{"format": "HH:mm"}'/> -
  396. <span t-field="shift.end_time" t-field-options='{"format": "HH:mm"}'/><br/>
  397. <t t-esc="shift.task_type_id.name"/><br/>
  398. <t t-esc="count"/> available space(s)
  399. </div>
  400. <div class="modal-footer">
  401. <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
  402. <a class="btn btn-primary"
  403. t-if="irregular_enable_sign_up"
  404. t-att-href="'/shift/%s/subscribe?nexturl=%s' % (shift.id, nexturl)">
  405. Subscribe
  406. </a>
  407. </div>
  408. </div>
  409. </div>
  410. </div>
  411. </t>
  412. <div class="oe_structure"/>
  413. </template>
  414. <!-- Shift for non-worker -->
  415. <template
  416. id="my_shift_non_worker"
  417. name="My Shift for Non Worker"
  418. page="True">
  419. <t t-call="website.layout">
  420. <t t-call="beesdoo_website_shift.my_shift_title"/>
  421. <section class="wrap">
  422. <div class="container">
  423. <div class="row">
  424. <div class="col-md-12">
  425. <div class="alert alert-info">
  426. You don't have to participate to shift system.
  427. </div>
  428. </div>
  429. </div>
  430. </div>
  431. </section>
  432. <div class="oe_structure"/>
  433. </t>
  434. </template>
  435. <!-- Shifts Exempted Workers -->
  436. <template
  437. id="my_shift_exempted_worker"
  438. name="My Shifts for Exempted Workers"
  439. page="True">
  440. <t t-call="website.layout">
  441. <t t-call="beesdoo_website_shift.my_shift_title"/>
  442. <section class="wrap">
  443. <div class="container">
  444. <div class="row">
  445. <div class="col-xs-12 col-md-4 pull-right">
  446. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  447. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  448. <p t-if="status.exempt_reason_id">
  449. <label>Exempt Reason:</label>
  450. <t t-esc="status.exempt_reason_id.name"/>
  451. </p>
  452. <div class="oe_structure"/>
  453. </div>
  454. <div class="col-xs-12 col-md-8">
  455. <section class="wrap">
  456. <div class="container">
  457. <div class="row">
  458. <div class="col-md-12">
  459. <div class="alert alert-info">
  460. You don't have to participate to shift system.
  461. </div>
  462. </div>
  463. </div>
  464. </div>
  465. </section>
  466. <div class="oe_structure"/>
  467. </div> <!-- col-md-8 -->
  468. </div> <!-- row -->
  469. </div> <!-- container -->
  470. </section>
  471. <div class="oe_structure"/>
  472. </t>
  473. </template>
  474. <!-- Shifts for Regular Workers -->
  475. <template
  476. id="my_shift_regular_worker"
  477. name="My Shifts for Regular Workers"
  478. page="True">
  479. <t t-call="website.layout">
  480. <t t-call="beesdoo_website_shift.my_shift_title"/>
  481. <section class="wrap">
  482. <div class="container">
  483. <div class="row">
  484. <div class="col-xs-12 col-md-4 pull-right">
  485. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  486. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  487. <p t-if="status.sr != 0">
  488. <label>Shift in Advance:</label>
  489. <t t-esc="status.sr"/>
  490. </p>
  491. <p t-if="status.sc != 0">
  492. <label>Compensation Shift:</label>
  493. <t t-esc="status.sc"/>
  494. </p>
  495. <p t-if="status.alert_start_time">
  496. <label>In Alert Since:</label>
  497. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.alert_start_time, '%Y-%m-%d'))"/>
  498. </p>
  499. <p t-if="status.extension_start_time">
  500. <label>In Extension Since:</label>
  501. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.extension_start_time, '%Y-%m-%d'))"/>
  502. </p>
  503. <div class="oe_structure"/>
  504. </div>
  505. <div class="col-xs-12 col-md-8">
  506. <t t-call="beesdoo_website_shift.my_shift_next_shifts"/>
  507. <t t-call="beesdoo_website_shift.my_shift_past_shifts"/>
  508. </div> <!-- col-md-8 -->
  509. </div> <!-- row -->
  510. </div> <!-- container -->
  511. </section>
  512. <div class="oe_structure"/>
  513. </t>
  514. </template>
  515. <!-- Shifts for Irregular Workers -->
  516. <template
  517. id="my_shift_irregular_worker"
  518. name="Shifts for Irregular Workers"
  519. page="True">
  520. <t t-call="website.layout">
  521. <t t-call="beesdoo_website_shift.my_shift_title"/>
  522. <section class="wrap">
  523. <div class="container">
  524. <div class="row">
  525. <div class="col-xs-12 col-md-4 pull-right">
  526. <t t-call="beesdoo_website_shift.my_shift_worker_status_title"/>
  527. <t t-call="beesdoo_website_shift.my_shift_worker_status_common"/>
  528. <p>
  529. <label>Shift in Advance:</label>
  530. <t t-esc="status.sr"/>
  531. </p>
  532. <p t-if="future_alert_date">
  533. <label>Future Date of Alert:</label>
  534. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(future_alert_date, '%Y-%m-%d'))"/>
  535. </p>
  536. <p t-if="status.irregular_absence_date">
  537. <label>Last Absence Date:</label>
  538. <t t-esc="time.strftime('%A %d %B %Y', time.strptime(status.irregular_absence_date, '%Y-%m-%d'))"/>
  539. </p>
  540. <p t-if="status.irregular_absence_counter">
  541. <label>Number of Absence:</label>
  542. <t t-esc="status.irregular_absence_counter"/>
  543. </p>
  544. <div class="oe_structure"/>
  545. </div>
  546. <div class="col-xs-12 col-md-8">
  547. <t t-call="beesdoo_website_shift.my_shift_next_shifts"/>
  548. <section class="wrap">
  549. <div class="container">
  550. <div class="row">
  551. <div class="col-md-12">
  552. <h2>
  553. Available Shifts
  554. </h2>
  555. </div>
  556. </div>
  557. </div>
  558. </section>
  559. <div class="oe_structure"/>
  560. <section class="wrap">
  561. <div class="container">
  562. <div class="row">
  563. <div class="col-xs-12 col-sm-6">
  564. <p>
  565. Explanation text
  566. </p>
  567. </div>
  568. </div>
  569. </div>
  570. </section>
  571. <div class="oe_structure"/>
  572. <t t-call="beesdoo_website_shift.available_shift_irregular_worker"/>
  573. <t t-call="beesdoo_website_shift.my_shift_past_shifts"/>
  574. </div> <!-- col-md-8 -->
  575. </div> <!-- row -->
  576. </div> <!-- container -->
  577. </section>
  578. <div class="oe_structure"/>
  579. </t>
  580. </template>
  581. </openerp>