blob: 2fd7f8ca211b14a26f011278490ca79d3b7832bf (
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
<template>
<t t-name="KanbanView.buttons">
<div>
<button t-if="!noCreate" type="button" t-attf-class="btn #{btnClass} o-kanban-button-new" accesskey="c">
<t t-esc="create_text || _t('Create')"/>
</button>
</div>
</t>
<t t-name="KanbanView.Group">
<div t-attf-class="o_kanban_group#{widget.data_records.length == 0 ? ' o_kanban_no_records' : ''}" t-att-data-id="widget.id or widget.db_id"
role="feed" t-attf-aria-labelledby="kanban_header_#{widget.id or widget.db_id}">
<div class="o_kanban_header">
<div class="o_kanban_header_title">
<span t-attf-id="#kanban_header_#{widget.id or widget.db_id}" class="o_column_title"><t t-esc="widget.title"/></span>
<span class="o_column_unfold"><i class="fa fa-arrows-h" role="img" aria-label="Unfold" title="Unfold"/></span>
<span class="o_kanban_config dropdown">
<a class="dropdown-toggle o-no-caret" data-toggle="dropdown" href="#"><i class="fa fa-gear" role="img" aria-label="Settings" title="Settings"/></a>
<div class="dropdown-menu" role="menu">
<a role="menuitem" class="dropdown-item o_kanban_toggle_fold" href="#">Fold</a>
<t t-if="widget.grouped_by_m2o">
<a t-if="widget.editable and widget.id" role="menuitem" class="dropdown-item o_column_edit" href="#">Edit Stage</a>
<a t-if="widget.deletable and widget.id" role="menuitem" class="dropdown-item o_column_delete" href="#">Delete</a>
</t>
<t t-if="widget.has_active_field and widget.archivable">
<a role="menuitem" href="#" class="dropdown-item o_column_archive_records">Archive All</a>
<a role="menuitem" href="#" class="dropdown-item o_column_unarchive_records">Unarchive All</a>
</t>
</div>
</span>
<span t-if="widget.quick_create" class="o_kanban_quick_add"><i class="fa fa-plus" role="img" aria-label="Quick add" title="Quick add"/></span>
</div>
</div>
<div t-if="widget.remaining > 0" class="o_kanban_load_more">
<t t-call="KanbanView.LoadMore"/>
</div>
</div>
</t>
<t t-name="KanbanView.LoadMore">
<a href="#">Load more... (<t t-esc="widget.remaining"/> remaining)</a>
</t>
<t t-name="KanbanView.ColumnQuickCreate">
<div class="o_column_quick_create">
<div class="o_quick_create_folded">
<span class="o_kanban_add_column"><i class="fa fa-plus" role="img" aria-label="Add column" title="Add column"/></span>
<span class="o_kanban_title">Add a Column</span>
</div>
<div class="o_quick_create_unfolded">
<div class="o_kanban_header">
<div class="input-group">
<input type="text" class="form-control o_input" placeholder="Column title"/>
<span class="input-group-append">
<button class="btn btn-primary o_kanban_add" type="button">Add</button>
</span>
</div>
<span t-if="!widget.isMobile" class="o_discard_msg text-muted float-right">Esc to discard</span>
<t t-if="widget.examples && !widget.isMobile">
<button type="button" class="btn btn-link o_kanban_examples">See examples</button>
</t>
</div>
<div class="o_kanban_muted_record"/>
<div class="o_kanban_muted_record"/>
<div class="o_kanban_muted_record"/>
</div>
</div>
</t>
<t t-name="KanbanView.RecordQuickCreate.buttons">
<div>
<button class="btn btn-primary o_kanban_add">Add</button>
<button class="btn btn-primary o_kanban_edit">Edit</button>
<button class="btn btn-secondary o_kanban_cancel ml8">Discard</button>
</div>
</t>
<t t-name="KanbanColorPicker">
<t t-foreach="colors" t-as="color">
<li>
<a role="menuitem"
href="#"
t-att-data-color="color_index"
t-attf-class="oe_kanban_color_#{color_index}"
t-att-title="color"
t-att-aria-label="color"/>
</li>
</t>
</t>
<t t-name="GraphCustomTooltip">
<table>
<tbody>
<tr>
<td class="legend-color-guide">
<div t-attf-style="background-color: #{color};"></div>
</td>
<td class="key"><t t-esc="key" /></td>
<td class="value"><t t-esc="value" /></td>
</tr>
</tbody>
</table>
</t>
<t t-name="KanbanView.ColumnProgressBar">
<div class="o_kanban_counter">
<div class="o_kanban_counter_progress progress">
<t t-foreach="widget.colors" t-as="color">
<t t-set="count" t-value="widget.subgroupCounts and widget.subgroupCounts[color] or 0"/>
<div t-attf-class="progress-bar transition-off bg-#{color_value}-full#{count ? ' o_bar_has_records' : ''}#{widget.activeFilter ? ' progress-bar-animated progress-bar-striped' : ''}"
t-att-data-filter="color"
t-attf-data-original-title="#{count} #{color}"
aria-valuemin="0" aria-valuemax="100" t-att-aria-valuenow="count*100" role="progressbar"
t-attf-style="width: #{count ? (count * 100 / widget.groupCount) : 0}%;"/>
</t>
</div>
<div class="o_kanban_counter_side"><b><t t-esc="widget.totalCounterValue || 0"/></b></div>
</div>
</t>
<t t-name="KanbanView.SetCoverModal">
<div t-if="attachmentIds.length" class="ml32 mr0 o_kanban_cover_container">
<t t-foreach="attachmentIds" t-as="attachment">
<div t-attf-class="o_kanban_cover_image#{coverId === attachment.id ? ' o_selected' : ''}">
<img t-attf-src="/web/image/#{attachment.id}?unique=1" t-att-data-id="attachment.id" t-att-data-name="attachment.name" alt="Attachment"/>
</div>
</t>
</div>
<div t-else="">There is no available image to be set as cover.</div>
<span class="d-none">
<t t-call="HiddenInputFile">
<t t-set="fileupload_id" t-value="widget.imageUploadID" />
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
<input type="hidden" name="model" t-att-value="widget.modelName" />
<input type="hidden" name="id" t-att-value="widget.id" />
</t>
</span>
</t>
<!-- Note: this dialog isn't responsive, but it is not accessible on mobile -->
<div t-name="KanbanView.ExamplesDialog" class="o_kanban_examples_dialog">
<div class="o_kanban_examples_dialog_nav">
<ul class="nav nav-pills flex-column">
<t t-foreach="examples" t-as="example">
<li class="nav-item">
<a t-attf-aria-controls="example_#{example_index}" data-toggle="tab" role="tab" t-att-data-example-index="example_index" t-attf-href="#example_#{example_index}" t-attf-class="nav-link#{example_index == 0 and ' active' or ''}"> <t t-esc="example.name"/> </a>
</li>
</t>
</ul>
</div>
<div class="o_kanban_examples_dialog_content">
<div class="tab-content">
<t t-foreach="examples" t-as="example">
<div role="tabpanel" t-attf-id="example_#{example_index}" t-attf-class="tab-pane #{example_index == 0 and 'active in' or ''}">
<div t-if="example.description" class="o_kanban_examples_description">
<t t-raw="example.description"/> <!-- description is supposed to be properly escaped -->
</div>
<div class="o_kanban_examples">
<t t-foreach="example.columns" t-as="column">
<div class="o_kanban_examples_group">
<h6><b><t t-esc="column"/></b></h6>
<t t-foreach="_.random(1,4)">
<t t-call="KanbanView.ExamplesDialog.RecordGhost"/>
</t>
</div>
</t>
</div>
</div>
</t>
</div>
</div>
</div>
<t t-name="KanbanView.ExamplesDialog.RecordGhost">
<div class="o_kanban_examples_ghost">
<div class="o_ghost_content"/>
<div class="o_ghost_content o_ghost_tag"/>
<t t-if="example.bullets">
<t t-if="_.random(0,5) > 3">
<t t-raw="example.bullets[_.random(0, example.bullets.length-1)]"/>
</t>
</t>
<img class="float-right o_ghost_avatar" src="/base/static/img/avatar.png" alt="Avatar"/>
</div>
</t>
<!-- Kanban Example Background -->
<t t-name="KanbanView.ExamplesBackground">
<div class="o_kanban_example_background_container">
<div class="o_kanban_example_background">
<div class="o_kanban_examples">
<t t-foreach="ghostColumns" t-as="column">
<div class="o_kanban_examples_group">
<h6><b><t t-esc="column"/></b></h6>
<t t-foreach="_.random(2,6)">
<t t-call="KanbanView.ExamplesBackground.RecordGhost"/>
</t>
</div>
</t>
</div>
</div>
</div>
</t>
<t t-name="KanbanView.ExamplesBackground.RecordGhost">
<div class="o_kanban_examples_ghost">
<div class="o_ghost_content"/>
<div class="o_ghost_content o_ghost_tag"/>
<img class="float-right o_ghost_avatar" src="/base/static/img/avatar.png" alt="Avatar"/>
</div>
</t>
<!-- Mobile templates -->
<t t-name="KanbanView.MobileTabs">
<div class="o_kanban_mobile_tabs_container">
<div class="o_kanban_mobile_tabs">
<t t-foreach="data" t-as="group">
<div class="o_kanban_mobile_tab" t-att-data-id="group.res_id or group.id">
<span class="o_column_title"><t t-esc="group.value"/></span>
</div>
</t>
<div class="o_kanban_mobile_add_column" t-if="quickCreateEnabled">
<i class="fa fa-plus " role="img" aria-label="Add column" title="Add column"/>
</div>
</div>
</div>
</t>
</template>
|