[REF] portal, *: move breadcrumbs in searchbar
* account, project, purchase, sale, website_crm_partner_assign In some circumstances, we need to move the breadcrumbs into the searchbar.
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<odoo>
|
||||
<template id="portal_my_home_menu_invoice" name="Portal layout : invoice menu entries" inherit_id="portal.portal_layout" priority="30">
|
||||
<template id="portal_my_home_menu_invoice" name="Portal layout : invoice menu entries" inherit_id="portal.portal_breadcrumbs" priority="30">
|
||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||
<li t-if="page_name == 'invoice'" class="breadcrumb-item active">
|
||||
<li t-if="page_name == 'invoice'" t-attf-class="breadcrumb-item #{'active ' if not invoice else ''}">
|
||||
<a t-if="invoice" t-attf-href="/my/invoices?{{ keep_query() }}">Invoices</a>
|
||||
<t t-else="">Invoices</t>
|
||||
</li>
|
||||
<li t-if="invoice" class="breadcrumb-item">
|
||||
<li t-if="invoice" class="breadcrumb-item active">
|
||||
<t t-esc="invoice.number" t-if="invoice.number"/>
|
||||
<t t-else="">Draft Invoice</t>
|
||||
<t t-else=""><em>Draft Invoice</em></t>
|
||||
</li>
|
||||
</xpath>
|
||||
</template>
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
<template id="portal_my_invoices" name="My Invoices and Payments">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
||||
|
||||
<t t-call="portal.portal_searchbar">
|
||||
<t t-set="title">Invoices</t>
|
||||
</t>
|
||||
|
||||
@@ -164,6 +164,14 @@ hr {
|
||||
color: color-yiq($list-group-bg);
|
||||
}
|
||||
|
||||
%o-portal-breadcrumbs {
|
||||
background-color: transparent;
|
||||
|
||||
.breadcrumb-item {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
|
||||
// Replaces old BS3 page-header class
|
||||
%o-page-header {
|
||||
margin-bottom: $headings-margin-bottom * 2;
|
||||
@@ -305,11 +313,7 @@ img.o_we_custom_image {
|
||||
// Portal specific
|
||||
.o_portal {
|
||||
.breadcrumb {
|
||||
background-color: transparent;
|
||||
|
||||
.breadcrumb-item {
|
||||
display: inline-flex;
|
||||
}
|
||||
@extend %o-portal-breadcrumbs;
|
||||
}
|
||||
|
||||
> tbody.o_portal_report_tbody {
|
||||
@@ -322,6 +326,28 @@ img.o_we_custom_image {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.o_portal_navbar {
|
||||
.breadcrumb {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
@extend %o-portal-breadcrumbs;
|
||||
|
||||
.breadcrumb-item.active {
|
||||
// In this context, active breadcrumb act as title
|
||||
color: $headings-color;
|
||||
line-height: $h5-font-size/$font-size-base;
|
||||
font: {size: $h5-font-size; weight: $headings-font-weight};
|
||||
|
||||
&:before {
|
||||
// Restore breadcrumb divider to default
|
||||
color: $breadcrumb-divider-color;
|
||||
line-height: $line-height-base;
|
||||
font: {size: $font-size-base; weight: $font-weight-base};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.o_portal_my_doc_table {
|
||||
td, th {
|
||||
text-align: right;
|
||||
|
||||
@@ -66,15 +66,19 @@
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<template id="portal_breadcrumbs" name="Portal Breadcrumbs">
|
||||
<ol t-if="page_name != 'home'" class="o_portal_submenu breadcrumb mb-0 py-2 flex-grow-1">
|
||||
<li class="breadcrumb-item"><a href="/my/home" aria-label="Home" title="Home"><i class="fa fa-home"/></a></li>
|
||||
<li t-if="page_name == 'my_details'" class="breadcrumb-item">Your Details</li>
|
||||
</ol>
|
||||
</template>
|
||||
|
||||
<template id="portal_layout" name="Portal Layout">
|
||||
<t t-call="portal.frontend_layout">
|
||||
<div t-if="not no_breadcrumbs and not my_details" class="o_portal container mt-3">
|
||||
<div t-if="not no_breadcrumbs and not my_details and not breadcrumbs_searchbar" class="o_portal container mt-3">
|
||||
<div class="row align-items-center bg-white no-gutters border rounded-top">
|
||||
<div class="col">
|
||||
<ol t-if="page_name != 'home'" class="o_portal_submenu breadcrumb mb-0 py-2 flex-grow-1">
|
||||
<li class="breadcrumb-item"><a href="/my/home" aria-label="Home" title="Home"><i class="fa fa-home"/></a></li>
|
||||
<li t-if="page_name == 'my_details'" class="breadcrumb-item">Your Details</li>
|
||||
</ol>
|
||||
<t t-call="portal.portal_breadcrumbs"></t>
|
||||
</div>
|
||||
<div t-if="prev_record or next_record" class="col flex-grow-0">
|
||||
<t t-call='portal.record_pager'/>
|
||||
@@ -157,15 +161,19 @@
|
||||
{'open': {'label': _('In Progress'), 'domain': [('state', '=', 'open')]}}
|
||||
:param string filterby : name of the filter criteria
|
||||
:param default_url : the base url of the pages (like '/my/orders')
|
||||
:param boolean breadcrumbs_searchbar : set to True to show breadcrumbs rather than the title
|
||||
:param boolean o_portal_search_panel : set to True to active the input search
|
||||
:param html $0 : content of the t-call
|
||||
:param title : bavbar title
|
||||
:param classes : navbar classes
|
||||
-->
|
||||
<template id="portal_searchbar" name="Portal Search Bar">
|
||||
<nav t-attf-class="navbar navbar-light navbar-expand-lg border border-top-0 mb-2 py-0 o_portal_navbar {{classes if classes else ''}}">
|
||||
<!-- Navbar title -->
|
||||
<span class="navbar-brand navbar-brand mb-0 h1 mr-auto" t-esc="title or 'No title'"/>
|
||||
<nav t-attf-class="navbar navbar-light navbar-expand-lg border py-0 o_portal_navbar {{classes if classes else ''}} {{'mt-4 rounded-top border-bottom-0' if breadcrumbs_searchbar else 'border-top-0 mb-2'}}">
|
||||
<!-- Navbar breadcrumb or title -->
|
||||
<t t-if="breadcrumbs_searchbar">
|
||||
<t t-call="portal.portal_breadcrumbs"/>
|
||||
</t>
|
||||
<span t-else="" class="navbar-brand mb-0 h1 mr-auto" t-esc="title or 'No title'"/>
|
||||
|
||||
<!-- Collapse button -->
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#o_portal_navbar_content" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle filters">
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="portal_layout" name="Portal layout: project menu entry" inherit_id="portal.portal_layout" priority="40">
|
||||
<template id="portal_layout" name="Portal layout: project menu entry" inherit_id="portal.portal_breadcrumbs" priority="40">
|
||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||
<li t-if="page_name == 'project' or project" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'project' or project" t-attf-class="breadcrumb-item #{'active ' if not project else ''}">
|
||||
<a t-if="project" t-attf-href="/my/projects?{{ keep_query() }}">Projects</a>
|
||||
<t t-else="">Projects</t>
|
||||
</li>
|
||||
<li t-if="project" class="breadcrumb-item">
|
||||
<li t-if="project" class="breadcrumb-item active">
|
||||
<t t-esc="project.name"/>
|
||||
</li>
|
||||
<li t-if="page_name == 'task' or task" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'task' or task" t-attf-class="breadcrumb-item #{'active ' if not task else ''}">
|
||||
<a t-if="task" t-attf-href="/my/tasks?{{ keep_query() }}">Tasks</a>
|
||||
<t t-else="">Tasks</t>
|
||||
</li>
|
||||
<li t-if="task" class="breadcrumb-item">
|
||||
<li t-if="task" class="breadcrumb-item active">
|
||||
<span t-field="task.name"/>
|
||||
</li>
|
||||
</xpath>
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
<template id="portal_my_projects" name="My Projects">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
||||
|
||||
<t t-call="portal.portal_searchbar">
|
||||
<t t-set="title">Projects</t>
|
||||
</t>
|
||||
@@ -118,6 +120,8 @@
|
||||
|
||||
<template id="portal_my_tasks" name="My Tasks">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
||||
|
||||
<t t-call="portal.portal_searchbar">
|
||||
<t t-set="title">Tasks</t>
|
||||
</t>
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="portal_my_home_menu_purchase" name="Portal layout : purchase menu entries" inherit_id="portal.portal_layout" priority="25">
|
||||
<template id="portal_my_home_menu_purchase" name="Portal layout : purchase menu entries" inherit_id="portal.portal_breadcrumbs" priority="25">
|
||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||
<li t-if="page_name == 'purchase' or purchase_order" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'purchase' or purchase_order" t-attf-class="breadcrumb-item #{'active ' if not purchase_order else ''}">
|
||||
<a t-if="purchase_order" t-attf-href="/my/purchase?{{ keep_query() }}">Purchase Orders</a>
|
||||
<t t-else="">Purchase Orders</t>
|
||||
</li>
|
||||
<li t-if="purchase_order" class="breadcrumb-item">
|
||||
<li t-if="purchase_order" class="breadcrumb-item active">
|
||||
<t t-esc="purchase_order.name"/>
|
||||
</li>
|
||||
</xpath>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="portal_my_home_menu_sale" name="Portal layout : sales menu entries" inherit_id="portal.portal_layout" priority="20">
|
||||
<template id="portal_my_home_menu_sale" name="Portal layout : sales menu entries" inherit_id="portal.portal_breadcrumbs" priority="20">
|
||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||
<li t-if="page_name == 'quote' or sale_order and sale_order.state in ('sent', 'cancel')" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'quote' or sale_order and sale_order.state in ('sent', 'cancel')" t-attf-class="breadcrumb-item #{'active ' if not sale_order else ''}">
|
||||
<a t-if="sale_order" t-attf-href="/my/quotes?{{ keep_query() }}">Quotations</a>
|
||||
<t t-else="">Quotations</t>
|
||||
</li>
|
||||
<li t-if="page_name == 'order' or sale_order and sale_order.state not in ('sent', 'cancel')" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'order' or sale_order and sale_order.state not in ('sent', 'cancel')" t-attf-class="breadcrumb-item #{'active ' if not sale_order else ''}">
|
||||
<a t-if="sale_order" t-attf-href="/my/orders?{{ keep_query() }}">Sales Orders</a>
|
||||
<t t-else="">Sales Orders</t>
|
||||
</li>
|
||||
<li t-if="sale_order" class="breadcrumb-item">
|
||||
<li t-if="sale_order" class="breadcrumb-item active">
|
||||
<span t-field="sale_order.type_name"/>
|
||||
<t t-esc="sale_order.name"/>
|
||||
</li>
|
||||
@@ -35,6 +35,8 @@
|
||||
|
||||
<template id="portal_my_quotations" name="My Quotations">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
||||
|
||||
<t t-call="portal.portal_searchbar">
|
||||
<t t-set="title">Quotations</t>
|
||||
</t>
|
||||
|
||||
@@ -185,9 +185,9 @@
|
||||
<script type="text/javascript" src="/website_crm_partner_assign/static/src/js/crm_partner_assign.js" />
|
||||
</xpath>
|
||||
</template>
|
||||
<template id="portal_my_home_menu_lead" name="Portal layout : lead menu entry" inherit_id="portal.portal_layout" priority="15">
|
||||
<template id="portal_my_home_menu_lead" name="Portal layout : lead menu entry" inherit_id="portal.portal_breadcrumbs" priority="15">
|
||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||
<li t-if="page_name == 'lead' or lead" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'lead' or lead" t-attf-class="breadcrumb-item #{'active ' if not lead else ''}">
|
||||
<a t-if="lead" t-attf-href="/my/leads?{{ keep_query() }}">
|
||||
My Leads
|
||||
</a>
|
||||
@@ -195,10 +195,10 @@
|
||||
My Leads
|
||||
</t>
|
||||
</li>
|
||||
<li t-if="lead" class="breadcrumb-item">
|
||||
<li t-if="lead" class="breadcrumb-item active">
|
||||
<span t-field="lead.name"/>
|
||||
</li>
|
||||
<li t-if="page_name == 'opportunity' or opportunity" class="breadcrumb-item">
|
||||
<li t-if="page_name == 'opportunity' or opportunity" t-attf-class="breadcrumb-item #{'active ' if not opportunity else ''}">
|
||||
<a t-if="opportunity" t-attf-href="/my/opportunities?{{ keep_query() }}">
|
||||
My Opportunities
|
||||
</a>
|
||||
@@ -206,7 +206,7 @@
|
||||
My Opportunities
|
||||
</t>
|
||||
</li>
|
||||
<li t-if="opportunity" class="breadcrumb-item">
|
||||
<li t-if="opportunity" class="breadcrumb-item active">
|
||||
<span t-field="opportunity.name"/>
|
||||
</li>
|
||||
</xpath>
|
||||
@@ -263,6 +263,8 @@
|
||||
|
||||
<template id="portal_my_opportunities" name="My Opportunities">
|
||||
<t t-call="portal.portal_layout">
|
||||
<t t-set="breadcrumbs_searchbar" t-value="True"/>
|
||||
|
||||
<t t-call="portal.portal_searchbar">
|
||||
<t t-set="title">My Opportunities</t>
|
||||
<li class="float-left"><button t-if="request.env.user.partner_id.grade_id or request.env.user.commercial_partner_id.grade_id" name='new_opp' data-toggle="modal" data-target=".modal_new_opp" class="btn btn-secondary navbar-btn ml16" title="Add an opportunity" aria-label="Add an opportunity"><i class="fa fa-plus"/></button></li>
|
||||
|
||||
Reference in New Issue
Block a user