diff --git a/app/controllers/main/routes.py b/app/controllers/main/routes.py index 9c5d93b5c..1a1a2a559 100644 --- a/app/controllers/main/routes.py +++ b/app/controllers/main/routes.py @@ -235,7 +235,7 @@ def viewUsersProfile(username): totalSustainedEngagements = getEngagementTotal(getCommunityEngagementByTerm(volunteer)) handbookOverdue = getHandbookStatus(volunteer) - training = hasGoneToTraining(g.current_user, g.current_term) + training = hasGoneToTraining(volunteer, g.current_term) return render_template ("/main/userProfile.html", username=username, diff --git a/app/logic/events.py b/app/logic/events.py index ae02cf477..57ef86832 100644 --- a/app/logic/events.py +++ b/app/logic/events.py @@ -428,7 +428,7 @@ def getParticipatedEventsForUser(user): .join(Program, JOIN.LEFT_OUTER).switch() .join(EventParticipant) .where(EventParticipant.user == user, - Event.isAllVolunteerTraining == False, Event.deletionDate == None, Event.isCeltsTraining == False) + Event.isAllVolunteerTraining == False, Event.deletionDate == None) .order_by(Event.startDate, Event.name)) allVolunteer = (Event.select(Event, "", Value("Volunteer").alias("participatedType"), Value(0).alias("hoursEarned")) diff --git a/app/static/css/base.css b/app/static/css/base.css index 8aa23189c..374356faf 100644 --- a/app/static/css/base.css +++ b/app/static/css/base.css @@ -36,7 +36,7 @@ select.empty { } .scroll-container { - min-height: 100vh; + max-height: 100vh; } .bi-list { diff --git a/app/templates/main/userProfile.html b/app/templates/main/userProfile.html index 024927369..fc67984ea 100644 --- a/app/templates/main/userProfile.html +++ b/app/templates/main/userProfile.html @@ -818,38 +818,37 @@
No CELTS Labor Handbook available for {{g.current_term.description}} yet.
- {% else %} - - {% endif %} - - {# All Volunteer Training #} + {% if not handbookAvailable %} +No {{ "CELTS Labor" if isLaborHandbook else "Volunteer" }} Handbook available for {{ g.current_term.description }} yet.
{% else %} - {% if not g.current_term.volunteerHandbook %} -No Volunteer Handbook available for {{g.current_term.description}} yet.
- {% else %} - - {% endif %} - {% endif %} ++ + {{ "CELTS Labor Handbook" if isLaborHandbook else "CELTS Student Handbook" }} + +
+ {% endif %}To volunteer, you must sign the CELTS handbook for {{g.current_term.academicYear}}, and you must do this at an All Volunteers Training.
- {% else %} - {% if volunteer.signatureTerm.academicYear != g.current_term.academicYear %} -Your handbook signature is good for AY {{volunteer.signatureTerm.academicYear}}.
+ {% if handbookOverdue and not training%} + {% if isOwnProfile %} +To volunteer, you must sign the CELTS handbook for {{g.current_term.academicYear}}, and you must do this at an All Volunteers Training or All CELTS Training (Labor).
+ {% elif isLaborViewer %} +To volunteer, {{volunteer.fullName}} must sign the CELTS handbook for {{g.current_term.academicYear}}, and they must do this at an All Volunteers Training or All CELTS Training (Labor).
{% endif %} - - {% if g.current_term.volunteerHandbook %} - {% if handbookOverdue and g.current_user.username == volunteer.username %} + + {% elif handbookOverdue %} +{{ volunteer.fullName }} has attended the training but they still need to sign the CELTS handbook for {{ g.current_term.academicYear }}.
{% endif %} {% endif %} - {% endif %} + {% else %} ++ {% if isOwnProfile %} Your handbook signature is good for AY {% else %} {{ volunteer.fullName }}'s handbook signature is good for AY {% endif %} {{ volunteer.signatureTerm.academicYear }}. +
+ {% endif %}