<?xml version="1.0" encoding="utf-8"?>

<!--
    Copyright 2016, 2019 Openworx.
    @author Mario Gielissen <mario@openworx.nl>
    License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
-->

<odoo>
    <template id="app_sidebar" inherit_id="web.webclient_bootstrap" name="Apps Sidebar">
        <xpath expr="//div[hasclass('o_main')]//main[hasclass('o_main_content')]" position="before">
            <div id="app-sidebar" class="app-sidebar-panel">
<!--                <div class="app-sidebar navbar-collapse collapse"> -->
		    <div class="app-sidebar">
                    <ul id="sidebar" class="app-sidebar-menu">
                        <li class="nav-item"  t-as="menu" t-foreach="menu_data['children']" >
                            <t t-set="debug_param" t-value="''"/>
                            <a t-att-href="'/web%s#menu_id=%s&amp;action=' % (debug_param, menu['id'])"
                               t-att-class="'nav-link nav-toggle' if menu.get('children') else 'nav-link '"
                               t-att-data-menu="menu['id']"
                               t-att-data-menu-xmlid="menu.get('xmlid')"
                               t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None"
                               t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None">
                                <img t-attf-src="/web/image/ir.ui.menu/{{ menu['id'] }}/web_icon_data" t-att-alt="menu['name']" class="app-sidebar-menuitem" t-att-title="menu['name']"/>
                                <span class="title" >
                                    <t t-esc="menu['name']"/>
                                </span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </xpath>
    </template>
</odoo>
