1<?xml version="1.0" encoding="UTF-8"?>
2<templates id="template" xml:space="preserve">
3<t t-name="website.contentMenu.dialog.submenu">
4    <li t-att-data-menu-id="submenu.fields['id']" t-att-data-mega-menu="submenu.fields['is_mega_menu'] ? true : undefined">
5        <div class="input-group">
6            <div class="input-group-prepend">
7                <span class="input-group-text fa fa-bars" role="img" aria-label="Dropdown menu" title="Dropdown menu"/>
8            </div>
9            <span class="form-control d-flex align-items-center">
10                <span class="js_menu_label o_text_overflow flex-grow-1">
11                    <t t-esc="submenu.fields['name']"/>
12                </span>
13                <span t-if="submenu.fields['is_mega_menu']" class="badge badge-primary">Mega Menu</span>
14                <i t-if="submenu.is_homepage" class="fa fa-home ml-3" role="img" aria-label="Home" title="Home"/>
15            </span>
16            <span class="input-group-append">
17                <button type="button" class="btn btn-primary js_edit_menu fa fa-pencil-square-o" aria-label="Edit Menu Item" title="Edit Menu Item"/>
18                <button type="button" class="btn btn-danger js_delete_menu fa fa-trash-o" aria-label="Delete Menu Item" title="Delete Menu Item"/>
19            </span>
20        </div>
21        <t t-set="children" t-value="submenu.children"/>
22        <ul t-if="children">
23            <t t-foreach="children" t-as="submenu">
24                <t t-call="website.contentMenu.dialog.submenu"/>
25            </t>
26        </ul>
27    </li>
28</t>
29<div t-name="website.contentMenu.dialog.select">
30    <select class="form-control mb16" t-if="widget.roots">
31        <t t-foreach="widget.roots" t-as="root">
32            <option t-att-value="root.id"><t t-esc="root.name"/></option>
33        </t>
34    </select>
35</div>
36<div t-name="website.contentMenu.dialog.edit">
37    <select class="form-control mb16" t-if="widget.roots">
38        <t t-foreach="widget.roots" t-as="root">
39            <option t-att-value="root.id"><t t-esc="root.name"/></option>
40        </t>
41    </select>
42    <ul class="oe_menu_editor list-unstyled">
43        <t t-foreach="widget.menu.children" t-as="submenu">
44            <t t-call="website.contentMenu.dialog.submenu"/>
45        </t>
46    </ul>
47    <div class="mt32">
48        <small class="float-right text-muted">
49            Drag to the right to get a submenu
50        </small>
51        <a href="#" class="js_add_menu">
52            <i class="fa fa-plus-circle"/> Add Menu Item
53        </a><br/>
54        <a href="#" class="js_add_menu" data-type="mega">
55            <i class="fa fa-plus-circle"/> Add Mega Menu Item
56        </a>
57    </div>
58</div>
59</templates>
60