merge-requests/8/head
Bob Mottram 2020-10-31 21:36:35 +00:00
parent d76e7aa79a
commit abc81ec464
1 changed files with 11 additions and 1 deletions

View File

@ -5773,7 +5773,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
domain = domain.split(':') domain = domain.split(':')
if authorized: if authorized:
# only show the publish button if logged in # only show the publish button if logged in, otherwise replace it with
# a login button
publishButtonStr = \ publishButtonStr = \
' <a href="' + \ ' <a href="' + \
'/users/' + nickname + '/newblog" ' + \ '/users/' + nickname + '/newblog" ' + \
@ -5787,9 +5788,11 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
' <a href="/login"><button class="publishbtn">' + \ ' <a href="/login"><button class="publishbtn">' + \
translate['Login'] + '</button></a>\n' translate['Login'] + '</button></a>\n'
# show publish button at the top if needed
if publishButtonAtTop: if publishButtonAtTop:
htmlStr += '<center>' + publishButtonStr + '</center>' htmlStr += '<center>' + publishButtonStr + '</center>'
# show a column header image, eg. title of the theme or newswire banner
editImageClass = '' editImageClass = ''
if showHeaderImage: if showHeaderImage:
rightColumnImageFilename = \ rightColumnImageFilename = \
@ -5821,6 +5824,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
if editImageClass == 'rightColEdit': if editImageClass == 'rightColEdit':
htmlStr += '\n <center>\n' htmlStr += '\n <center>\n'
# whether to show a back icon
# This is probably going to be osolete soon
if showBackButton: if showBackButton:
htmlStr += \ htmlStr += \
' <a href="' + timelinePath + '">' + \ ' <a href="' + timelinePath + '">' + \
@ -5831,6 +5836,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
if not showPublishAsIcon: if not showPublishAsIcon:
htmlStr += publishButtonStr htmlStr += publishButtonStr
# show the edit icon
if editor: if editor:
if os.path.isfile(baseDir + '/accounts/newswiremoderation.txt'): if os.path.isfile(baseDir + '/accounts/newswiremoderation.txt'):
# show the edit icon highlighted # show the edit icon highlighted
@ -5853,6 +5859,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
translate['Edit newswire'] + '" src="/' + \ translate['Edit newswire'] + '" src="/' + \
iconsDir + '/edit.png" /></a>\n' iconsDir + '/edit.png" /></a>\n'
# show the RSS icon
rssIconStr = \ rssIconStr = \
' <a href="/newswire.xml">' + \ ' <a href="/newswire.xml">' + \
'<img class="' + editImageClass + \ '<img class="' + editImageClass + \
@ -5863,6 +5870,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
if rssIconAtTop and showHeaderImage: if rssIconAtTop and showHeaderImage:
htmlStr += rssIconStr htmlStr += rssIconStr
# show publish icon at top
if showPublishButton: if showPublishButton:
if showPublishAsIcon: if showPublishAsIcon:
htmlStr += \ htmlStr += \
@ -5880,11 +5888,13 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
if showHeaderImage: if showHeaderImage:
htmlStr += ' <br>\n' htmlStr += ' <br>\n'
# show the newswire lines
newswireContentStr = \ newswireContentStr = \
htmlNewswire(newswire, nickname, moderator, translate, htmlNewswire(newswire, nickname, moderator, translate,
positiveVoting, iconsDir) positiveVoting, iconsDir)
htmlStr += newswireContentStr htmlStr += newswireContentStr
# show the rss icon at the bottom, typically on the right hand side
rssAtBottom = not rssIconAtTop or not showHeaderImage rssAtBottom = not rssIconAtTop or not showHeaderImage
if newswireContentStr and rssAtBottom: if newswireContentStr and rssAtBottom:
htmlStr += '<br><div class="columnIcons">' + rssIconStr + '</div>' htmlStr += '<br><div class="columnIcons">' + rssIconStr + '</div>'