Merge pull request #2529 from alphagov/download-pdf-footer

Put download PDF link in the sticky footer on the sent letter page
This commit is contained in:
Chris Hill-Scott
2018-11-22 13:23:10 +00:00
committed by GitHub
5 changed files with 17 additions and 14 deletions

View File

@@ -48,6 +48,7 @@
.page-footer {
margin-bottom: 0;
min-height: 50px;
}
.notification-status {

View File

@@ -39,7 +39,7 @@
{% if template.template_type != 'letter' or not request.args.from_test %}
<button type="submit" class="button">Send {{ count_of_recipients }} {{ message_count_label(count_of_recipients, template.template_type, suffix='') }}</button>
{% else %}
<a href="{{ url_for('main.check_messages_preview', service_id=current_service.id, template_id=template.id, upload_id=upload_id, filetype='pdf') }}" download class="button">Download as a printable PDF</a>
<a href="{{ url_for('main.check_messages_preview', service_id=current_service.id, template_id=template.id, upload_id=upload_id, filetype='pdf') }}" download class="button">Download as a PDF</a>
{% endif %}
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
</form>

View File

@@ -65,7 +65,7 @@
{% endif %}
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
{% if template.template_type == 'letter' %}
<a href="{{ url_for('main.check_notification_preview', service_id=current_service.id, template_id=template.id, filetype='pdf') }}" download class="page-footer-right-aligned-link">Download as a printable PDF</a>
<a href="{{ url_for('main.check_notification_preview', service_id=current_service.id, template_id=template.id, filetype='pdf') }}" download class="page-footer-right-aligned-link">Download as a PDF</a>
{% endif %}
</form>
</div>

View File

@@ -51,22 +51,24 @@
<p>
Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}
</p>
<p class="bottom-gutter">
<a href="{{ url_for('main.view_letter_notification_as_preview', service_id=current_service.id, notification_id=notification_id, filetype='pdf') }}" download>Download as a PDF</a>
</p>
{% endif %}
{% endif %}
{{ template|string }}
{% if template.template_type != 'letter' %}
{% if template.template_type == 'email' %}<div class="js-stick-at-bottom-when-scrolling">{% endif %}
{% if template.template_type == 'letter' %}
<div class="js-stick-at-bottom-when-scrolling">
<div class="page-footer">
<div>&nbsp;</div>
<a class="page-footer-right-aligned-link" href="{{ url_for('main.view_letter_notification_as_preview', service_id=current_service.id, notification_id=notification_id, filetype='pdf') }}" download>Download as a PDF</a>
</div>
</div>
{% elif template.template_type == 'email' %}
<div class="js-stick-at-bottom-when-scrolling">
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
</div>
{% elif template.template_type == 'sms' %}
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
{% if template.template_type == 'email' %}</div>{% endif %}
{% endif %}
{% if current_user.has_permissions('send_messages') and current_user.has_permissions('view_activity') and template.template_type == 'sms' and can_receive_inbound %}