mirror of
https://github.com/documize/community.git
synced 2025-07-23 07:09:43 +02:00
44 lines
1.4 KiB
Handlebars
44 lines
1.4 KiB
Handlebars
{{#if (or hasAttachments canEdit)}}
|
|
<Ui::UiSpacer @size="200" />
|
|
<div class="title">{{localize 'attachments'}}</div>
|
|
<div class="document-sidebar-attachment">
|
|
<ul class="files">
|
|
{{#each files key="id" as |file|}}
|
|
{{#if (eq file.pageId "")}}
|
|
<li class="file">
|
|
<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
|
|
{{file.filename}}
|
|
</a>
|
|
{{#if canEdit}}
|
|
<div class="menu">
|
|
<i class="dicon {{constants.Icon.Cross}}" role="button" tabindex="0" aria-haspopup="menu">
|
|
{{#attach-popover class="ember-attacher-popper" hideOn="escapekey, clickout" showOn="click" isShown=false}}
|
|
<div class="form">
|
|
<p>{{localize 'attachment_delete_confirm'}}</p>
|
|
<Ui::UiSpacer @size="100" />
|
|
{{ui/ui-button
|
|
light=false
|
|
label=(localize 'delete')
|
|
color=constants.Color.Red
|
|
onClick=(action "onDelete" file)}}
|
|
</div>
|
|
{{/attach-popover}}
|
|
</i>
|
|
</div>
|
|
{{/if}}
|
|
</li>
|
|
{{/if}}
|
|
{{/each}}
|
|
{{#if canEdit}}
|
|
<li id="upload-document-files">
|
|
<i class="dicon {{constants.Icon.Plus}}" role="button" tabindex="0" title={{localize 'upload_attachment'}} />
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</div>
|
|
{{#if canEdit}}
|
|
{{#unless hasAttachments}}
|
|
<Ui::UiSpacer @size="100" />
|
|
{{/unless}}
|
|
{{/if}}
|
|
{{/if}}
|