diff options
Diffstat (limited to 'addons/web/static/src/xml')
| -rw-r--r-- | addons/web/static/src/xml/kanban.xml | 105 |
1 files changed, 104 insertions, 1 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml index 06ba6b71eb6..8a9ac5fdb7d 100644 --- a/addons/web/static/src/xml/kanban.xml +++ b/addons/web/static/src/xml/kanban.xml @@ -192,6 +192,110 @@ </div> </t> +<!-- Kanban SearchPanel --> +<t t-name="SearchPanel.SectionHeader"> + <header class="o_search_panel_section_header text-uppercase"> + <i t-attf-class="mr-1 fa #{section.icon} o_search_panel_section_icon" t-attf-style="#{section.color ? ('color: ' + section.color) : ''}"/> + <b><t t-esc="section.description"/></b> + </header> +</t> + +<t t-name="SearchPanel.Category"> + <section class="o_search_panel_section o_search_panel_category"> + <t t-call="SearchPanel.SectionHeader"> + <t t-set="section" t-value="category"/> + </t> + <ul class="list-group d-block"> + <li class="o_search_panel_category_value border-0 list-group-item" t-att-data-category-id="category.id"> + <header t-att-class="'list-group-item-action' + (!category.activeValueId ? ' active' : '')"> + <label class="o_search_panel_label mb0 d-block"> + <span class="o_search_panel_label_title"><b>All</b></span> + </label> + </header> + </li> + <t t-call="SearchPanel.CategoryValues"> + <t t-set="values" t-value="category.rootIds"/> + </t> + </ul> + </section> +</t> +<t t-name="SearchPanel.CategoryValues"> + <t t-foreach="values" t-as="valueId"> + <t t-set="value" t-value="category.values[valueId]"/> + <li class="o_search_panel_category_value border-0 list-group-item" t-att-data-id="value.id" t-att-data-category-id="category.id"> + <header t-att-class="'list-group-item-action' + (value.id === category.activeValueId ? ' active' : '')"> + <label t-att-for="value.display_name" class="o_search_panel_label mb0 d-block"> + <i t-if="value.childrenIds.length" t-att-class="'fa fa-fw pull-right o_toggle_fold ' + (value.folded ? 'fa-caret-left' : 'fa-caret-down')"/> + <span class="o_search_panel_label_title"><t t-esc="value.display_name"/></span> + </label> + </header> + <ul t-if="!value.folded" class="list-group d-block"> + <t t-call="SearchPanel.CategoryValues"> + <t t-set="values" t-value="value.childrenIds"/> + </t> + </ul> + </li> + </t> +</t> + +<t t-name="SearchPanel.Filter"> + <section class="o_search_panel_section o_search_panel_filter"> + <t t-call="SearchPanel.SectionHeader"> + <t t-set="section" t-value="filter"/> + </t> + <ul class="list-group d-block"> + <t t-if="filter.groups" t-call="SearchPanel.FilterGroups"> + <t t-set="groups" t-value="filter.groups"/> + </t> + <t t-else="" t-call="SearchPanel.FilterValues"> + <t t-set="sortedValueIds" t-value="filter.sortedValueIds"/> + <t t-set="values" t-value="filter.values"/> + </t> + </ul> + </section> +</t> +<t t-name="SearchPanel.FilterGroups"> + <li t-foreach="filter.sortedGroupIds" t-as="groupId" t-att-data-group-id="groupId" t-att-data-filter-id="filter.id" + class="o_search_panel_filter_group list-group-item border-0"> + <t t-set="group" t-value="groups[groupId]"/> + <div class="custom-control custom-checkbox"> + <t t-set="inputId" t-value="_.uniqueId('input_')"/> + <input type="checkbox" t-att-id="inputId" t-att-checked="group.state === 'checked' ? 'checked' : undefined" class="custom-control-input"/> + <label t-att-for="inputId" class="o_search_panel_label custom-control-label d-block" t-att-title="group.tooltip"> + <i t-att-class="'fa fa-fw pull-right o_toggle_fold ' + (group.folded ? 'fa-caret-left' : 'fa-caret-down')"/> + <span class="o_search_panel_label_title"><t t-esc="group.name"/></span> + </label> + </div> + <ul t-if="!group.folded" class="list-group d-block"> + <t t-call="SearchPanel.FilterValues"> + <t t-set="sortedValueIds" t-value="group.sortedValueIds"/> + <t t-set="values" t-value="group.values"/> + </t> + </ul> + </li> + <ul t-if="groups['false']" class="list-group d-block"> + <t t-call="SearchPanel.FilterValues"> + <t t-set="group" t-value="groups['false']"/> + <t t-set="sortedValueIds" t-value="group.sortedValueIds"/> + <t t-set="values" t-value="group.values"/> + </t> + </ul> +</t> +<t t-name="SearchPanel.FilterValues"> + <li t-foreach="sortedValueIds" t-as="valueId" t-att-data-value-id="valueId" t-att-data-filter-id="filter.id" + class="o_search_panel_filter_value list-group-item border-0"> + <t t-set="value" t-value="values[valueId]"/> + <div class="custom-control custom-checkbox"> + <t t-set="inputId" t-value="_.uniqueId('input_')"/> + <input type="checkbox" t-att-id="inputId" t-att-checked="value.checked ? 'checked' : undefined" class="custom-control-input"/> + <label t-att-for="inputId" class="o_search_panel_label custom-control-label d-block" t-att-title="group && group.tooltip"> + <span class="o_search_panel_label_title"><t t-esc="value.name"/></span> + <span t-if="value.count > 0" class="pull-right text-muted mr-2 mt-1 small"><t t-esc="value.count"/></span> + <span t-if="filter.disableCounters" class="pull-right text-muted mr-2 mt-1 small">?</span> + </label> + </div> + </li> +</t> <!-- Mobile templates --> <t t-name="KanbanView.MobileTabs"> @@ -203,5 +307,4 @@ </t> </div> </t> - </template> |
