Themes image would not be shown correctly in the theme selection if the `website` module was installed in CLI. Indeed, the code supposed to load the theme images was done in the kanban view during theme selection after installing module through apps screen. Now, this code is encapsulated and called in post_init hook of website. This was also needed for an improvement on `test_themes` module, see https://github.com/odoo/design-themes/pull/195. closes odoo/odoo#42206 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
182 lines
14 KiB
XML
182 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Front-end/Back-end integration -->
|
|
<template id="user_navbar" inherit_id="website.layout" name="User Navbar">
|
|
<xpath expr="//t[@t-set='html_data']" position="after">
|
|
<t t-set="body_classname" t-value="(body_classname if body_classname else '') + (' o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else '')"/>
|
|
</xpath>
|
|
<xpath expr="//div[@id='wrapwrap']" position="before">
|
|
<nav groups="base.group_user" t-if="website and menu_data" id="oe_main_menu_navbar" class="o_main_navbar">
|
|
<ul id="oe_applications">
|
|
<li class="dropdown active">
|
|
<a class="dropdown-toggle full" data-toggle="dropdown" href="#">
|
|
<i class="fa fa-th-large"/> WEBSITE
|
|
</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<t t-as="menu" t-foreach="menu_data['children']">
|
|
<a role="menuitem"
|
|
t-attf-class="dropdown-item #{'oe_menu_toggler' if menu.get('children') else 'oe_menu_leaf'}"
|
|
t-att-data-action-id="menu['action'] and menu['action'].split(',')[1] or None"
|
|
t-att-data-action-model="menu['action'] and menu['action'].split(',')[0] or None"
|
|
t-att-data-menu="menu['id']"
|
|
t-att-data-menu-xmlid="menu.get('xmlid')"
|
|
t-att-href="'/web#menu_id=%s&action=%s' % (menu['id'], menu['action'] and menu['action'].split(',')[1] or '')">
|
|
<i t-attf-class="fa #{menu.get('icon')} fa-lg fa-fw" t-if="menu.get('icon')" role="img" aria-label="Menu" title="Menu"/>
|
|
<span class="oe_menu_text">
|
|
<t t-esc="menu['name']"/>
|
|
</span>
|
|
</a>
|
|
</t>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
<button type="button" class="fa fa-bars float-right d-block d-md-none o_mobile_menu_toggle" aria-label="Menu" title="Menu"/>
|
|
|
|
<ul class="o_menu_sections" groups="website.group_website_designer">
|
|
<!-- Content -->
|
|
<li t-if="editable" class="dropdown" id="content-menu">
|
|
<a id="content-menu-button" class="dropdown-toggle o-no-caret waves" data-toggle="dropdown" data-display="static" href="#">Pages</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<a role="menuitem" data-action="edit_menu" href="#" title="Edit Top Menu" class="dropdown-item">Edit Menu</a>
|
|
<a role="menuitem" href="/website/pages" title="Manage Your Website Pages" class="dropdown-item">Manage Pages</a>
|
|
<div t-if="deletable" role="separator" class="dropdown-divider"/>
|
|
<a role="menuitem" href="#" data-action="page_properties" class="dropdown-item" t-if="deletable">Page Properties</a>
|
|
</div>
|
|
</li>
|
|
<!-- Customize -->
|
|
<li class="dropdown" id="customize-menu">
|
|
<a class="dropdown-toggle o-no-caret waves" data-toggle="dropdown" data-display="static" href="#">Customize</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<a role="menuitem" href="#" data-action="customize_theme" class="dropdown-item" id="theme_customize">Customize Theme</a>
|
|
<a role="menuitem" href="#" data-action="ace" class="dropdown-item" id="html_editor">HTML/CSS/JS Editor</a>
|
|
<a role="menuitem" href="/web#action=website.action_website_add_features" class="dropdown-item" id="install_apps">Add Features</a>
|
|
</div>
|
|
</li>
|
|
<!-- Promote -->
|
|
<li class="dropdown" id="promote-menu">
|
|
<a class="dropdown-toggle o-no-caret waves" data-toggle="dropdown" href="#">Promote</a>
|
|
<div class="dropdown-menu oe_promote_menu" role="menu">
|
|
<a role="menuitem" data-action="promote-current-page" href="#" title="Promote page on the web" class="dropdown-item">Optimize SEO</a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="o_menu_systray d-none d-md-block" groups="website.group_website_publisher">
|
|
<li t-if="'website_published' in main_object.fields_get() and ('can_publish' not in main_object.fields_get() or main_object.can_publish)" t-attf-class="js_publish_management #{main_object.website_published and 'css_published' or 'css_unpublished'}" t-att-data-id="main_object.id" t-att-data-object="main_object._name" t-att-data-controller="publish_controller">
|
|
<label class="o_switch o_switch_danger js_publish_btn" for="id">
|
|
<input type="checkbox" t-att-checked="main_object.website_published" id="id"/>
|
|
<span/>
|
|
<span class="css_publish">Unpublished</span>
|
|
<span class="css_unpublish">Published</span>
|
|
</label>
|
|
</li>
|
|
<!-- Mobile preview -->
|
|
<li class="o_mobile_preview" id="mobile-menu">
|
|
<a data-action="show-mobile-preview" href="#"><span title="Mobile preview" role="img" aria-label="Mobile preview" class="fa fa-mobile"/></a>
|
|
</li>
|
|
<li groups="website.group_multi_website" t-if="multi_website_websites" id="website_switcher">
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
<i class="fa fa-globe d-lg-none"/>
|
|
<span class="d-none d-lg-inline-block">
|
|
<t t-esc="multi_website_websites_current['name']"/>
|
|
</span>
|
|
</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<div class="d-lg-none dropdown-item active">
|
|
<span t-esc="multi_website_websites_current['name']"/>
|
|
</div>
|
|
<t t-foreach="multi_website_websites" t-as="multi_website_website">
|
|
<a role="menuitem" href="#"
|
|
t-att-domain="multi_website_website['domain']"
|
|
class="dropdown-item oe_menu_text js_multi_website_switch"
|
|
t-att-website-id="str(multi_website_website['website_id'])"
|
|
>
|
|
<span t-esc="multi_website_website['name']" />
|
|
</a>
|
|
</t>
|
|
</div>
|
|
</li>
|
|
|
|
<!-- Page Edition -->
|
|
<li class="o_new_content_menu" id="new-content-menu">
|
|
<a href="#"><span class="fa fa-plus mr-2"/>New</a>
|
|
<div id="o_new_content_menu_choices" class="o_hidden">
|
|
<div class="container pt32 pb32">
|
|
<div class="row">
|
|
<div groups="website.group_website_designer" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_page" aria-label="New page" title="New page">
|
|
<i class="fa fa-file-o"/>
|
|
<p>New Page</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_blog" t-att-data-module-id="env.ref('base.module_website_blog').id" t-att-data-module-shortdesc="env.ref('base.module_website_blog').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_blog_post">
|
|
<i class="fa fa-rss"/>
|
|
<p>New Blog Post</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_event" t-att-data-module-id="env.ref('base.module_website_event').id" t-att-data-module-shortdesc="env.ref('base.module_website_event').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_event">
|
|
<i class="fa fa-glass"/>
|
|
<p>New Event</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_forum" t-att-data-module-id="env.ref('base.module_website_forum').id" t-att-data-module-shortdesc="env.ref('base.module_website_forum').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_forum">
|
|
<i class="fa fa-comment"/>
|
|
<p>New Forum</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_hr_recruitment" t-att-data-module-id="env.ref('base.module_website_hr_recruitment').id" t-att-data-module-shortdesc="env.ref('base.module_website_hr_recruitment').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#">
|
|
<i class="fa fa-briefcase"/>
|
|
<p>New Job Offer</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_sale" t-att-data-module-id="env.ref('base.module_website_sale').id" t-att-data-module-shortdesc="env.ref('base.module_website_sale').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_product">
|
|
<i class="fa fa-shopping-cart"/>
|
|
<p>New Product</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_slides" t-att-data-module-id="env.ref('base.module_website_slides').id" t-att-data-module-shortdesc="env.ref('base.module_website_slides').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_slide_channel">
|
|
<i class="fa fa-graduation-cap"></i>
|
|
<p>New Course</p>
|
|
</a>
|
|
</div>
|
|
<div groups="base.group_system" name="module_website_livechat" t-att-data-module-id="env.ref('base.module_website_livechat').id" t-att-data-module-shortdesc="env.ref('base.module_website_livechat').shortdesc" class="col-md-4 mb8 o_new_content_element">
|
|
<a href="#" data-action="new_channel">
|
|
<i class="fa fa-hashtag"/>
|
|
<p>New Livechat Channel</p>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li t-if="not translatable" id="edit-page-menu">
|
|
<a data-action="edit" href="#"><span class="fa fa-pencil mr-2"/>Edit</a>
|
|
</li>
|
|
<li t-if="edit_in_backend or ('website_published' in main_object.fields_get() and main_object._name != 'website.page')">
|
|
<a role="button" class="btn btn-primary btn-sm dropdown-toggle css_edit_dynamic" data-toggle="dropdown">
|
|
<span class="sr-only">Toggle Dropdown</span>
|
|
</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<a role="menuitem" style="text-align: left;" t-attf-href="/web#view_type=form&model=#{main_object._name}&id=#{main_object.id}&action=#{action}&menu_id=#{backend_menu_id}"
|
|
class="dropdown-item" title='Edit in backend' id="edit-in-backend">Edit in backend</a>
|
|
</div>
|
|
</li>
|
|
<li t-if="translatable">
|
|
<a data-action="translate" href="#">TRANSLATE</a>
|
|
</li>
|
|
<li t-if="translatable">
|
|
<a data-action="edit_master" href="#">or Edit Master</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</xpath>
|
|
</template>
|
|
</odoo>
|