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.

76 lines
3.1 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="AppsMenu">
  19. <t t-jquery=".o_app" t-operation="attributes">
  20. <attribute name="t-attf-href">#menu_id=#{app.menuID}&amp;action_id=#{app.actionID}</attribute>
  21. </t>
  22. <t t-jquery=".full" t-operation="attributes">
  23. <attribute name="accesskey">h</attribute>
  24. </t>
  25. <t t-jquery=".full &gt; i" t-operation="attributes">
  26. <attribute name="class">fa fa-th</attribute>
  27. </t>
  28. <t t-jquery="[t-as=app]" t-operation="before">
  29. <div class="mk_search_container form-row align-items-center mb-4 col-12">
  30. <div class="mk_search_input col-md-10 ml-auto mr-auto mb-2">
  31. <div class="input-group">
  32. <div class="input-group-prepend">
  33. <div class="input-group-text">
  34. <i class="fa fa-search"/>
  35. </div>
  36. </div>
  37. <input type="text" placeholder="Search menus..." class="form-control"/>
  38. </div>
  39. </div>
  40. <div class="mk_search_results col-md-10 ml-auto mr-auto"/>
  41. </div>
  42. </t>
  43. <t t-jquery=".o_app &gt; t" t-operation="replace">
  44. <t t-call="muk_web_theme.AppIcon"/>
  45. </t>
  46. </t>
  47. <t t-name="muk_web_theme.AppIcon">
  48. <img class="o-app-icon" t-attf-src="data:image/png;base64,#{app.web_icon_data}"/>
  49. <span class="o-app-name">
  50. <t t-esc="app.name"/>
  51. </span>
  52. </t>
  53. <t t-name="muk_web_theme.MenuSearchResults">
  54. <t t-foreach="results" t-as="result">
  55. <t t-set="menu" t-value="widget._menuInfo(result.original)"/>
  56. <a t-attf-class="mk_menu_search_result dropdown-item col-12 ml-auto mr-auto #{result_first ? 'active' : ''}"
  57. t-attf-style="background-image: #{menu.web_icon_data ? 'url(data:image/png;base64,' + menu.web_icon_data + ')' : 'none'}"
  58. t-attf-href="#menu_id=#{menu.id}&amp;action_id=#{menu.action_id}"
  59. t-att-data-menu-id="menu.id"
  60. t-att-data-action-id="menu.action_id"
  61. t-att-data-parent-id="menu.parent_id[0]"
  62. t-raw="result.string"/>
  63. </t>
  64. </t>
  65. </templates>