mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-18 12:16:53 -04:00
Add filetype to all links to download user reports / examples
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
</p>
|
||||
{% elif notifications %}
|
||||
<p class="{% if job.template_type != 'letter' %}bottom-gutter{% endif %}">
|
||||
<a href="{{ download_link }}" download class="govuk-link govuk-link--no-visited-state heading-small">Download this report</a>
|
||||
<a href="{{ download_link }}" download class="govuk-link govuk-link--no-visited-state heading-small">Download this report (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
 
|
||||
<span id="time-left">{{ time_left }}</span>
|
||||
</p>
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
{% if current_user.has_permissions('view_activity') %}
|
||||
<p class="bottom-gutter">
|
||||
<a href="{{ download_link }}" download="download" class="govuk-link govuk-link--no-visited-state govuk-!-font-weight-bold">Download this report</a>
|
||||
<a href="{{ download_link }}" download="download" class="govuk-link govuk-link--no-visited-state govuk-!-font-weight-bold">Download this report (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
 
|
||||
Data available for {{ partials.service_data_retention_days }} days
|
||||
</p>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
{% else %}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
<p class="govuk-!-margin-bottom-1">
|
||||
<a href="{{ download_link }}" download="download" class="govuk-link govuk-link--no-visited-state govuk-!-font-weight-bold">Download this report</a>
|
||||
<a href="{{ download_link }}" download="download" class="govuk-link govuk-link--no-visited-state govuk-!-font-weight-bold">Download this report (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{{ page_header('Returned letters for {}'.format(reported_at|format_date_normal)) }}
|
||||
|
||||
<p class="bottom-gutter">
|
||||
<a download href="{{ url_for('.returned_letters_report', service_id=current_service.id, reported_at=reported_at) }}" class="govuk-link heading-small">Download this report</a>
|
||||
<a download href="{{ url_for('.returned_letters_report', service_id=current_service.id, reported_at=reported_at) }}" class="govuk-link heading-small">Download this report (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
</p>
|
||||
|
||||
<div class="dashboard-table">
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
{% endcall %}
|
||||
</div>
|
||||
<p class="table-show-more-link">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}" download>Download this example</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.get_example_csv', service_id=current_service.id, template_id=template.id) }}" download>Download this example (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
</p>
|
||||
|
||||
<h2 class="heading-medium">Your file will populate this template ({{ template.name }})</h2>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('main.delete_contact_list', service_id=current_service.id, contact_list_id=contact_list.id) }}">Delete this contact list</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
<a class="govuk-link govuk-link--no-visited-state page-footer-right-aligned-link-without-button" download href="{{ url_for('main.download_contact_list', service_id=current_service.id, contact_list_id=contact_list.id) }}">Download this contact list</a>
|
||||
<a class="govuk-link govuk-link--no-visited-state page-footer-right-aligned-link-without-button" download href="{{ url_for('main.download_contact_list', service_id=current_service.id, contact_list_id=contact_list.id) }}">Download this contact list (<abbr title="Comma separated values">CSV</abbr>)</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -666,7 +666,7 @@ def test_organisation_services_links_to_downloadable_report(
|
||||
page = client_request.get('.organisation_dashboard', org_id=ORGANISATION_ID)
|
||||
|
||||
link_to_report = page.select_one('a[download]')
|
||||
assert normalize_spaces(link_to_report.text) == 'Download this report'
|
||||
assert normalize_spaces(link_to_report.text) == 'Download this report (CSV)'
|
||||
assert link_to_report.attrs["href"] == url_for(
|
||||
'.download_organisation_usage_report',
|
||||
org_id=ORGANISATION_ID,
|
||||
|
||||
@@ -106,7 +106,7 @@ def test_should_show_page_for_one_job(
|
||||
job_id=fake_uuid,
|
||||
status=status_argument
|
||||
)
|
||||
assert csv_link.text == 'Download this report'
|
||||
assert csv_link.text == 'Download this report (CSV)'
|
||||
assert page.find('span', {'id': 'time-left'}).text == 'Data available for 7 days'
|
||||
|
||||
assert normalize_spaces(page.select_one('tbody tr').text) == normalize_spaces(
|
||||
|
||||
@@ -146,7 +146,7 @@ def test_returned_letters_page_with_many_letters(
|
||||
expected_message
|
||||
)
|
||||
assert page.select_one('a[download]').text == (
|
||||
'Download this report'
|
||||
'Download this report (CSV)'
|
||||
)
|
||||
assert page.select_one('a[download]')['href'] == url_for(
|
||||
'.returned_letters_report',
|
||||
|
||||
Reference in New Issue
Block a user