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.

86 lines
3.5 KiB

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