Files
notifications-admin/app/templates/views/manage-templates.html
T

54 lines
1.7 KiB
HTML
Raw Normal View History

2015-12-14 16:53:07 +00:00
{% extends "withnav_template.html" %}
{% from "components/sms-message.html" import sms_message %}
2016-01-13 16:27:54 +00:00
{% from "components/email-message.html" import email_message %}
{% from "components/browse-list.html" import browse_list %}
{% block page_title %}
2016-02-08 09:23:51 +00:00
Manage templates GOV.UK Notify
{% endblock %}
2015-12-14 16:53:07 +00:00
{% block maincolumn_content %}
2016-02-08 09:23:51 +00:00
<h1 class="heading-large">Manage templates</h1>
2016-02-02 13:38:39 +00:00
2016-02-04 11:31:33 +00:00
{% if not has_jobs %}
{{ banner(
2016-02-04 12:20:24 +00:00
'<a href="{}">Send yourself a text message</a>'.format(
2016-02-04 11:31:33 +00:00
url_for(".choose_sms_template", service_id=service_id)
)|safe,
subhead='Next step',
type="tip"
)}}
{% endif %}
2016-02-02 13:38:39 +00:00
<div class="grid-row">
<div class="column-two-thirds">
2016-01-13 16:27:54 +00:00
{% for template in templates %}
{% if template.get_field('template_type') == 'sms' %}
2016-01-13 16:27:54 +00:00
{{ sms_message(
2016-01-22 11:20:39 +00:00
template.get_field('content'),
name=template.title,
id=template.get_field('id'),
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
2016-01-13 16:27:54 +00:00
) }}
{% elif template.get_field('template_type') == 'email' %}
2016-01-13 16:27:54 +00:00
{{ email_message(
2016-01-22 11:20:39 +00:00
template.get_field('subject'),
template.get_field('content'),
name=template.get_field('name'),
edit_link=url_for('.edit_service_template', service_id=template.get_field('service'), template_id=template.get_field('id'))
2016-01-13 16:27:54 +00:00
) }}
{% endif %}
{% endfor %}
2016-02-02 13:38:39 +00:00
<p>
<a href="{{ url_for('.add_service_template', service_id=service_id) }}" class="button">Add new template</a>
</p>
</div>
</div>
{% endblock %}