Skip to content

Commit

Permalink
[#2696] Display additional links to recruitment-related scheduled emails
Browse files Browse the repository at this point in the history
  • Loading branch information
pbanaszkiewicz committed Sep 15, 2024
1 parent 047c0ef commit e786b71
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
14 changes: 13 additions & 1 deletion amy/templates/includes/event_details_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,20 @@
</td></tr>
<tr>
<th>Related scheduled emails:</th>
<td>
<td colspan="2">
{% include "includes/related_scheduled_emails.html" with object=event %}
</td>
</tr>
<tr>
<th>Related scheduled emails for recruitments:</th>
<td colspan="2">
{% with signups=related_instructor_recruitment_signups %}
{% for signup in signups %}
{% include "includes/related_scheduled_emails_no_empty_msg.html" with object=signup %}
{% empty %}
&mdash;
{% endfor %}
{% endwith %}
</td>
</tr>
</table>
14 changes: 13 additions & 1 deletion amy/templates/workshops/person.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,19 @@
{% with awards=person.award_set.all %}
{% for award in awards %}
{% include "includes/related_scheduled_emails_no_empty_msg.html" with object=award %}
{% empty%}
{% empty %}
&mdash;
{% endfor %}
{% endwith %}
</td>
</tr>
<tr>
<th>Related scheduled emails for recruitments:</th>
<td>
{% with signups=person.instructorrecruitmentsignup_set.all %}
{% for signup in signups %}
{% include "includes/related_scheduled_emails_no_empty_msg.html" with object=signup %}
{% empty %}
&mdash;
{% endfor %}
{% endwith %}
Expand Down
5 changes: 5 additions & 0 deletions amy/workshops/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
)
from emails.signals import persons_merged_signal
from fiscal.models import MembershipTask
from recruitment.models import InstructorRecruitmentSignup
from workshops.base_views import (
AMYCreateView,
AMYDeleteView,
Expand Down Expand Up @@ -1087,6 +1088,9 @@ def event_details(request, slug):
admin_lookup_form.helper = BootstrapHelper(
form_action=reverse("event_assign", args=[slug]), add_cancel_button=False
)
instructor_recruitment_signups = InstructorRecruitmentSignup.objects.filter(
recruitment=event.instructorrecruitment
)

context = {
"title": "Event {0}".format(event),
Expand All @@ -1109,6 +1113,7 @@ def event_details(request, slug):
"longitude": event.longitude,
},
"recruitment_stats": recruitment_stats,
"related_instructor_recruitment_signups": instructor_recruitment_signups,
}
return render(request, "workshops/event.html", context)

Expand Down

0 comments on commit e786b71

Please sign in to comment.