email confirming interim meeting request now says 'the Area Director of the <area>' instead of '<area> Area Director'. Fixes issue #2522. Commit ready to merge.
- Legacy-Id: 15344
This commit is contained in:
parent
0ece320908
commit
3c478e5c52
|
@ -508,10 +508,6 @@ def comma_separated_list(seq, end_word="and"):
|
|||
return u"".join(seq)
|
||||
else:
|
||||
return u", ".join(seq[:-1]) + u" %s %s"%(end_word, seq[-1])
|
||||
|
||||
@register.filter()
|
||||
def role_names(roles):
|
||||
return list(set([ "%s %s" % (r.group.name, r.name.name) for r in roles ]))
|
||||
|
||||
@register.filter()
|
||||
def zaptmp(s):
|
||||
|
|
|
@ -484,7 +484,7 @@ def make_materials_directories(meeting):
|
|||
|
||||
|
||||
def send_interim_approval_request(meetings):
|
||||
"""Sends an email to the secretariat, group chairs, and resposnible area
|
||||
"""Sends an email to the secretariat, group chairs, and responsible area
|
||||
director or the IRTF chair noting that approval has been requested for a
|
||||
new interim meeting. Takes a list of one or more meetings."""
|
||||
group = meetings[0].session_set.first().group
|
||||
|
@ -501,7 +501,12 @@ def send_interim_approval_request(meetings):
|
|||
is_series = True
|
||||
else:
|
||||
is_series = False
|
||||
context = locals()
|
||||
approver_set = set()
|
||||
for role in group.interim_approval_roles():
|
||||
approver = "%s of the %s" % ( role.name.name, role.group.name)
|
||||
approver_set.add(approver)
|
||||
approvers = list(approver_set)
|
||||
context = locals() # TODO Unnecessarily complex, context needs to only contain what the template needs
|
||||
send_mail(None,
|
||||
to_email,
|
||||
from_email,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{% load ams_filters %}{% load ietf_filters %}
|
||||
A new interim meeting {% if is_series %}series {% endif %}request has just been submitted by {{ requester }}.
|
||||
|
||||
This request requires approval by the {{ group.interim_approval_roles|role_names|comma_separated_list:"or" }}
|
||||
This request requires approval by the {{ approvers|comma_separated_list:"or" }}
|
||||
|
||||
The meeting{{ meetings|pluralize }} can be approved here:
|
||||
{% for url in approval_urls %}{{ url }}
|
||||
|
|
Loading…
Reference in a new issue