Files
odoo_source/addons/website/static/src/xml/website.backend.xml
T
Dhawal Limbuwala 4764cae315 [IMP] website(_sale): Improve UX for the website dashboard
Purpose
=======

There are some usability issues in the website dashboard

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

1/ Move button 'Go to Website' in the header
2/ Hide the action button bar if there's nothing in it
3/ Align the labels in the graph's legend
4/ Make the legend labels and display more obvious
5/ Modify the graph colors to be more readable
6/ Remove margins around todo buttons
2017-12-05 13:13:23 +01:00

98 lines
4.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<div t-name="WidgetWebsiteButton" class="o_stat_info published">
<span class="o_stat_text o_value"/>
<span class="o_stat_text">On Website</span>
</div>
<t t-name="website.WebsiteDashboardMain">
<div class="o_dashboards">
<div class="container-fluid o_website_dashboard">
<t t-call="website.dashboard_header"/>
<t t-call="website.dashboard_content"/>
</div>
</div>
</t>
<t t-name="website.dashboard_header">
<div class="row o_dashboard_common"/>
</t>
<t t-name="website.dashboard_content">
<div class="o_website_dashboard_content">
<div class="row o_dashboard_visits" t-if="widget.groups.website_designer">
<div class="col-xs-12 o_box">
<h2>Visits</h2>
<div t-if="widget.dashboards_data.visits &amp;&amp; widget.dashboards_data.visits.ga_client_id">
<div class="row js_analytics_components"/>
<a href="#" class="js_link_analytics_settings">Edit my Analytics Client ID</a>
</div>
<div t-if="!(widget.dashboards_data.visits &amp;&amp; widget.dashboards_data.visits.ga_client_id)" class="col-md-12">
<div class="o_demo_background">
<div class="o_layer">
</div>
<div class="o_buttons text-center">
<h3>There is no data currently available.</h3>
<button class="btn btn-sm btn-primary js_link_analytics_settings center-block mb8">Link my Analytics Account</button>
</div>
</div>
</div>
</div>
</div>
</div>
</t>
<div t-name="website.unauthorized_analytics" class="col-xs-12 js_unauthorized_message mb16">
<span t-if="reason === 'not_connected'">You need to log in to your Google Account before: </span>
<span t-if="reason === 'no_right'">You do not seem to have access to this Analytics Account.</span>
<span t-if="reason === 'not_initialized'">Google Analytics initialization failed. Maybe this domain is not whitelisted in your Google Analytics project for this client ID.</span>
</div>
<div t-name="website.ga_dialog_content">
Your Tracking ID: <input type="text" name="ga_analytics_key" placeholder="UA-XXXXXXXX-Y" t-att-value="ga_analytics_key" style="width: 100%"></input>
<a href="https://www.odoo.com/documentation/user/online/website/optimize/google_analytics.html" class="oe_link fa fa-arrow-right" target="_blank">
How to get my Tracking ID
</a>
<br/><br/>
Your Client ID: <input type="text" name="ga_client_id" t-att-value="ga_key" style="width: 100%"></input>
<a href="https://www.odoo.com/documentation/user/online/website/optimize/google_analytics_dashboard.html" class="oe_link fa fa-arrow-right" target="_blank">
How to get my Client ID
</a>
</div>
<t t-name="website.DateRangeButtons">
<div class="btn-group btn-group-sm o_date_range_buttons pull-right">
<button class="btn btn-sm btn-default js_date_range active" data-date="week">Last Week</button>
<button class="btn btn-sm btn-default js_date_range" data-date="month">Last Month</button>
<button class="btn btn-sm btn-default js_date_range" data-date="year">Last Year</button>
</div>
</t>
<t t-name="website.SalesChartTooltip">
<table>
<thead>
<tr><td colspan="3"><strong><t t-esc="chartData.series[0].key"/></strong></td></tr>
</thead>
<tbody>
<tr>
<td class="legend-color-guide"><div class="o_legend0"/></td>
<td class="key o_tooltip_key"><t t-esc="format.date(moment(chartData.value))"/></td>
<td class="value"><t t-esc="format.float(chartData.series[0].data[1])"/></td>
</tr>
<tr>
<td class="legend-color-guide"><div class="o_legend1"/></td>
<td class="key o_tooltip_key"><t t-esc="format.date(moment(chartData.value).subtract(1, dateRange))"/></td>
<td class="value"><t t-esc="format.float(chartData.series[1].data[1])"/></td>
</tr>
</tbody>
</table>
</t>
<t t-name="website.GoToButtons">
<a href="/" class="btn btn-primary" title="Go to Website">
Go to Website
</a>
</t>
</templates>