diff options
| author | std-odoo <std@odoo.com> | 2020-08-10 08:07:48 +0000 |
|---|---|---|
| committer | std-odoo <std@odoo.com> | 2020-08-18 08:47:28 +0000 |
| commit | 13d1f3e012d0c528dbea67ee5e1d4c32548195a3 (patch) | |
| tree | eb69f43e611d962243163b03dc48a06ce0885cb2 /addons/mass_mailing/views | |
| parent | 8d62eacfff5f94f692661c221c7b43f39bd3b891 (diff) | |
[IMP] mass_mailing: allow to customize the mail preview
Purpose
=======
Allow to customize the preview text in mass mailing.
Specifications
==============
We do not generate the preview text anymore, instead we add
a new field to let the user choose want he want to put into
the preview. As the preview is added in the mail body, it
supports dynamic placeholders.
Rename "View in browser" into "View Online" because the text
will be displayed in the preview if the snippet is added at
the beginning of the email. And we want to make it shorter.
Remove the alt attribute of the image tag which are not part
of the "email content" in the mass mailing template.
So, we improve the email preview in the mail clients
(otherwise the mail client include the alt attribute into the
preview).
Task-2313872
closes odoo/odoo#55695
Related: odoo/upgrade#1584
Related: odoo/enterprise#12323
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/mass_mailing/views')
| -rw-r--r-- | addons/mass_mailing/views/mailing_mailing_views.xml | 1 | ||||
| -rw-r--r-- | addons/mass_mailing/views/snippets_themes.xml | 26 | ||||
| -rw-r--r-- | addons/mass_mailing/views/themes_templates.xml | 2 |
3 files changed, 15 insertions, 14 deletions
diff --git a/addons/mass_mailing/views/mailing_mailing_views.xml b/addons/mass_mailing/views/mailing_mailing_views.xml index 5c689b0cf57..a645334412a 100644 --- a/addons/mass_mailing/views/mailing_mailing_views.xml +++ b/addons/mass_mailing/views/mailing_mailing_views.xml @@ -160,6 +160,7 @@ <field name="mailing_type" widget="radio" options="{'horizontal': true}" invisible="1" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}"/> <field name="subject" string="Subject" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}" widget="char_emojis" placeholder="e.g. New Sale on all T-shirts"/> + <field name="preview" string="Preview Text" attrs="{'readonly': [('state', 'in', ('sending', 'done'))]}" widget="char_emojis" placeholder="e.g. Check it out before it's too late!"/> <label for="mailing_model_id" string="Recipients"/> <div name="mailing_model_id_container"> <div class="row"> diff --git a/addons/mass_mailing/views/snippets_themes.xml b/addons/mass_mailing/views/snippets_themes.xml index 5d88537b190..00933d63cae 100644 --- a/addons/mass_mailing/views/snippets_themes.xml +++ b/addons/mass_mailing/views/snippets_themes.xml @@ -127,7 +127,7 @@ <td width="35%"/> <td valign="center" width="30%" class="text-center o_mail_v_padding"> <a t-att-href="(company_id.website) or '#'" style="text-decoration:none;"> - <img border="0" src="/mass_mailing/static/src/img/theme_basic/s_default_image_logo.png" style="height:auto;max-width:400px;width:auto" alt="Your Logo" /> + <img border="0" src="/mass_mailing/static/src/img/theme_basic/s_default_image_logo.png" style="height:auto;max-width:400px;width:auto"/> </a> </td> <td width="35%" style="text-align:right"/> @@ -145,7 +145,7 @@ <tr> <td width="100%" valign="top" class="o_mail_full_width_padding o_mail_no_colorpicker"> <a href="#"> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_banner.jpg" class="d-block mx-auto" alt="Your Banner Image" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_banner.jpg" class="d-block mx-auto"/> </a> </td> </tr> @@ -155,7 +155,7 @@ </div> </template> -<template id="s_mail_block_header_view" name="View in browser"> +<template id="s_mail_block_header_view" name="View Online"> <div class="o_snippet_view_in_browser"> <div class="o_mail_snippet_general"> <table align="center" cellspacing="0" cellpadding="0" border="0" class="o_mail_table_styles"> @@ -163,7 +163,7 @@ <tr> <td width="100%" class="o_mail_h_padding o_mail_v_padding o_mail_no_colorpicker text-center"> <a href="/view"> - View this email in your browser + View Online </a> </td> </tr> @@ -376,7 +376,7 @@ <tr> <td style="vertical-align:top;width:270px;" class="o_mail_col_mv o_mail_col_container"> <div> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_two_cols_1.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_two_cols_1.jpg" class="d-block mx-auto"/> <h4 class="text-center">Column title</h4> <p class="text-center o_mail_no_margin"> Write one paragraph describing your product, @@ -391,7 +391,7 @@ <td style="vertical-align:top;width:270px;" class="o_mail_col_mv o_mail_col_container"> <div> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_two_cols_2.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_two_cols_2.jpg" class="d-block mx-auto"/> <h4 class="text-center">Column title</h4> <p class="text-center o_mail_no_margin"> Write one paragraph describing your product, @@ -418,7 +418,7 @@ <tr> <td style="vertical-align:top;width:180px;" class="o_mail_col_mv o_mail_col_container"> <div> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_three_cols_1.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_three_cols_1.jpg" class="d-block mx-auto"/> <h4 class="text-center">Column Title</h4> <p class="text-center o_mail_no_margin"> A short description @@ -431,7 +431,7 @@ <td style="vertical-align:top;width:180px;" class="o_mail_col_mv o_mail_col_container"> <div> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_three_cols_2.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_three_cols_2.jpg" class="d-block mx-auto"/> <h4 class="text-center">Column Title</h4> <p class="text-center o_mail_no_margin"> A short description @@ -444,7 +444,7 @@ <td style="vertical-align:top;width:180px;" class="o_mail_col_mv o_mail_col_container"> <div> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_three_cols_3.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_three_cols_3.jpg" class="d-block mx-auto"/> <h4 class="text-center">Column Title</h4> <p class="text-center o_mail_no_margin"> A short description @@ -468,7 +468,7 @@ <tbody> <tr> <td style="width:270px;text-align:center;vertical-align:middle" class="o_mail_col_mv o_mail_img_container o_mail_h_padding o_mail_v_padding"> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_image_text.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_image_text.jpg" class="d-block mx-auto"/> </td> <td style="width:270px;vertical-align:middle;text-align:center;" class="o_mail_col_mv o_mail_h_padding o_mail_v_padding"> <h3>Omnichannel sales</h3> @@ -498,7 +498,7 @@ </div> </td> <td style="width:270px;text-align:center;vertical-align:middle" class="o_mail_col_mv o_mail_img_container o_mail_h_padding o_mail_v_padding"> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_text_image.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_text_image.jpg" class="d-block mx-auto"/> </td> </tr> </tbody> @@ -514,7 +514,7 @@ <tbody> <tr> <td width="100%" align="center" style="text-align:center" class="o_mail_h_padding"> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_image.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_image.jpg" class="d-block mx-auto"/> </td> </tr> <tr> @@ -666,7 +666,7 @@ </div> </td> <td style="width:25%;min-height: 150px;" class="text-center bg-o-color-4 o_mail_col_mv"> - <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_event.jpg" class="d-block mx-auto" alt="Your Picture" /> + <img src="/mass_mailing/static/src/img/theme_basic/s_default_image_block_event.jpg" class="d-block mx-auto"/> </td> <td class="o_mail_h_padding o_mail_v_padding o_mail_col_mv" style="min-height: 150px;"> <div style="min-height: 111px"> diff --git a/addons/mass_mailing/views/themes_templates.xml b/addons/mass_mailing/views/themes_templates.xml index 812de3c7964..6d819395429 100644 --- a/addons/mass_mailing/views/themes_templates.xml +++ b/addons/mass_mailing/views/themes_templates.xml @@ -21,7 +21,7 @@ <td width="20%"/> <td valign="center" width="60%" class="o_mail_logo_container text-center o_mail_v_padding"> <a t-att-href="(company_id.website) or '#'" style="text-decoration:none;"> - <img border="0" src="/mass_mailing/static/src/img/theme_default/s_default_image_logo.png" style="height:auto;max-width:400px;" alt="Your Logo" /> + <img border="0" src="/mass_mailing/static/src/img/theme_default/s_default_image_logo.png" style="height:auto;max-width:400px;"/> </a> </td> <td width="20%" style="text-align:right"/> |
