Only show the link to use list if service has lists

Most services won’t be interested in the contact list feature, so we
shouldn’t clutter up the interface with the extra link.
This commit is contained in:
Chris Hill-Scott
2020-03-16 10:14:11 +00:00
parent 6c2021aeb2
commit 31d2fd9b58
3 changed files with 33 additions and 1 deletions

View File

@@ -33,7 +33,7 @@
<div class="govuk-grid-column-full">
{% if link_to_upload %}
<a class="govuk-link govuk-link--no-visited-state govuk-!-margin-right-3" href="{{ url_for('.send_messages', service_id=current_service.id, template_id=template.id) }}">Upload a list of {{ recipient_count_label(999, template.template_type) }}</a>
{% if current_user.platform_admin %}
{% if current_user.platform_admin and current_service.contact_lists %}
<a class="govuk-link govuk-link--no-visited-state govuk-!-margin-right-3" href="{{ url_for('.choose_from_contact_list', service_id=current_service.id, template_id=template.id) }}">Use a saved list</a>
{% endif %}
{% endif %}