aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-10-03 15:21:20 +0200
committerMario <mario@mariovavti.com>2018-10-03 15:21:20 +0200
commit5e7c9b9d4a0dccf615da1ebf8bac93c10b3d2ac8 (patch)
treeae10a9ce3e211772b0181e4a6296fbd7bc279c6e
parent009e03c3ba13df34564b9b8d6d95a292dc91ad8f (diff)
downloadvolse-hubzilla-5e7c9b9d4a0dccf615da1ebf8bac93c10b3d2ac8.tar.gz
volse-hubzilla-5e7c9b9d4a0dccf615da1ebf8bac93c10b3d2ac8.tar.bz2
volse-hubzilla-5e7c9b9d4a0dccf615da1ebf8bac93c10b3d2ac8.zip
jot: show settings icon only to local profile owner
-rw-r--r--include/conversation.php3
-rwxr-xr-xview/tpl/jot.tpl2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index c8a3f1824..041994b90 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1462,7 +1462,8 @@ function hz_status_editor($a, $x, $popup = false) {
'$expanded' => ((x($x, 'expanded')) ? $x['expanded'] : false),
'$bbcode' => ((x($x, 'bbcode')) ? $x['bbcode'] : false),
'$parent' => ((array_key_exists('parent',$x) && $x['parent']) ? $x['parent'] : 0),
- '$reset' => $reset
+ '$reset' => $reset,
+ '$is_owner' => ((local_channel() && (local_channel() == $x['profile_uid'])) ? true : false)
));
if ($popup === true) {
diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl
index cb80c6c7e..4eae33d13 100755
--- a/view/tpl/jot.tpl
+++ b/view/tpl/jot.tpl
@@ -43,7 +43,9 @@
{{/if}}
<div id="jot-text-wrap">
<div id="profile-jot-tools" class="btn-group d-none">
+ {{if $is_owner}}
<a id="profile-jot-settings" class="btn btn-outline-secondary btn-sm border-0" href="/settings/editor/?f=&rpath=/{{$return_path}}"><i class="fa fa-cog"></i></a>
+ {{/if}}
{{if $reset}}
<button id="profile-jot-reset" class="btn btn-outline-secondary btn-sm border-0" title="{{$reset}}" onclick="itemCancel(); return false;">
<i class="fa fa-close"></i>