mirror of
https://github.com/documize/community.git
synced 2025-08-02 20:15:26 +02:00
Provide per section attachments
Upload and delete attachments on a per section basis.
This commit is contained in:
parent
166aeba09b
commit
61d0086337
13 changed files with 248 additions and 116 deletions
|
@ -11,31 +11,32 @@
|
|||
<div class="document-sidebar-attachment">
|
||||
<ul class="files">
|
||||
{{#each files key="id" as |file|}}
|
||||
<li class="file">
|
||||
<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
|
||||
{{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}}
|
||||
{{#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/ui-spacer 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 (eq file.pageId '')}}
|
||||
<li class="file">
|
||||
<a href="{{appMeta.endpoint}}/public/attachment/{{appMeta.orgId}}/{{file.id}}{{downloadQuery}}">
|
||||
{{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}}
|
||||
{{#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/ui-spacer 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>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue