mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
42 lines
1.2 KiB
Handlebars
42 lines
1.2 KiB
Handlebars
{{#if (or hasAttachments canEdit)}}
|
|
<Ui::UiSpacer @size="200" />
|
|
<div class="title">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}}">
|
|
{{#attach-popover class="ember-attacher-popper" hideOn="escapekey, clickout" showOn="click" isShown=false}}
|
|
<div class="form">
|
|
<p>Are you sure you want to delete this file?</p>
|
|
<Ui::UiSpacer @size="100" />
|
|
{{ui/ui-button
|
|
light=false
|
|
label=constants.Label.Delete
|
|
color=constants.Color.Red
|
|
onClick=(action "onDelete" file)}}
|
|
</div>
|
|
{{/attach-popover}}
|
|
</i>
|
|
</div>
|
|
{{/if}}
|
|
</li>
|
|
{{/if}}
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
{{#if canEdit}}
|
|
{{#unless hasAttachments}}
|
|
<Ui::UiSpacer @size="100" />
|
|
{{/unless}}
|
|
<div id="upload-document-files">
|
|
<span>Upload</span>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|