mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 17:45:32 -04:00
Add line to template page if you can’t do anything
If someone has no permissions but needs permissions the thing they’re probably going to need is to send a message or edit a template. The place they will probably come to is the place where the buttons would be – users with these permissions are finding the thing they need to do on this page. So this commit adds a line to this page which (hopefully) makes it clear they’re in the right place, but need to go and speak to someone.
This commit is contained in:
@@ -44,6 +44,11 @@
|
||||
margin-top: $gutter-half;
|
||||
}
|
||||
|
||||
.top-gutter-1-3 {
|
||||
@extend %top-gutter;
|
||||
margin-top: $gutter / 3;
|
||||
}
|
||||
|
||||
%bottom-gutter,
|
||||
.bottom-gutter {
|
||||
@extend %contain-floats;
|
||||
|
||||
@@ -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