Files
odoo_source/addons/website_links/views/website_links_template.xml
T
len-odoo b4e310e7f6 [FIX] website_links: do not require flash to copy text to clipboard
The "copy link" to clipboard button ancestrally used a flash (.swf) dependency
(ZeroClipboard) to work.
Since Odoo honours its history, it was still there.
However on Firefox you are asked to activate flash to make it work,
and on Chrome nothing happens.
We get rid of this shibboleth, using instead clipboard.js that is already used
elswhere for the same purpose.

closes #27958
opw 1896509
2018-10-29 13:56:41 +01:00

114 lines
6.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="assets_website_links" inherit_id="website.assets_frontend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/website_links/static/src/js/website_links.js"/>
<script type="text/javascript" src="/website_links/static/src/js/website_links_code_editor.js"/>
<script type="text/javascript" src="/website_links/static/src/js/website_links_charts.js"/>
<link rel="stylesheet" type="text/css" href="/website_links/static/src/css/website_links.css" />
</xpath>
</template>
<template id="share_page_menu" inherit_id="website.user_navbar">
<xpath expr="//li/a[@data-action='promote-current-page']/.." position="after">
<li>
<a href="/r" id="o_website_links_share_page">
<span title="Track this page to count clicks">Track this Page</span>
</a>
</li>
</xpath>
</template>
<template id="asset_website_links_menu" inherit_id="website.assets_editor">
<xpath expr="." position="inside">
<script type="text/javascript" src="/website_links/static/src/js/website_links_menu.js"></script>
</xpath>
</template>
<template id="create_shorten_url">
<div class="o_website_links_create_tracked_url">
<div class="container">
<h1 class="page-header">Link Tracker</h1>
<div class="notification"></div>
<div class="row">
<div class="col-sm-7">
<form class="form-horizontal" id="o_website_links_link_tracker_form">
<div class="form-group" id="url-form-group">
<label class="col-sm-3 control-label text-left">URL</label>
<div class="col-sm-9">
<input type="text" id="url" class="form-control required-form-control" required="True" placeholder="e.g. https://www.odoo.com/page/contactus" t-att-value="u"/>
</div>
</div>
<div class="o_website_links_utm_forms">
<div class="form-group">
<label class="col-sm-3 control-label">Campaign <i class="fa fa-info-circle" data-toggle="tooltip" data-placement="top" title="Defines the context of your link. It might be an event you want to promote or a special promotion."></i></label>
<div class="col-sm-9">
<input type="hidden" class="form-control" id="campaign-select"/>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Medium <i class="fa fa-info-circle" data-toggle="tooltip" data-placement="top" title="Defines the medium used to share your link. It might be an email, or a Facebook Ads for instance."></i></label>
<div class="col-sm-9">
<input type="hidden" class="form-control" id="channel-select" />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Source <i class="fa fa-info-circle" data-toggle="tooltip" data-placement="top" title="Defines the source from which your traffic will come from, Facebook or Twitter for instance."></i></label>
<div class="col-sm-9">
<input type="hidden" class="form-control" id="source-select" />
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-primary" id="btn_shorten_url" data-clipboard-text="">Get tracked link</button>
<span id="generated_tracked_link" style="display:none;" class="text-muted"></span>
</div>
</div>
</form>
</div>
<div class="col-sm-offset-1 col-sm-3 hidden-xs">
<p class="text-muted text-justify">Share this page with a <strong>short link</strong> that includes <strong>analytics trackers</strong>.</p>
<p class="text-muted text-justify">Those trackers can be used in Google Analytics to track clicks and visitors, or in Odoo reports to track opportunities and related revenues.</p>
</div>
</div>
<h2 class="page-header">Your tracked links
<small class="pull-right hidden-xs mt16" id="filters">
<ul class="nav nav-tabs nav-tabs-inline graph-tabs" role="tablist">
<li class="active"><a href="#" id="filter-newest-links" role="tab" data-toggle="tab">Newest</a></li>
<li><a href="#" id="filter-most-clicked-links" role="tab" data-toggle="tab">Most Clicked</a></li>
<li><a href="#" id="filter-recently-used-links" role="tab" data-toggle="tab">Recently Used</a></li>
</ul>
</small>
</h2>
<div id="o_website_links_recent_links">
<div class="o_website_links_recent_links_notification"></div>
</div>
</div>
</div>
</template>
<template id="page_shorten_url" name="Link Tracker">
<t t-call="website.layout">
<t t-call="website_links.create_shorten_url"/>
</t>
</template>
</odoo>