1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00
documize/gui/app/templates/components/document/view-attachment.hbs
McMatts 27fde0dac8 Streamline document meta view and editing experience
Meta data:

1. Condensed layout.
2. Unified editing.

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
2018-06-15 14:25:05 +01:00

29 lines
966 B
Handlebars

<div class="view-attachment d-print-none">
{{#if canEdit}}
<div class="upload-document-files">
<div id="upload-document-files" class="btn btn-secondary text-uppercase font-weight-bold">+ Attachments</div>
</div>
{{/if}}
{{#if hasAttachments}}
<ul class="list">
{{#each files key="id" as |a index|}}
<li class="item">
<a href="{{appMeta.endpoint}}/public/attachments/{{appMeta.orgId}}/{{a.id}}">
{{a.filename}}
</a>
{{#if canEdit}}
<div class="delete">
<div class="button-icon-danger button-icon-small align-middle" {{action 'onShowDialog' a.id a.filename}}>
<i class="material-icons">delete</i>
</div>
</div>
{{/if}}
</li>
{{/each}}
</ul>
{{/if}}
</div>
{{#ui/ui-dialog title="Delete Attachment" confirmCaption="Delete" buttonType="btn-danger" show=showDialog onAction=(action 'onDelete')}}
<p>Are you sure you want to delete {{deleteAttachment.name}}?</p>
{{/ui/ui-dialog}}