Files
notifications-admin/app/templates/views/templates/choose-reply.html
2018-08-22 17:42:04 +01:00

49 lines
1.6 KiB
HTML

{% from "components/pill.html" import pill %}
{% from "components/message-count-label.html" import message_count_label %}
{% from "components/textbox.html" import textbox %}
{% from "components/live-search.html" import live_search %}
{% extends "withnav_template.html" %}
{% block service_page_title %}
Choose a template
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Choose a template</h1>
{% if not templates %}
{% if current_user.has_permissions('manage_templates') %}
<p class="bottom-gutter">
You need a template before you can send text messages.
</p>
<a href="{{ url_for('.add_template_by_type', service_id=current_service.id) }}" class="button">Add a new template</a>
{% else %}
<p>
You need to ask your service manager to add templates before you
can send text messages.
</p>
{% endif %}
{% else %}
{{ live_search(target_selector='#template-list .column-whole', show=show_search_box, form=search_form) }}
<nav class="grid-row" id=template-list>
{% for template in templates %}
<div class="column-whole">
<h2 class="message-name">
<a href="{{ url_for('.conversation_reply_with_template', service_id=current_service.id, template_id=template.id, notification_id=notification_id) }}">{{ template.name }}</a>
</h2>
<p class="message-type">
{{ message_count_label(1, template.template_type, suffix='')|capitalize }} template
</p>
</div>
{% endfor %}
</nav>
{% endif %}
{% endblock %}