Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ietf/group/templatetags/group_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ def role_person_link(role, **kwargs):
plain_name = role.person.plain_name()
email = role.email.address
return {'name': name, 'plain_name': plain_name, 'email': email, 'title': title, 'class': cls}

@register.filter
def name_with_conditional_acronym(group):
if group.type_id in ("sdo", "isoc", "individ", "nomcom", "ietf", "irtf", ):
return group.name
else:
return f"{group.name} ({group.acronym})"
11 changes: 9 additions & 2 deletions ietf/templates/liaisons/liaison_mail.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{% load ietf_filters %}{% autoescape off %}Title: {{ liaison.title|clean_whitespace }}
{% load ietf_filters group_filters %}{% autoescape off %}Title: {{ liaison.title|clean_whitespace }}
Submission Date: {{ liaison.submitted|date:"Y-m-d" }}
URL of the IETF Web page: {{ liaison.get_absolute_url }}

To: {% for g in liaison.to_groups.all %}{{g|name_with_conditional_acronym}}{% if not forloop.last %}, {% endif %}{% endfor %}
From: {% for g in liaison.from_groups.all %}{{g|name_with_conditional_acronym}}{% if not forloop.last %}, {% endif %}{% endfor %}
Purpose: {{ liaison.purpose.name }}
{% if liaison.deadline %}Please reply by {{ liaison.deadline }}{% endif %}

Email Addresses
---------------
From: {% if liaison.from_contact %}{{ liaison.from_contact }}{% endif %}
To: {{ liaison.to_contacts }}
Cc: {{ liaison.cc_contacts }}
Response Contacts: {{ liaison.response_contacts }}
Technical Contacts: {{ liaison.technical_contacts }}
Purpose: {{ liaison.purpose.name }}

{% for related in liaison.source_of_set.all %}
Referenced liaison: {% if related.target.title %}{{ related.target.title }}{% else %}Liaison #{{ related.target.pk }}{% endif %} ({{ related.target.get_absolute_url }})
{% endfor %}
Expand Down
Loading