From 57bb9b87effdfa52ef96cc6c10a328b697ae29d2 Mon Sep 17 00:00:00 2001 From: Dilwoar Hussain Date: Tue, 27 Oct 2020 15:24:22 +0000 Subject: [PATCH 1/2] Add print link to detailed guide # What Adds print link to detailed guides # Why User research found that users were not clear on how to print pages. https://trello.com/c/zSFv4dxR/497-add-the-print-button-to-c19-pages-that-dont-have-it --- app/views/content_items/detailed_guide.html.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/content_items/detailed_guide.html.erb b/app/views/content_items/detailed_guide.html.erb index f609e5fc9..4ef6ab5e3 100644 --- a/app/views/content_items/detailed_guide.html.erb +++ b/app/views/content_items/detailed_guide.html.erb @@ -24,6 +24,10 @@ <%= render 'components/important-metadata', items: @content_item.important_metadata %> <%= render "components/contents-list-with-body", contents: @content_item.contents do %> + <%= render "govuk_publishing_components/components/print_link", { + margin_top: 0, + margin_bottom: 6, + } %> <%= render 'govuk_publishing_components/components/govspeak', @content_item.govspeak_body %>
@@ -34,6 +38,10 @@ } %>
<% end %> + <%= render "govuk_publishing_components/components/print_link", { + margin_top: 0, + margin_bottom: 6, + } %> <%= render 'shared/sidebar_navigation' %> From 1b4c3b9e042a34b2f976a0de1494adba161dd59e Mon Sep 17 00:00:00 2001 From: Dilwoar Hussain Date: Thu, 29 Oct 2020 11:40:40 +0000 Subject: [PATCH 2/2] Add print button to html publications --- app/assets/stylesheets/views/_html-publication.scss | 6 ++++++ app/views/content_items/html_publication.html.erb | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/app/assets/stylesheets/views/_html-publication.scss b/app/assets/stylesheets/views/_html-publication.scss index b74071c3e..0b1ecbd82 100644 --- a/app/assets/stylesheets/views/_html-publication.scss +++ b/app/assets/stylesheets/views/_html-publication.scss @@ -56,6 +56,12 @@ display: none; } + .govuk-sticky-element { + .govuk-sticky-element__print-link { + margin-left: govuk-spacing(3); + } + } + @include govuk-media-query($until: desktop) { .govuk-sticky-element--enabled { position: static; diff --git a/app/views/content_items/html_publication.html.erb b/app/views/content_items/html_publication.html.erb index 6da410c8b..7e185ffd4 100644 --- a/app/views/content_items/html_publication.html.erb +++ b/app/views/content_items/html_publication.html.erb @@ -43,6 +43,10 @@ <% if @content_item.contents.any? %>
<%= render 'govuk_publishing_components/components/contents_list', contents: @content_item.contents, format_numbers: true %> + <%= render "govuk_publishing_components/components/print_link", { + margin_top: 0, + margin_bottom: 6, + } %>
<% end %> @@ -58,5 +62,11 @@
<%= render 'components/back-to-top', href: "#contents" %> +