From c28161162f9bcd47c83ef459d676ec1fdb6f54c9 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 9 Jul 2025 18:17:11 +0200 Subject: [PATCH] Adapt session notify email based on submission count Since we *know* if the user has submitted more than one session, we can easily adapt the notification emails to exclude the part about "if you have made multiple submissions" if they haven't. --- postgresqleu/confreg/views.py | 1 + template.jinja/confreg/mail/session_notify_approved.txt | 4 +++- template.jinja/confreg/mail/session_notify_notaccepted.txt | 4 +++- template.jinja/confreg/mail/session_notify_pending.txt | 4 +++- template.jinja/confreg/mail/session_notify_pendreserve.txt | 4 +++- template.jinja/confreg/mail/session_notify_reserve.txt | 4 +++- template.jinja/confreg/mail/session_notify_submitted.txt | 4 +++- template.jinja/confreg/mail/session_notify_withdrawn.txt | 4 +++- 8 files changed, 22 insertions(+), 7 deletions(-) diff --git a/postgresqleu/confreg/views.py b/postgresqleu/confreg/views.py index 2f493afa..30bab7a3 100644 --- a/postgresqleu/confreg/views.py +++ b/postgresqleu/confreg/views.py @@ -2055,6 +2055,7 @@ def _send_session_notification(session): 'conference': session.conference, 'session': session, 'speaker': spk, + 'has_multiple_sessions': spk.conferencesession_set.filter(conference=session.conference).exclude(pk=session.pk).exists(), 'has_track_selection': session.conference.track_set.filter(incfp=True).count() > 0, }, receivername=spk.fullname, diff --git a/template.jinja/confreg/mail/session_notify_approved.txt b/template.jinja/confreg/mail/session_notify_approved.txt index e90c826c..9e6b0f46 100644 --- a/template.jinja/confreg/mail/session_notify_approved.txt +++ b/template.jinja/confreg/mail/session_notify_approved.txt @@ -19,8 +19,10 @@ of the description of the talk or the speaker(s), please contact the conference organizers *immediately*, so the changes can be made and the submission re-evaluated based on the new information. -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} diff --git a/template.jinja/confreg/mail/session_notify_notaccepted.txt b/template.jinja/confreg/mail/session_notify_notaccepted.txt index 4f8ec5d2..354296e1 100644 --- a/template.jinja/confreg/mail/session_notify_notaccepted.txt +++ b/template.jinja/confreg/mail/session_notify_notaccepted.txt @@ -9,8 +9,10 @@ submitted to {{conference}} has been updated. Unfortunately, we have not been able to accept this session. We do hope to see you at {{conference}} regardless! -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} diff --git a/template.jinja/confreg/mail/session_notify_pending.txt b/template.jinja/confreg/mail/session_notify_pending.txt index 376f8290..05d7dcbc 100644 --- a/template.jinja/confreg/mail/session_notify_pending.txt +++ b/template.jinja/confreg/mail/session_notify_pending.txt @@ -24,8 +24,10 @@ page as where you confirm your session. {%endif%} Thank you, and we look forward to seeing you at {{conference}}. -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} diff --git a/template.jinja/confreg/mail/session_notify_pendreserve.txt b/template.jinja/confreg/mail/session_notify_pendreserve.txt index c0395061..8931ba22 100644 --- a/template.jinja/confreg/mail/session_notify_pendreserve.txt +++ b/template.jinja/confreg/mail/session_notify_pendreserve.txt @@ -27,8 +27,10 @@ to this email. Also, if you do not wish for your session to be used for the reserve list, please let us know by responding to this email. -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} diff --git a/template.jinja/confreg/mail/session_notify_reserve.txt b/template.jinja/confreg/mail/session_notify_reserve.txt index 073a334c..27f2f775 100644 --- a/template.jinja/confreg/mail/session_notify_reserve.txt +++ b/template.jinja/confreg/mail/session_notify_reserve.txt @@ -9,8 +9,10 @@ submitted to {{conference}} has been updated. The session is currently on the reserve list. If you have any questions about what this means, please contact the conference organizers. -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} diff --git a/template.jinja/confreg/mail/session_notify_submitted.txt b/template.jinja/confreg/mail/session_notify_submitted.txt index 90644c5b..c930715a 100644 --- a/template.jinja/confreg/mail/session_notify_submitted.txt +++ b/template.jinja/confreg/mail/session_notify_submitted.txt @@ -9,8 +9,10 @@ submitted to {{conference}} has been updated. The session has been returned to "submitted" status. Please wait for further information from the organizers. -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} diff --git a/template.jinja/confreg/mail/session_notify_withdrawn.txt b/template.jinja/confreg/mail/session_notify_withdrawn.txt index ac8c4c55..553eed83 100644 --- a/template.jinja/confreg/mail/session_notify_withdrawn.txt +++ b/template.jinja/confreg/mail/session_notify_withdrawn.txt @@ -10,8 +10,10 @@ We have noted you have withdrawn this session, and will not be putting it on the schedule. We do hope to see you at {{conference}} regardless! -If you have made more than one submission to the conference, +{% if has_multiple_sessions %} +Since you have made more than one submission to the conference, please note that this status only affects this specific session. To view the status of all your sessions, please view the website {{sitebase}}/events/{{conference.urlname}}/callforpapers/ +{% endif %} -- 2.39.5