aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-01-02 18:53:23 +0000
committerMario <mario@mariovavti.com>2021-01-02 18:53:23 +0000
commit98f3e4cbd39dca3c111a711b0aaaa53428eb14a6 (patch)
tree7f1134d5dcaf33df4608f7c80e8a97f3a5b69eb5 /view
parentefc8ed484504e2e01a8bc9dc8c720144995be210 (diff)
downloadvolse-hubzilla-98f3e4cbd39dca3c111a711b0aaaa53428eb14a6.tar.gz
volse-hubzilla-98f3e4cbd39dca3c111a711b0aaaa53428eb14a6.tar.bz2
volse-hubzilla-98f3e4cbd39dca3c111a711b0aaaa53428eb14a6.zip
set is_owner does not need to be a per item flag. fix post button visible for collections
Diffstat (limited to 'view')
-rw-r--r--view/tpl/cloud_directory.tpl18
1 files changed, 9 insertions, 9 deletions
diff --git a/view/tpl/cloud_directory.tpl b/view/tpl/cloud_directory.tpl
index 5886391bb..84c9f2e86 100644
--- a/view/tpl/cloud_directory.tpl
+++ b/view/tpl/cloud_directory.tpl
@@ -35,8 +35,8 @@
{{$item.name}}
</a>
</div>
- {{if $item.is_owner}}
- {{* add file tools here*}}
+ {{if $is_owner}}
+ {{* add file tools here *}}
{{/if}}
</div>
{{/foreach}}
@@ -160,25 +160,25 @@
{{/if}}
</td>
<td class="cloud-index-tool">
- {{if ($item.is_owner || $item.is_creator) && $item.attach_id}}
+ {{if ($is_owner || $item.is_creator) && $item.attach_id}}
<div class="dropdown">
<button class="btn btn-link btn-sm" id="dropdown-button-{{$item.attach_id}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-fw fa-ellipsis-v"></i>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-button-{{$item.attach_id}}">
<a id="cloud-tool-info-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-info-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-info"></i> Info</a>
- {{if $item.is_owner}}
+ {{if $is_owner}}
<a id="cloud-tool-perms-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-perms-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-{{$item.lockstate}}"></i> Adjust permissions</a>
{{/if}}
<a id="cloud-tool-rename-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-rename-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-pencil"></i> Rename</a>
<a id="cloud-tool-move-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-move-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-copy"></i> Move or copy</a>
<a id="cloud-tool-categories-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-categories-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-asterisk"></i> Categories</a>
- {{if $item.is_owner}}
- <a id="cloud-tool-share-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-share-btn" href="/rpost?attachment=[attachment]{{$item.resource}},{{$item.revision}}[/attachment]&acl[allow_cid]={{$item.raw_allow_cid}}&acl[allow_gid]={{$item.raw_allow_gid}}&acl[deny_cid]={{$item.raw_deny_cid}}&acl[deny_gid]={{$item.raw_deny_gid}}" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-share-square-o"></i> Post</a>
- {{/if}}
{{if $item.collection}}
<a id="cloud-tool-dir-download-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-dir-download-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-cloud-download"></i> Download</a>
{{else}}
+ {{if $is_owner}}
+ <a id="cloud-tool-share-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-share-btn" href="/rpost?attachment=[attachment]{{$item.resource}},{{$item.revision}}[/attachment]&acl[allow_cid]={{$item.raw_allow_cid}}&acl[allow_gid]={{$item.raw_allow_gid}}&acl[deny_cid]={{$item.raw_deny_cid}}&acl[deny_gid]={{$item.raw_deny_gid}}" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-share-square-o"></i> Post</a>
+ {{/if}}
<a id="cloud-tool-download-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-download-btn" href="/attach/{{$item.resource}}" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-cloud-download"></i> Download</a>
{{/if}}
<a id="cloud-tool-delete-btn-{{$item.attach_id}}" class="dropdown-item cloud-tool-delete-btn" href="#" data-id="{{$item.attach_id}}"><i class="fa fa-fw fa-trash-o"></i> {{$delete}}</a>
@@ -247,7 +247,7 @@
{{include file="field_input.tpl" field=$item.categories}}
</div>
<div id="cloud-tool-submit-{{$item.attach_id}}" class="cloud-tool">
- {{if $item.is_owner}}
+ {{if $is_owner}}
{{if !$item.collection}}{{include file="field_checkbox.tpl" field=$item.notify}}{{/if}}
{{if $item.collection}}{{include file="field_checkbox.tpl" field=$item.recurse}}{{/if}}
{{/if}}
@@ -256,7 +256,7 @@
Cancel
</button>
<div id="attach-edit-perms-{{$item.attach_id}}" class="btn-group float-right">
- {{if $item.is_owner}}
+ {{if $is_owner}}
<button id="dbtn-acl-{{$item.attach_id}}" class="btn btn-outline-secondary btn-sm" data-toggle="modal" data-target="#aclModal" title="{{$permset}}" type="button">
<i id="jot-perms-icon-{{$item.attach_id}}" class="fa fa-{{$item.lockstate}} jot-icons jot-perms-icon"></i>
</button>