2017-06-12 17:21:25 +01:00
{% extends "withnav_template.html" %}
{% from "components/banner.html" import banner %}
{% from "components/ajax-block.html" import ajax_block %}
2019-04-29 11:44:05 +01:00
{% from "components/page-header.html" import page_header %}
2017-06-12 17:21:25 +01:00
{% from "components/page-footer.html" import page_footer %}
2022-12-14 11:50:51 -05:00
{% from "components/uk_components/back-link/macro.njk" import govukBackLink %}
2017-06-12 17:21:25 +01:00
{% block service_page_title %}
2021-01-06 13:41:16 +00:00
{{ 1|message_count_label(template.template_type, suffix='') | capitalize }}
2017-06-12 17:21:25 +01:00
{% endblock %}
2021-07-30 18:23:12 +01:00
{% block backLink %}
{% if back_link %}
{{ govukBackLink({ "href": back_link }) }}
{% endif %}
{% endblock %}
2017-06-12 17:21:25 +01:00
{% block maincolumn_content %}
2019-04-29 11:44:05 +01:00
{{ page_header(
2021-07-30 18:23:12 +01:00
1|message_count_label(template.template_type, suffix='') | capitalize
2019-04-29 11:44:05 +01:00
) }}
2020-05-29 17:11:01 +01:00
< p class = "govuk-body" >
2022-12-05 15:33:44 -05:00
{% if help %}
‘ {{ template.name }}’
2017-07-04 09:32:09 +01:00
{% else %}
2022-12-05 15:33:44 -05:00
< a class = "govuk-link govuk-link--no-visited-state" href = "{{ url_for('.view_template', service_id=current_service.id, template_id=template.id) }}" > ‘ {{ template.name }}’ </ a >
2017-07-04 09:32:09 +01:00
{% endif %}
2022-12-05 15:33:44 -05:00
was sent
2017-06-24 17:12:45 +01:00
{% if job and job.original_file_name != 'Report' %}
2018-11-27 16:49:01 +00:00
{% set destination =
2022-12-05 15:33:44 -05:00
{'email': 'an email address', 'sms': 'a phone number'} %}
2018-11-27 16:49:01 +00:00
to {{ destination[template.template_type] }} from
2019-12-06 07:53:46 +00:00
< a class = "govuk-link govuk-link--no-visited-state" href = "{{ url_for('.view_job', service_id=current_service.id, job_id=job.id) }}" > {{ job.original_file_name }}</ a >
2017-06-24 17:12:45 +01:00
{% elif created_by %}
by {{ created_by.name }}
{% endif %}
2020-02-19 17:11:31 +00:00
{{ created_at|format_datetime_human }}
2017-06-24 17:12:45 +01:00
</ p >
2022-12-05 15:33:44 -05:00
< div class = "" >
2019-02-07 15:59:31 +00:00
{{ template|string }}
</ div >
2017-06-12 17:21:25 +01:00
2022-11-22 22:50:47 -05:00
{% if template.template_type == 'email' %}
2018-11-22 12:16:32 +00:00
< div class = "js-stick-at-bottom-when-scrolling" >
2020-04-08 17:55:53 +01:00
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
2018-11-22 12:16:32 +00:00
</ div >
{% elif template.template_type == 'sms' %}
2020-04-08 17:55:53 +01:00
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
2017-07-13 13:05:41 +01:00
{% endif %}
2017-06-12 17:21:25 +01:00
2018-06-13 16:35:00 +01:00
{% if current_user.has_permissions('send_messages') and current_user.has_permissions('view_activity') and template.template_type == 'sms' and can_receive_inbound %}
2020-05-29 17:11:01 +01:00
< p class = "govuk-body" >
2019-12-06 07:53:46 +00:00
< a class = "govuk-link govuk-link--no-visited-state" href = "{{ url_for('.conversation', service_id=current_service.id, notification_id=notification_id, _anchor='n{}'.format(notification_id)) }}" > See all text messages sent to this phone number</ a >
2017-10-16 10:30:59 +01:00
</ p >
{% endif %}
2022-12-12 14:50:10 -05:00
{% endblock %}