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>
117 lines
6.5 KiB
XML
117 lines
6.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
<record id="slide_template_published" model="mail.template">
|
|
<field name="name">Slide Published</field>
|
|
<field name="model_id" ref="model_slide_slide"/>
|
|
<field name="subject">New ${object.slide_type} published on ${object.channel_id.name}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
|
Hello<br/><br/>
|
|
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="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="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>
|
|
Enjoy this exclusive content!
|
|
% if user.signature
|
|
<br />
|
|
${user.signature | safe}
|
|
% endif
|
|
</p>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<record id="slide_template_shared" model="mail.template">
|
|
<field name="name">Slide Shared</field>
|
|
<field name="model_id" ref="model_slide_slide"/>
|
|
<field name="subject">${user.name} shared a ${object.slide_type} with you!</field>
|
|
<field name="email_from">${user.email_formatted | safe}</field>
|
|
<field name="email_to">${ctx.get('email', '')}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
|
Hello<br/><br/>
|
|
${user.name} shared the ${object.slide_type} <strong>${object.name}</strong> with you!
|
|
<div style="margin: 16px 8px 16px 8px; text-align: center;">
|
|
<a href="${(object.website_url + '?fullscreen=1') if ctx['fullscreen'] else object.website_url | safe}">
|
|
<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="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>
|
|
% if user.signature
|
|
<br />
|
|
${user.signature | safe}
|
|
% endif
|
|
</p>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
|
|
<!-- Completed Channel Message -->
|
|
<record id="mail_template_channel_completed" model="mail.template">
|
|
<field name="name">Completed Course</field>
|
|
<field name="model_id" ref="model_slide_channel_partner"/>
|
|
<field name="subject">Congratulation! You completed ${object.channel_id.name}</field>
|
|
<field name="email_from">${(object.channel_id.user_id.email_formatted or object.channel_id.user_id.company_id.catchall_formatted) | safe}</field>
|
|
<field name="partner_to">${object.partner_id.id}</field>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px;">
|
|
<div style="margin: 0px; padding: 0px; font-size: 13px;">
|
|
<p style="margin: 0px;">Hello ${object.partner_id.name},</p><br/>
|
|
<p><b>Congratulations!</b></p>
|
|
<p>You've completed the course <b>${object.channel_id.name}</b></p>
|
|
<p>Check out the other available courses.</p><br/>
|
|
|
|
<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>
|
|
</div>
|
|
Enjoy this exclusive content!
|
|
% if object.channel_id.user_id.signature
|
|
<br />
|
|
${object.channel_id.user_id.signature | safe}
|
|
% endif
|
|
</div>
|
|
</div>
|
|
</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
</record>
|
|
|
|
<!-- Slide channel invite feature -->
|
|
<record id="mail_template_slide_channel_invite" model="mail.template">
|
|
<field name="name">Channel: Invite by email</field>
|
|
<field name="model_id" ref="model_slide_channel_partner" />
|
|
<field name="subject">You have been invited to join ${object.channel_id.name}</field>
|
|
<field name="use_default_to" eval="True"/>
|
|
<field name="body_html" type="html">
|
|
<div style="margin: 0px; padding: 0px; font-size: 13px;">
|
|
<p style="margin: 0px; padding: 0px; font-size: 13px;">
|
|
Hello<br/><br/>
|
|
You have been invited to join a new course: ${object.channel_id.name}.
|
|
</p>
|
|
</div>
|
|
</field>
|
|
<field name="lang">${object.partner_id.lang}</field>
|
|
<field name="auto_delete" eval="True"/>
|
|
</record>
|
|
</data>
|
|
</odoo>
|