mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 17:08:26 -04:00
https://www.pivotaltracker.com/story/show/112814667 > As you need to have templates to send any notifications, we should be nudging > people to do that when they sign in. > > This should be in the dashboard, with a link to manage templates. > > Should be bright and shiny and only show if the service has no templates. This commit adds the above. It also rationalises the language (some places used ‘create template’, others used ‘add template’, this changes everything to the latter).
42 lines
1.4 KiB
HTML
42 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>
|
|
|
|
<p>
|
|
<a href="{{ url_for('.add_service_template', service_id=service_id) }}">Add new template</a>
|
|
|
|
{% for template in templates %}
|
|
{% if template.get_field('template_type') == 'sms' %}
|
|
{{ sms_message(
|
|
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(
|
|
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 %}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|