| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
|
| 3 |
<templates> |
| 4 |
<t t-name="hr_homeworking_calendar.CalendarCommonRendererHeader" t-inherit="web.CalendarCommonRendererHeader" t-inherit-mode="primary"> |
| 5 |
<xpath expr="//span[hasclass('o_cw_day_number')]" position="after"> |
| 6 |
<t t-if="scale != 'month'" t-call="hr_homeworking_calendar.CalendarCommonRenderer.buttonWorklocation"/> |
| 7 |
</xpath> |
| 8 |
</t> |
| 9 |
|
| 10 |
<t t-name="hr_homeworking_calendar.CalendarCommonRenderer.buttonWorklocation"> |
| 11 |
<t t-if="multiCalendar"> |
| 12 |
<t t-call="hr_homeworking_calendar.MultiCalendarButtonWorkLocation"/> |
| 13 |
</t> |
| 14 |
<t t-else=""> |
| 15 |
<t t-call="hr_homeworking_calendar.SingleCalendarButtonWorkLocation"/> |
| 16 |
</t> |
| 17 |
</t> |
| 18 |
|
| 19 |
<div t-name="hr_homeworking_calendar.MultiCalendarButtonWorkLocation" class="o_worklocation_btn w-100 d-flex align-items-center"> |
| 20 |
<div class="o_homework_multi d-flex gap-1 ms-1"> |
| 21 |
<t t-foreach="Object.keys(worklocation)" t-as="location" t-key="location"> |
| 22 |
<t t-foreach="worklocation[location]" t-as="wl" t-key="wl.id"> |
| 23 |
<div class="o_homeworking_content wl_action" t-att-data-location="location" t-att-data-id="wl.id" t-att-data-employee="wl.employeeId"> |
| 24 |
<i t-attf-class="o_homework_content d-flex align-items-center justify-content-center flex-wrap border border-1 rounded-circle me-0 fa {{iconMap[wl.icon] || 'fa-map-marker'}} wl_color_{{wl.colorIndex}}"/> |
| 25 |
</div> |
| 26 |
</t> |
| 27 |
<span class="fw-bolder" t-esc="worklocation[location][0].title"/> |
| 28 |
</t> |
| 29 |
</div> |
| 30 |
<button t-if="!workLocationSetForCurrentUser" class="o_worklocation_text bg-info bg-opacity-25 border-0 rounded-pill px-lg-2 py-0 text-nowrap opacity-0 opacity-100-hover wl_action" data-create="1"> |
| 31 |
<i class="add_wl fa fa-map-marker me-lg-1" aria-hidden="true"></i> |
| 32 |
</button> |
| 33 |
</div> |
| 34 |
|
| 35 |
<div t-name="hr_homeworking_calendar.SingleCalendarButtonWorkLocation" class="o_worklocation_btn w-100 d-flex align-items-center"> |
| 36 |
<div t-if="workLocationSetForCurrentUser" class="w-100 d-flex align-items-center wl_action o_homework_single"> |
| 37 |
<t t-if="worklocation.display"> |
| 38 |
<button t-attf-class='o_worklocation_text border-0 rounded-pill px-lg-2 py-0 text-nowrap wl_color_{{worklocation.colorIndex}}'> |
| 39 |
<i t-attf-class="fa {{iconMap[worklocation.icon] || 'fa-map-marker'}} me-lg-1" aria-hidden="true"></i> |
| 40 |
<span class="d-none d-lg-inline fw-bold" t-esc="worklocation.title"/> |
| 41 |
</button> |
| 42 |
<button t-if="showLine" t-attf-class="o_worklocation_line d-lg-block w-100 border-0 p-0 wl_color_{{worklocation.colorIndex}}"/> |
| 43 |
</t> |
| 44 |
<t t-else=""> |
| 45 |
<button t-if="showLine" t-attf-class="o_worklocation_line d-lg-block w-100 border-0 p-0 wl_color_{{worklocation.colorIndex}}"/> |
| 46 |
</t> |
| 47 |
</div> |
| 48 |
<div t-else="" class="w-100 d-flex align-items-center opacity-0 opacity-100-hover wl_action" data-create="1"> |
| 49 |
<button t-if="!workLocationSetForCurrentUser" class="o_worklocation_text bg-info bg-opacity-25 border-0 rounded-pill px-lg-2 py-0 text-nowrap"> |
| 50 |
<i class="fa fa-map-marker me-1" aria-hidden="true"></i> |
| 51 |
<span class="d-lg-inline fw-bold">Set<span class="location_xs_hide"> Location</span></span> |
| 52 |
</button> |
| 53 |
<button t-if="showLine" class="o_worklocation_line d-lg-block w-100 bg-info bg-opacity-25 border-0 p-0"/> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
</templates> |