From 45578c9fe4a34c98d5d4fd30614eb7304cfce038 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 6 Nov 2020 15:42:52 +0000 Subject: [PATCH] Happening button before new post --- webinterface.py | 99 +++++++++++++++++++++++++------------------------ 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/webinterface.py b/webinterface.py index 43d28261..27ad84d9 100644 --- a/webinterface.py +++ b/webinterface.py @@ -6542,6 +6542,54 @@ def headerButtonsTimeline(defaultTimeline: str, inboxButton + '">' + translate['Inbox'] + \ '' + # show todays events buttons on the first inbox page + happeningStr = '' + if boxName == 'inbox' and pageNumber == 1: + if todaysEventsCheck(baseDir, nickname, domain): + now = datetime.now() + + # happening today button + if not iconsAsButtons: + happeningStr += \ + '' + \ + '' + else: + happeningStr += \ + '' + \ + '' + + # happening this week button + if thisWeeksEventsCheck(baseDir, nickname, domain): + if not iconsAsButtons: + happeningStr += \ + '' + else: + happeningStr += \ + '' + else: + # happening this week button + if thisWeeksEventsCheck(baseDir, nickname, domain): + if not iconsAsButtons: + happeningStr += \ + '' + else: + happeningStr += \ + '' + if not newsHeader: # button for the outbox tlStr += \ @@ -6553,54 +6601,7 @@ def headerButtonsTimeline(defaultTimeline: str, # add other buttons tlStr += \ sharesButtonStr + bookmarksButtonStr + eventsButtonStr + \ - moderationButtonStr + newPostButtonStr - - # show todays events buttons on the first inbox page - if boxName == 'inbox' and pageNumber == 1: - if todaysEventsCheck(baseDir, nickname, domain): - now = datetime.now() - - # happening today button - if not iconsAsButtons: - tlStr += \ - '' + \ - '' - else: - tlStr += \ - '' + \ - '' - - # happening this week button - if thisWeeksEventsCheck(baseDir, nickname, domain): - if not iconsAsButtons: - tlStr += \ - '' - else: - tlStr += \ - '' - else: - # happening this week button - if thisWeeksEventsCheck(baseDir, nickname, domain): - if not iconsAsButtons: - tlStr += \ - '' - else: - tlStr += \ - '' + moderationButtonStr + happeningStr + newPostButtonStr if not newsHeader: if not iconsAsButtons: @@ -6665,6 +6666,8 @@ def headerButtonsTimeline(defaultTimeline: str, '' + translate['Expand'] + \ '' + tlStr += happeningStr + if newsHeader: tlStr += \ '' + \