Files
odoo_source/addons/website/views/website_navbar_templates.xml
T
sed-odoo d81e1b7341 [IMP] website_*: Improve menus and configuration
Purpose
=======

Clean menus structure in website frontend and backend, for an easier navigation.

Specification
=============

Website
-------

- Restructure menu
- Enterprise: Keep google analytics view in a dedicated menu item when ecommerce is
  installed:
    - Sales Dashboard(ecommerce dashboard)
    - Analytics (google analytics)
- Community: Keep both sales orders and google analytic dashboard on the same
  dashboard view
- Restore google analytics api option in website settings when ecommerce
  is installed

E-Commerce
----------

- Website > orders > orders: add default filter "from website" and remove it in
  the action. That way if you create an order manually there is still a way
  to find it from the menu (the salesteam is different)
- Default filter for abandoned cart menu
- Improve setting text and tooltip. It's not obvious that recovery emails must
  be sent manually. Replace with:
    - Title: Abandoned Carts
    - Subtitle: Send a recovery email when a cart is abandoned
    - Tooltip: Abandoned carts are all carts for which no transaction has
               been confirmed while the customer has filled in their address.
               You can find them in *Website > Orders > Abandoned Carts*.
               From there you can send a recovery email to stimulate the
               customers to resume their order.
    - Tooltip email template: This email template is suggested by default
                              when you send a recovery email.
    - Tooltip hours: Carts are flagged as abandoned after this delay.
    - Hour label: Cart is abandoned after .... hour(s).

Task ID: 1859170
2018-08-09 11:58:35 +02:00

112 lines
7.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Front-end/Back-end integration -->
<template id="user_navbar" inherit_id="website.layout">
<xpath expr="//t[@t-set='html_data']" position="after">
<t t-set="body_classname" t-value="'o_connected_user' if env['ir.ui.view'].user_has_groups('base.group_user') else None"/>
</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-set="debug_param" t-value="'?&amp;debug=' if debug else ''"/>
<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%s#menu_id=%s&amp;action=%s' % (debug_param, 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" 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" 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 Editor</a>
<a role="menuitem" href="/web#action=website.action_website_add_features" class="dropdown-item" id="install_apps" context="{'search_default_web_features' : 1}">Add Features</a>
<div role="separator" class="dropdown-divider"/>
</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()" 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>
<!-- Page Edition -->
<li class="o_new_content_menu" id="new-content-menu">
<a href="#"><span class="fa fa-plus"/>New</a>
<div id="o_new_content_menu_choices" class="o_hidden">
<ul>
<li groups="website.group_website_designer"><a href="#" data-action="new_page" aria-label="New page" title="New page"><i class="fa fa-file-o"/><p>New Page</p></a></li>
</ul>
</div>
</li>
<li t-if="not translatable" id="edit-page-menu">
<a data-action="edit" href="#"><span class="fa fa-pencil"/>Edit</a>
</li>
<li t-if="'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#return_label=Website&amp;view_type=form&amp;model=#{main_object._name}&amp;id=#{main_object.id}&amp;action=#{action}"
class="dropdown-item btn btn-link btn-sm" 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>