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.

70 lines
2.3 KiB

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!--
  3. Copyright (c) 2017-today MuK IT GmbH.
  4. This file is part of MuK 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 xml:space="preserve">
  18. <t t-name="muk_web_theme.NavBar" t-inherit="web.NavBar" t-inherit-mode="extension" owl="1">
  19. <xpath expr="//nav" position="before">
  20. <t t-set="apps" t-value="menuService.getApps()" />
  21. </xpath>
  22. <xpath expr="//t[@t-call='web.NavBar.AppsMenu']" position="replace">
  23. <AppsMenu hotkey="'h'" title="'Home Menu'" class="o_navbar_apps_menu" manualOnly="true">
  24. <t t-set-slot="toggler">
  25. <i class="fa fa-th" />
  26. </t>
  27. <MenuItem
  28. t-foreach="apps"
  29. t-as="app"
  30. t-key="app.id"
  31. class="o_app"
  32. t-att-class="{ focus: menuService.getCurrentApp() === app }"
  33. payload="app"
  34. >
  35. <a t-att-href="getMenuItemHref(app)" t-on-click.prevent="">
  36. <img
  37. t-if="app.webIconData"
  38. class="mk_app_icon"
  39. t-attf-src="data:image/png;base64,{{ app.webIconData }}"
  40. />
  41. <img
  42. t-else=""
  43. class="mk_app_icon"
  44. src="/muk_web_theme/static/img/default_icon.png"
  45. />
  46. <span class="mk_app_name" t-attf-style="mix-blend-mode: {{ backgroundBlendMode }};">
  47. <t t-esc="app.name"/>
  48. </span>
  49. </a>
  50. </MenuItem>
  51. </AppsMenu>
  52. </xpath>
  53. <xpath expr="//nav" position="inside">
  54. <AppsBar apps="apps"/>
  55. </xpath>
  56. <xpath expr="//t[@t-call='web.NavBar.SectionsMenu']" position="attributes">
  57. <attribute name="t-if">currentAppSections.length</attribute>
  58. </xpath>
  59. </t>
  60. </templates>