odex25_standard/odex25_donation/affiliate_management/views/tool_template.xml

207 lines
6.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<odoo>
<data>
<template id="tool" name="Tool">
<t t-call="website.layout">
<t t-if="user_id.partner_id.is_affiliate">
<div class="oe_structure">
<div class="container mt16">
<div class="navbar navbar-expand-md navbar-light"
style="background-color: #3aadaa">
<div>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/affiliate/about"
style="color:white;">
<i class="fa fa-home fa-2x">
</i>
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1 namitm"
href="/affiliate/report"
style=" color: white;border-left: 3px solid;">
Reports
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1"
href="/affiliate/payment"
style=" color: white;border-left: 3px solid;">
Payments
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1"
href="/affiliate/tool"
style=" color: white;border-left: 3px solid;">
Tools
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container mt16" style="padding-bottom:5%;">
<h2>
<strong>
Your Tools
</strong>
</h2>
<div class="container row ms-2">
<div class="row">
<div class="col-md-8 p-2"
style="border: 2px solid #3aadaa;border-radius: 20px;">
<h4>
<svg xmlns="http://www.w3.org/2000/svg" width="24"
height="26" fill="3aadaa" class="bi bi-link-45deg"
viewBox="0 0 16 16">
<path
d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" />
<path
d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" />
</svg>
<a href="/tool/link_generator">
Affiliate Link Generator
</a>
</h4>
With our this tool, a link will be generated with key for
the publisher just by entering a valid url and clicking on
Generate which he can showcase on his website. </div>
</div>
<br />
<br />
<div class="row mt-3">
<div class="col-md-8 p-2"
style="border: 2px solid #3aadaa;border-radius: 20px;">
<h4>
<svg xmlns="http://www.w3.org/2000/svg" width="24"
height="26" fill="3aadaa" class="bi bi-link-45deg"
viewBox="0 0 16 16">
<path
d="M4.715 6.542 3.343 7.914a3 3 0 1 0 4.243 4.243l1.828-1.829A3 3 0 0 0 8.586 5.5L8 6.086a1.002 1.002 0 0 0-.154.199 2 2 0 0 1 .861 3.337L6.88 11.45a2 2 0 1 1-2.83-2.83l.793-.792a4.018 4.018 0 0 1-.128-1.287z" />
<path
d="M6.586 4.672A3 3 0 0 0 7.414 9.5l.775-.776a2 2 0 0 1-.896-3.346L9.12 3.55a2 2 0 1 1 2.83 2.83l-.793.792c.112.42.155.855.128 1.287l1.372-1.372a3 3 0 1 0-4.243-4.243L6.586 4.672z" />
</svg>
<a href="/tool/product_link">
Generate Product Link
</a>
</h4>
With our this tool, the publisher can generate a unique
product link by following below three simple steps. First
Choose Your Product, Second Choose your Image and Last Copy
Generated Code </div>
</div>
</div>
</div>
</div>
</t>
</t>
</template>
<!-- # tool 1 view -->
<template id="link_generator" name="Link Generator">
<t t-call="website.layout">
<t t-if="user_id.partner_id.is_affiliate">
<div class="oe_structure">
<div class="container mt16">
<div class="navbar navbar-expand-md navbar-light"
style="background-color: #3aadaa">
<div>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/affiliate/about"
style="color:white;">
<i class="fa fa-home fa-2x">
</i>
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1 namitm"
href="/affiliate/tool"
style=" color: white;border-left: 3px solid;">
Tools
</a>
</li>
<li class="nav-item">
<a class="nav-link mt-1 ps-2 ms-1 namitm"
href="/tool/link_generator"
style=" color: white;border-left: 3px solid;">
Affiliate Link Generator
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container mt16">
<h3 class="page-header">
Affiliate Link Generator
</h3>
<div class="container">
<form role="form" class="mb-5" t-attf-action="/tool/create_link"
method="post">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()" />
<div class="d-flex">
<div class="w-50 me-2">
<input type="link" name="link" t-att-value="link"
id="link" class="form-control inp_style"
required="required" autofocus="autofocus"
placeholder="eg. www.localhost:8069/shop/product/e-com10-apple-wireless-keyboard-16" />
</div>
<div class="ps-2">
<button type="submit" class="btn btn-primary ms-2"
style="top:12px;border-radius:24px;">
Generate
</button>
</div>
</div>
</form>
</div>
<!-- [UPD]: Updated the view of generated link -->
<div>
<p t-if="generate_link">
<h4>
Text Link created below.
</h4>
<t t-if="generate_link">
<div class="row">
<div class="col-md-9">
<p class="border p-2"
style="background-color:#f0f8ff">
<strong>
<t t-esc="generate_link" />
</strong>
</p>
<button id="link_copy_button"
class="btn btn-success ms-2"
style="border-radius:24px;">
Copy
</button>
</div>
</div>
</t>
<textarea class="form-control" rows="2" readonly="1"
id="copy_link" style="display:none;">
<t t-if="generate_link">
<t t-esc="generate_link" />
</t>
</textarea>
<h6 class="mt-3 text-info">
Copy the generated link and paste it into your website
</h6>
</p>
<p class="alert alert-danger" t-if="error">
<t t-esc="error" />
</p>
</div>
</div>
</div>
</t>
</t>
</template>
</data>
</odoo>