diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/website_mail/views | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website_mail/views')
| -rw-r--r-- | addons/website_mail/views/assets.xml | 9 | ||||
| -rw-r--r-- | addons/website_mail/views/website_mail_templates.xml | 31 |
2 files changed, 40 insertions, 0 deletions
diff --git a/addons/website_mail/views/assets.xml b/addons/website_mail/views/assets.xml new file mode 100644 index 00000000..c0c293a1 --- /dev/null +++ b/addons/website_mail/views/assets.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="head" inherit_id="website.assets_frontend" name="Mail customization"> + <xpath expr="." position="inside"> + <script type="text/javascript" src="/website_mail/static/src/js/follow.js"></script> + <link rel="stylesheet" type="text/scss" href="/website_mail/static/src/css/website_mail.scss"/> + </xpath> + </template> +</odoo> diff --git a/addons/website_mail/views/website_mail_templates.xml b/addons/website_mail/views/website_mail_templates.xml new file mode 100644 index 00000000..cca43955 --- /dev/null +++ b/addons/website_mail/views/website_mail_templates.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="follow"> + <div t-attf-class="input-group js_follow #{div_class}" t-att-data-id="object.id" + t-att-data-object="object._name" + t-att-data-follow="object.id and object.message_is_follower and 'on' or 'off'" + t-att-data-unsubscribe="'unsubscribe' if 'unsubscribe' in request.params else None"> + <input + type="email" name="email" + class="js_follow_email form-control" + placeholder="your email..." + groups="base.group_public"/> + <div t-if="icons_design and not request.env.user.has_group('base.group_public')" class="js_follow_icons_container"> + <button class="btn text-reset js_unfollow_btn"> + <div class="d-flex align-items-center"> + <small>Unfollow</small><i class="fa fa-fw ml-1"/> + </div> + </button> + <button class="btn text-reset js_follow_btn"> + <div class="d-flex align-items-center"> + <small>Follow</small><i class="fa fa-fw ml-1"/> + </div> + </button> + </div> + <div t-else="" t-attf-class="#{request.env.user.has_group('base.group_public') and 'input-group-append'}"> + <button href="#" t-attf-class="btn btn-secondary js_unfollow_btn">Unsubscribe</button> + <button href="#" t-attf-class="btn btn-primary js_follow_btn">Subscribe</button> + </div> + </div> + </template> +</odoo> |
