only show upload button to those with write_storage permission
This commit is contained in:
parent
ca11d7b9a7
commit
8eb6dafe31
@ -740,6 +740,7 @@ class ThreadItem {
|
|||||||
'$edvideo' => t('Video'),
|
'$edvideo' => t('Video'),
|
||||||
'$preview' => t('Preview'), // ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
|
'$preview' => t('Preview'), // ((feature_enabled($conv->get_profile_owner(),'preview')) ? t('Preview') : ''),
|
||||||
'$indent' => $indent,
|
'$indent' => $indent,
|
||||||
|
'$can_upload' => perm_is_allowed($conv->get_profile_owner(),get_observer_hash(),'write_storage'),
|
||||||
'$feature_encrypt' => ((feature_enabled($conv->get_profile_owner(),'content_encrypt')) ? true : false),
|
'$feature_encrypt' => ((feature_enabled($conv->get_profile_owner(),'content_encrypt')) ? true : false),
|
||||||
'$encrypt' => t('Encrypt text'),
|
'$encrypt' => t('Encrypt text'),
|
||||||
'$cipher' => $conv->get_cipher(),
|
'$cipher' => $conv->get_cipher(),
|
||||||
|
@ -47,9 +47,11 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group mr-2">
|
<div class="btn-group mr-2">
|
||||||
|
{{if $can_upload}}
|
||||||
<button class="btn btn-outline-secondary btn-sm" title="{{$edatt}}" onclick="insertCommentAttach('{{$comment}}',{{$id}}); return false;">
|
<button class="btn btn-outline-secondary btn-sm" title="{{$edatt}}" onclick="insertCommentAttach('{{$comment}}',{{$id}}); return false;">
|
||||||
<i class="fa fa-paperclip comment-icon"></i>
|
<i class="fa fa-paperclip comment-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
|
{{/if}}
|
||||||
<button class="btn btn-outline-secondary btn-sm" title="{{$edurl}}" onclick="insertCommentURL('{{$comment}}',{{$id}}); return false;">
|
<button class="btn btn-outline-secondary btn-sm" title="{{$edurl}}" onclick="insertCommentURL('{{$comment}}',{{$id}}); return false;">
|
||||||
<i class="fa fa-link comment-icon"></i>
|
<i class="fa fa-link comment-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
|
Reference in New Issue
Block a user