Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use heading component from gem #902

Merged
merged 1 commit into from
May 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions app/views/content_items/_publication_inline_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<%= 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 %>

<div aria-labelledby="documents-title">
<%= render 'govuk_component/govspeak',
content: @content_item.documents,
direction: page_text_direction %>
</div>

<%= 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 %>

<div aria-labelledby="details-title">
<%= render 'govuk_component/govspeak',
Expand Down
16 changes: 8 additions & 8 deletions app/views/content_items/consultation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
<%= 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 %>
<div class="consultation-outcome">
<%= render 'govuk_component/govspeak',
content: @content_item.final_outcome_documents,
direction: page_text_direction %>
</div>
<% 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 %>
<div class="consultation-outcome-detail">
<%= render 'govuk_component/govspeak',
content: @content_item.final_outcome_detail,
Expand All @@ -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 %>
<div class="consultation-feedback-documents">
<%= render 'govuk_component/govspeak',
content: @content_item.public_feedback_documents,
Expand All @@ -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 %>
<div class="consultation-feedback">
<%= render 'govuk_component/govspeak',
content: @content_item.public_feedback_detail,
Expand All @@ -68,7 +68,7 @@
<% if @content_item.final_outcome? %>
<section class="original-consultation">
<header>
<%= 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 %>
</header>
<% end %>

Expand Down Expand Up @@ -102,11 +102,11 @@


<div class="consultation-description">
<%= 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 %>
<div class="consultation-documents">
<%= render 'govuk_component/govspeak',
content: @content_item.documents,
Expand All @@ -117,7 +117,7 @@

<% if @content_item.ways_to_respond? %>
<div class="consultation-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 %>
<div class="call-to-action">
Expand Down