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

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 %}
{% from "components/email-message.html" import email_message %}
{% from "components/browse-list.html" import browse_list %}
{% block page_title %}
Manage templates GOV.UK Notify
{% endblock %}
2015-12-14 16:53:07 +00:00
{% block maincolumn_content %}
<h1 class="heading-large">Manage templates</h1>
2016-02-04 11:31:33 +00:00
{% if not has_jobs %}
{{ banner(
'<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 %}
<div class="grid-row">
<div class="column-two-thirds">
{% for template in templates %}
{% if template.get_field('template_type') == 'sms' %}
{{ 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'))
) }}
{% elif template.get_field('template_type') == 'email' %}
{{ 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'))
) }}
{% endif %}
{% endfor %}
<p>
<a href="{{ url_for('.add_service_template', service_id=service_id) }}" class="button">Add new template</a>
</p>
</div>
</div>
{% endblock %}