<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="follow">
        <div class="input-group js_follow" 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 class="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>

    <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>
            <script type="text/javascript" src="/website_mail/static/src/js/website_mail.js"></script>
            <link rel="stylesheet" type="text/scss" href="/website_mail/static/src/css/website_mail.scss"/>
        </xpath>
    </template>

</odoo>
