summaryrefslogtreecommitdiff
path: root/addons/website_mail/views/website_mail_templates.xml
blob: cca4395575d5e2c4ca69678a55fe323a11f090ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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>