summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/components/message/message.xml
diff options
context:
space:
mode:
authorXavier Dubuc <xdu@odoo.com>2020-12-02 09:32:47 +0000
committerXavier Dubuc <xdu@odoo.com>2020-12-04 09:43:08 +0000
commit42f923eac4320c6be733dcbc7d269c64d09b4609 (patch)
tree13bdc2dceebe301f173689f6b7127ce0da1267fa /addons/mail/static/src/components/message/message.xml
parent329b00365e7b7702eb4923443c99ddac13340ae8 (diff)
[FIX] mail: split attachments list to improve style
There is now two lists of attachments : first one with images and second one with non-images. Attachment viewer allows to navigate through previews of all viewable attachments in the order they're shown. task-2272587 task-2401325 closes odoo/odoo#62866 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/components/message/message.xml')
-rw-r--r--addons/mail/static/src/components/message/message.xml26
1 files changed, 7 insertions, 19 deletions
diff --git a/addons/mail/static/src/components/message/message.xml b/addons/mail/static/src/components/message/message.xml
index f38e0109f18..9207dab2485 100644
--- a/addons/mail/static/src/components/message/message.xml
+++ b/addons/mail/static/src/components/message/message.xml
@@ -182,25 +182,13 @@
</t>
<t t-if="message.attachments and message.attachments.length > 0">
<div class="o_Message_footer">
- <!-- TODO XDU This does not allow to preview all attachments at once, find somethind else -->
- <t t-if="imageAttachments and imageAttachments.length > 0">
- <AttachmentList
- class="o_Message_attachmentList"
- areAttachmentsDownloadable="true"
- areAttachmentsEditable="message.author === env.messaging.currentPartner"
- attachmentLocalIds="imageAttachments.map(attachment => attachment.localId)"
- attachmentsDetailsMode="props.attachmentsDetailsMode"
- />
- </t>
- <t t-if="nonImageAttachments and nonImageAttachments.length > 0">
- <AttachmentList
- class="o_Message_attachmentList"
- areAttachmentsDownloadable="true"
- areAttachmentsEditable="message.author === env.messaging.currentPartner"
- attachmentLocalIds="nonImageAttachments.map(attachment => attachment.localId)"
- attachmentsDetailsMode="props.attachmentsDetailsMode"
- />
- </t>
+ <AttachmentList
+ class="o_Message_attachmentList"
+ areAttachmentsDownloadable="true"
+ areAttachmentsEditable="message.author === env.messaging.currentPartner"
+ attachmentLocalIds="message.attachments.map(attachment => attachment.localId)"
+ attachmentsDetailsMode="props.attachmentsDetailsMode"
+ />
</div>
</t>
</div>