Commit | Line | Data |
---|---|---|
f0bc263f MW |
1 | {if $attachmentList && $attachmentList->getGroupedObjects($objectID)|count} |
2 | {hascontent} | |
95961bdf | 3 | <section class="section attachmentThumbnailList"> |
19b8fa31 | 4 | <h2 class="messageSectionTitle">{lang}wcf.attachment.images{/lang}</h2> |
95961bdf | 5 | |
e3b932b6 | 6 | <ul class="inlineList"> |
95961bdf MW |
7 | {content} |
8 | {foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment} | |
9 | {if $attachment->showAsImage() && !$attachment->isEmbedded()} | |
10 | <li class="attachmentThumbnail" data-attachment-id="{@$attachment->attachmentID}"> | |
dabba34f TD |
11 | <a href="{$attachment->getLink()}"{if $attachment->canDownload()} class="jsImageViewer jsTooltip" title="{lang}wcf.attachment.image.title{/lang}"{/if}> |
12 | <div class="attachmentThumbnailContainer"> | |
13 | <span class="attachmentThumbnailImage"> | |
14 | {if $attachment->hasThumbnail()} | |
15 | <img | |
16 | src="{$attachment->getThumbnailLink('thumbnail')}" | |
17 | alt="" | |
18 | {if $attachment->thumbnailWidth >= ATTACHMENT_THUMBNAIL_WIDTH && $attachment->thumbnailHeight >= ATTACHMENT_THUMBNAIL_HEIGHT} | |
19 | class="attachmentThumbnailImageScalable" | |
20 | {/if} | |
21 | width="{$attachment->thumbnailWidth}" | |
22 | height="{$attachment->thumbnailHeight}" | |
23 | loading="lazy" | |
24 | > | |
25 | {else} | |
26 | <img | |
27 | src="{$attachment->getLink()}" | |
28 | alt="" | |
29 | {if $attachment->width >= ATTACHMENT_THUMBNAIL_WIDTH && $attachment->height >= ATTACHMENT_THUMBNAIL_HEIGHT} | |
30 | class="attachmentThumbnailImageScalable" | |
31 | {/if} | |
32 | width="{$attachment->width}" | |
33 | height="{$attachment->height}" | |
34 | loading="lazy" | |
35 | > | |
36 | {/if} | |
37 | </span> | |
38 | ||
39 | <span class="attachmentThumbnailData"> | |
40 | <span class="attachmentFilename">{$attachment->filename}</span> | |
41 | </span> | |
42 | </div> | |
43 | ||
44 | <ul class="attachmentMetaData inlineList"> | |
45 | <li> | |
ab43711a | 46 | {icon name='file-lines'} |
dabba34f TD |
47 | {@$attachment->filesize|filesize} |
48 | </li> | |
49 | <li> | |
ab43711a | 50 | {icon name='up-right-and-down-left-from-center'} |
03150bed | 51 | {#$attachment->width} × {#$attachment->height} |
dabba34f | 52 | </li> |
dabba34f TD |
53 | </ul> |
54 | </a> | |
95961bdf MW |
55 | </li> |
56 | {/if} | |
57 | {/foreach} | |
58 | {/content} | |
59 | </ul> | |
60 | </section> | |
f0bc263f | 61 | {/hascontent} |
ca8bfa53 | 62 | |
f0bc263f | 63 | {hascontent} |
95961bdf | 64 | <section class="section attachmentFileList"> |
19b8fa31 AE |
65 | <h2 class="messageSectionTitle">{lang}wcf.attachment.files{/lang}</h2> |
66 | ||
67 | <div class="messageAttachmentList"> | |
95961bdf MW |
68 | {content} |
69 | {foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment} | |
70 | {if $attachment->showAsFile() && !$attachment->isEmbedded()} | |
19b8fa31 AE |
71 | <a href="{$attachment->getLink()}" class="messageAttachment jsTooltip" title="{lang}wcf.attachment.file.title{/lang}"> |
72 | <span class="messageAttachmentIcon"> | |
3ff6ced9 AE |
73 | <span class="messageAttachmentIconDefault"> |
74 | {icon size=32 name=$attachment->getIconName()} | |
75 | </span> | |
76 | <span class="messageAttachmentIconDownload"> | |
77 | {icon size=32 name='download'} | |
78 | </span> | |
19b8fa31 AE |
79 | </span> |
80 | <span class="messageAttachmentFilename">{$attachment->filename}</span> | |
81 | <span class="messageAttachmentMeta">{lang}wcf.attachment.file.info{/lang}</span> | |
82 | </a> | |
83 | {/if} | |
84 | {/foreach} | |
85 | {/content} | |
86 | </div> | |
95961bdf | 87 | </section> |
f0bc263f | 88 | {/hascontent} |
ca8bfa53 | 89 | {/if} |