mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-04 13:48:26 -04:00
For email jobs, the template needed to look up the service to work out the email_from and from_name. `service` used to be a variable passed through to the view. Now every veiw gets `current_service` instead. This is a quick fix to make things work.
70 lines
1.9 KiB
HTML
70 lines
1.9 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/banner.html" import banner %}
|
||
{% from "components/sms-message.html" import sms_message %}
|
||
{% from "components/email-message.html" import email_message %}
|
||
|
||
{% block page_title %}
|
||
{{ uploaded_file_name }} – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
<h1 class="heading-large">
|
||
{{ uploaded_file_name }}
|
||
</h1>
|
||
|
||
{% if 'sms' == template.template_type %}
|
||
<div class="grid-row">
|
||
<div class="column-two-thirds">
|
||
{{ sms_message(
|
||
template.formatted_as_markup,
|
||
)}}
|
||
</div>
|
||
</div>
|
||
{% elif 'email' == template.template_type %}
|
||
{{ email_message(
|
||
template.subject,
|
||
template.formatted_as_markup,
|
||
from_address='{}@notifications.service.gov.uk'.format(current_service.email_from),
|
||
from_name=current_service.name
|
||
)}}
|
||
{% endif %}
|
||
|
||
{% if not finished_at %}
|
||
<div
|
||
data-module="update-content"
|
||
data-resource="{{url_for(".view_job_updates", service_id=current_service.id, job_id=job_id)}}"
|
||
data-key="status"
|
||
>
|
||
{% endif %}
|
||
{% include 'partials/jobs/status.html' %}
|
||
{% if not finished_at %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if not finished_at %}
|
||
<div
|
||
data-module="update-content"
|
||
data-resource="{{url_for(".view_job_updates", service_id=current_service.id, job_id=job_id)}}"
|
||
data-key="counts"
|
||
>
|
||
{% endif %}
|
||
{% include 'partials/jobs/count.html' %}
|
||
{% if not finished_at %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if not finished_at %}
|
||
<div
|
||
data-module="update-content"
|
||
data-resource="{{url_for(".view_job_updates", service_id=current_service.id, job_id=job_id)}}"
|
||
data-key="notifications"
|
||
>
|
||
{% endif %}
|
||
{% include 'partials/jobs/notifications.html' %}
|
||
{% if not finished_at %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% endblock %}
|