Files
notifications-admin/app/templates/views/manage-templates.html
Chris Hill-Scott 75c92c12c1 Add a prototype email template
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.
2016-01-14 10:59:51 +00:00

50 lines
1.4 KiB
HTML

{% extends "withnav_template.html" %}
{% from "components/sms-message.html" import sms_message %}
{% from "components/email-message.html" import email_message %}
{% from "components/browse-list.html" import browse_list %}
{% block page_title %}
GOV.UK Notify | Manage templates
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-two-thirds">
<h1 class="heading-xlarge">Templates</h1>
{% for template in templates %}
{% if template.type == 'sms' %}
{{ sms_message(
template.body,
name=template.name,
edit_link=url_for('.edit_template', service_id=service_id, template_id=loop.index)
) }}
{% elif template.type == 'email' %}
{{ email_message(
template.subject,
template.body,
name=template.name,
edit_link=url_for('.edit_template', service_id=service_id, template_id=loop.index)
) }}
{% endif %}
{% endfor %}
</div>
<div class="column-one-third">
{{ browse_list([
{
'title': 'New text message template',
'link': url_for('.add_template', service_id=service_id)
},
{
'title': 'New email template',
'link': url_for('.add_template', service_id=service_id)
}
]) }}
</div>
</div>
{% endblock %}