mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Put actions at the top on single template page
The links to the right of the template take up valuable horizontal space. This means that the preview of email and letter templates isn’t as big as it could be. By making the letter preview bigger it removes the need to click through to the PDF to see a preview. Reuses the navigation style used on the API integration page, because I think it damages consistency to create another new button style.
This commit is contained in:
@@ -1,25 +1,51 @@
|
||||
<div class="column-two-thirds">
|
||||
{{ template|string }}
|
||||
</div>
|
||||
<div class="column-one-third">
|
||||
<div class="column-whole">
|
||||
{% if template._template.archived %}
|
||||
<div class="message-updated-at">
|
||||
This template was deleted<br/>{{ template._template.updated_at|format_date_normal }}
|
||||
</div>
|
||||
</p>
|
||||
{% else %}
|
||||
<div class="message-use-links{% if show_title %}-with-title{% endif %}">
|
||||
{% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %}
|
||||
<a href="{{ url_for(".send_messages", service_id=current_service.id, template_id=template.id) }}" class="primary">
|
||||
<div class="bottom-gutter-2-3">
|
||||
<div class="grid-row">
|
||||
{% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %}
|
||||
<div class="{{ 'column-half' if template.template_type == 'letter' else 'column-third' }}">
|
||||
<a href="{{ url_for(".send_messages", service_id=current_service.id, template_id=template.id) }}" class="pill-separate-item">
|
||||
Upload recipients
|
||||
</a>
|
||||
</div>
|
||||
<div class="{{ 'column-half' if template.template_type == 'letter' else 'column-third' }}">
|
||||
<a href="{{ url_for(".send_test", service_id=current_service.id, template_id=template.id) }}" class="pill-separate-item">
|
||||
{{ 'Generate preview' if template.template_type == 'letter' else 'Send yourself a test' }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if
|
||||
current_user.has_permissions(permissions=['manage_templates'], admin_override=True) and
|
||||
template.template_type != 'letter'
|
||||
%}
|
||||
<div class="column-one-third">
|
||||
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}" class="pill-separate-item">
|
||||
Edit template
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %}
|
||||
<p class="bottom-gutter-1-2">
|
||||
<a href="{{ url_for(".send_messages", service_id=current_service.id, template_id=template.id) }}" class="heading-medium">
|
||||
Upload recipients
|
||||
</a>
|
||||
<a href="{{ url_for(".send_test", service_id=current_service.id, template_id=template.id) }}">
|
||||
Send yourself a test
|
||||
</a>
|
||||
 
|
||||
<a href="{{ url_for(".send_test", service_id=current_service.id, template_id=template.id) }}" class="heading-medium">
|
||||
Send yourself a test
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% 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) }}" class="edit-template-link">Edit</a>
|
||||
{% endif %}
|
||||
{% 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(".send_from_api", service_id=current_service.id, template_id=template.id) }}">API info</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column-whole">
|
||||
{{ template|string }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user