Files
notifications-admin/app/templates/components/email-message.html
Chris Hill-Scott 45f21e9a10 Hide ‘created at…’ on the templates page
I don’t think that if there’s only one version of the template that it’s
useful to see the created at date.

The auditing stuff only becomes relevant once someone a template has been
changed.
2016-05-24 09:22:12 +01:00

74 lines
1.9 KiB
HTML

{% macro email_message(
subject,
body,
name=None,
edit_link=None,
from_name=None,
from_address=None,
recipient=None,
id=None,
updated_at=None,
versions_url=None,
version=1,
show_placeholder_for_recipient=False,
show_id=False
) %}
{% if name %}
<h3 class="email-message-name">
{% if edit_link %}
<a href="{{ edit_link }}">{{ name }}</a>
{% else %}
{{ name }}
{% endif %}
</h3>
{% endif %}
{% if version > 1 %}
{% if updated_at %}
<p class="email-message-updated-at">Last updated on {{ updated_at|format_date_normal }} <a href="{{ versions_url }}">see earlier versions</a></p>
{% endif %}
{% endif %}
<div class="email-message">
{% if from_name or subject %}
<table class="email-message-meta">
<tbody>
{% if from_name and from_address %}
<tr>
<th>From</th>
<td>
{{ from_name }} &lt;{{ from_address }}&gt;
</td>
</tr>
{% endif %}
{% if recipient is not none %}
<tr>
<th>To</th>
<td>
{% if show_placeholder_for_recipient %}
<span class="placeholder">
email address
</span>
{% else %}
{{ recipient }}
{% endif %}
</td>
</tr>
{% endif %}
{% if subject %}
<tr class="email-message-meta">
<th>Subject</th>
<td>
{{ subject }}
</td>
</div>
{% endif %}
</tbody>
</table>
{% endif %}
<div class="email-message-body" data-module="expand-collapse" data-max-height="200">
<div class="email-message-body-wrapper">
{{ body|nl2br }}
</div>
</div>
</div>
{% endmacro %}