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.

256 lines
10 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2016 LasLabs Inc.
  4. License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  5. -->
  6. <odoo>
  7. <template id="webclient_bootstrap"
  8. inherit_id="web.webclient_bootstrap"
  9. name="App Drawer - Web Client"
  10. >
  11. <xpath expr="//div[@class='oe_leftbar']" position="replace" />
  12. <xpath expr="//t[@t-set='head']" position="inside">
  13. <meta charset="utf-8" />
  14. <meta http-equiv="cleartype" content="on" />
  15. <meta name="MobileOptimized" content="320" />
  16. <meta name="HandheldFriendly" content="True" />
  17. <meta name="apple-mobile-web-app-capable" content="yes" />
  18. <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
  19. </xpath>
  20. <xpath expr="//nav[@id='oe_main_menu_navbar']" position="replace">
  21. <t t-set="body_classname" t-value="'drawer drawer--left'" />
  22. <header role="banner">
  23. <nav id="odooAppDrawer" class="app-drawer-nav drawer-nav" role="navigation">
  24. <t t-call="web.menu" />
  25. </nav>
  26. <nav class="navbar navbar-default main-nav"
  27. role="navigation"
  28. groups="base.group_user,base.group_portal"
  29. >
  30. <div class="container-fluid">
  31. <div class="navbar-header">
  32. <a href="#"
  33. class="drawer-toggle navbar-collapse collapse btn btn-default app-drawer-toggle"
  34. accesskey="A"
  35. >
  36. <span class="sr-only">Toggle App Drawer</span>
  37. <i class="fa fa-th fa-lg app-drawer-icon-open"
  38. t-translation="off"
  39. aria-hidden="true"
  40. />
  41. </a>
  42. <button type="button"
  43. class="app-drawer-toggle drawer-toggle pull-left navbar-toggle collapsed"
  44. >
  45. <span class="sr-only">Toggle App Drawer</span>
  46. <div class="fa fa-th fa-lg app-drawer-icon-open" />
  47. </button>
  48. <button type="button"
  49. id="odooMenuBarToggle"
  50. class="navbar-toggle collapsed pull-right"
  51. data-toggle="collapse"
  52. data-target="#odooMenuBarNav"
  53. >
  54. <span class="sr-only">Toggle Navigation</span>
  55. <i class="fa fa-bars fa-lg"
  56. t-translation="off"
  57. aria-hidden="true"
  58. />
  59. </button>
  60. </div>
  61. <div class="collapse navbar-collapse text-center"
  62. id="odooMenuBarNav"
  63. data-parent="#odooMenuBarToggle"
  64. aria-expanded="false"
  65. >
  66. <div class="oe_leftbar"
  67. groups="base.group_user,base.group_portal"
  68. >
  69. <t t-call="web.menu_secondary" />
  70. </div>
  71. <div class="nav navbar-nav navbar-right">
  72. <ul class="nav navbar-nav navbar-right oe_user_menu_placeholder"
  73. style="display: none;"
  74. />
  75. <ul class="nav navbar-nav navbar-right oe_systray"
  76. style="display: none;"
  77. />
  78. </div>
  79. </div>
  80. </div>
  81. </nav>
  82. </header>
  83. </xpath>
  84. </template>
  85. <template id="menu_secondary"
  86. inherit_id="web.menu_secondary"
  87. name="App Drawer - Secondary Menu"
  88. >
  89. <xpath expr="//a[@class='oe_logo']" position="replace" />
  90. <xpath expr="//div[@class='oe_secondary_menus_container']/t" position="replace">
  91. <t t-foreach="menu_data['children']" t-as="menu">
  92. <ul class="oe_secondary_menu nav navbar-nav"
  93. t-att-data-menu-parent="menu['id']"
  94. style="display: none;"
  95. >
  96. <t t-call="web.menu_secondary_submenu" />
  97. </ul>
  98. </t>
  99. </xpath>
  100. </template>
  101. <template id="menu_secondary_submenu"
  102. inherit_id="web.menu_secondary_submenu"
  103. name="App Drawer - Secondary Submenu"
  104. >
  105. <xpath expr="//ul" position="replace">
  106. <t t-foreach="menu['children']" t-as="menu">
  107. <t t-if="menu['children']">
  108. <li t-attf-class="{{ 'dropdown-header' if submenu else '' }}">
  109. <t t-if="submenu">
  110. <t t-esc="menu['name']" />
  111. <t t-call="web.menu_secondary_submenu">
  112. <t t-set="submenu" t-value="True" />
  113. </t>
  114. </t>
  115. <t t-if="not submenu">
  116. <a href="#"
  117. class="dropdown-toggle"
  118. data-toggle="dropdown"
  119. role="button"
  120. aria-haspopup="true"
  121. aria-expanded="false"
  122. >
  123. <t t-esc="menu['name']" />
  124. <span class="caret" />
  125. </a>
  126. <ul t-if="menu['children']"
  127. t-attf-class="dropdown-menu oe_secondary_submenu dropdown-scrollable"
  128. >
  129. <t t-call="web.menu_secondary_submenu">
  130. <t t-set="submenu" t-value="True" />
  131. </t>
  132. </ul>
  133. </t>
  134. </li>
  135. </t>
  136. <t t-if="not menu['children']">
  137. <li>
  138. <t t-call="web.menu_link" />
  139. </li>
  140. </t>
  141. </t>
  142. </xpath>
  143. </template>
  144. <template id="menu_link"
  145. inherit_id="web.menu_link"
  146. name="App Drawer - Menu Link"
  147. >
  148. <xpath expr="//a" position="attributes">
  149. <attribute name="t-att-data-menu-name">menu['name']</attribute>
  150. </xpath>
  151. <xpath expr="//span[@class='oe_menu_text']" position="replace">
  152. <t t-if="display_images">
  153. <img t-attf-src="/web/image/ir.ui.menu/{{ menu['id'] }}/web_icon_data"
  154. class="app-drawer-icon-app img-rounded"
  155. t-att-alt="menu['name']"
  156. t-att-title="menu['name']"
  157. />
  158. <p class="app-drawer-title text-center">
  159. <t t-esc="menu['name']" />
  160. </p>
  161. </t>
  162. <t t-if="not display_images">
  163. <span class="oe_menu_text">
  164. <t t-esc="menu['name']" />
  165. </span>
  166. </t>
  167. </xpath>
  168. </template>
  169. <template id="menu"
  170. inherit_id="web.menu"
  171. name="App Drawer - Menu"
  172. >
  173. <xpath expr="//ul[contains(@class, 'oe_systray')]" position="replace" />
  174. <xpath expr="//ul[contains(@class, 'oe_user_menu_placeholder')]" position="replace" />
  175. <xpath expr="//ul[contains(@class, 'oe_application_menu_placeholder')]" position="replace">
  176. <div class="panel-default app-drawer-app-panel" id="appDrawerAppMenu">
  177. <div class="panel-heading" id="appDrawerAppPanelHead">
  178. <div class="col-xs-6">
  179. <h4 class="app-drawer-panel-title pull-left">
  180. <a href="#" class="app-drawer-icon-close drawer-toggle">
  181. <i class="fa fa-lg fa-chevron-left"
  182. t-translation="off"
  183. aria-hidden="true"
  184. />
  185. Apps
  186. </a>
  187. </h4>
  188. </div>
  189. <div class="col-xs-6">
  190. <a class="oe_logo pull-right" t-attf-href="/web?{{ keep_query() }}">
  191. <i class="fa fa-pencil-square-o oe_logo_edit"
  192. aria-hidden="true"
  193. t-translation="off"
  194. />
  195. <img src='/web/binary/company_logo'/>
  196. </a>
  197. </div>
  198. </div>
  199. <div class="panel-body" id="appDrawerAppPanelBody">
  200. <ul class="row list-unstyled oe_application_menu_placeholder"
  201. style="display: none;">
  202. <li t-foreach="menu_data['children']" t-as="menu"
  203. class="col-xs-6 col-sm-4 col-md-3 col-lg-2 text-center mt16">
  204. <t t-call="web.menu_link">
  205. <t t-set="display_images" t-value="1" />
  206. </t>
  207. </li>
  208. <li id="menu_more_container" class="dropdown" style="display: none;">
  209. <a href="#" class="dropdown-toggle" data-toggle="dropdown">More <b class="caret"></b></a>
  210. <ul id="menu_more" class="dropdown-menu"></ul>
  211. </li>
  212. </ul>
  213. </div>
  214. </div>
  215. </xpath>
  216. </template>
  217. </odoo>