[IMP] mass_mailing: add title for the templates and update thumbnail

Purpose
=======
We can now define a title for the mailing templates that will be
displayed bellow the thumbnail.

Improve the thumbnail image of the "plaintext" template.

Technical
=========
The title is set on the "title" atribute, and not on "data-title",
because the data attributes are not translated.

Task-2593231

Part-of: odoo/odoo#79174
This commit is contained in:
std-odoo
2022-03-16 13:16:13 +01:00
parent d2852a3db2
commit d8e4aefa74
6 changed files with 5 additions and 0 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

@@ -415,6 +415,7 @@ var MassMailingFieldHtml = FieldHtml.extend({
});
return {
name: name,
title: $theme.attr("title") || "",
className: classname || "",
img: $theme.data("img") || "",
template: $theme.html().trim(),
@@ -12,6 +12,7 @@
<a t-att-id="theme.name" role="menuitem" href="#" class="dropdown-item">
<div class="o_thumb small" t-attf-style="background-image: url(#{theme.img}_small.png)"/>
<div class="o_thumb large" t-attf-style="background-image: url(#{theme.img}_large.png)"/>
<h5 class="text-white text-capitalize text-truncate" t-esc="theme.title"/>
</a>
</t>
</div>
@@ -20,17 +20,20 @@
<t t-set="company_id" t-value="res_company"/>
<div id="email_designer_themes">
<div data-name="basic"
title="Plain Text"
data-nowrap="1"
data-img="/mass_mailing/static/src/img/theme_imgs/basic_thumb"
data-images-info='{"logo": {"format": "png"}}'>
<t t-call="mass_mailing.theme_basic_template"/>
</div>
<div data-name="empty"
title="Start From Scratch"
data-img="/mass_mailing/static/src/img/theme_imgs/empty_thumb"
data-images-info='{"logo": {"format": "png"}}'>
<t t-call="mass_mailing.theme_empty_template"/>
</div>
<div data-name="default"
title="Welcome Message"
data-img="/mass_mailing/static/src/img/theme_imgs/default_thumb"
data-images-info='{"logo": {"format": "png"}}'>
<t t-call="mass_mailing.theme_default_template"/>