mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
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:
@@ -48,6 +48,7 @@
|
|||||||
|
|
||||||
.page-footer {
|
.page-footer {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
min-height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-status {
|
.notification-status {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
{% if template.template_type != 'letter' or not request.args.from_test %}
|
{% 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>
|
<button type="submit" class="button">Send {{ count_of_recipients }} {{ message_count_label(count_of_recipients, template.template_type, suffix='') }}</button>
|
||||||
{% else %}
|
{% 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 %}
|
{% endif %}
|
||||||
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
|
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
|
<a href="{{ back_link }}" class="page-footer-back-link">Back</a>
|
||||||
{% if template.template_type == 'letter' %}
|
{% 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 %}
|
{% endif %}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -51,22 +51,24 @@
|
|||||||
<p>
|
<p>
|
||||||
Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}
|
Estimated delivery date: {{ estimated_letter_delivery_date|string|format_date_short }}
|
||||||
</p>
|
</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 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ template|string }}
|
{{ template|string }}
|
||||||
|
|
||||||
{% if template.template_type != 'letter' %}
|
{% if template.template_type == 'letter' %}
|
||||||
|
<div class="js-stick-at-bottom-when-scrolling">
|
||||||
{% if template.template_type == 'email' %}<div class="js-stick-at-bottom-when-scrolling">{% endif %}
|
<div class="page-footer">
|
||||||
|
<div> </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) }}
|
{{ ajax_block(partials, updates_url, 'status', finished=finished) }}
|
||||||
|
|
||||||
{% if template.template_type == 'email' %}</div>{% endif %}
|
|
||||||
|
|
||||||
{% 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 %}
|
{% if current_user.has_permissions('send_messages') and current_user.has_permissions('view_activity') and template.template_type == 'sms' and can_receive_inbound %}
|
||||||
|
|||||||
@@ -2803,7 +2803,7 @@ def test_one_off_letters_have_download_link(
|
|||||||
template_id=fake_uuid,
|
template_id=fake_uuid,
|
||||||
filetype='pdf',
|
filetype='pdf',
|
||||||
)
|
)
|
||||||
assert page.select_one('a[download]').text == 'Download as a printable PDF'
|
assert page.select_one('a[download]').text == 'Download as a PDF'
|
||||||
|
|
||||||
|
|
||||||
def test_send_one_off_letter_errors_in_trial_mode(
|
def test_send_one_off_letter_errors_in_trial_mode(
|
||||||
@@ -2848,7 +2848,7 @@ def test_send_one_off_letter_errors_in_trial_mode(
|
|||||||
|
|
||||||
assert not page.select('[type=submit]')
|
assert not page.select('[type=submit]')
|
||||||
assert page.select_one('.page-footer-back-link').text == 'Back'
|
assert page.select_one('.page-footer-back-link').text == 'Back'
|
||||||
assert page.select_one('a[download]').text == 'Download as a printable PDF'
|
assert page.select_one('a[download]').text == 'Download as a PDF'
|
||||||
|
|
||||||
|
|
||||||
def test_check_messages_shows_over_max_row_error(
|
def test_check_messages_shows_over_max_row_error(
|
||||||
|
|||||||
Reference in New Issue
Block a user