Browse Source

mail_digest: improve default template

pull/273/head
Simone Orsi 7 years ago
parent
commit
2855b0ded2
  1. 19
      mail_digest/templates/digest_default.xml

19
mail_digest/templates/digest_default.xml

@ -24,16 +24,29 @@
<template id="default_digest_tmpl" name="Mail digest default template"> <template id="default_digest_tmpl" name="Mail digest default template">
<t t-call="mail_digest.digest_layout"> <t t-call="mail_digest.digest_layout">
<div id="mail_content"> <div id="mail_content">
<h2>Hello,</h2>
<p>Hello <t t-esc="digest.partner_id.name" />,</p>
<div id="mail_inner_content"> <div id="mail_inner_content">
<t t-foreach="grouped_messages.keys()" t-as="gkey"> <t t-foreach="grouped_messages.keys()" t-as="gkey">
<t t-set="messages" t-value="grouped_messages[gkey]" /> <t t-set="messages" t-value="grouped_messages[gkey]" />
<t t-if="messages">
<div class="subtype-wrapper"
t-attf-style="marging-bottom:10px;padding-bottom:10px;#{not gkey_last and 'border-bottom:2px solid #aaa;margin-bottom:20px'}">
<t t-set="subtype" t-value="messages[0].subtype_id" />
<h3 style="margin-bottom:5px">
<span t-field="subtype.name" style="font-weight:bold" />
<t t-if="subtype.description">
<span t-field="subtype.description"
style="display:block;margin-top:10px;font-size:80%;color: #777"/>
</t>
</h3>
<t t-foreach="messages" t-as="msg"> <t t-foreach="messages" t-as="msg">
<div style="margin:20px">
<h3 t-esc="msg.subject" />
<div class="message-wrapper"
t-attf-style="margin:0 10px;padding:5px 10px;#{not msg_first and 'border-top:1px solid #ccc'}">
<t t-raw="digest.message_body(msg)" /> <t t-raw="digest.message_body(msg)" />
</div> </div>
</t> </t>
</div>
</t>
</t> </t>
</div> </div>
</div> </div>

Loading…
Cancel
Save