blob: 06f28a9c9c2435aef71acd0eaa5ca5227a544208 (
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
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2017-today MuK IT GmbH.
This file is part of MuK Grid Snippets
(see https://mukit.at).
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<templates id="template" xml:space="preserve">
<t t-extend="AppsMenu">
<t t-jquery=".o_app" t-operation="attributes">
<attribute name="t-attf-href">#menu_id=#{app.menuID}&action_id=#{app.actionID}</attribute>
</t>
<t t-jquery=".full" t-operation="attributes">
<attribute name="accesskey">h</attribute>
</t>
<t t-jquery=".full > i" t-operation="attributes">
<attribute name="class">fa fa-th</attribute>
</t>
<t t-jquery="[t-as=app]" t-operation="before">
<div class="mk_search_container form-row align-items-center mb-4 col-12">
<div class="mk_search_input col-md-10 ml-auto mr-auto mb-2">
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">
<i class="fa fa-search"/>
</div>
</div>
<input type="text" placeholder="Search menus..." class="form-control"/>
</div>
</div>
<div class="mk_search_results col-md-10 ml-auto mr-auto"/>
</div>
</t>
<t t-jquery=".o_app > t" t-operation="replace">
<t t-call="muk_web_theme.AppIcon"/>
</t>
</t>
<t t-name="muk_web_theme.AppIcon">
<img class="o-app-icon" t-attf-src="data:image/png;base64,#{app.web_icon_data}"/>
<span class="o-app-name">
<t t-esc="app.name"/>
</span>
</t>
<t t-name="muk_web_theme.MenuSearchResults">
<t t-foreach="results" t-as="result">
<t t-set="menu" t-value="widget._menuInfo(result.original)"/>
<a t-attf-class="mk_menu_search_result dropdown-item col-12 ml-auto mr-auto #{result_first ? 'active' : ''}"
t-attf-style="background-image: #{menu.web_icon_data ? 'url(data:image/png;base64,' + menu.web_icon_data + ')' : 'none'}"
t-attf-href="#menu_id=#{menu.id}&action_id=#{menu.action_id}"
t-att-data-menu-id="menu.id"
t-att-data-action-id="menu.action_id"
t-att-data-parent-id="menu.parent_id[0]"
t-raw="result.string"/>
</t>
</t>
</templates>
|