summaryrefslogtreecommitdiff
path: root/addons/hr_holidays/static/src/xml/time_off_calendar.xml
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/hr_holidays/static/src/xml/time_off_calendar.xml
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/hr_holidays/static/src/xml/time_off_calendar.xml')
-rw-r--r--addons/hr_holidays/static/src/xml/time_off_calendar.xml78
1 files changed, 78 insertions, 0 deletions
diff --git a/addons/hr_holidays/static/src/xml/time_off_calendar.xml b/addons/hr_holidays/static/src/xml/time_off_calendar.xml
new file mode 100644
index 00000000..b041222d
--- /dev/null
+++ b/addons/hr_holidays/static/src/xml/time_off_calendar.xml
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<templates id="template" xml:space="preserve">
+ <t t-name="hr_holidays.dashboard_calendar_header">
+ <div class="o_timeoff_container d-flex">
+ <div t-foreach="timeoffs" t-as="timeoff" t-attf-class="o_timeoff_card flex-grow-1 d-flex flex-column {{ timeoff_last ? 'o_timeoff_card_last' : '' }}">
+ <t t-set="need_allocation" t-value="timeoff[2] !== 'no'"/>
+ <t t-set="cl" t-value="'text-muted'"/>
+
+ <t t-if="need_allocation &amp;&amp; timeoff[1]['virtual_remaining_leaves'] &gt; 0">
+ <t t-set="cl" t-value="'o_timeoff_green'"/>
+ </t>
+
+ <div class="mt-2">
+ <t t-if="need_allocation">
+ <span t-esc="timeoff[1]['virtual_remaining_leaves']" class="o_timeoff_big o_timeoff_purple"/> / <span t-esc="timeoff[1]['max_leaves']"/> <t t-if="timeoff[1]['request_unit'] == 'hour'">Hours</t><t t-else="">Days</t>
+ </t>
+ <t t-else="">
+ <span t-esc="timeoff[1]['virtual_leaves_taken']" class="o_timeoff_big o_timeoff_purple"/> <t t-if="timeoff[1]['request_unit'] == 'hour'">Hours</t><t t-else="">Days</t>
+ </t>
+ </div>
+
+ <b><span t-esc="timeoff[0]" class="o_timeoff_name"/></b>
+
+ <span class="mb-4" t-if="need_allocation">
+ <span t-attf-class="mr-1 font-weight-bold {{ cl }}" t-esc="timeoff[1]['virtual_leaves_taken']"/><span>taken</span>
+ <t t-if="timeoff[3]"> (Expire on <span t-esc="moment(timeoff[3]).format('L')"/>)</t>
+ </span>
+ </div>
+ </div>
+ </t>
+
+ <t t-name="hr_holidays.dashboard.calendar.button">
+ <button class="btn btn-primary btn-time-off" type="button">
+ <t t-esc="time_off"/>
+ </button>
+ <button class="btn btn-secondary btn-allocation" type="button">
+ <t t-esc="request"/>
+ </button>
+ </t>
+
+ <t t-name="hr_holidays.calendar.popover.placeholder">
+ <div t-attf-class="o_cw_popover popover card shadow #{typeof color === 'number' ? _.str.sprintf('o_calendar_color_%s', color) : ''}" role="tooltip">
+ <div class="arrow"/>
+ <div class="card-header d-flex justify-content-between py-2 pr-2">
+ <h4 class="popover-header border-0 p-0 pt-1"/>
+ <div class="ml-4">
+ <i t-if="calendarIcon" t-attf-class="fa {{calendarIcon}}"></i>
+ <span class="o_cw_popover_close ml-1"><i class="fa fa-close small"/></span>
+ </div>
+ </div>
+ <div class="o_cw_body">
+ </div>
+ </div>
+ </t>
+
+ <t t-name="hr_holidays.calendar.popover">
+ <div class="o_cw_body">
+ <ul class="list-group list-group-flush">
+ <li t-if="!widget.hideDate and widget.eventDate.date" class="list-group-item">
+ <b class="text-capitalize" t-esc="widget.eventDate.date"/> <small t-if="widget.eventDate.duration"><b t-esc="_.str.sprintf('(%s)', widget.eventDate.duration)"/></small>
+ </li>
+ <li t-if="!widget.hideTime and widget.eventTime.time" class="list-group-item">
+ <b t-esc="widget.eventTime.time"/> <small t-if="widget.eventTime.duration"><b t-esc="_.str.sprintf('(%s)', widget.eventTime.duration)"/></small>
+ </li>
+ </ul>
+ <ul class="list-group list-group-flush o_cw_popover_fields_secondary" t-if="widget.display_name">
+ <li class="list-group-item">
+ <span class="o_field_char o_field_widget" t-esc="widget.display_name" />
+ </li>
+ </ul>
+ <div class="card-footer border-top" t-if="widget.canEdit or widget.canDelete">
+ <a t-if="widget.canEdit" href="#" class="btn btn-primary o_cw_popover_edit">Edit</a>
+ <a t-if="widget.canDelete" href="#" class="btn btn-secondary o_cw_popover_delete ml-2">Delete</a>
+ </div>
+ </div>
+ </t>
+</templates>