2019-01-04 16:33:30 +00:00
|
|
|
<div class="title center">attachments</div>
|
2018-12-18 19:03:34 +00:00
|
|
|
{{#if canEdit}}
|
|
|
|
<div class="text-center">
|
2019-01-04 16:33:30 +00:00
|
|
|
{{ui/ui-spacer size=100}}
|
|
|
|
{{ui/ui-button color=constants.Color.Gray label="Upload" id="upload-document-files"}}
|
2018-12-18 19:03:34 +00:00
|
|
|
{{ui/ui-spacer size=100}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#if hasAttachments}}
|
|
|
|
<div class="document-sidebar-attachment">
|
|
|
|
<ul class="files">
|
|
|
|
{{#each files key="id" as |file|}}
|
|
|
|
<li class="file">
|
2018-12-19 12:41:36 +00:00
|
|
|
<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
|
2018-12-18 19:03:34 +00:00
|
|
|
{{file.filename}}
|
|
|
|
</a>
|
|
|
|
{{#if canEdit}}
|
|
|
|
<div class="menu">
|
|
|
|
{{#ui/ui-toolbar dark=false light=false raised=false large=false bordered=false}}
|
|
|
|
{{ui/ui-toolbar-icon icon=constants.Icon.Delete color=constants.Color.Red
|
|
|
|
onClick=(action "onShowDialog" file.id file.filename)}}
|
|
|
|
{{/ui/ui-toolbar}}
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2018-12-19 12:41:36 +00:00
|
|
|
{{else}}
|
|
|
|
<p class="empty-label">No attachments</p>
|
2018-12-18 19:03:34 +00:00
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
{{#ui/ui-dialog title="Delete Attachment" confirmCaption="Delete" buttonColor=constants.Color.Red show=showDialog onAction=(action "onDelete")}}
|
|
|
|
<p>Are you sure you want to delete {{deleteAttachment.name}}?</p>
|
|
|
|
{{/ui/ui-dialog}}
|