- Repo for opensource odoo website theme (since V13.0)
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.

92 lines
5.2 KiB

5 years ago
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="preHeader" inherit_id="website.layout" name="Nano preHeader">
  4. <xpath expr="//div[@id='wrapwrap']/header/nav" position="before">
  5. <nav id="preheader" class="bg-alpha">
  6. <!-- Languages -->
  7. <ul id="lang" class="js_language_selector list-unstyled" t-if="(request.is_frontend_multilang and len(languages) &gt; 1) or editable">
  8. <li>
  9. <div class="btn-group">
  10. <button data-toggle="dropdown" type="button" class="dropdown-toggle">
  11. <i class="fa fa-flag fa-1x rounded-circle"/>
  12. </button>
  13. <div role="menu" class="dropdown-menu js_language_selector">
  14. <t t-foreach="languages" t-as="lg">
  15. <a t-att-href="url_for(request.httprequest.path + '?' + keep_query(), lang_code=lg[0])"
  16. t-attf-class="js_change_lang dropdown-item#{' active' if lang == lg[0] else ''}"
  17. t-att-data-url_code="lg[1]">
  18. <t t-esc="lg[2].split('/').pop()"/>
  19. </a>
  20. </t>
  21. <t groups="base.group_website_publisher">
  22. <t t-set="url_return" t-value="url_for('', lang_code='[lang]') + '?' + keep_query()"/>
  23. <a class="dropdown-item"
  24. t-attf-href="/web#action=base.action_view_base_language_install&amp;website_id=#{website.id}&amp;url_return=#{url_return}">
  25. <i class="fa fa-plus-circle"/>Add...
  26. </a>
  27. </t>
  28. </div>
  29. </div>
  30. </li>
  31. </ul>
  32. <!-- Infos + Contact -->
  33. <div id="contact">
  34. <div class="btn-group">
  35. <button data-toggle="dropdown" type="button" class="dropdown-toggle">
  36. <i class="fa fa-info fa-1x rounded-circle"/>
  37. </button>
  38. <div role="menu" class="dropdown-menu">
  39. <div class="dropdown-item contact-address">
  40. <address itemscope="itemscope" itemtype="http://schema.org/Organization">
  41. <div t-field="res_company.partner_id" t-field-options='{
  42. "widget": "contact",
  43. "fields": ["name", "address", "phone", "mobile", "fax", "email"]}'/>
  44. </address>
  45. </div>
  46. </div>
  47. </div>
  48. <a t-attf-href="mailto:{{ res_company.email }}">
  49. <i class="fa fa-envelope fa-1x rounded-circle"/>
  50. </a>
  51. </div>
  52. <!-- Social -->
  53. <div id="social">
  54. <a t-if="website.social_facebook" t-att-href="website.social_facebook" target="_blank">
  55. <i class="fa fa-1x fa-facebook rounded-circle"/>
  56. </a>
  57. <a t-if="website.social_twitter" t-att-href="website.social_twitter" target="_blank">
  58. <i class="fa fa-1x fa-twitter rounded-circle"/>
  59. </a>
  60. <a t-if="website.social_linkedin" t-att-href="website.social_linkedin" target="_blank">
  61. <i class="fa fa-1x fa-linkedin rounded-circle"/>
  62. </a>
  63. <a t-if="website.social_youtube" t-att-href="website.social_youtube" target="_blank">
  64. <i class="fa fa-1x fa-youtube rounded-circle"/>
  65. </a>
  66. <a t-if="website.social_github" t-att-href="website.social_github" target="_blank">
  67. <i class="fa fa-1x fa-github rounded-circle"/>
  68. </a>
  69. <a t-if="website.social_instagram" t-att-href="website.social_instagram" target="_blank">
  70. <i class="fa fa-1x fa-instagram rounded-circle"/>
  71. </a>
  72. </div>
  73. </nav>
  74. </xpath>
  75. </template>
  76. <template id="add_footer_arrow" inherit_id="website.layout">
  77. <xpath expr="//div[hasclass('o_footer_copyright')]//div[hasclass('row')]/div[1]" position="attributes">
  78. <attribute name="class" separator=" " remove="col-lg-6" add="col-lg-5"/>
  79. </xpath>
  80. <xpath expr="//div[hasclass('o_footer_copyright')]//div[hasclass('row')]/div[2]" position="attributes">
  81. <attribute name="class" separator=" " remove="col-lg-6" add="col-lg-5"/>
  82. </xpath>
  83. <xpath expr="//div[hasclass('o_footer_copyright')]//div[hasclass('row')]/div[1]" position="after">
  84. <div class="col-lg-2 d-none d-md-block text-center">
  85. <a href="#" class="top"><i class="fa fa-arrow-up fa-1x"/></a>
  86. </div>
  87. </xpath>
  88. </template>
  89. </odoo>