mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
document attachments view
This commit is contained in:
parent
6cc78f76da
commit
486b5983d9
11 changed files with 65 additions and 130 deletions
31
gui/app/templates/components/document/view-attachment.hbs
Normal file
31
gui/app/templates/components/document/view-attachment.hbs
Normal file
|
@ -0,0 +1,31 @@
|
|||
{{#if canShow}}
|
||||
<div class="view-attachment non-printable">
|
||||
{{#if hasAttachments}}
|
||||
<ul class="list">
|
||||
{{#each files key="id" as |a index|}}
|
||||
<li class="item">
|
||||
<img class="icon" src="/assets/img/attachments/{{document/file-icon a.extension}}" />
|
||||
<a href="{{ appMeta.endpoint }}/public/attachments/{{ appMeta.orgId }}/{{ a.id }}">
|
||||
<span class="file">{{ a.filename }}</span>
|
||||
</a>
|
||||
{{#if permissions.documentEdit}}
|
||||
<div class="button-icon-danger align-middle action" {{action 'onShowDialog' a.id a.filename}}>
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{#if permissions.documentEdit}}
|
||||
<div class="upload-document-files">
|
||||
<div id="upload-document-files" class="btn btn-secondary">Upload</div>
|
||||
</div>
|
||||
{{/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}}
|
||||
|
||||
{{/if}}
|
Loading…
Add table
Add a link
Reference in a new issue