themes.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <!--
  5. Customize Themes
  6. Use INPUT type 'checkbox' or 'radio' or use OPTION in select box
  7. 'data-xmlid' (optional) xml id of the template to add if the input is checked.
  8. You can set a list of xml id separate by comma (all template is enable or
  9. disable in same time)
  10. 'data-enable' (optional) to checked one or more HTML ids, or list separate by comma
  11. 'data-disable' (optional) to unchecked one or more HTML ids, or list separate by comma
  12. 'data-reload="/"' (optional) force the reloading of the page if the url match with
  13. the string ( = regexp).
  14. Otherwise, only the '/web/css/website.assets_frontend' is reloaded
  15. For the sets (data-enable and/or data-disable without data-xmlid), the set is
  16. automatically checked if:
  17. - all related fields are enabled for data-enable
  18. - all related fields are disabled for data-disable
  19. else unchecked
  20. HTML apply classes:
  21. - 'checked': on the parent label when input is checked
  22. - 'in': on the container (e.g.: bootstrap modal) after added in DOM (removed together
  23. out is added)
  24. - 'out': on the container 1 second before removed from ths DOM
  25. - 'loading': on the container/modal when the new css is loading
  26. -->
  27. <template id="website_less.theme_customize" name="Theme Modal for Customization">
  28. <div id="theme_customize_modal" class="modal fade">
  29. <div class="modal-dialog">
  30. <div class="modal-content">
  31. <input id="less" data-xmlid="website_less.option_bootstrap_less" style="display: none;"/>
  32. <div class="loading_backdrop"></div>
  33. <div class="modal-header">
  34. <button type="button" class="close">×</button>
  35. <h4 class="modal-title" id="mySmallModalLabel">Customize your theme</h4>
  36. </div>
  37. <div class="modal-body">
  38. <h5 class="modal-h5">LAYOUT</h5>
  39. <table name="layout">
  40. <tr>
  41. <td class=" text-center" width="50%">
  42. <label class=" center-block">
  43. <div class="text-center" style="background-image: url(/website_less/static/src/img/theme/layout-full.gif); background-size: 100%; line-height: 40px;">FULL WIDTH</div>
  44. <input name="layoutvar" type="radio" data-xmlid=""/>
  45. </label>
  46. </td>
  47. <td class=" text-center">
  48. <label class=" center-block">
  49. <div class="text-center" style="background-image: url(/website_less/static/src/img/theme/layout-boxed.gif); background-size: 100%; line-height: 40px;">BOXED</div>
  50. <input name="layoutvar" type="radio" data-xmlid="website_less.option_layout_boxed" data-enable="less"/>
  51. </label>
  52. </td>
  53. </tr>
  54. </table>
  55. <h5 class="modal-h5">MAIN COLOR</h5>
  56. <table name="color">
  57. <tr>
  58. <td>
  59. <label class="chd-color-combi">
  60. <img src="/website_less/static/src/img/theme/variant-stone.gif" alt="Stone" class="chd-color-combi-img"/>
  61. <input name="colorvar" type="radio" data-xmlid="" data-disable="less"/>
  62. </label>
  63. </td>
  64. <td>
  65. <label class="chd-color-combi">
  66. <img src="/website_less/static/src/img/theme/variant-emerald.gif" alt="Emerald" class="chd-color-combi-img"/>
  67. <input name="colorvar" type="radio" data-xmlid="website_less.option_color_emerald" data-enable="less"/>
  68. </label>
  69. </td>
  70. <td>
  71. <label class="chd-color-combi">
  72. <img src="/website_less/static/src/img/theme/variant-cobalt.gif" alt="Cobalt" class="chd-color-combi-img"/>
  73. <input name="colorvar" type="radio" data-xmlid="website_less.option_color_cobalt" data-enable="less"/>
  74. </label>
  75. </td>
  76. <td>
  77. <label class="chd-color-combi">
  78. <img src="/website_less/static/src/img/theme/variant-amethyst.gif" alt="Amethyst" class="chd-color-combi-img"/>
  79. <input name="colorvar" type="radio" data-xmlid="website_less.option_color_amethyst" data-enable="less"/>
  80. </label>
  81. </td>
  82. <td>
  83. <label class="chd-color-combi">
  84. <img src="/website_less/static/src/img/theme/variant-ruby.gif" alt="Blue" class="chd-color-combi-img"/>
  85. <input name="colorvar" type="radio" data-xmlid="website_less.option_color_ruby" data-enable="less"/>
  86. </label>
  87. </td>
  88. <td>
  89. <label class="chd-color-combi">
  90. <img src="/website_less/static/src/img/theme/variant-gold.gif" alt="Gold" class="chd-color-combi-img"/>
  91. <input name="colorvar" type="radio" data-xmlid="website_less.option_color_gold" data-enable="less"/>
  92. </label>
  93. </td>
  94. </tr>
  95. </table>
  96. <h5 class="modal-h5">FONTS COMBINATIONS</h5>
  97. <table name="font">
  98. <tr>
  99. <td width="50%">
  100. <label>
  101. <div>
  102. <span style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:11px">Helvetica</span>
  103. <span style="font-family:Georgia, 'Times New Roman', Times, serif; font-size:11px" >/ Georgia</span>
  104. </div>
  105. <input name="theme" type="radio" data-xmlid=""/>
  106. </label>
  107. </td>
  108. <td width="50%">
  109. <label>
  110. <div>
  111. <span style="font-family:Georgia, 'Times New Roman', Times, serif; font-size:11px" >Georgia</span>
  112. <span style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-size:11px">/ Helvetica</span>
  113. <input name="theme" type="radio" data-xmlid="website_less.option_font" data-enable="less"/>
  114. </div>
  115. </label>
  116. </td>
  117. </tr>
  118. </table>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </template>
  124. <!-- color-picker -->
  125. <!-- HTML class to hide option for one mode : only-text, only-bg -->
  126. <template id="website_less.colorpicker" name="Color-Picker">
  127. <table class="colorpicker">
  128. <tr>
  129. <td><button class="automatic-color" title="Automatic Color"/></td>
  130. <td><button class="bg-primary" title="Primary Color"/></td>
  131. <td><button class="bg-success" title="Success Color"/></td>
  132. <td><button class="bg-info" title="Info Color"/></td>
  133. <td><button class="bg-warning" title="Warning Color"/></td>
  134. <td><button class="bg-danger" title="Danger Color"/></td>
  135. </tr>
  136. <tr><td colspan="8"><hr style="width: 100%; height: 1px;"/></td></tr>
  137. <tr>
  138. <td><button class="bg-blue"/></td>
  139. <td><button class="bg-turquoise"/></td>
  140. <td><button class="bg-green"/></td>
  141. <td><button class="bg-yellow"/></td>
  142. <td><button class="bg-red"/></td>
  143. <td><button class="bg-pink"/></td>
  144. <td><button class="bg-purple"/></td>
  145. <td><button class="bg-brown"/></td>
  146. </tr>
  147. </table>
  148. </template>
  149. <!-- Disable old themes before activating the less option -->
  150. <record id="website.theme_amelia" model="ir.ui.view">
  151. <field name="active" eval='False'/>
  152. </record>
  153. <record id="website.theme_cerulean" model="ir.ui.view">
  154. <field name="active" eval='False'/>
  155. </record>
  156. <record id="website.theme_cosmo" model="ir.ui.view">
  157. <field name="active" eval='False'/>
  158. </record>
  159. <record id="website.theme_cyborg" model="ir.ui.view">
  160. <field name="active" eval='False'/>
  161. </record>
  162. <record id="website.theme_flatly" model="ir.ui.view">
  163. <field name="active" eval='False'/>
  164. </record>
  165. <record id="website.theme_journal" model="ir.ui.view">
  166. <field name="active" eval='False'/>
  167. </record>
  168. <record id="website.theme_readable" model="ir.ui.view">
  169. <field name="active" eval='False'/>
  170. </record>
  171. <record id="website.theme_simplex" model="ir.ui.view">
  172. <field name="active" eval='False'/>
  173. </record>
  174. <record id="website.theme_slate" model="ir.ui.view">
  175. <field name="active" eval='False'/>
  176. </record>
  177. <record id="website.theme_spacelab" model="ir.ui.view">
  178. <field name="active" eval='False'/>
  179. </record>
  180. <record id="website.theme_united" model="ir.ui.view">
  181. <field name="active" eval='False'/>
  182. </record>
  183. <record id="website.theme_yeti" model="ir.ui.view">
  184. <field name="active" eval='False'/>
  185. </record>
  186. <!-- Bootstrap Less File layout
  187. Each theme module must override the following view to active bootstrap:
  188. <record id="website_less.option_bootstrap_less" model="ir.ui.view">
  189. <field name="active" eval='True'/>
  190. </record>
  191. -->
  192. <template id="website_less.option_bootstrap_less" name="option_bootstrap_less" inherit_id="website.theme" active="True" customize_show="False">
  193. <xpath expr="//link[@id='bootstrap_css']" position="replace">
  194. <link rel="stylesheet" href='/website_less/static/src/less/import_bootstrap.less'/>
  195. <link rel="stylesheet" href='/website_less/static/src/less/colors.less' t-ignore="true"/>
  196. </xpath>
  197. </template>
  198. <!-- Default Options Toggle -->
  199. <template id="website_less.default_options" name="Default Customize Options" inherit_id="website.theme">
  200. <xpath expr="//link[last()]" position="after">
  201. <!-- Default options inherit from this view so we can easily disable it to reset all options -->
  202. <t id="default_options" t-if="True"></t>
  203. </xpath>
  204. </template>
  205. <!-- Option layout -->
  206. <template id="website_less.option_layout_boxed" name="option_layout_boxed" inherit_id="website_less.default_options" active="False" customize_show="True">
  207. <xpath expr="//t[@id='default_options']" position="inside">
  208. <link href="/website_less/static/src/less/option_layout_boxed.less" rel="stylesheet" type="text/less"/>
  209. </xpath>
  210. </template>
  211. <!-- Option color -->
  212. <template id="website_less.option_color_stone" name="option_color_stone" inherit_id="website_less.default_options" active="False" customize_show="True">
  213. <xpath expr="//t[@id='default_options']" position="inside">
  214. <link href="/website_less/static/src/less/option_color_stone.less" rel="stylesheet" type="text/less"/>
  215. </xpath>
  216. </template>
  217. <template id="website_less.option_color_emerald" name="option_color_emerald" inherit_id="website_less.default_options" active="False" customize_show="True">
  218. <xpath expr="//t[@id='default_options']" position="inside">
  219. <link href="/website_less/static/src/less/option_color_emerald.less" rel="stylesheet" type="text/less"/>
  220. </xpath>
  221. </template>
  222. <template id="website_less.option_color_cobalt" name="option_color_cobalt" inherit_id="website_less.default_options" active="False" customize_show="True">
  223. <xpath expr="//t[@id='default_options']" position="inside">
  224. <link href="/website_less/static/src/less/option_color_cobalt.less" rel="stylesheet" type="text/less"/>
  225. </xpath>
  226. </template>
  227. <template id="website_less.option_color_amethyst" name="option_color_amethyst" inherit_id="website_less.default_options" active="False" customize_show="True">
  228. <xpath expr="//t[@id='default_options']" position="inside">
  229. <link href="/website_less/static/src/less/option_color_amethyst.less" rel="stylesheet" type="text/less"/>
  230. </xpath>
  231. </template>
  232. <template id="website_less.option_color_ruby" name="option_color_ruby" inherit_id="website_less.default_options" active="False" customize_show="True">
  233. <xpath expr="//t[@id='default_options']" position="inside">
  234. <link href="/website_less/static/src/less/option_color_ruby.less" rel="stylesheet" type="text/less"/>
  235. </xpath>
  236. </template>
  237. <template id="website_less.option_color_gold" name="option_color_gold" inherit_id="website_less.default_options" active="False" customize_show="True">
  238. <xpath expr="//t[@id='default_options']" position="inside">
  239. <link href="/website_less/static/src/less/option_color_gold.less" rel="stylesheet" type="text/less"/>
  240. </xpath>
  241. </template>
  242. <template id="website_less.option_font" name="option_font" inherit_id="website_less.default_options" active="False" customize_show="True">
  243. <xpath expr="//t[@id='default_options']" position="inside">
  244. <link href="/website_less/static/src/less/option_font.less" rel="stylesheet" type="text/less"/>
  245. </xpath>
  246. </template>
  247. </data>
  248. </openerp>