From 5660af4f893411fa62a349713dcb698c7bbb7bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Thu, 28 Feb 2019 22:27:24 +0100 Subject: [PATCH] hide edit button for comments made by others (#31011) --- javascripts/theme.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/javascripts/theme.js b/javascripts/theme.js index 03548b3..892ced7 100644 --- a/javascripts/theme.js +++ b/javascripts/theme.js @@ -199,6 +199,16 @@ $(function() { }); } + var user_href = $('#loggedas a').attr('href'); + if (user_href) { + $('div.journal.has-notes').each(function(idx, entry) { + var user_entry_href = $(entry).find('a.user').attr('href'); + if (user_entry_href && user_entry_href != user_href) { + $(entry).find('.icon-edit').hide(); + } + }); + } + if ($('.administration').length == 0) { /* fake access control */ return;