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_mass_mailing/views/snippets_templates.xml | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website_mass_mailing/views/snippets_templates.xml')
| -rw-r--r-- | addons/website_mass_mailing/views/snippets_templates.xml | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/addons/website_mass_mailing/views/snippets_templates.xml b/addons/website_mass_mailing/views/snippets_templates.xml new file mode 100644 index 00000000..1c7c58e8 --- /dev/null +++ b/addons/website_mass_mailing/views/snippets_templates.xml @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> +<template id="iframe_css_assets_edit" name="CSS assets for wysiwyg iframe content for popup" groups="base.group_user"> + <t t-call-assets="web.assets_common" t-js="false"/> + <t t-call-assets="web.assets_frontend" t-js="false"/> + <t t-call-assets="web_editor.assets_wysiwyg" t-js="false"/> + <t t-call-assets="website.assets_editor" t-js="false"/> +</template> + +<template id="remove_external_snippets" inherit_id="website.external_snippets"> + <xpath expr="//t[@id='newsletter_snippet']" position="replace"/> + <xpath expr="//t[@id='newsletter_popup_snippet']" position="replace"/> +</template> + +<template id="snippets" inherit_id="website.snippets"> + <xpath expr="//t[@id='mass_mailing_newsletter_block_hook']" position="replace"> + <t t-snippet="website_mass_mailing.s_newsletter_block" t-thumbnail="/website_mass_mailing/static/src/img/snippets_thumbs/s_newsletter_block.svg"/> + </xpath> + <xpath expr="//t[@id='mass_mailing_newsletter_popup_hook']" position="replace"> + <t t-snippet="website_mass_mailing.s_newsletter_subscribe_popup" t-thumbnail="/website/static/src/img/snippets_thumbs/newsletter_subscribe_popup.svg"/> + </xpath> + <xpath expr="//t[@id='mass_mailing_newsletter_hook']" position="replace"> + <t t-snippet="website_mass_mailing.s_newsletter_subscribe_form" t-thumbnail="/website/static/src/img/snippets_thumbs/s_newsletter_subscribe_form.svg"/> + </xpath> +</template> + +<template id="s_newsletter_subscribe_form" name="Newsletter"> + <div class="s_newsletter_subscribe_form js_subscribe" data-vxml="001" data-list-id="0"> + <div class="input-group"> + <input type="email" name="email" class="js_subscribe_email form-control" placeholder="your email..."/> + <span class="input-group-append"> + <a role="button" href="#" class="btn btn-primary js_subscribe_btn o_submit">Subscribe</a> + <a role="button" href="#" class="btn btn-success js_subscribed_btn d-none o_submit" disabled="disabled">Thanks</a> + </span> + </div> + </div> +</template> + +<template id="s_newsletter_block" name="Newsletter block"> + <section class="s_newsletter_block bg-200 pt32 pb32"> + <div class="container"> + <div class="row"> + <div class="col-lg-8 offset-lg-2 pt24 pb24"> + <h2>Always First.</h2> + <p>Be the first to find out all the latest news, products, and trends.</p> + <t t-snippet-call="website_mass_mailing.s_newsletter_subscribe_form"/> + </div> + </div> + </div> + </section> +</template> + +<template id="s_newsletter_subscribe_popup" name="Newsletter Popup"> + <div class="o_newsletter_popup o_snippet_invisible" data-list-id="0"/> +</template> + +<template id="s_newsletter_subscribe_popup_content" name="Newsletter Popup Content"> + <section class="s_text_block oe_img_bg pt88 pb64" data-snippet="s_text_block" + style="background-image: url('/web/image/website.s_cover_default_image'); background-position: 0 100%;"> + <div class="container s_allow_columns"> + <h1 style="text-align: center;">Always <b>First</b>.</h1> + <p style="text-align: center;">Be the first to find out all the latest news,<br/> products, and trends.</p> + </div> + </section> + <section class="s_text_block" data-snippet="s_text_block"> + <div class="container"> + <div class="row s_nb_column_fixed"> + <div class="col-lg-8 offset-lg-2 pt32 pb32"> + <t t-snippet-call="website_mass_mailing.s_newsletter_subscribe_form"/> + </div> + </div> + </div> + </section> +</template> + +<template id="newsletter_subscribe_options" name="Newsletter Subscribe Options" inherit_id="website.snippet_options"> + <xpath expr="//*[@t-set='so_snippet_addition_selector']" position="inside">, .o_newsletter_popup</xpath> + <xpath expr="//div" position="after"> + <t t-set="selector" t-value="'.js_subscribe'"/> + <div data-js="mailing_list_subscribe" + t-att-data-selector="selector" + t-attf-data-exclude=".o_newsletter_modal #{selector}"> + <we-button data-select_mailing_list="" data-no-preview="true">Change Newsletter</we-button> + </div> + <div data-js="recaptchaSubscribe" + t-att-data-selector="selector"> + <t t-set="recaptcha_public_key" t-value="request.env['ir.config_parameter'].sudo().get_param('recaptcha_public_key')"/> + <we-checkbox t-if="recaptcha_public_key" string="Show reCaptcha Policy" data-toggle-recaptcha-legal="" data-no-preview="true"/> + </div> + <div t-att-data-selector="selector" data-drop-near="p, h1, h2, h3, blockquote, .card"/> + <div data-js="newsletter_popup" + data-selector=".o_newsletter_popup"> + <we-button data-select_mailing_list="" data-no-preview="true">Change Newsletter</we-button> + </div> + </xpath> + <xpath expr="//div[@data-js='anchor']" position="attributes"> + <attribute name="data-exclude" add=".o_newsletter_popup" separator=","/> + </xpath> +</template> + +<!-- Extend default mass_mailing snippets with website feature --> + +<template id="s_mail_block_header_social" inherit_id="mass_mailing.s_mail_block_header_social"> + <xpath expr="//td[hasclass('o_mail_logo_container')]" position="after"> + <td width="30%" class="text-right o_mail_no_resize"> + <div class="o_mail_header_social"> + <t t-call="mass_mailing.social_links"/> + </div> + </td> + </xpath> +</template> + +<template id="s_mail_block_header_text_social" inherit_id="mass_mailing.s_mail_block_header_text_social"> + <xpath expr="//table//td" position="after"> + <td width="30%" class="text-right o_mail_no_resize"> + <div class="o_mail_header_social"> + <t t-call="mass_mailing.social_links"/> + </div> + </td> + </xpath> +</template> + +<template id="s_mail_block_footer_social" inherit_id="mass_mailing.s_mail_block_footer_social"> + <xpath expr="//td[hasclass('o_mail_footer_links')]" position="inside"> + <t> | <a role="button" href="/contactus" class="btn btn-link">Contact</a></t> + </xpath> +</template> + +<template id="s_mail_block_footer_social_left" inherit_id="mass_mailing.s_mail_block_footer_social_left"> + <xpath expr="//div[hasclass('o_mail_footer_links')]" position="inside"> + <t> | <a role="button" href="/contactus" class="btn btn-link">Contact</a></t> + </xpath> +</template> + +</odoo> |
