mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-15 19:01:04 -04:00
Put versions at bottom of single template page
Like the template ID this is an infrequently-used action on a template and doesn’t belong at the same level as ‘Upload recipients’ or ‘Send yourself’ a test. We don’t think it’s information that’s useful to working out which template you want to interact with, so it shouldn’t be on the choose template page any more.
This commit is contained in:
@@ -39,6 +39,11 @@
|
||||
margin-bottom: $gutter-half;
|
||||
}
|
||||
|
||||
.bottom-gutter-1-3 {
|
||||
@extend %bottom-gutter;
|
||||
margin-bottom: $gutter/3;
|
||||
}
|
||||
|
||||
.bottom-gutter-3-2 {
|
||||
@extend %bottom-gutter;
|
||||
margin-bottom: $gutter * 3/2;
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
<div class="column-whole">
|
||||
<h2 class="message-name">{{ template.name }}</h2>
|
||||
<p class="hint">
|
||||
{% if template.get_raw('version', 1) > 1 %}
|
||||
Edit made {% if template.get_raw('updated_at', None) %}{{ template.get_raw('updated_at')|format_datetime_normal }}{% endif %}
|
||||
{% else %}
|
||||
Created
|
||||
{% if template.get_raw('created_at', None) %}{{ template.get_raw('created_at')|format_datetime_normal }}{% endif %}
|
||||
{% endif %}
|
||||
by {{ template.get_raw('created_by').name }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="column-two-thirds">
|
||||
<div class="column-whole">
|
||||
{{ template|string }}
|
||||
</div>
|
||||
|
||||
<div class="column-one-third">
|
||||
<div class="message-use-links">
|
||||
{% if template.get_raw('version', 1) > 1 %}
|
||||
{% if template.get_raw('updated_at', None) %}{{ template.get_raw('updated_at')|format_datetime_normal }}{% endif %}
|
||||
{% else %}
|
||||
Created<br/>{% if template.get_raw('created_at', None) %}{{ template.get_raw('created_at')|format_datetime_normal }}{% endif %}
|
||||
{% endif %}
|
||||
<br/>by {{ template.get_raw('created_by').name }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,12 +64,8 @@
|
||||
<h2 class="message-name">
|
||||
<a href="{{ url_for('.view_template', service_id=current_service.id, template_id=template.id) }}">{{ template.name }}</a>
|
||||
</h2>
|
||||
<p class="hint bottom-gutter-1-2">
|
||||
<p class="hint bottom-gutter-1-3">
|
||||
{{ message_count_label(1, template.template_type, suffix='')|capitalize }} template
|
||||
{% if template.get('updated_at', None) %}
|
||||
 Last edited {{ template.get('updated_at', None)|format_date_short }}
|
||||
 <a href="{{ url_for('.view_template_versions', service_id=current_service.id, template_id=template.id) }}">See previous versions</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -18,8 +18,17 @@
|
||||
{% endwith %}
|
||||
</div>
|
||||
|
||||
<div class="bottom-gutter-2">
|
||||
<div class="bottom-gutter">
|
||||
{{ api_key(template.id, name="Template ID", thing='template ID') }}
|
||||
</div>
|
||||
|
||||
{% if template._template.updated_at %}
|
||||
<div class="bottom-gutter-2">
|
||||
<h2 class="heading-small">Last edited {{ template._template.updated_at|format_datetime_relative }}</h2>
|
||||
<p>
|
||||
<a href="{{ url_for('.view_template_versions', service_id=current_service.id, template_id=template.id) }}">See previous versions</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user