From 373c107d89e04984ee46fd8e28b75714393f7814 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 27 Oct 2020 19:56:52 +0000 Subject: [PATCH] Newswire and links on front page --- webinterface.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/webinterface.py b/webinterface.py index 7c83d5e7..438d02ba 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3386,14 +3386,14 @@ def htmlProfile(iconsAsButtons: bool, defaultTimeline: str, if not iconsAsButtons: loginButton += \ ' ' + \ + '/users/news/newswiremobile">' + \ '| ' + translate['News'] + \
                 '\n' loginButton += \ ' ' + \ + '/users/news/linksmobile">' + \ '| ' + translate['Edit Links'] + \
@@ -3404,13 +3404,13 @@ def htmlProfile(iconsAsButtons: bool, defaultTimeline: str,
         else:
             loginButton += \
                 '      <a href=\n' loginButton += \ ' \n' @@ -5899,7 +5899,10 @@ def htmlLinksMobile(baseDir: str, nickname: str, domainFull: str, iconsDir = getIconsDir(baseDir) # is the user a site editor? - editor = isEditor(baseDir, nickname) + if nickname == 'news': + editor = False + else: + editor = isEditor(baseDir, nickname) htmlStr = htmlHeader(cssFilename, profileStyle) htmlStr += \ @@ -5940,11 +5943,17 @@ def htmlNewswireMobile(baseDir: str, nickname: str, iconsDir = getIconsDir(baseDir) - # is the user a moderator? - moderator = isModerator(baseDir, nickname) + if nickname == 'news': + editor = False + moderator = False + else: + # is the user a moderator? + moderator = isModerator(baseDir, nickname) - # is the user a site editor? - editor = isEditor(baseDir, nickname) + # is the user a site editor? + editor = isEditor(baseDir, nickname) + + showPublishButton = editor htmlStr = htmlHeader(cssFilename, profileStyle) htmlStr += \ @@ -5952,7 +5961,7 @@ def htmlNewswireMobile(baseDir: str, nickname: str, httpPrefix, translate, iconsDir, moderator, editor, newswire, positiveVoting, - True, timelinePath, True, + True, timelinePath, showPublishButton, showPublishAsIcon, True, False) htmlStr += htmlFooter() return htmlStr