| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<templates xml:space="preserve"> |
| 3 |
|
| 4 |
<t t-name="web.CalendarYearPopover"> |
| 5 |
<t t-if="env.isSmall"> |
| 6 |
<Dialog title="dialogTitle"> |
| 7 |
<t t-call="{{ constructor.subTemplates.body }}" /> |
| 8 |
<t t-set-slot="footer"> |
| 9 |
<t t-call="{{ constructor.subTemplates.footer }}" /> |
| 10 |
</t> |
| 11 |
</Dialog> |
| 12 |
</t> |
| 13 |
<t t-else=""> |
| 14 |
<t t-call="{{ constructor.subTemplates.popover }}" /> |
| 15 |
</t> |
| 16 |
</t> |
| 17 |
|
| 18 |
<t t-name="web.CalendarYearPopover.popover"> |
| 19 |
<div class="position-absolute" style="top: .75rem; right: 1rem;"> |
| 20 |
<span class="o_cw_popover_close" t-on-click.stop="() => props.close()"> |
| 21 |
<i class="fc-close fc-icon fc-icon-x" /> |
| 22 |
</span> |
| 23 |
</div> |
| 24 |
<div class="o_cw_body popover-body d-flex flex-column gap-2"> |
| 25 |
<t t-call="{{ constructor.subTemplates.body }}" /> |
| 26 |
<t t-if="props.model.canCreate"> |
| 27 |
<t t-call="{{ constructor.subTemplates.footer }}" /> |
| 28 |
</t> |
| 29 |
</div> |
| 30 |
</t> |
| 31 |
|
| 32 |
<t t-name="web.CalendarYearPopover.body"> |
| 33 |
<div t-foreach="recordGroups" t-as="recordGroup" t-key="recordGroup.title"> |
| 34 |
<h5 t-out="recordGroup.title" /> |
| 35 |
<t t-foreach="recordGroup.records" t-as="record" t-key="record.id"> |
| 36 |
<t t-call="{{ constructor.subTemplates.record }}" /> |
| 37 |
</t> |
| 38 |
</div> |
| 39 |
</t> |
| 40 |
|
| 41 |
<t t-name="web.CalendarYearPopover.footer"> |
| 42 |
<t t-if="props.model.canCreate"> |
| 43 |
<a href="#" class="btn-link o_cw_popover_create" t-on-click.prevent="onCreateButtonClick"> |
| 44 |
<i class="fa fa-plus" /> |
| 45 |
Create |
| 46 |
</a> |
| 47 |
</t> |
| 48 |
<t t-else=""> |
| 49 |
<button class="btn btn-primary o-default-button" t-on-click="props.close"> |
| 50 |
<t>Ok</t> |
| 51 |
</button> |
| 52 |
</t> |
| 53 |
</t> |
| 54 |
|
| 55 |
<t t-name="web.CalendarYearPopover.record"> |
| 56 |
<a |
| 57 |
href="#" |
| 58 |
t-on-click.prevent="() => this.onRecordClick(record)" |
| 59 |
t-attf-style="{{ getRecordStyle(record) }}" |
| 60 |
t-attf-class="o_cw_popover_link d-flex align-items-center gap-1 {{ getRecordClass(record) }} {{record.startHour ? 'o_event_dot' : 'o_event_allday'}}" |
| 61 |
t-att-data-id="record.id" |
| 62 |
t-att-data-title="record.title" |
| 63 |
> |
| 64 |
<span t-if="record.startHour"><t t-out="record.startHour" /></span> |
| 65 |
<span t-esc="record.title"/> |
| 66 |
</a> |
| 67 |
</t> |
| 68 |
|
| 69 |
</templates> |