From ecc46df6970d7a43cc8a829f89c93612e2a2462e Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Tue, 15 May 2018 14:27:16 +0000 Subject: [PATCH] Use heading component from gem --- Gemfile | 2 +- Gemfile.lock | 10 +++++----- .../_publication_inline_body.html.erb | 8 ++++++-- app/views/content_items/consultation.html.erb | 16 ++++++++-------- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index f3ab659eb..9a49289ff 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'gds-api-adapters', '~> 52.5' gem 'govuk_ab_testing', '~> 2.4' gem 'govuk_app_config', '~> 1.5' gem 'govuk_frontend_toolkit', '~> 7.4' -gem 'govuk_publishing_components', '~> 7.1.0' +gem 'govuk_publishing_components', '~> 8.0.1' gem 'plek', '~> 2.1' gem 'slimmer', '~> 12.1' diff --git a/Gemfile.lock b/Gemfile.lock index d63b9355b..fede69efb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,7 +91,7 @@ GEM execjs (2.7.0) faker (1.8.7) i18n (>= 0.7) - faraday (0.15.0) + faraday (0.15.1) multipart-post (>= 1.2, < 3) ffi (1.9.23) gds-api-adapters (52.5.1) @@ -127,7 +127,7 @@ GEM govuk_frontend_toolkit (7.5.0) railties (>= 3.1.0) sass (>= 3.2.0) - govuk_publishing_components (7.1.0) + govuk_publishing_components (8.0.1) govspeak (>= 5.0.3) govuk_app_config govuk_frontend_toolkit @@ -186,11 +186,11 @@ GEM minitest (5.11.3) mocha (1.5.0) metaclass (~> 0.0.1) - money (6.11.1) + money (6.11.3) i18n (>= 0.6.4, < 1.1) multipart-post (2.0.0) netrc (0.11.0) - nio4r (2.3.0) + nio4r (2.3.1) nokogiri (1.8.2) mini_portile2 (~> 2.3.0) nokogumbo (1.5.0) @@ -368,7 +368,7 @@ DEPENDENCIES govuk_ab_testing (~> 2.4) govuk_app_config (~> 1.5) govuk_frontend_toolkit (~> 7.4) - govuk_publishing_components (~> 7.1.0) + govuk_publishing_components (~> 8.0.1) govuk_schemas (~> 3.1) htmlentities (~> 4.3) jasmine-rails diff --git a/app/views/content_items/_publication_inline_body.html.erb b/app/views/content_items/_publication_inline_body.html.erb index 768489455..a6072376b 100644 --- a/app/views/content_items/_publication_inline_body.html.erb +++ b/app/views/content_items/_publication_inline_body.html.erb @@ -1,6 +1,7 @@ <%= render 'govuk_publishing_components/components/heading', text: t("publication.documents", count: 5), # This should always be pluralised. - id: "documents-title" %> + id: "documents-title", + mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', @@ -8,7 +9,10 @@ direction: page_text_direction %>
-<%= render 'govuk_publishing_components/components/heading', text: t("publication.details"), id: "details-title" %> +<%= render 'govuk_publishing_components/components/heading', + text: t("publication.details"), + id: "details-title", + mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', diff --git a/app/views/content_items/consultation.html.erb b/app/views/content_items/consultation.html.erb index 8a872fc0a..29c5b7c5d 100644 --- a/app/views/content_items/consultation.html.erb +++ b/app/views/content_items/consultation.html.erb @@ -31,7 +31,7 @@ <%= render 'components/notice', title: 'This consultation has concluded' %> <% if @content_item.final_outcome_documents? %> - <%= render 'govuk_publishing_components/components/heading', text: "Download the full outcome" %> + <%= render 'govuk_publishing_components/components/heading', text: "Download the full outcome", mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', content: @content_item.final_outcome_documents, @@ -39,7 +39,7 @@
<% end %> - <%= render 'govuk_publishing_components/components/heading', text: "Detail of outcome" %> + <%= render 'govuk_publishing_components/components/heading', text: "Detail of outcome", mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', content: @content_item.final_outcome_detail, @@ -48,7 +48,7 @@ <% end %> <% if @content_item.public_feedback_documents? %> - <%= render 'govuk_publishing_components/components/heading', text: "Feedback received" %> + <%= render 'govuk_publishing_components/components/heading', text: "Feedback received", mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', content: @content_item.public_feedback_documents, @@ -57,7 +57,7 @@ <% end %> <% if @content_item.public_feedback_detail %> - <%= render 'govuk_publishing_components/components/heading', text: "Detail of feedback received" %> + <%= render 'govuk_publishing_components/components/heading', text: "Detail of feedback received", mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', content: @content_item.public_feedback_detail, @@ -68,7 +68,7 @@ <% if @content_item.final_outcome? %>
- <%= render 'govuk_publishing_components/components/heading', text: "Original consultation", id: "original-consultation-title", heading_level: 2 %> + <%= render 'govuk_publishing_components/components/heading', text: "Original consultation", id: "original-consultation-title", heading_level: 2, mobile_top_margin: true %>
<% end %> @@ -102,11 +102,11 @@
- <%= render 'govuk_publishing_components/components/heading', text: "Consultation description" %> + <%= render 'govuk_publishing_components/components/heading', text: "Consultation description", mobile_top_margin: true %> <%= render 'govuk_component/govspeak', @content_item.govspeak_body %> <% if @content_item.documents? %> - <%= render 'govuk_publishing_components/components/heading', text: "Documents" %> + <%= render 'govuk_publishing_components/components/heading', text: "Documents", mobile_top_margin: true %>
<%= render 'govuk_component/govspeak', content: @content_item.documents, @@ -117,7 +117,7 @@ <% if @content_item.ways_to_respond? %>
- <%= render 'govuk_publishing_components/components/heading', text: "Ways to respond" %> + <%= render 'govuk_publishing_components/components/heading', text: "Ways to respond", mobile_top_margin: true %> <% @ways_to_respond_body = capture do %> <% if @content_item.respond_online_url %>