Merge pull request #1783 from alphagov/enable-download-link

Enable the download CSV file for notifications
This commit is contained in:
Rebecca Law
2018-01-17 11:12:56 +00:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -157,7 +157,8 @@ def download_notifications_csv(service_id):
status=filter_args.get('status'),
page=request.args.get('page', 1),
page_size=5000,
format_for_csv=True
format_for_csv=True,
template_type=filter_args.get('message_type')
)
),
mimetype='text/csv',

View File

@@ -47,11 +47,11 @@
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
</form>
{% endif %}
<!--<p class="bottom-gutter">-->
<!--<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>-->
<!--&emsp;-->
<!--Data available for 7 days-->
<!--</p>-->
<p class="bottom-gutter">
<a href="{{ download_link }}" download="download" class="heading-small">Download this report</a>
&emsp;
Data available for 7 days
</p>
{{ ajax_block(
partials,
url_for('.get_notifications_as_json', service_id=current_service.id, message_type=message_type, status=status, page=page),