From d940238c00c1ec97a8f9843a810f17f3a23ca085 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 30 Nov 2021 22:28:00 +0000 Subject: [PATCH] Show left and right column buttons when there are no entries --- city.py | 2 ++ webapp_column_left.py | 26 ++++++++++++-------------- webapp_column_right.py | 30 ++++++++++++++---------------- 3 files changed, 28 insertions(+), 30 deletions(-) diff --git a/city.py b/city.py index 3f8c0f3af..12f869002 100644 --- a/city.py +++ b/city.py @@ -334,6 +334,8 @@ def _pointInPolygon(poly: [], x: float, y: float) -> bool: def pointInNogo(nogo: [], latitude: float, longitude: float) -> bool: + """Returns true of the given geolocation is within a nogo area + """ for polygon in nogo: if _pointInPolygon(polygon, latitude, longitude): return True diff --git a/webapp_column_left.py b/webapp_column_left.py index 51f738390..333f48ee9 100644 --- a/webapp_column_left.py +++ b/webapp_column_left.py @@ -380,20 +380,18 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, headerButtonsFrontScreen(translate, nickname, 'links', authorized, iconsAsButtons) + '' - if _linksExist(baseDir): - htmlStr += \ - getLeftColumnContent(baseDir, nickname, domainFull, - httpPrefix, translate, - editor, - False, timelinePath, - rssIconAtTop, False, False, - theme, accessKeys, - sharedItemsFederatedDomains) - else: - if editor: - htmlStr += '


\n
\n ' - htmlStr += translate['Select the edit icon to add web links'] - htmlStr += '\n
\n' + htmlStr += \ + getLeftColumnContent(baseDir, nickname, domainFull, + httpPrefix, translate, + editor, + False, timelinePath, + rssIconAtTop, False, False, + theme, accessKeys, + sharedItemsFederatedDomains) + if editor and not _linksExist(baseDir): + htmlStr += '


\n
\n ' + htmlStr += translate['Select the edit icon to add web links'] + htmlStr += '\n
\n' # end of col-left-mobile htmlStr += '\n' diff --git a/webapp_column_right.py b/webapp_column_right.py index 93b41080b..40ba8e438 100644 --- a/webapp_column_right.py +++ b/webapp_column_right.py @@ -494,22 +494,20 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, headerButtonsFrontScreen(translate, nickname, 'newswire', authorized, iconsAsButtons) + '' - if newswire: - htmlStr += \ - getRightColumnContent(baseDir, nickname, domainFull, - httpPrefix, translate, - moderator, editor, - newswire, positiveVoting, - False, timelinePath, showPublishButton, - showPublishAsIcon, rssIconAtTop, False, - authorized, False, theme, - defaultTimeline, accessKeys) - else: - if editor: - htmlStr += '


\n' - htmlStr += '
\n ' - htmlStr += translate['Select the edit icon to add RSS feeds'] - htmlStr += '\n
\n' + htmlStr += \ + getRightColumnContent(baseDir, nickname, domainFull, + httpPrefix, translate, + moderator, editor, + newswire, positiveVoting, + False, timelinePath, showPublishButton, + showPublishAsIcon, rssIconAtTop, False, + authorized, False, theme, + defaultTimeline, accessKeys) + if editor and not newswire: + htmlStr += '


\n' + htmlStr += '
\n ' + htmlStr += translate['Select the edit icon to add RSS feeds'] + htmlStr += '\n
\n' # end of col-right-mobile htmlStr += ''