{if $attachmentList && $attachmentList->getGroupedObjects($objectID)|count}
{hascontent}
<section class="section attachmentThumbnailList">
- <h2 class="sectionTitle">{lang}wcf.attachment.images{/lang}</h2>
+ <h2 class="messageSectionTitle">{lang}wcf.attachment.images{/lang}</h2>
<ul class="inlineList">
{content}
{if $attachment->showAsImage() && !$attachment->isEmbedded()}
<li class="attachmentThumbnail" data-attachment-id="{@$attachment->attachmentID}">
{if $attachment->hasThumbnail()}
- <a href="{$attachment->getLink()}"{if $attachment->canDownload()} class="jsImageViewer" title="{$attachment->filename}"{/if}>
+ <a href="{$attachment->getLink()}"{if $attachment->canDownload()} class="jsImageViewer jsTooltip" title="{lang}wcf.attachment.image.title{/lang}"{/if}>
{/if}
<div class="attachmentThumbnailContainer">
{hascontent}
<section class="section attachmentFileList">
- <h2 class="sectionTitle">{lang}wcf.attachment.files{/lang}</h2>
-
- <ul class="inlineList">
+ <h2 class="messageSectionTitle">{lang}wcf.attachment.files{/lang}</h2>
+
+ <div class="messageAttachmentList">
{content}
{foreach from=$attachmentList->getGroupedObjects($objectID) item=attachment}
{if $attachment->showAsFile() && !$attachment->isEmbedded()}
- <li class="box32" data-attachment-id="{@$attachment->attachmentID}">
- <a href="{$attachment->getLink()}"><span class="icon icon32 fa-{@$attachment->getIconName()}"></span></a>
-
- <div>
- <p><a href="{$attachment->getLink()}">{$attachment->filename}</a></p>
- <small>{lang}wcf.attachment.file.info{/lang}</small>
- </div>
- </li>
- {/if}
- {/foreach}
- {/content}
- </ul>
+ <a href="{$attachment->getLink()}" class="messageAttachment jsTooltip" title="{lang}wcf.attachment.file.title{/lang}">
+ <span class="messageAttachmentIcon">
+ <span class="messageAttachmentIconDefault icon icon32 fa-{@$attachment->getIconName()}"></span>
+ <span class="messageAttachmentIconDownload icon icon32 fa-download"></span>
+ </span>
+ <span class="messageAttachmentFilename">{$attachment->filename}</span>
+ <span class="messageAttachmentMeta">{lang}wcf.attachment.file.info{/lang}</span>
+ </a>
+ {/if}
+ {/foreach}
+ {/content}
+ </div>
</section>
{/hascontent}
{/if}
opacity: 0;
}
}
+
+ > a {
+ display: block;
+ }
}
/* attachments tab in editor */
/* this will also suppress the link being displayed in the browser's "status bar" on hover */
pointer-events: none;
}
+
+.messageSectionTitle {
+ align-items: center;
+ display: flex;
+ margin-bottom: 10px;
+
+ &::before {
+ border-top: 1px solid $wcfContentBorderInner;
+ content: "";
+ flex: 0 0 20px;
+ margin-right: 10px;
+ }
+
+ &::after {
+ border-top: 1px solid $wcfContentBorderInner;
+ content: "";
+ flex: 1 0 auto;
+ margin-left: 10px;
+ }
+}
+
+.messageAttachmentList {
+ display: grid;
+ gap: 10px;
+ grid-template-columns: repeat(auto-fill, 300px);
+
+ @include screen-xs {
+ grid-template-columns: 1fr;
+ }
+}
+
+.messageAttachment {
+ border: 1px solid $wcfContentBorderInner;
+ border-radius: 3px;
+ color: inherit;
+ column-gap: 8px;
+ display: grid;
+ grid-template-areas:
+ "icon filename"
+ "icon meta";
+ grid-template-columns: 32px auto;
+ padding: 8px;
+ row-gap: 1px;
+
+ &:focus,
+ &:hover {
+ color: inherit;
+
+ .messageAttachmentIconDefault {
+ display: none;
+ }
+ }
+
+ &:not(:focus):not(:hover) {
+ .messageAttachmentIconDownload {
+ display: none;
+ }
+ }
+}
+
+.messageAttachmentIcon {
+ align-self: center;
+ grid-area: icon;
+}
+
+.messageAttachmentIconDefault,
+.messageAttachmentIconDownload {
+ cursor: inherit !important;
+}
+
+.messageAttachmentFilename {
+ font-weight: 600;
+ grid-area: filename;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.messageAttachmentMeta {
+ @include wcfFontSmall;
+
+ color: $wcfContentDimmedText;
+ grid-area: meta;
+}
<item name="wcf.article.like.notification.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} haben auf {if LANGUAGE_USE_INFORMAL_VARIANT}deinen{else}Ihren{/if} Artikel <strong>{$article->getTitle()}</strong> reagiert ({@$__wcf->getReactionHandler()->renderInlineList($reactions)}).]]></item>
</category>
<category name="wcf.attachment">
- <item name="wcf.attachment.file.info"><![CDATA[({@$attachment->filesize|filesize}, <strong>{#$attachment->downloads}</strong> Mal heruntergeladen{if $attachment->downloads > 0}, zuletzt: {@$attachment->lastDownloadTime|time}{/if})]]></item>
+ <item name="wcf.attachment.file.info"><![CDATA[{@$attachment->filesize|filesize} – {plural value=$attachment->downloads 1="1 Download" other="# Downloads"}]]></item>
+ <item name="wcf.attachment.file.title"><![CDATA[Datei „{$attachment->filename}“ herunterladen]]></item>
<item name="wcf.attachment.image.info"><![CDATA[{@$attachment->filesize|filesize}, {#$attachment->width}×{#$attachment->height}, {#$attachment->downloads} Mal angesehen]]></item>
+ <item name="wcf.attachment.image.title"><![CDATA[Bild „{$attachment->filename}“ anzeigen]]></item>
<item name="wcf.attachment.files"><![CDATA[Dateien]]></item>
<item name="wcf.attachment.images"><![CDATA[Bilder]]></item>
<item name="wcf.attachment.attachments"><![CDATA[Dateianhänge]]></item>
<item name="wcf.article.like.notification.message.stacked"><![CDATA[{@'wcf.user.notification.stacked.authorList'|language} reacted to article <strong>{$article->getTitle()}</strong> ({@$__wcf->getReactionHandler()->renderInlineList($reactions)}).]]></item>
</category>
<category name="wcf.attachment">
- <item name="wcf.attachment.file.info"><![CDATA[({@$attachment->filesize|filesize}, downloaded <strong>{#$attachment->downloads}</strong> times{if $attachment->downloads > 0}, last: {@$attachment->lastDownloadTime|time}{/if})]]></item>
+ <item name="wcf.attachment.file.info"><![CDATA[{@$attachment->filesize|filesize} – {plural value=$attachment->downloads 1="1 Download" other="# Downloads"}]]></item>
+ <item name="wcf.attachment.file.title"><![CDATA[Download file “{$attachment->filename}”]]></item>
<item name="wcf.attachment.image.info"><![CDATA[{@$attachment->filesize|filesize}, {#$attachment->width}×{#$attachment->height}, viewed {#$attachment->downloads} times]]></item>
+ <item name="wcf.attachment.image.title"><![CDATA[View image “{$attachment->filename}”]]></item>
<item name="wcf.attachment.files"><![CDATA[Files]]></item>
<item name="wcf.attachment.images"><![CDATA[Images]]></item>
<item name="wcf.attachment.attachments"><![CDATA[Attachments]]></item>