mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Update all dates to use utc, only in the template is it converted to british time.
Template versions and template version pages added. Fix merge changes.
This commit is contained in:
committed by
Chris Hill-Scott
parent
daf33b03ad
commit
64e7a7b010
@@ -15,6 +15,7 @@
|
||||
{% else %}
|
||||
{{ name }}
|
||||
{% endif %}
|
||||
{% if created_at %}{{ created_at }}{% endif %}
|
||||
</h3>
|
||||
{% endif %}
|
||||
<div class="email-message">
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
{% else %}
|
||||
{{ name }}
|
||||
{% endif %}
|
||||
{% if created_at %}{{ created_at }}{% endif %}
|
||||
</h3>
|
||||
{% endif %}
|
||||
{% if recipient is not none %}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
{% if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) %}
|
||||
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}">Edit template</a>
|
||||
{% endif %}
|
||||
<a href="{{ url_for('.view_template_versions', service_id=current_service.id, template_id=template.id) }}">Template versions</a>
|
||||
<a href="{{ url_for(".send_from_api", service_id=current_service.id, template_id=template.id) }}">API info</a>
|
||||
</div>
|
||||
</div>
|
||||
36
app/templates/views/templates/_template_history.html
Normal file
36
app/templates/views/templates/_template_history.html
Normal file
@@ -0,0 +1,36 @@
|
||||
{% from "components/email-message.html" import email_message %}
|
||||
{% from "components/sms-message.html" import sms_message %}
|
||||
|
||||
<div class="column-two-thirds">
|
||||
{% if 'email' == template.template_type %}
|
||||
{{ email_message(
|
||||
template.formatted_subject_as_markup,
|
||||
template.formatted_as_markup,
|
||||
name=template.name if show_title else None,
|
||||
edit_link=url_for(
|
||||
'.view_template_version',
|
||||
service_id=current_service.id,
|
||||
template_id=template.id,
|
||||
version=template.get_raw('version')
|
||||
)
|
||||
) }}
|
||||
{% elif 'sms' == template.template_type %}
|
||||
{{ sms_message(
|
||||
template.formatted_as_markup,
|
||||
name=template.name if show_title else None,
|
||||
edit_link=url_for(
|
||||
'.view_template_version',
|
||||
service_id=current_service.id,
|
||||
template_id=template.id,
|
||||
version=template.get_raw('version')
|
||||
)
|
||||
) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="column-one-third">
|
||||
<div class="sms-message-use-links{% if show_title %}-with-title{% endif %}">
|
||||
<p>Edited by {{ template.get_raw('created_by').name }}</p>
|
||||
<p>Edited on {{ template.get_raw('created_at')|format_datetime }}</p>
|
||||
</div>
|
||||
</div>
|
||||
16
app/templates/views/templates/choose_history.html
Normal file
16
app/templates/views/templates/choose_history.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ template.name }} – GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
<h1 class="heading-large">{{ template.name }} version history</h1>
|
||||
<div class="grid-row">
|
||||
{% for template in versions %}
|
||||
{% with show_title=True %}
|
||||
{% include 'views/templates/_template_history.html' %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
22
app/templates/views/templates/template_history.html
Normal file
22
app/templates/views/templates/template_history.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/email-message.html" import email_message %}
|
||||
{% from "components/sms-message.html" import sms_message %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
|
||||
{% block page_title %}
|
||||
{{ template.name }} – GOV.UK Notify
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
|
||||
<h1 class="heading-large">{{ template.name }}</h1>
|
||||
|
||||
<div class="grid-row">
|
||||
{% with show_title=False %}
|
||||
{% include 'views/templates/_template_history.html' %}
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user