From bdc96297270fe43b6c3b24104ce883080fa57fc0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 23 Oct 2020 11:02:43 +0100 Subject: [PATCH] Option to show publish as an icon --- webinterface.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/webinterface.py b/webinterface.py index 935c30fdc..1f5bbd7de 100644 --- a/webinterface.py +++ b/webinterface.py @@ -5697,7 +5697,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, iconsDir: str, moderator: bool, editor: bool, newswire: {}, positiveVoting: bool, showBackButton: bool, timelinePath: str, - showPublishButton: bool) -> str: + showPublishButton: bool, + showPublishAsIcon: bool) -> str: """Returns html content for the right column """ htmlStr = '' @@ -5741,12 +5742,22 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, translate['Go Back'] + '\n' if showPublishButton: - htmlStr += \ - ' ' + \ - '\n' + if showPublishAsIcon: + htmlStr += \ + ' ' + \ + '' + \
+                translate['Publish a news article'] + '\n' + else: + htmlStr += \ + ' ' + \ + '\n' if editor: if os.path.isfile(baseDir + '/accounts/newswiremoderation.txt'): @@ -5865,7 +5876,8 @@ def htmlNewswireMobile(baseDir: str, nickname: str, httpPrefix, translate, iconsDir, moderator, editor, newswire, positiveVoting, - True, timelinePath, True) + True, timelinePath, True, + False) htmlStr += htmlFooter() return htmlStr @@ -6552,7 +6564,7 @@ def htmlTimeline(defaultTimeline: str, httpPrefix, translate, iconsDir, moderator, editor, newswire, positiveVoting, - False, None, True) + False, None, True, False) tlStr += ' ' + \ rightColumnStr + ' \n' tlStr += ' \n'