Files
odoo_source/addons/website/static/src/xml/website.backend.xml
T
Arthur Detroux (ard) a45b94656b [IMP] website: adapt website stat buttons to OWL
This commit adapts the website_published button and the settings field
"website cookie bar" to OWL.

Note: The website_redirect_button was adapted by [1] but the legacy
redirect button is still needed by a single partner view.

[1]: https://github.com/odoo/odoo/commit/9434969d5dc06aadcdbbfc600514a0bdb5635ea2

Part-of: odoo/odoo#99150
2022-09-08 08:36:52 +02:00

80 lines
3.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="WidgetWebsiteButtonIcon">
<button type="button" class="btn oe_stat_button">
<i class="fa fa-fw o_button_icon fa-globe"/>
<div class="o_stat_info">
<span class="o_stat_text">Go to<br/>Website</span>
</div>
</button>
</t>
<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">
<t t-call="website.plausible_content"/>
</div>
</t>
<t t-name="website.plausible_content">
<div class="row o_dashboard_visits" t-if="widget.groups.website_designer">
<div class="col-12 o_box">
<h2>Analytics</h2>
<div t-if="widget.dashboards_data.plausible_share_url" class="row">
<div class="ratio ratio-1x1">
<iframe t-att-src='widget.dashboards_data.plausible_share_url' class="embed-responsive-item" frameborder="0" loading="lazy"/>
</div>
</div>
<div t-else="" class="col-lg-12">
<div class="o_demo_background">
<div class="o_layer">
</div>
<div class="o_buttons text-center">
<h3>Easily track your visitor with Plausible</h3>
<a class="btn btn-primary" target="_blank"
href="https://www.odoo.com/documentation/master/applications/websites/website/optimize/plausible.html">
Connect Plausible
</a>
</div>
</div>
</div>
</div>
</div>
</t>
<t t-name="website.DateRangeButtons">
<!-- TODO: Hide in mobile as it is going to push in control panel and it breaks UI, maybe we will improve it in future -->
<div class="btn-group o_date_range_buttons d-none d-md-inline-flex float-end">
<button class="btn btn-secondary js_date_range active" data-date="week">Last Week</button>
<button class="btn btn-secondary js_date_range" data-date="month">Last Month</button>
<button class="btn btn-secondary js_date_range" data-date="year">Last Year</button>
</div>
<div class="btn-group d-none d-md-inline-block float-end" style="margin-right: 20px;">
<t t-foreach="widget.websites" t-as="website">
<button t-attf-class="btn btn-secondary js_website #{website.selected ? 'active' : ''}"
t-att-data-website-id="website.id">
<t t-esc="website.name"/>
</button>
</t>
</div>
</t>
<t t-name="website.GoToButtons">
<a role="button" href="/" class="btn btn-primary" title="Go to Website">
Go to Website
</a>
</t>
</templates>