[FIX] various: avoid scroll for button(s) within mail templates

Right now, for notifications handled by odoo (which are being displayed on
discuss app / object chatter), few of the buttons have unexpected scroll
(mostly the CTAs that redirect to record / portal views) and ruins the UI.

This commit fixes the issue by improving such templates by using proper
paddings on the button.

TaskId:2518863

closes odoo/odoo#70083

Related: odoo/enterprise#18225
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Munaf Khan
2021-06-15 08:34:37 +00:00
parent b35d0509a3
commit 292ffeec00
5 changed files with 12 additions and 12 deletions
@@ -12,13 +12,13 @@
There is something new in the course <strong>${object.channel_id.name}</strong> you are following:<br/><br/>
<center><strong>${object.name}</strong></center>
% if object.image_1024
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<div style="padding: 16px 8px 16px 8px; text-align: center;">
<a href="${object.website_url}">
<img alt="${object.name}" src="${ctx['base_url']}/web/image/slide.slide/${object.id}/image_1024" style="height:auto; width:150px; margin: 16px;"/>
</a>
</div>
% endif
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<div style="padding: 16px 8px 16px 8px; text-align: center;">
<a href="${object.website_url}"
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">View content</a>
</div>
@@ -49,7 +49,7 @@
<img alt="${object.name}" src="${ctx['base_url']}/web/image/slide.slide/${object.id}/image_1024" style="height:auto; width:150px; margin: 16px;"/>
</a>
</div>
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<div style="padding: 16px 8px 16px 8px; text-align: center;">
<a href="${(object.website_url + '?fullscreen=1') if ctx['fullscreen'] else object.website_url | safe}"
style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">View <strong>${object.name}</strong></a>
</div>
@@ -78,7 +78,7 @@
<p>You've completed the course <b>${object.channel_id.name}</b></p>
<p>Check out the other available courses.</p><br/>
<div style="margin: 16px 8px 16px 8px; text-align: center;">
<div style="padding: 16px 8px 16px 8px; text-align: center;">
<a href="/slides/all" style="background-color: #875a7b; padding: 8px 16px 8px 16px; text-decoration: none; color: #fff; border-radius: 5px;">
Explore courses
</a>