<xf:title>
{{ phrase('thattachmentsplus_attachment_manager') }}
</xf:title>
<xf:wrap template="account_wrapper">
<xf:set var="$pageSelected" value="thAttachmentManager" />
</xf:wrap>
<div class="block">
<div class="block-container">
<div class="block-body">
<xf:if is="$attachments is not empty">
<xf:datalist>
<xf:foreach loop="$attachments" value="$attachment">
<xf:datarow>
<xf:comment>
<xf:toggle name="attachment_ids[]" value="{$attachment.attachment_id}" />
</xf:comment>
<xf:cell class="dataList-cell--min dataList-cell--alt dataList-cell--image dataList-cell--imageMediumWide"
href="{{ link('account/th-attachment-manager/view', $attachment) }}" target="_blank">
<xf:if is="$attachment.has_thumbnail">
<img src="{$attachment.thumbnail_url}" alt="{$attachment.filename}" />
<xf:else />
{{ thattachplus_attachment_icon($attachment, 's') }}
</xf:if>
</xf:cell>
<xf:cell href="{{ link('account/th-attachment-manager/view', $attachment) }}"
class="dataList-cell--main" target="_blank">
<div class="dataList-mainRow">{$attachment.filename}</div>
<div class="dataList-subRow">
<ul class="listInline listInline--bullet">
<li><xf:date time="{$attachment.Data.upload_date}" /></li>
<li>{$attachment.file_size|file_size}</li>
</ul>
</div>
</xf:cell>
<xf:cell href="{{ (!$attachment.unassociated && $attachment.getContainerLink()) ? $attachment.getContainerLink() : link('attachments/view', $attachment) }}"
target="{{ !$attachment.unassociated ? '_blank' : '' }}"
class="dataList-cell--action">
<xf:if is="!$attachment.unassociated && {$handlers.{$attachment.content_type}}">
{{ phrase('thattachmentsplus_view_x', {'type': $handlers.{$attachment.content_type}.getContentTypePhrase()}) }}
</xf:if>
</xf:cell>
<xf:if is="$attachment.canTHAttachPlusDelete()">
<xf:delete href="{{ link('account/th-attachment-manager/delete', $attachment) }}" />
<xf:else />
<xf:cell class="dataList-cell--min dataList-cell--action" />
</xf:if>
</xf:datarow>
</xf:foreach>
</xf:datalist>
<xf:else />
<div class="block-row">
{{ phrase('thattachmentsplus_no_attachments_yet') }}
</div>
</xf:if>
</div>
<footer class="block-footer">
{{ display_totals($attachments, $userTotals.attach_count) }}
<xf:if contentcheck="true">
<div style="float:right;text-align: right">
<xf:contentcheck>
<xf:if is="$userMax.attach_count > 0">
<div data-xf-init="tooltip" title="{{ phrase('thattachmentsplus_attachment_space_usage') }}">
{{
phrase('thattachmentsplus_x_of_y_attachments', {
'current': $userTotals.attach_count,
'total': $userMax.attach_count,
'percentage': floor($userTotals.attach_count * 100 / $userMax.attach_count)
})
}}
</div>
</xf:if>
<xf:if is="$userMax.attach_count > 0">
<div data-xf-init="tooltip" title="{{ phrase('thattachmentsplus_disk_space_usage') }}">
{{
phrase('thattachmentsplus_x_of_y_disk_space', {
'current': floor($userTotals.disk_space / 1048576),
'total': $userMax.disk_space,
'percentage': floor(($userTotals.disk_space / 1048576) * 100 / $userMax.disk_space)
})
}}
</div>
</xf:if>
</xf:contentcheck>
</div>
</xf:if>
</footer>
</div>
<xf:pagenav link="account/th-attachment-manager" params="{{ {'type': $type} }}"
page="{$page}" perpage="{$perPage}" total="{$userTotals.attach_count}"
wrapperclass="block-outer block-outer--after" />
</div>