-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The context_label is being defined by "schema_name: "publication" - should this be present this determines whether we class this as a "publication or consultation" Ensure title of page has "context_inside" Content prefixed to a "publication or consultation" Should content be [withdrawn] this also adds the "context_label" (or grey text) to the title scoped to items that have been identified as a "publication or consultation" Remove the loops around the attachments and just apply the context_label in all cases. Remove word "overview" from "context_inside"
- Loading branch information
Chris Yoong
committed
Dec 1, 2021
1 parent
dab1815
commit 8e06b17
Showing
4 changed files
with
38 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,7 @@ | ||
<% | ||
context_string = t("content_item.schema_name.#{@content_item.document_type}", count: 1); | ||
context_inside = false; | ||
%> | ||
<% @content_item&.featured_attachments.each do |fa| %> | ||
<% return if !@content_item.attachment_details(fa).present? %> | ||
<% if @content_item.attachment_details(fa)['title'] == @content_item.title %> | ||
<% content_for :title do %> | ||
<%= t("content_item.schema_name.#{@content_item.document_type}.overview", count: 1) %>: <%= @content_item.title %> | ||
<% end %> | ||
<% | ||
context_string = t("content_item.schema_name.#{@content_item.document_type}.overview", count: 1) << ":" | ||
context_inside = true | ||
%> | ||
<% break %> | ||
<% end %> | ||
<% end %> | ||
<%= render 'govuk_publishing_components/components/title', | ||
context: context_string, | ||
context_locale: t_locale_fallback("content_item.schema_name.#{@content_item.document_type}", count: 1), | ||
context_inside: context_inside, | ||
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) , | ||
context_inside: true, | ||
title: @content_item.title, | ||
average_title_length: "long" | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters