[IMP] mail: notification template
The template used for notifications is updated. The general layout is now header: logo -- action buttons, contextual actions separator body signature Sent by company using Odoo
This commit is contained in:
@@ -67,73 +67,58 @@
|
||||
<meta itemprop="name" content="View ${ctx['model_name']}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div summary="o_mail_notification" class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #FFFFFF repeat top /100%;color:#777777" data-snippet-theme="basic_theme">
|
||||
<table cellspacing="0" cellpadding="0" style="width:600px;border-collapse:collapse;background:inherit;color:inherit">
|
||||
<div summary="o_mail_notification" style="padding:0px; width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<table cellspacing="0" cellpadding="0" style="width:600px; border-collapse:collapse; background:inherit; color:inherit">
|
||||
<tbody><tr>
|
||||
<td valign="center" width="270" style="padding:10px 10px 10px 5px;font-size: 30px">
|
||||
% if ctx.get('button_access'):
|
||||
<a href="${ctx['button_access']['url']}" style="-webkit-user-select: none; padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#a24689; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #a24689; border: 1px solid #a24689; border-radius:3px" class="o_default_snippet_text">${ctx['button_access']['title']}</a>
|
||||
% endif
|
||||
|
||||
% if ctx.get('button_follow'):
|
||||
<a href="${ctx['button_follow']['url']}" style="-webkit-user-select: none; padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#a24689; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #a24689; border: 1px solid #a24689; border-radius:3px" class="o_default_snippet_text">${ctx['button_follow']['title']}</a>
|
||||
|
||||
% elif ctx.get('button_unfollow'):
|
||||
<a href="${ctx['button_unfollow']['url']}" style="-webkit-user-select: none; padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#a24689; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #a24689; border: 1px solid #a24689; border-radius:3px" class="o_default_snippet_text">${ctx['button_unfollow']['title']}</a>
|
||||
% endif
|
||||
|
||||
% if not ctx.get('button_access') and not ctx.get('button_follow') and not ctx.get('button_unfollow') and ctx.get('model_name'):
|
||||
<p style="padding: 5px 10px; font-size: 12px;"">
|
||||
About <strong>${ctx['model_name']}
|
||||
% if ctx.get('record_name'):
|
||||
: ${ctx['record_name']}
|
||||
% endif
|
||||
</strong>
|
||||
</p>
|
||||
% endif
|
||||
<td valign="center" width="200" style="padding:0px 10px 5px 5px; font-size: 12px">
|
||||
<img src="/logo.png" style="padding: 0px; margin: 0px; height: auto; width: 80px;" alt="${user.company_id.name}">
|
||||
</td>
|
||||
<td valign="center" align="right" width="270" style="padding:10px 15px 10px 10px; font-size: 12px;">
|
||||
<td valign="center" align="right" width="340" style="padding:0px 10px 5px 5px; font-size: 12px;">
|
||||
<p>
|
||||
% if ctx.get('actions'):
|
||||
% for action in ctx['actions']:
|
||||
<a href="${action['url']}" style="text-decoration:none; color: #a24689;"><strong>${action['title']}</strong></a>
|
||||
%if len(ctx['actions']) > 1 and loop.index < len(ctx['actions']):
|
||||
|
|
||||
% endif
|
||||
<a href="${action['url']}" style="padding: 5px 10px; font-size: 12px; line-height: 18px; color: #FFFFFF; border-color:#a24689; text-decoration: none; display: inline-block; margin-bottom: 0px; font-weight: 400; text-align: center; vertical-align: middle; cursor: pointer; white-space: nowrap; background-image: none; background-color: #a24689; border: 1px solid #a24689; border-radius:3px">${action['title']}</a>
|
||||
% endfor
|
||||
% else:
|
||||
<strong>Sent by</strong>
|
||||
% if ctx.get('website_url'):
|
||||
<a href="${ctx['website_url']}" style="text-decoration:none; color: #a24689;">
|
||||
% endif
|
||||
<strong>${ctx.get('company_name')}</strong>
|
||||
% if ctx.get('website_url'):
|
||||
</a>
|
||||
|
||||
% if ctx.get('button_follow'):
|
||||
% if ctx.get('actions'):
|
||||
|
|
||||
% endif
|
||||
<strong>using</strong>
|
||||
<a href="www.odoo.com" style="text-decoration:none; color: #a24689;"><strong>Odoo</strong></a>
|
||||
<a href="${ctx['button_follow']['url']}" style="text-decoration:none; color: #a24689;"><strong>${ctx['button_follow']['title']}</strong></a>
|
||||
% elif ctx.get('button_unfollow'):
|
||||
% if ctx.get('actions'):
|
||||
|
|
||||
% endif
|
||||
<a href="${ctx['button_unfollow']['url']}" style="text-decoration:none; color: #a24689;"><strong>${ctx['button_unfollow']['title']}</strong></a>
|
||||
% endif
|
||||
|
||||
% if ctx.get('button_access') or ctx.get('button_follow') or ctx.get('button_unfollow'):
|
||||
% if ctx.get('actions'):
|
||||
|
|
||||
% endif
|
||||
<a href="${ctx['button_access']['url']}" style="text-decoration:none; color: #a24689;"><strong>${ctx['button_access']['title']}</strong></a>
|
||||
% endif
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>
|
||||
<div style="padding:0px;width:600px;margin:auto;color:#777777;background-color:#FFFFFF" class="">
|
||||
<table cellspacing="0" cellpadding="0" style="vertical-align:top;padding:0px;font-family:arial;font-size:12px;border-collapse:collapse;background:inherit;color:inherit">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td valign="top" style="width:600px; padding:10px 10px 10px 5px;">
|
||||
<div>
|
||||
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0;margin:15px auto;padding:0">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<div summary="o_mail_notification" style="padding:0px; width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<table cellspacing="0" cellpadding="0" style="vertical-align:top; padding:0px; border-collapse:collapse; background:inherit; color:inherit">
|
||||
<tbody><tr>
|
||||
<td valign="top" style="width:600px; padding:0px 10px 5px 5px;">
|
||||
<div>
|
||||
<hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0;margin:0px auto;padding:0">
|
||||
</div>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="snippet_row bg-color" style="padding:0;width:600px;max-width:600px;margin:0 auto;background: #fff repeat top /100%;color:#777777">
|
||||
<table style="width:100%;text-align:justify;margin:0 auto;background:inherit;color:inherit;border-collapse:collapse;color:inherit">
|
||||
<div style="padding:0px; width:600px; max-width:600px; margin:0 auto; background: #FFFFFF repeat top /100%; color:#777777">
|
||||
<table cellspacing="0" cellpadding="0" style="width:600px ;text-align:justify; margin:0 auto; border-collapse:collapse; background:inherit; color:inherit">
|
||||
<tbody><tr>
|
||||
<td style="padding:10px 10px 10px 5px;font-size: 14px;">
|
||||
<td style="padding:0px 10px 5px 5px;font-size: 14px;">
|
||||
${object.body | safe}
|
||||
% if ctx.get('tracking'):
|
||||
% for tracking in ctx['tracking']
|
||||
@@ -144,22 +129,33 @@
|
||||
</tr>
|
||||
</tbody></table>
|
||||
</div>
|
||||
% if ctx.get('signature'):
|
||||
<div class="snippet_row bg-color" style="padding:0px;width:600px;margin:auto;background: #fff repeat top /100%;color:#777777">
|
||||
<center>
|
||||
<table width="600" cellspacing="0" cellpadding="0" border="0" style="margin: 0 auto; width:600px; border-collapse:collapse;background:inherit;color:inherit">
|
||||
<tbody><tr>
|
||||
<td style="padding:10px 10px 10px 5px;font-size: 14px; text-align: left;">
|
||||
|
||||
<div style="padding:0px; width:600px; max-width:600px; margin:0 auto; background: #FFFFFF repeat top /100%;color:#777777">
|
||||
<table cellspacing="0" cellpadding="0" style="width:600px ;text-align:justify; margin:0 auto; border-collapse:collapse; background:inherit; color:inherit">
|
||||
<tbody>
|
||||
% if ctx.get('signature'):
|
||||
<tr>
|
||||
<td style="padding:0px 10px 5px 5px;font-size: 14px; text-align: left;">
|
||||
${ctx['signature'] | safe}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</center>
|
||||
</div>
|
||||
% endif]]></field>
|
||||
</tr>
|
||||
% endif
|
||||
<tr>
|
||||
<td style="padding:0px 10px 5px 5px;font-size: 11px; text-align: left;">
|
||||
<strong>Sent by</strong>
|
||||
% if ctx.get('website_url'):
|
||||
<a href="${ctx['website_url']}" style="text-decoration:none; color: #a24689;">
|
||||
% endif
|
||||
<strong>${ctx.get('company_name')}</strong>
|
||||
% if ctx.get('website_url'):
|
||||
</a>
|
||||
% endif
|
||||
<strong>using</strong>
|
||||
<a href="www.odoo.com" style="text-decoration:none; color: #a24689;"><strong>Odoo</strong></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>]]></field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
Reference in New Issue
Block a user