Files
odoo_source/addons/mass_mailing/views/themes_templates.xml
T
fja-odoo 11c60739e4 [IMP] website, *: warn user about outdated blocks
* = mass_mailing, web_editor, website_crm, website_event, website_form,
website_forum, website_hr_recruitment, website_mail_channel,
website_mass_mailing, website_sale, website_slides

When an outdated snippet's option are activated we display a warning
in the left panel that inform the user about the potential
malfunctions.

To do so the snippet's template key is added to the snippet as
data-snippet.
If a snippet is "t-call" inside another snippet, it will need to use
t-snippet-call instead of t-call to have the key on himself.

Those unique keys are used on snippet selection to retrieve the
snippet's version in the left panel and compare it with the currently
selected snippet's version. Versions are describe with data-vcss,
data-vjs and data-vxml. If a snippet's key is not in the left panel we
consider that snippet as outdated.

Added some tests to ensure that t-snippet and t-snippet-call really have
their template key as data-snippet

Adapted the views to the data-snippet changes adding
data-snippet="tmpl_key".

Part of: https://github.com/odoo/odoo/pull/44569
task-2189669

closes odoo/odoo#50254

X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
Related: odoo/enterprise#10236
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-04-27 16:36:31 +00:00

36 lines
1.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Theme "Basic" template -->
<template id="theme_basic_template">
<div class="o_mail_no_options">
<p><br/></p>
<p><br/></p>
<p>
<br/>
<a href="/unsubscribe_from_list">Unsubscribe</a>
</p>
</div>
</template>
<!-- Default Theme -->
<template id="theme_default_template">
<div class="o_mail_block_header_logo mb16" data-snippet="s_mail_block_header_logo">
<div class="o_mail_snippet_general">
<table align="center" cellspacing="0" cellpadding="0" border="0" class="o_mail_table_styles o_mail_h_padding">
<tr>
<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" />
</a>
</td>
<td width="20%" style="text-align:right"/>
</tr>
</table>
</div>
</div>
<t t-snippet-call="mass_mailing.s_mail_block_title_text" />
<t t-snippet-call="mass_mailing.s_mail_block_footer_social_left"/>
</template>
</odoo>