Files
odoo_source/addons/website/static/src/xml/website.backend.xml
T
Benoit Socias 6a7a5eb516 [IMP] website: make Plausible dashboard scrollable if ever needed
Since [1] the Plausible dashboard height was hard-coded to avoid the
display of a scrollbar on the iframe.
In case the Plausible dashboard height grows in the future, it will not
be possible to scroll to the bottom elements.

This commit virtually restores the scrollbar, so that in case the
Plausible dashboard grows in the future, the scrollbar will appear and
still give access to the whole dashboard.

[1]: https://github.com/odoo/odoo/commit/b8c1976e933628182496929d348dda11b5051a0c

task-2993773

closes odoo/odoo#102852

X-original-commit: 616eb5384df085fdc94cb18ab8e14336f9b68702
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-10 13:00:54 +02:00

81 lines
3.4 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 t-if="widget.dashboards_data.plausible_share_url" class="col-12">
<div class="container">
<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>
<div t-else="" class="col-lg-12 o_box">
<h2>Analytics</h2>
<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>
</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 -->
<t t-set="show_range_buttons" t-value="0"/>
<div t-attf-class="btn-group o_date_range_buttons #{show_range_buttons ? 'd-md-inline-flex' : 'd-none'} 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>