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.

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