Show left and right column buttons when there are no entries

merge-requests/30/head
Bob Mottram 2021-11-30 22:28:00 +00:00
parent 7a145a98cc
commit d940238c00
3 changed files with 28 additions and 30 deletions

View File

@ -334,6 +334,8 @@ def _pointInPolygon(poly: [], x: float, y: float) -> bool:
def pointInNogo(nogo: [], latitude: float, longitude: 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: for polygon in nogo:
if _pointInPolygon(polygon, latitude, longitude): if _pointInPolygon(polygon, latitude, longitude):
return True return True

View File

@ -380,7 +380,6 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
headerButtonsFrontScreen(translate, nickname, headerButtonsFrontScreen(translate, nickname,
'links', authorized, 'links', authorized,
iconsAsButtons) + '</center>' iconsAsButtons) + '</center>'
if _linksExist(baseDir):
htmlStr += \ htmlStr += \
getLeftColumnContent(baseDir, nickname, domainFull, getLeftColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, httpPrefix, translate,
@ -389,8 +388,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
rssIconAtTop, False, False, rssIconAtTop, False, False,
theme, accessKeys, theme, accessKeys,
sharedItemsFederatedDomains) sharedItemsFederatedDomains)
else: if editor and not _linksExist(baseDir):
if editor:
htmlStr += '<br><br><br>\n<center>\n ' htmlStr += '<br><br><br>\n<center>\n '
htmlStr += translate['Select the edit icon to add web links'] htmlStr += translate['Select the edit icon to add web links']
htmlStr += '\n</center>\n' htmlStr += '\n</center>\n'

View File

@ -494,7 +494,6 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
headerButtonsFrontScreen(translate, nickname, headerButtonsFrontScreen(translate, nickname,
'newswire', authorized, 'newswire', authorized,
iconsAsButtons) + '</center>' iconsAsButtons) + '</center>'
if newswire:
htmlStr += \ htmlStr += \
getRightColumnContent(baseDir, nickname, domainFull, getRightColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, httpPrefix, translate,
@ -504,8 +503,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
showPublishAsIcon, rssIconAtTop, False, showPublishAsIcon, rssIconAtTop, False,
authorized, False, theme, authorized, False, theme,
defaultTimeline, accessKeys) defaultTimeline, accessKeys)
else: if editor and not newswire:
if editor:
htmlStr += '<br><br><br>\n' htmlStr += '<br><br><br>\n'
htmlStr += '<center>\n ' htmlStr += '<center>\n '
htmlStr += translate['Select the edit icon to add RSS feeds'] htmlStr += translate['Select the edit icon to add RSS feeds']