summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/thread.xml
diff options
context:
space:
mode:
authorstefanorigano <sri@odoo.com>2018-04-04 15:04:40 +0200
committerGéry Debongnie <ged@odoo.com>2018-04-06 14:14:32 +0200
commita5a788981a42b858c98061b5adf8c679ea33b2a5 (patch)
treeef413fcabec9a94bbd062bd6255af55c29a5c2a7 /addons/mail/static/src/xml/thread.xml
parent6e12372f9563786192b24b18aef280397ee7997e (diff)
[IMP] web, mail: mimetype icons design
- Redesign all mimetype icons - use SVG to reduce file size and improve rendering quality. - Add a data attribute to attachments to detect the file extension (in somes cases just mimetype is not accurate)
Diffstat (limited to 'addons/mail/static/src/xml/thread.xml')
-rw-r--r--addons/mail/static/src/xml/thread.xml5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/mail/static/src/xml/thread.xml b/addons/mail/static/src/xml/thread.xml
index 51fa880302c..1019b141b75 100644
--- a/addons/mail/static/src/xml/thread.xml
+++ b/addons/mail/static/src/xml/thread.xml
@@ -281,6 +281,7 @@
<div t-attf-class="o_attachment #{ editable ? 'o_attachment_editable' : '' } #{attachment.upload ? 'o_attachment_uploading' : ''}" t-att-title="attachment.name">
<div class="o_attachment_wrap">
<t t-set="has_preview" t-value="type == 'image' or type == 'video' or attachment.mimetype == 'application/pdf'"/>
+ <t t-set="ext" t-value="attachment.filename.split('.').pop()"/>
<div t-attf-class="o_image_box pull-left #{has_preview ? 'o_attachment_view' : ''}" t-att-data-id="attachment.id">
<div t-if="has_preview"
@@ -289,9 +290,9 @@
t-att-data-mimetype="attachment.mimetype">
</div>
<a t-elif="!editable" t-att-href='attachment.url' t-att-title="'Download ' + attachment.name">
- <span class="o_image o_hover" t-att-data-mimetype="attachment.mimetype"/>
+ <span class="o_image o_hover" t-att-data-mimetype="attachment.mimetype" t-att-data-ext="ext"/>
</a>
- <span t-else="" class="o_image" t-att-data-mimetype="attachment.mimetype"/>
+ <span t-else="" class="o_image" t-att-data-mimetype="attachment.mimetype" t-att-data-ext="ext"/>
</div>
<div class="caption">