From 984d215fc85bc1f5123b58d6171a549d2815bed2 Mon Sep 17 00:00:00 2001 From: dea Date: Thu, 20 Jun 2024 19:07:54 +0000 Subject: [PATCH 01/12] Issue fixed --- app/controllers/admin/routes.py | 4 ++++ app/templates/eventNav.html | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/routes.py b/app/controllers/admin/routes.py index 5783f9c77..fe950a261 100644 --- a/app/controllers/admin/routes.py +++ b/app/controllers/admin/routes.py @@ -209,6 +209,8 @@ def renewEvent(eventId): @admin_bp.route('/event//edit', methods=['GET','POST']) def eventDisplay(eventId): pageViewsCount = EventView.select().where(EventView.event == eventId).count() + current_time = datetime.now().time() + current_date = datetime.now().date() if request.method == 'GET' and request.path == f'/event/{eventId}/view': viewer = g.current_user event = Event.get_by_id(eventId) @@ -277,6 +279,8 @@ def eventDisplay(eventId): # Event Edit if 'edit' in rule.rule: return render_template("admin/createEvent.html", + current_time = current_time, + current_date = current_date, eventData = eventData, futureTerms=futureTerms, event = event, diff --git a/app/templates/eventNav.html b/app/templates/eventNav.html index a9ae7318c..07cb4c5ec 100644 --- a/app/templates/eventNav.html +++ b/app/templates/eventNav.html @@ -18,15 +18,22 @@ {% if g.current_user.isAdmin %} {{ eventheader(page_title, event, 'large', isNewEvent) }} {% endif %} - {% set alertClass = "alert-danger" if eventPast else "alert-warning"%} - {% set display = "" if eventPast or event.isCanceled else "d-none"%} + {% set isCurrentDate = current_date == event.startDate %} + {% set isCurrentTime = current_time < event.timeEnd and current_time > event.timeStart %} + {% set display = "" if eventPast or event.isCanceled or isCurrentDate or isCurrentTime else "d-none"%} + {% set alertClass = ("alert-success" if isCurrentTime else ( "alert-danger" if eventPast else "alert-warning")) %} + From 589b6126aa7810d67d7fd8f7b6a8bd9a97a323f9 Mon Sep 17 00:00:00 2001 From: dea Date: Fri, 5 Jul 2024 08:44:57 -0400 Subject: [PATCH 02/12] Issues changed , dscssion to be had with Brian regarding future events section. --- app/templates/admin/createEvent.html | 2 +- app/templates/eventNav.html | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/app/templates/admin/createEvent.html b/app/templates/admin/createEvent.html index 22e88b3c6..14ba54b61 100644 --- a/app/templates/admin/createEvent.html +++ b/app/templates/admin/createEvent.html @@ -23,7 +23,7 @@ {% extends "eventNav.html"%} {% endif %} -{% set eventPast = event.isPastStart if not isNewEvent else False %} +{% set eventPast = event.isPastEnd if not isNewEvent else False %} {% set tabName = 'edit' %} diff --git a/app/templates/eventNav.html b/app/templates/eventNav.html index d408b2073..0f96f3265 100644 --- a/app/templates/eventNav.html +++ b/app/templates/eventNav.html @@ -18,17 +18,13 @@ {% if g.current_user.isAdmin %} {{ eventheader(page_title, event, 'large', isNewEvent) }} {% endif %} - indicate_Event_In_Prog - {% set isCurrentDate = current_date == event.startDate %} - {% set isCurrentTime = current_time < event.timeEnd and current_time > event.timeStart %} - {% set display = "" if eventPast or event.isCanceled or isCurrentDate or isCurrentTime else "d-none"%} + {% set display = "" if eventPast or event.isCanceled else "d-none"%} {% set alertClass = ("alert-success" if isCurrentTime else ( "alert-danger" if eventPast else "alert-warning")) %} + From a29be8f3a7d581fa007ad043c91b4ad8b1fd6fd2 Mon Sep 17 00:00:00 2001 From: dea Date: Mon, 8 Jul 2024 15:20:23 -0400 Subject: [PATCH 04/12] Updated the banner to appear in all tabs, for all conditions --- app/controllers/admin/routes.py | 6 ++++-- app/templates/eventNav.html | 4 ++-- app/templates/eventView.html | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/routes.py b/app/controllers/admin/routes.py index b4acbff00..8563b3105 100644 --- a/app/controllers/admin/routes.py +++ b/app/controllers/admin/routes.py @@ -217,6 +217,7 @@ def eventDisplay(eventId): viewer = g.current_user event = Event.get_by_id(eventId) addEventView(viewer,event) + eventCountdown = getCountdownToEvent(event) # Validate given URL try: event = Event.get_by_id(eventId) @@ -299,7 +300,7 @@ def eventDisplay(eventId): eventData['timeEnd'] = event.timeEnd.strftime("%-I:%M %p") eventData['startDate'] = event.startDate.strftime("%m/%d/%Y") eventCountdown = getCountdownToEvent(event) - + # Identify the next event in a recurring series if event.recurringId: @@ -324,7 +325,8 @@ def eventDisplay(eventId): filepaths=filepaths, image=image, pageViewsCount=pageViewsCount, - eventCountdown=eventCountdown) + eventCountdown=eventCountdown + ) diff --git a/app/templates/eventNav.html b/app/templates/eventNav.html index 202c76372..45bb43d94 100644 --- a/app/templates/eventNav.html +++ b/app/templates/eventNav.html @@ -21,7 +21,7 @@ {% set isInProg = not event.isPastEnd and event.isPastStart %} {% set display = "" if eventPast or event.isCanceled or isInProg else "d-none"%} {% set alertClass = ("alert-success" if isInProg else ( "alert-danger" if eventPast else "alert-warning")) %} - + {{eventPast}} -
+
{% if programTrainings %} {% if program or not eventData.isAllVolunteerTraining %}

Program Trainings:

From 51629fd7619110bc5ea51927380d37ceb48b1c13 Mon Sep 17 00:00:00 2001 From: dea Date: Mon, 8 Jul 2024 15:28:23 -0400 Subject: [PATCH 05/12] Removed logs --- app/templates/eventNav.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/eventNav.html b/app/templates/eventNav.html index 45bb43d94..fa36c594e 100644 --- a/app/templates/eventNav.html +++ b/app/templates/eventNav.html @@ -21,7 +21,7 @@ {% set isInProg = not event.isPastEnd and event.isPastStart %} {% set display = "" if eventPast or event.isCanceled or isInProg else "d-none"%} {% set alertClass = ("alert-success" if isInProg else ( "alert-danger" if eventPast else "alert-warning")) %} - {{eventPast}} +