From 9a70c3c2759ee479f598dceef1ad95b4675db7f0 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 4 Dec 2019 15:33:53 +0100 Subject: Show unpin button for pinned post for owner only --- view/tpl/pinned_item.tpl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/view/tpl/pinned_item.tpl b/view/tpl/pinned_item.tpl index 17e82b410..a24c4ae44 100644 --- a/view/tpl/pinned_item.tpl +++ b/view/tpl/pinned_item.tpl @@ -137,7 +137,9 @@ {{if $plink}} {{$plink.title}} {{/if}} - {{$pinme}} + {{if $pinme}} + {{$pinme}} + {{/if}} {{if $hide}} {{$hide}} {{/if}} -- cgit v1.2.3 From a6516341c50fb54b0d40b12fe76230f07e499fb2 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 4 Dec 2019 15:35:46 +0100 Subject: Show unpin button for pinned post for owner only --- Zotlabs/Widget/Pinned.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php index ec2c7f4e8..3324206f4 100644 --- a/Zotlabs/Widget/Pinned.php +++ b/Zotlabs/Widget/Pinned.php @@ -154,7 +154,7 @@ class Pinned { 'embed' => $embed, 'plink' => get_plink($item), 'pinned' => t('Pinned post'), - 'pinme' => t('Unpin from the top'), + 'pinme' => (($observer['xchan_hash'] == $owner['xchan_hash']) ? t('Unpin from the top') : ''), 'hide' => (! $is_new && $observer && ($observer['xchan_hash'] != $owner['xchan_hash']) ? t("Don't show") : ''), // end toolbar buttons 'modal_dismiss' => t('Close'), -- cgit v1.2.3