Merge pull request #2898 from alphagov/user-permission-count

add count of folders visible per user to the team members page
This commit is contained in:
Leo Hemsted
2019-04-05 14:20:52 +01:00
committed by GitHub
5 changed files with 104 additions and 6 deletions

View File

@@ -57,6 +57,20 @@
{% endif %}
</div>
{% endif %}
{# only show if the service has folders #}
{% if current_service.has_permission('edit_folder_permissions') and current_service.all_template_folders %}
<div class="tick-cross-list-hint">
{% set folder_count = user.template_folders_for_service(current_service) | length %}
{% if folder_count == 0 %}
Cannot see any folders
{% elif folder_count != current_service.all_template_folders | length %}
Can see {{ folder_count }} folder{% if folder_count > 1 %}s{% endif %}
{% else %}
Can see all folders
{% endif%}
</div>
{% endif %}
</div>
{% if current_user.has_permissions('manage_service') %}
<li class="tick-cross-list-edit-link">