* Set the blocking warning if the user enters a 'Client ID' without any 'Tracking ID'. * 'Google Analytics in Dashboard' field is visible only if 'Google Analytics' is checked in website settings. * Get/Set the value of 'google_analytics_key' and 'google_management_client_id' from 'website' model instead of 'ir.config_parameter' on 'Google Analytics' wizard. * If ID is set on 'Google Analytics' wizard then activated the related features and populate fields in website settings.
114 lines
6.4 KiB
XML
114 lines
6.4 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"/>
|
|
<div class="o_website_dashboard_content"/>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="website.dashboard_header">
|
|
<div class="row o_dashboard_common">
|
|
<div class="o_box">
|
|
<a href="#" class="o_box_item o_dashboard_action" name="website.action_website" title="Go to Website">
|
|
<div class="o_inner_box o_primary">
|
|
<i class="fa fa-globe fa-3x"></i><br/>
|
|
Go to Website
|
|
</div>
|
|
</a>
|
|
<t t-if="widget.groups.system">
|
|
<t t-set="apps" t-value="{
|
|
'website_crm': {'icon': 'fa-file-text-o', 'help': _('Add a contact form to your Contact Us page.')},
|
|
'website_sale': {'icon': 'fa-shopping-cart', 'help': _('Sell online to reach new customers.')},
|
|
'website_blog': {'icon': 'fa-rss-square', 'help': _('Build up a community with an efficient content strategy.')},
|
|
'website_hr_recruitment': {'icon': 'fa-suitcase', 'help': _('Promote your job announces to attract new talents.')},
|
|
'website_event': {'icon': 'fa-ticket', 'help': _('Promote your events, manage attendance and sell tickets.')},
|
|
'im_livechat': {'icon': 'fa-comments-o', 'help': _('Chat with your visitors in real time.')},
|
|
}"/>
|
|
</t>
|
|
<t t-if="! widget.groups.system"><t t-set="apps" t-value="{}"/></t>
|
|
<t t-set="vignette_max" t-value="6"/>
|
|
<t t-set="vignette_nbr" t-value="1"/>
|
|
<t t-foreach="apps" t-as="app">
|
|
<t t-set="app_data" t-value="widget.dashboards_data.apps_data[app]"/>
|
|
<t t-set="app_dashboard" t-value="apps[app]"/>
|
|
<t t-if="vignette_nbr < vignette_max && widget.hidden_apps.indexOf(app_data['id']) == -1 && app_data['state'] == 'uninstalled'">
|
|
<t t-set="vignette_nbr" t-value="vignette_nbr + 1"/>
|
|
<a href="#" class="o_box_item o_dashboard_action_form"
|
|
name="Apps"
|
|
data-res_model="ir.module.module"
|
|
t-att-data-res_id="app_data['id']"
|
|
t-att-title="app_dashboard['help']">
|
|
<div class="o_inner_box o_apps">
|
|
<div class="o_apps_show">
|
|
<i t-attf-class="fa #{app_dashboard['icon']} fa-3x"></i><br/>
|
|
<t t-esc="app_data['shortdesc']"/>
|
|
</div>
|
|
<div class="o_apps_hidden">
|
|
<i class="fa fa-plus-circle fa-3x"></i><br/>
|
|
Add this feature
|
|
</div>
|
|
<i class="o_apps_hidden o_dashboard_hide_panel fa fa-close" t-att-data-module_id="app_data['id']" title="Remove this suggestion from dashboard"/>
|
|
</div>
|
|
</a>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="website.dashboard_visits">
|
|
<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 && 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 && 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>
|
|
</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>
|
|
</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_dashboard.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>
|
|
</templates>
|