mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 13:18:25 -04:00
Use folder buttons in empty state
It’s confusing to have one way of adding things when your service is new (green button) but a different way once you’ve added your first thing (the new grey buttons). For services that have a `edit_folders` permission, this commit standardises on the grey buttons for a consistent experience.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% from "components/checkbox.html" import unlabelled_checkbox %}
|
||||
{% from "components/message-count-label.html" import folder_contents_count, message_count_label %}
|
||||
|
||||
{% if not template_list.templates_to_show %}
|
||||
{% if template_list.template_folder_id and not template_list.templates_to_show %}
|
||||
<p class="template-list-empty">
|
||||
{% if template_list.folder_is_empty %}
|
||||
This folder is empty
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
emails or text messages
|
||||
{%- endif %}.
|
||||
</p>
|
||||
<a href="{{ url_for('.add_template_by_type', service_id=current_service.id) }}" class="button">Add a new template</a>
|
||||
{% else %}
|
||||
<p>
|
||||
You need to ask your service manager to add templates before you can send
|
||||
@@ -71,7 +70,7 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% if show_template_nav %}
|
||||
<div class="bottom-gutter">
|
||||
{{ pill(template_nav_items, current_value=template_type, show_count=False) }}
|
||||
@@ -91,7 +90,10 @@
|
||||
|
||||
{% else %}
|
||||
{% include 'views/templates/_template_list.html' %}
|
||||
{% if (not current_service.all_templates) and (not current_service.all_template_folders) and current_user.has_permissions('manage_templates') %}
|
||||
<a href="{{ url_for('.add_template_by_type', service_id=current_service.id) }}" class="button">Add a new template</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user