datatracker/ietf/templates/doc/document_email.html
Lars Eggert 303ff70e64
fix: Linkify email address lists one-by-one (#6315)
* fix: Linkify email address lists one-by-one

Seems to work around a bug in mozilla/bleach.

Fixes #6307

* Cosmetic change

* Fix test
2023-09-15 10:45:58 -05:00

69 lines
2.5 KiB
HTML

{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load ietf_filters textfilters %}
{% load static %}
{% block pagehead %}
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
{% endblock %}
{% block title %}Email expansions for {{ doc.name }}-{{ doc.rev }}{% endblock %}
{% block content %}
{% origin %}
{{ top|safe }}
{% if aliases %}
<h2 class="my-3">Email aliases</h2>
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="alias">Alias</th>
<th scope="col" data-sort="expansion">Expansion</th>
</tr>
</thead>
<tbody>
{% for alias in aliases %}
<tr>
<td>
<a href="mailto:{{ doc.name }}{{ alias.alias_type|default:'' }}@{{ ietf_domain }}">
{{ doc.name }}{{ alias.alias_type|default:'' }}@{{ ietf_domain }}
</a>
</td>
<td>{{ alias.expansion }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<h2 class="my-3">Recipient expansions</h2>
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="trigger">Mail trigger</th>
<th scope="col" data-sort="to">To</th>
<th scope="col" data-sort="cc">Cc</th>
</tr>
</thead>
<tbody>
{% for trigger,desc,to,cc in expansions %}
<tr>
<td>
<a href="{% url 'ietf.mailtrigger.views.show_triggers' trigger %}"
title="{{ desc }}">{{ trigger }}</a>
</td>
<td>
{% for addr in to %}
{{ addr|linkify }}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
<td>
{% for addr in cc %}
{{ addr|linkify }}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}"></script>
{% endblock %}