Skip to content

Commit

Permalink
Merge pull request #2240 from alphagov/Use-devolved-nations-component…
Browse files Browse the repository at this point in the history
…-in-place-of-important-metadata-component-on-publication-page

Update devolved nations component uses to pass type property
  • Loading branch information
maxgds authored Oct 13, 2021
2 parents c91062f + 7c740e2 commit a7c2f29
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
5 changes: 4 additions & 1 deletion app/views/content_items/consultation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/devolved_nations", national_applicability: @content_item.national_applicability || {} %>
<%= render "govuk_publishing_components/components/devolved_nations", {
national_applicability: @content_item.national_applicability || {},
type: @content_item.schema_name
} %>

<% if @content_item.unopened? %>
<% content_item_unopened = capture do %>
Expand Down
5 changes: 4 additions & 1 deletion app/views/content_items/detailed_guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/devolved_nations", national_applicability: @content_item.national_applicability || {} %>
<%= render "govuk_publishing_components/components/devolved_nations", {
national_applicability: @content_item.national_applicability || {},
type: @content_item.schema_name
} %>

<%= render "components/contents-list-with-body", contents: @content_item.contents do %>
<%= render "govuk_publishing_components/components/print_link", {
Expand Down
13 changes: 8 additions & 5 deletions app/views/content_items/publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/title',
context: t("content_item.schema_name.#{@content_item.document_type}", count: 1),
context_locale: t_locale_fallback("content_item.schema_name.#{@content_item.document_type}", count: 1),
title: @content_item.title,
average_title_length: "long" %>
context: t("content_item.schema_name.#{@content_item.document_type}", count: 1),
context_locale: t_locale_fallback("content_item.schema_name.#{@content_item.document_type}", count: 1),
title: @content_item.title,
average_title_length: "long" %>
</div>
<%= render 'shared/translations' %>

Expand All @@ -27,7 +27,10 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<div class="responsive-bottom-margin">
<%= render "govuk_publishing_components/components/devolved_nations", national_applicability: @content_item.national_applicability || {} %>
<%= render "govuk_publishing_components/components/devolved_nations", {
national_applicability: @content_item.national_applicability || {},
type: @content_item.schema_name
} %>

<div class="responsive-bottom-margin">
<%= render "attachments",
Expand Down

0 comments on commit a7c2f29

Please sign in to comment.