You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
3.5 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Copyright (c) 2017-2019 MuK IT GmbH.
  4. This file is part of MuK Backend Theme
  5. (see https://mukit.at).
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU Lesser General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU Lesser General Public License for more details.
  14. You should have received a copy of the GNU Lesser General Public License
  15. along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. -->
  17. <templates id="template" xml:space="preserve">
  18. <t t-extend="Menu">
  19. <t t-jquery=".o_menu_systray" t-operation="after">
  20. <button class="mk_menu_sections_toggle d-md-none" data-toggle="collapse"
  21. data-target=".o_main_navbar > .o_menu_sections">
  22. <i class="fa fa-bars"/>
  23. </button>
  24. </t>
  25. <t t-jquery=".o_menu_systray" t-operation="after">
  26. <div class="mk_apps_sidebar_panel" />
  27. </t>
  28. </t>
  29. <t t-name="muk_web_theme.MobileMenu.link">
  30. <t t-set="depth" t-value="(depth || 0) + 1"/>
  31. <t t-if="!menu.children.length">
  32. <li>
  33. <a role="menuitem" t-attf-class="dropdown-item o_menu_entry_lvl_#{depth}"
  34. t-attf-href="#menu_id=#{menu.id}&amp;action=#{menu.action ? menu.action.split(',')[1] : ''}"
  35. t-att-data-action-model="menu.action ? menu.action.split(',')[0] : ''"
  36. t-att-data-action-id="menu.action ? menu.action.split(',')[1] : ''"
  37. t-att-data-menu="menu.id"
  38. t-att-data-menu-xmlid="menu.xmlid"
  39. data-toggle="collapse" data-target="#o_navbar_collapse.in">
  40. <span>
  41. <t t-esc="menu.name"/>
  42. </span>
  43. </a>
  44. </li>
  45. </t>
  46. <t t-else="">
  47. <li class="mk_menu_mobile_section clearfix">
  48. <a role="button" href="#" t-attf-class="dropdown-toggle o-no-caret o_menu_header_lvl_#{depth}"
  49. t-att-data-menu-xmlid="menu.xmlid" data-toggle="dropdown" aria-expanded="false">
  50. <span>
  51. <t t-esc="menu.name"/>
  52. </span>
  53. <span class="fa fa-chevron-right float-right"/>
  54. <span class="fa fa-chevron-down float-right" style="display: none;"/>
  55. </a>
  56. <ul class="dropdown-menu" role="menu">
  57. <t t-foreach="menu.children" t-as="submenu">
  58. <t t-call="muk_web_theme.MobileMenu.link">
  59. <t t-set="menu" t-value="submenu"/>
  60. </t>
  61. </t>
  62. </ul>
  63. </li>
  64. </t>
  65. </t>
  66. <t t-name="muk_web_theme.MobileMenu.sections">
  67. <t t-set="isMobile" t-value="true"/>
  68. <t t-foreach="menu_data.children" t-as="topmenu">
  69. <section t-att-class="topmenu.id">
  70. <t t-if="topmenu.children.length">
  71. <t t-foreach="topmenu.children" t-as="submenu">
  72. <t t-call="muk_web_theme.MobileMenu.link">
  73. <t t-set="menu" t-value="submenu"/>
  74. </t>
  75. </t>
  76. </t>
  77. </section>
  78. </t>
  79. </t>
  80. </templates>