diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-08-21 10:13:23 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2015-08-21 22:06:52 +0200 |
| commit | d4bae06d081798e35529c2323b66ec5467545cdb (patch) | |
| tree | bf481d1bce45f6aba21c809bd3264433ff09d284 /addons/mail/views/mail_message_views.xml | |
| parent | 6baf611df1064a3ae5f6368d3a35b3c3d7779543 (diff) | |
[IMP] web: use css to display attachment mimetype
Widgets and website display images or display the type with icon like pdf, doc...
Diffstat (limited to 'addons/mail/views/mail_message_views.xml')
| -rw-r--r-- | addons/mail/views/mail_message_views.xml | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/addons/mail/views/mail_message_views.xml b/addons/mail/views/mail_message_views.xml index 6f2b5c88dd6..6c3f28ee6af 100644 --- a/addons/mail/views/mail_message_views.xml +++ b/addons/mail/views/mail_message_views.xml @@ -112,7 +112,7 @@ <field name="model">ir.attachment</field> <field name="arch" type="xml"> <kanban> - <field name="file_type_icon"/> + <field name="mimetype"/> <field name="url"/> <field name="name"/> <templates> @@ -120,13 +120,10 @@ <div class="oe_kanban_global_click"> <div class="oe_kanban_vignette"> <div class="oe_attachment"> - <div t-if="record.file_type_icon.value != 'webimage'"> - <img t-att-src="'/mail/static/src/img/mimetypes/' + record.file_type_icon.value + '.png'"></img> + <div t-if="!record.url.value"> + <div class="o_image" t-att-data-mimetype="record.mimetype.value" t-attf-data-src="/web/image/#{record.id}/100x80"/> </div> - <div t-if="record.file_type_icon.value == 'webimage' and !record.url.value"> - <img t-att-src="kanban_image('ir.attachment', 'datas', record.id.value)"/> - </div> - <div t-if="record.file_type_icon.value and record.url.value"> + <div t-if="record.url.value"> <img t-att-src="record.url.value"/> </div> <div class="oe_name"> |
