2018-06-15 14:25:05 +01:00
|
|
|
<div class="view-attachment d-print-none">
|
|
|
|
{{#if canEdit}}
|
|
|
|
<div class="upload-document-files">
|
2018-12-12 13:35:16 +00:00
|
|
|
<div id="upload-document-files" class="btn btn-secondary text-uppercase bold-700">+ Attachments</div>
|
2018-06-15 14:25:05 +01:00
|
|
|
</div>
|
2018-06-17 14:50:43 +01:00
|
|
|
{{else}}
|
|
|
|
<div class="margin-top-50" />
|
2018-06-15 14:25:05 +01:00
|
|
|
{{/if}}
|
2018-01-26 15:34:20 +00:00
|
|
|
{{#if hasAttachments}}
|
|
|
|
<ul class="list">
|
2018-12-08 20:54:19 +00:00
|
|
|
{{#each files key="id" as |file|}}
|
2018-01-26 15:34:20 +00:00
|
|
|
<li class="item">
|
2018-12-08 20:54:19 +00:00
|
|
|
<a href="{{appMeta.endpoint}}/public/attachments/{{appMeta.orgId}}/{{file.id}}">
|
|
|
|
{{file.filename}}
|
2018-01-26 15:34:20 +00:00
|
|
|
</a>
|
|
|
|
{{#if canEdit}}
|
2018-05-29 18:26:04 +01:00
|
|
|
<div class="delete">
|
2018-12-08 20:54:19 +00:00
|
|
|
<div class="button-icon-danger button-icon-small align-middle" {{action "onShowDialog" file.id file.filename}}>
|
2018-05-29 18:26:04 +01:00
|
|
|
<i class="material-icons">delete</i>
|
|
|
|
</div>
|
2018-01-26 15:34:20 +00:00
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
2017-12-11 11:40:12 +00:00
|
|
|
|
2018-12-14 15:47:41 +00:00
|
|
|
{{#ui/ui-dialog title="Delete Attachment" confirmCaption="Delete" buttonColor=constants.Color.Red show=showDialog onAction=(action "onDelete")}}
|
2018-01-26 15:34:20 +00:00
|
|
|
<p>Are you sure you want to delete {{deleteAttachment.name}}?</p>
|
|
|
|
{{/ui/ui-dialog}}
|