mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
On the send messages and manage team pages we have big green buttons for adding/inviting a new template or team member. On the add template page it was at the bottom, and often got missed. On the manage team page it was at the top, but maybe too prominent because it’s big and green. This commit tries putting it in the top right of the page instead (except when the template page is empty, in which case it’s unchanged).
74 lines
2.6 KiB
HTML
74 lines
2.6 KiB
HTML
{% 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 %}
|
||
{{ page_heading }} – GOV.UK Notify
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
|
||
{% if not templates %}
|
||
|
||
<h1 class="heading-large">{{ page_heading }}</h1>
|
||
|
||
{% if current_user.has_permissions(['manage_templates']) %}
|
||
<a href="{{ url_for('.add_service_template', service_id=service_id, template_type=template_type) }}" class="button">Add a new template</a>
|
||
{% endif %}
|
||
|
||
{% else %}
|
||
|
||
<div class="grid-row">
|
||
<div class="column-two-thirds">
|
||
<h1 class="heading-large">{{ page_heading }}</h1>
|
||
</div>
|
||
{% if current_user.has_permissions(['manage_templates']) %}
|
||
<div class="column-one-third">
|
||
<a href="{{ url_for('.add_service_template', service_id=service_id, template_type=template_type) }}" class="button align-with-heading">Add new template</a>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
|
||
{% if not has_jobs %}
|
||
{% if current_user.has_permissions(['send_texts', 'send_emails', 'send_letters'], or_=True) %}
|
||
{{ banner(
|
||
"""
|
||
Send yourself a test message
|
||
""",
|
||
subhead='Next step',
|
||
type="tip"
|
||
)}}
|
||
{% endif %}
|
||
{% endif %}
|
||
<div class="grid-row">
|
||
{% for template in templates %}
|
||
<div class="column-two-thirds">
|
||
{% if 'email' == template_type %}
|
||
{{ email_message(
|
||
template.subject,
|
||
template.formatted_as_markup,
|
||
name=template.name
|
||
) }}
|
||
{% elif 'sms' == template_type %}
|
||
{{ sms_message(template.formatted_as_markup, name=template.name) }}
|
||
{% endif %}
|
||
</div>
|
||
<div class="column-one-third">
|
||
<div class="sms-message-use-links">
|
||
{% if current_user.has_permissions(['send_texts', 'send_emails', 'send_letters']) %}
|
||
<a href="{{ url_for(".send_messages", service_id=service_id, template_id=template.id) }}">Add recipients</a>
|
||
<a href="{{ url_for(".send_message_to_self", service_id=service_id, template_id=template.id) }}">Send yourself a test</a>
|
||
{% endif %}
|
||
{% if current_user.has_permissions(['manage_templates']) %}
|
||
<a href="{{ url_for(".edit_service_template", service_id=service_id, template_id=template.id) }}">Edit template</a>
|
||
{% endif %}
|
||
</div>
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% endblock %}
|