[IMP] portal: use a less "big underlined headers everywhere" display

Main page of the customer portal now contains simply a list of document
models the user can access, under a 'Your Documents' section. It is
a bit easier to read and a bit less ugly than a list of underlined
headers.
This commit is contained in:
Thibault Delavallée
2017-07-11 11:28:18 +02:00
parent efbb4dd903
commit 3afb78371f
6 changed files with 75 additions and 117 deletions
@@ -8,25 +8,23 @@
</template>
<template id="portal_my_home_invoice" name="Portal My Home : invoice entries" inherit_id="website_portal.portal_my_home" priority="30">
<xpath expr="//div[contains(@class,'o_my_home_content')]" position="inside">
<h3 t-if="invoice_count" class="page-header">
<a href="/my/invoices">My Invoices
<span class="badge ml8" t-esc="invoice_count"/>
</a>
</h3>
<xpath expr="//ul[contains(@class,'o_portal_docs')]" position="inside">
<li t-if="invoice_count" class="list-group-item">
<span class="badge" t-esc="invoice_count"/>
<a href="/my/invoices">Invoices</a>
</li>
</xpath>
</template>
<template id="portal_my_invoices" name="My Invoices and Payments">
<t t-call="website_portal.portal_layout">
<div class="page-header">
<span class="h3">My Invoices</span>
<h3>Invoices
<t t-call="website_portal.portal_searchbar"/>
</div>
</h3>
<t t-if="not invoices">
<p>There are currently no invoices and payments for your account.</p>
</t>
<t t-if="invoices">
<div t-if="invoices" class="panel panel-default">
<div class="table-responsive"><table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
@@ -66,7 +64,7 @@
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</t>
</div>
</t>
</template>
</odoo>
@@ -143,6 +143,9 @@
<t t-set="my_details" t-value="True"/>
<div class="o_my_home_content">
<div class="oe_structure"></div>
<h3 class="page-header">Your Documents</h3>
<ul class="o_portal_docs list-group">
</ul>
</div>
<div class="col-md-12 oe_structure"/>
</t>
@@ -4,12 +4,8 @@
<template id="portal_my_home_menu_purchase" name="Portal layout : purchase menu entries" inherit_id="website_portal.portal_layout" priority="25">
<xpath expr="//ol[contains(@class,'o_portal_submenu')]" position="inside">
<li t-if="page_name == 'purchase' or purchase_order">
<a t-if="purchase_order" t-attf-href="/my/purchase?{{ keep_query() }}">
My Purchase Orders
</a>
<t t-else="">
My Purchase Orders
</t>
<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">
<t t-esc="purchase_order.name"/>
@@ -18,22 +14,21 @@
</template>
<template id="portal_my_home_purchase" name="Portal My Home : purchase entry" inherit_id="website_portal.portal_my_home" priority="25">
<xpath expr="//div[contains(@class,'o_my_home_content')]" position="inside">
<h3 t-if="purchase_count" class="page-header">
<a href="/my/purchase">My Purchase Orders
<span class="badge ml8" t-esc="purchase_count"/>
</a>
</h3>
<xpath expr="//ul[contains(@class,'o_portal_docs')]" position="inside">
<li t-if="purchase_count" class="list-group-item">
<span class="badge" t-esc="purchase_count"/>
<a href="/my/purchase">Purchase Orders</a>
</li>
</xpath>
</template>
<template id="portal_my_purchase_orders" name="Portal: My Purchase Orders">
<t t-call="website_portal.portal_layout">
<h3 class="page-header">
My Purchase Orders
<h3>Purchase Orders
<t t-call="website_portal.portal_searchbar"/>
</h3>
<table class="table table-hover o_my_status_table">
<div t-if="orders" class="panel panel-default">
<div class="table-responsive"><table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
<th>Purchase Orders #</th>
@@ -57,10 +52,11 @@
</td>
</tr>
</t>
</table>
</table></div>
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</div>
</t>
</template>
@@ -9,61 +9,43 @@
<template id="portal_my_home_menu_sale" name="Portal layout : sales menu entries" inherit_id="website_portal.portal_layout" priority="20">
<xpath expr="//ol[contains(@class,'o_portal_submenu')]" position="inside">
<li t-if="page_name == 'quote' or sales_order and sales_order.state == 'sent'">
<a t-if="sales_order" t-attf-href="/my/quotes?{{ keep_query() }}">
My Quotations
</a>
<t t-else="">
My Quotations
</t>
<a t-if="sales_order" t-attf-href="/my/quotes?{{ keep_query() }}">Quotations</a>
<t t-else="">Quotations</t>
</li>
<li t-if="page_name == 'order' or sales_order and sales_order.state != 'sent'">
<a t-if="sales_order" t-attf-href="/my/orders?{{ keep_query() }}">
My Sales Orders
</a>
<t t-else="">
My Sales Orders
</t>
<a t-if="sales_order" t-attf-href="/my/orders?{{ keep_query() }}">Sales Orders</a>
<t t-else="">Sales Orders</t>
</li>
<li t-if="sales_order">
<t t-if="sales_order.state == 'sent'">
Quotation
</t>
<t t-if="sales_order.state != 'sent'">
Order
</t>
<t t-if="sales_order.state == 'sent'">Quotation</t>
<t t-if="sales_order.state != 'sent'">Order</t>
<t t-esc="sales_order.name"/>
</li>
</xpath>
</template>
<template id="portal_my_home_sale" name="Portal My Home : sales entries" inherit_id="website_portal.portal_my_home" priority="20">
<xpath expr="//div[contains(@class,'o_my_home_content')]" position="inside">
<h3 t-if="quotation_count" class="page-header">
<a href="/my/quotes">My Quotations
<span class="badge ml8" t-esc="quotation_count"/>
</a>
</h3>
<h3 class="page-header">
<a href="/my/orders">My Sales Orders
<span t-if="order_count" class="badge ml8" t-esc="order_count"/>
<small t-if="not order_count" class="ml8">
There are currently no orders.
</small>
</a>
</h3>
<xpath expr="//ul[contains(@class,'o_portal_docs')]" position="inside">
<li t-if="quotation_count" class="list-group-item">
<span class="badge" t-esc="quotation_count"/>
<a href="/my/quotes">Quotations</a>
</li>
<li t-if="order_count" class="list-group-item">
<span class="badge" t-esc="order_count"/>
<a href="/my/orders">Sales Orders</a>
</li>
</xpath>
</template>
<template id="portal_my_quotations" name="My Quotations">
<t t-call="website_portal.portal_layout">
<div class="page-header">
<span class="h3">My Quotations</span>
<h3>Quotations
<t t-call="website_portal.portal_searchbar"/>
</div>
</h3>
<t t-if="not quotations">
<p>There are currently no quotations for your account.</p>
</t>
<t t-if="quotations">
<div t-if="quotations" class="panel panel-default">
<div class="table-responsive"><table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
@@ -97,20 +79,19 @@
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</t>
</div>
</t>
</template>
<template id="portal_my_orders" name="My Sales Orders">
<t t-call="website_portal.portal_layout">
<div class="page-header">
<span class="h3">My Sales Orders</span>
<h3>Sales Orders
<t t-call="website_portal.portal_searchbar"/>
</div>
</h3>
<t t-if="not orders">
<p>There are currently no orders for your account.</p>
</t>
<t t-if="orders">
<div t-if="orders" class="panel panel-default">
<div class="table-responsive"><table class="table table-hover o_my_status_table">
<thead>
<tr class="active">
@@ -150,7 +131,7 @@
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="website.pager"/>
</div>
</t>
</div>
</t>
</template>
@@ -3,23 +3,15 @@
<template id="portal_layout" name="Portal layout: project menu entry" inherit_id="website_portal.portal_layout" priority="40">
<xpath expr="//ol[contains(@class,'o_portal_submenu')]" position="inside">
<li t-if="page_name == 'project' or project">
<a t-if="project" t-attf-href="/my/projects?{{ keep_query() }}">
Projects
</a>
<t t-else="">
Projects
</t>
<a t-if="project" t-attf-href="/my/projects?{{ keep_query() }}">Projects</a>
<t t-else="">Projects</t>
</li>
<li t-if="project">
<t t-esc="project.name"/>
</li>
<li t-if="page_name == 'task' or task">
<a t-if="task" t-attf-href="/my/tasks?{{ keep_query() }}">
My Tasks
</a>
<t t-else="">
My Tasks
</t>
<a t-if="task" t-attf-href="/my/tasks?{{ keep_query() }}">Tasks</a>
<t t-else="">Tasks</t>
</li>
<li t-if="task">
<span t-field="task.name"/>
@@ -28,28 +20,23 @@
</template>
<template id="portal_my_home" name="Portal My Home: project entries" inherit_id="website_portal.portal_my_home" priority="40">
<xpath expr="//div[contains(@class,'o_my_home_content')]" position="inside">
<h3 t-if="project_count" class="page-header">
<a href="/my/projects">My Projects
<span class="badge ml8" t-esc="project_count"/>
</a>
</h3>
<h3 t-if="task_count" class="page-header">
<a href="/my/tasks">My Tasks
<span class="badge ml8" t-esc="task_count"/>
</a>
</h3>
<xpath expr="//ul[contains(@class,'o_portal_docs')]" position="inside">
<li t-if="project_count" class="list-group-item">
<span class="badge" t-esc="project_count"/>
<a href="/my/projects">Projects</a>
</li>
<li t-if="task_count" class="list-group-item">
<span class="badge" t-esc="task_count"/>
<a href="/my/tasks">Tasks</a>
</li>
</xpath>
</template>
<template id="my_projects" name="My Projects">
<t t-call="website_portal.portal_layout">
<div class="row">
<h3 class="page-header">
My Projects
<t t-call="website_portal.portal_searchbar"/>
</h3>
</div>
<h3>Projects
<t t-call="website_portal.portal_searchbar"/>
</h3>
<t t-if="not projects">
<div class="alert alert-warning mt8" role="alert">
There are no projects.
@@ -60,7 +47,7 @@
<thead>
<tr class="active">
<th class="col-md-6">Name</th>
<th></th>
<th>Tasks</th>
</tr>
</thead>
<tbody>
@@ -69,7 +56,7 @@
<a t-attf-href="/my/project/#{project.id}?{{ keep_query() }}"><span t-field="project.name"/></a>
</td>
<td>
<a t-if="project.use_tasks" t-attf-href="/my/tasks?filterby=#{project.id}">
<a t-if="project.use_tasks" t-attf-href="/my/tasks?{{keep_query('debug', filterby=project.id)}}">
<t t-esc="project.task_count" />
<t t-esc="project.label_tasks" />
</a>
@@ -140,8 +127,7 @@
<template id="my_tasks" name="My Tasks">
<t t-call="website_portal.portal_layout">
<h3 class="page-header">
My Tasks
<h3>Tasks
<t t-call="website_portal.portal_searchbar"/>
</h3>
<t t-if="not tasks">
@@ -4,12 +4,8 @@
<template id="portal_layout" name="Portal layout: Issues menu entry" inherit_id="website_portal.portal_layout" priority="45">
<xpath expr="//ol[contains(@class,'o_portal_submenu')]" position="inside">
<li t-if="page_name == 'issue' or issue">
<a t-if="issue" t-attf-href="/my/issues?{{ keep_query() }}">
My Issues
</a>
<t t-else="">
My Issues
</t>
<a t-if="issue" t-attf-href="/my/issues?{{ keep_query() }}">Issues</a>
<t t-else="">Issues</t>
</li>
<li t-if="issue">
Issue <span t-esc="issue.id"/>
@@ -18,19 +14,17 @@
</template>
<template id="portal_my_home" name="Portal My Home: Issue entries" inherit_id="website_portal.portal_my_home" priority="45">
<xpath expr="//div[contains(@class,'o_my_home_content')]" position="inside">
<h3 t-if="issue_count" class="page-header">
<a href="/my/issues">My Issues
<span class="badge ml8" t-esc="issue_count"/>
</a>
</h3>
<xpath expr="//ul[contains(@class,'o_portal_docs')]" position="inside">
<li t-if="issue_count" class="list-group-item">
<span class="badge" t-esc="issue_count"/>
<a href="/my/issues">Issues</a>
</li>
</xpath>
</template>
<template id="my_issues" name="My Issues">
<t t-call="website_portal.portal_layout">
<h3 class="page-header">
My Issues
<h3>Issues
<t t-call="website_portal.portal_searchbar"/>
</h3>
<t t-if="not issues">
@@ -136,7 +130,7 @@
<template id="my_projects" inherit_id="website_project.my_projects">
<xpath expr="//table/thead/tr/th[last()]" position="after">
<th></th>
<th>Issues</th>
</xpath>
<xpath expr="//table/tbody/tr/td[last()]" position="after">
<td>