@@ -51,13 +51,13 @@ <h1 class="text-center">Events List for {{selectedTerm.description}}</h1>
5151 < ul class ="nav nav-tabs nav-fill mx-2 mb-2 " id ="pills-tab " role ="tablist ">
5252 < li class ="col-md-2 col-12 nav-item " role ="presentation ">
5353 < button class ="nav-link {{'active' if activeTab == 'volunteerOpportunities' else ''}} " id ="volunteerOpportunities "
54- data-bs-toggle ="pill " data-bs-target ="#pills-volunteer-opportunities " type ="button " role ="tab " aria-controls ="pills-volunteer-opportunities " aria-selected ="true "> Volunteer Opportunities</ button >
54+ data-bs-toggle ="pill " data-bs-target ="#pills-volunteer-opportunities " type ="button " role ="tab " aria-controls ="pills-volunteer-opportunities " aria-selected ="true "> Volunteer Opportunities </ button >
5555 </ li >
5656
5757 {% if trainingEvents and trainingEvents|length %}
5858 < li class ="col-md-2 col-12 nav-item " role ="presentation ">
5959 < button class ="nav-link {{'active' if activeTab == 'trainingEvents' else ''}} " id ="trainingEvents "
60- data-bs-toggle ="pill " data-bs-target ="#pills-training " type ="button " role ="tab " aria-controls ="pills-training " aria-selected ="false "> Training </ button >
60+ data-bs-toggle ="pill " data-bs-target ="#pills-training " type ="button " role ="tab " aria-controls ="pills-training " aria-selected ="false "> Trainings </ button >
6161 </ li >
6262 {% endif %}
6363
@@ -175,29 +175,29 @@ <h1 class="text-center">Events List for {{selectedTerm.description}}</h1>
175175 < p class ="m-2 fs-4 "> There are no {{typemap[type]}} events for this term.</ p >
176176{% endif %}
177177{% endmacro %}
178-
179178< div class ="tab-content " id ="pills-tabContent ">
180- < div class ="tab-pane fade show {{'active' if activeTab == 'volunteerOpportunities' else ''}} " id ="pills-volunteer-opportunities " role ="tabpanel " aria-labelledby ="pills-volunteer-opportunities-tab ">
181- {% if volunteerOpportunities %}
182- < div class ="accordion " id ="categoryAccordion ">
183- {% for program,events in volunteerOpportunities.items() %}
184- < div class ="accordion-item ">
185- < div class ="accordion-header " id ="accordion__header_{{program}} ">
186- < button class ="accordion-button {{'show' if programID == program.id else 'collapsed'}} "
187- type ="button "
188- data-bs-toggle ="collapse "
189- data-bs-target ="#accordion__body_{{program}}_num_{{ loop.index }} "
190- aria-expanded ="true "
191- aria-controls ="accordion__body_{{program}} ">
192- {{program.programName}}
193- {% if program.id not in countUpcomingVolunteerOpportunities%}
194- < span class ="ms-auto fw-light fst-italic "> 0 upcoming events</ span >
195- {% else %}
196- < span class ="ms-auto fw-light fst-italic "> {{countUpcomingVolunteerOpportunities[program.id]}} upcoming event{% if countUpcomingVolunteerOpportunities[program.id] > 1 %}s{% endif %}</ span >
197- {% endif %}
179+ < div class ="tab-pane fade show {{ 'active' if activeTab == 'volunteerOpportunities' else '' }} "
180+ id ="pills-volunteer-opportunities "
181+ role ="tabpanel "
182+ aria-labelledby ="pills-volunteer-opportunities-tab ">
198183
199- </ button >
200- </ div >
184+ {% if volunteerOpportunities %}
185+ < div class ="accordion " id ="categoryAccordion ">
186+ {% for program, events in volunteerOpportunities.items() %}
187+ < div class ="accordion-item ">
188+ < div class ="accordion-header " id ="accordion__header_{{ program }} ">
189+ < button class ="accordion-button {{ 'show' if programID == program.id else 'collapsed' }} "
190+ type ="button "
191+ data-bs-toggle ="collapse "
192+ data-bs-target ="#accordion__body_{{ program }}_num_{{ loop.index }} "
193+ aria-expanded ="true "
194+ aria-controls ="accordion__body_{{ program }} ">
195+ {{ program.programName }}
196+ {% set upcoming = countUpcomingVolunteerOpportunities.get(program.id, 0) %}
197+ {% set past = countPastVolunteerOpportunities.get(program.id, 0) %}
198+ < span class ="ms-auto fw-light fst-italic "> {{ upcoming }} upcoming event{% if upcoming != 1 %}s{% endif %} and {{ past }} past event{% if past != 1 %}s{% endif %} </ span >
199+ </ button >
200+ </ div >
201201 < div id ="accordion__body_{{program}}_num_{{ loop.index }} "
202202 class ="accordion-collapse collapse {{'show' if programID == program.id else ''}} "
203203 aria-labelledby ="accordion__header_{{program}} "
@@ -208,11 +208,25 @@ <h1 class="text-center">Events List for {{selectedTerm.description}}</h1>
208208 {% endfor %}
209209 </ div >
210210 {% else %}
211- < p class ="m-2 fs-4 "> There are no events that earn service for this term.</ p >
211+ < div class ="table-responsive ">
212+ < table class ="table ">
213+ < thead >
214+ < tr >
215+ < th scope ="col "> Program</ th >
216+ < th scope ="col "> Event Name</ th >
217+ < th scope ="col "> Date</ th >
218+ < th scope ="col "> Time</ th >
219+ < th scope ="col "> Location</ th >
220+ < th scope ="col "> </ th >
221+ </ tr >
222+ </ thead >
223+ </ table >
224+ </ div >
225+ < td colspan ="{{colspan_value}} " class ="p-3 no-upcoming "> There are no upcoming events for this program</ td >
212226 {% endif %}
213227 </ div >
214228 < div class ="tab-pane fade show " id ="pills-training " role ="tabpanel " aria-labelledby ="pills-training-tab ">
215- {{createTable(trainingEvents, "trainings ")}}
229+ {{createTable(trainingEvents, "training ")}}
216230 </ div >
217231 < div class ="tab-pane fade show " id ="pills-engagement " role ="tabpanel " aria-labelledby ="pills-engagement-tab ">
218232 {{createTable(engagementEvents, "education and engagement")}}
0 commit comments