No delete button for news posts

main
Bob Mottram 2020-10-08 10:14:21 +01:00
parent eca0cbe982
commit a7cd3d160e
1 changed files with 12 additions and 9 deletions

View File

@ -4686,15 +4686,18 @@ def individualPostAsHtml(allowDownloads: bool,
('/' + fullDomain + '/' in postActor and ('/' + fullDomain + '/' in postActor and
messageId.startswith(postActor))): messageId.startswith(postActor))):
if '/users/' + nickname + '/' in messageId: if '/users/' + nickname + '/' in messageId:
deleteStr = \ if not isNewsPost(postJsonObject):
' <a class="imageAnchor" href="/users/' + nickname + \ deleteStr = \
'?delete=' + messageId + pageNumberParam + \ ' <a class="imageAnchor" href="/users/' + \
'" title="' + translate['Delete this post'] + '">\n' nickname + \
deleteStr += \ '?delete=' + messageId + pageNumberParam + \
' ' + \ '" title="' + translate['Delete this post'] + '">\n'
'<img loading="lazy" alt="' + translate['Delete this post'] + \ deleteStr += \
' |" title="' + translate['Delete this post'] + \ ' ' + \
'" src="/' + iconsDir + '/delete.png"/></a>\n' '<img loading="lazy" alt="' + \
translate['Delete this post'] + \
' |" title="' + translate['Delete this post'] + \
'" src="/' + iconsDir + '/delete.png"/></a>\n'
else: else:
if not isMuted: if not isMuted:
muteStr = \ muteStr = \