Remove folders feature flag

Every service has this feature now[1] so we don’t need to check whether
or not it’s switched on any more.

1. https://github.com/alphagov/notifications-api/pull/2286
This commit is contained in:
Chris Hill-Scott
2019-02-11 16:06:46 +00:00
parent 0c823db970
commit 3a5bfeb7aa
7 changed files with 38 additions and 105 deletions

View File

@@ -13,7 +13,7 @@
<nav id=template-list>
{% for item in template_list %}
<div class="template-list-item {% if can_manage_folders %}template-list-item-with-checkbox{% endif %} {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
{% if can_manage_folders %}
{% if current_user.has_permissions('manage_templates') %}
{{ unlabelled_checkbox(
id='templates-or-folder-{}'.format(item.id),
name='templates_and_folders',

View File

@@ -48,7 +48,7 @@
{% else %}
<div class="grid-row {% if current_service.all_template_folders %}bottom-gutter-1-2{% else %}bottom-gutter-2-3{% endif %}">
<div class="{% if can_manage_folders %} column-five-sixths {% else %} column-two-thirds {% endif %}">
<div class="{% if current_user.has_permissions('manage_templates') %} column-five-sixths {% else %} column-two-thirds {% endif %}">
{{ folder_path(
folders=template_folder_path,
service_id=current_service.id,
@@ -58,12 +58,12 @@
) }}
</div>
{% if current_user.has_permissions('manage_templates') %}
{% if not can_manage_folders %}
{% if not current_user.has_permissions('manage_templates') %}
<div class="column-one-third">
<a href="{{ url_for('.add_template_by_type', service_id=current_service.id, template_folder_id=current_template_folder_id) }}" class="button align-with-heading">Add new template</a>
</div>
{% endif %}
{% if can_manage_folders and current_template_folder_id %}
{% if current_user.has_permissions('manage_templates') and current_template_folder_id %}
<div class="column-one-sixth">
<a href="{{ url_for('.manage_template_folder', service_id=current_service.id, template_folder_id=current_template_folder_id) }}" class="folder-heading-manage-link">Manage</a>
</div>
@@ -79,7 +79,7 @@
{{ live_search(target_selector='#template-list .template-list-item', show=show_search_box, form=search_form) }}
{% if can_manage_folders %}
{% if current_user.has_permissions('manage_templates') %}
{% call form_wrapper(
module='template-folder-form',
data_kwargs={'prev-state': templates_and_folders_form.op or None}