mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #1952 from alphagov/no-no-permissions-banner
Replace ‘no permissions’ banner with a line on the template page
This commit is contained in:
@@ -15,12 +15,8 @@
|
||||
<div class="dashboard">
|
||||
|
||||
<h1 class="visuallyhidden">Dashboard</h1>
|
||||
{% if current_user.has_permissions('manage_templates') %}
|
||||
{% if not templates %}
|
||||
{% include 'views/dashboard/write-first-messages.html' %}
|
||||
{% endif %}
|
||||
{% elif not current_user.has_permissions('send_messages', 'manage_api_keys') %}
|
||||
{% include 'views/dashboard/no-permissions-banner.html' %}
|
||||
{% if current_user.has_permissions('manage_templates') and not templates %}
|
||||
{% include 'views/dashboard/write-first-messages.html' %}
|
||||
{% endif %}
|
||||
|
||||
{{ ajax_block(partials, updates_url, 'upcoming') }}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% call banner_wrapper(type="warning") %}
|
||||
You only have permission to view this service. To send messages, edit
|
||||
templates or manage team members, contact the person who invited you.
|
||||
{% endcall %}
|
||||
@@ -1,8 +1,16 @@
|
||||
{% from 'components/message-count-label.html' import message_count_label %}
|
||||
|
||||
<div class="column-whole">
|
||||
{% if template._template.archived %}
|
||||
<p class="hint">
|
||||
This template was deleted {{ template._template.updated_at|format_datetime_relative }}.
|
||||
</p>
|
||||
{% elif not current_user.has_permissions('send_messages', 'manage_api_keys', 'manage_templates', 'manage_service') %}
|
||||
<p class="top-gutter-1-3 {% if template.template_type != 'sms' %}bottom-gutter{% endif %}">
|
||||
If you need to send this
|
||||
{{ message_count_label(1, template.template_type, suffix='') }}
|
||||
or edit this template, contact your manager.
|
||||
</p>
|
||||
{% else %}
|
||||
<div class="bottom-gutter-2-3">
|
||||
<div class="grid-row">
|
||||
|
||||
Reference in New Issue
Block a user