blob: b041222d7fcac363237c856933fcadbb56f48e2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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 && timeoff[1]['virtual_remaining_leaves'] > 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>
|