Merge pull request #2752 from alphagov/remove-folder-flag

Remove code that is redundant now that all users have folders
This commit is contained in:
Chris Hill-Scott
2019-02-13 17:10:24 +00:00
committed by GitHub
9 changed files with 49 additions and 323 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

@@ -15,14 +15,14 @@
Sending {{ notification_type }} has been disabled for your service.
</p>
<p>
If you need to send {{ notification_type }}
If you need to send {{ notification_type }}
<a href="{{ url_for('.support') }}">get in touch with the GOV.UK Notify team</a>.
</p>
{% set
back_link_dict = {
'add_new_template': {
'url' : '.add_template_by_type', 'text': 'Back to add new template'
'url' : '.choose_template', 'text': 'Back to templates'
},
'templates': {
'url' : '.choose_template', 'text' : 'Back to templates'

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}