diff --git a/app/logic/events.py b/app/logic/events.py index b3288e05d..b85724b95 100644 --- a/app/logic/events.py +++ b/app/logic/events.py @@ -309,7 +309,7 @@ def getUpcomingEventsForUser(user, asOf=datetime.now(), program=None): if program: events = events.where(Event.program == program) - events = events.order_by(Event.startDate, Event.name) + events = events.order_by(Event.startDate, Event.timeStart) events_list = [] shown_recurring_event_list = [] diff --git a/app/static/css/userProfile.css b/app/static/css/userProfile.css index ac474dcf7..cd5414a3b 100644 --- a/app/static/css/userProfile.css +++ b/app/static/css/userProfile.css @@ -2,10 +2,14 @@ vertical-align: middle; } -.ongoing-event{ +.past-event{ opacity:0.6; } +.ongoing-event{ + background-color: #cdebaa; +} + dt { font-weight: normal; padding: 5px; diff --git a/app/templates/main/userProfile.html b/app/templates/main/userProfile.html index 6de16a6a2..0f9b4804e 100644 --- a/app/templates/main/userProfile.html +++ b/app/templates/main/userProfile.html @@ -97,15 +97,26 @@

Event Name Event Date Start Time + End Time Location RSVP Status {% for event in upcomingEvents %} - + + {% set eventStatus = 'future-event' %} + {% if event.isPastStart %} + {% set eventStatus = 'ongoing-event' %} + {% endif %} + {% if event.isPastEnd %} + {% set eventStatus = 'past-event' %} + {% endif %} + + {{event.program.programName if event.program else '--'}} {{event.name}} - {{event.startDate.strftime('%m/%d/%Y')}} + {{ 'In Progress' | safe if eventStatus == 'ongoing-event' else event.startDate.strftime('%m/%d/%Y') }} {{event.timeStart.strftime('%-I:%M %p')}} + {{event.timeEnd.strftime('%-I:%M %p')}} {{event.location}} {% if (event.isRsvpRequired) and (event.id in rsvpedEvents) %} You have RSVP'd for this event.