mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
If the templates page contains text messages and emails then there’s two ways it could be structured: - into two sections, all text messages first, then all emails - emails and text messages interleaved, sorted by date I think the second one is better. Imagine a situation where you mostly do emails but have a few text messages. You’d have to scroll past the text messages to get to your emails. Every time. I reckon that the most commonly accessed templates will be the most recent ones.
20 lines
494 B
HTML
20 lines
494 B
HTML
{% macro email_message(subject, body, name=None, edit_link=None) %}
|
|
{% if name %}
|
|
<h3 class="email-message-name">
|
|
{% if edit_link %}
|
|
<a href="{{ edit_link }}">{{ name }}</a>
|
|
{% else %}
|
|
{{ name }}
|
|
{% endif %}
|
|
</h3>
|
|
{% endif %}
|
|
<div class="email-message">
|
|
<div class="email-message-subject">
|
|
{{ subject|placeholders }}
|
|
</div>
|
|
<div class="email-message-body">
|
|
{{ body|nl2br|placeholders }}
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|