1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 07:39:43 +02:00
documize/gui/app/templates/components/document/section-attachment.hbs
McMatts c49707d160 Make popups close on doble-click + quote @size attrs
1. Popups should close on subsequent trigger clicks
2. @attrs should be quoted as oper linter warnings.
2019-05-28 10:59:48 +01:00

39 lines
1.4 KiB
Handlebars

{{#if editMode}}
<Ui::UiSpacer @size="200" />
{{ui/ui-button color=constants.Color.Gray label=uploadLabel id=uploadId}}
{{/if}}
<ul class="section-attachments">
{{#each files key="id" as |file|}}
{{#if (eq file.pageId page.id)}}
<li class="file">
<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
{{file.filename}}
</a>
{{#if editMode}}
<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}}
{{#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}}
{{/ui/ui-toolbar-icon}}
{{/ui/ui-toolbar}}
</div>
{{/if}}
</li>
{{/if}}
{{/each}}
</ul>
{{#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 this attachment?</p>
{{/ui/ui-dialog}}