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

Revert PRs #2238 and #2292 #2309

Merged
merged 2 commits into from
Dec 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
26 changes: 0 additions & 26 deletions app/views/content_items/_context_and_title.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/content_items/consultation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render 'context_and_title' %>
<%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %>
</div>
<%= render 'shared/translations' %>
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/views/content_items/publication.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render 'context_and_title' %>
<%= 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" %>
</div>
<%= render 'shared/translations' %>

Expand Down
23 changes: 0 additions & 23 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ en:
closed_consultation:
one: Closed consultation
other: Closed consultations
overview: Closed consultation overview
cma_case:
one: Competition and Markets Authority case
other: Competition and Markets Authority cases
Expand All @@ -97,25 +96,21 @@ en:
consultation_outcome:
one: Consultation outcome
other: Consultation outcomes
overview: Consultation outcome overview
corporate_information_page:
one: Information page
other: Information pages
corporate_report:
one: Corporate report
other: Corporate reports
overview: Corporate reports overview
correspondence:
one: Correspondence
other: Correspondences
overview: Correspondence overview
countryside_stewardship_grant:
one: Countryside Stewardship grant
other: Countryside Stewardship grants
decision:
one: Decision
other: Decisions
overview: Decision overview
detailed_guide:
one: Guidance
other: Guidance
Expand Down Expand Up @@ -146,43 +141,36 @@ en:
foi_release:
one: FOI release
other: FOI releases
overview: FOI release overview
form:
one: Form
other: Forms
overview: Forms overview
government_response:
one: Government response
other: Government responses
guidance:
one: Guidance
other: Guidance
overview: Guidance overview
impact_assessment:
one: Impact assessment
other: Impact assessments
overview: Impact assessment overview
imported:
one: imported - awaiting type
other: imported - awaiting type
independent_report:
one: Independent report
other: Independent reports
overview: Independent report overview
international_development_fund:
one: International development funding
other: International development funding
international_treaty:
one: International treaty
other: International treaties
overview: International treaty overview
maib_report:
one: Marine Accident Investigation Branch report
other: Marine Accident Investigation Branch reports
map:
one: Map
other: Maps
overview: Map overview
medical_safety_alert:
one: Alerts and recalls for drugs and medical devices
other: Alerts and recalls for drugs and medical devices
Expand All @@ -192,7 +180,6 @@ en:
national_statistics:
one: National statistics
other: National statistics
overview: National statistics overview
national_statistics_announcement:
one: National statistics announcement
other: National statistics announcements
Expand All @@ -205,21 +192,18 @@ en:
notice:
one: Notice
other: Notices
overview: Notice overview
official:
one: Official statistics announcement
other: Official statistics announcements
official_statistics:
one: Official Statistics
other: Official statistics
overview: Official statistics overview
official_statistics_announcement:
one: Official statistics announcement
other: Official statistics announcements
open_consultation:
one: Open consultation
other: Open consultations
overview: Open consultation overview
oral_statement:
one: Oral statement to Parliament
other: Oral statements to Parliament
Expand All @@ -229,14 +213,12 @@ en:
policy_paper:
one: Policy paper
other: Policy papers
overview: Policy paper overview
press_release:
one: Press release
other: Press releases
promotional:
one: Promotional material
other: Promotional material
overview: Promotional material overview
publication:
one: Publication
other: Publications
Expand All @@ -246,11 +228,9 @@ en:
regulation:
one: Regulation
other: Regulations
overview: Regulation overview
research:
one: Research and analysis
other: Research and analysis
overview: Research and analysis overview
residential_property_tribunal_decision:
one: Residential property tribunal decision
other: Residential property tribunal decisions
Expand All @@ -269,7 +249,6 @@ en:
standard:
one: Standard
other: Standards
overview: Standard overview
statement_to_parliament:
one: Statement to Parliament
other: Statements to Parliament
Expand All @@ -282,7 +261,6 @@ en:
statutory_guidance:
one: Statutory guidance
other: Statutory guidance
overview: Statutory guidance overview
take_part:
one: Take part
other: Take part
Expand All @@ -295,7 +273,6 @@ en:
transparency:
one: Transparency data
other: Transparency data
overview: Transparency data overview
utaac_decision:
one: Administrative appeals tribunal decision
other: Administrative appeals tribunal decisions
Expand Down
19 changes: 0 additions & 19 deletions test/views/content_items/attachments.html.erb_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,4 @@ class ContentItemsAttachmentsTest < ActionView::TestCase
assert_includes rendered, "gem-c-govspeak"
assert_includes rendered, "some html"
end

test "renders overview title when attachment title matches parent" do
@content_item = PublicationPresenter.new(
{ "document_type" => "correspondence",
"title" => "Matching",
"details" => { "attachments" => [{ "id" => "attachment_id",
"title" => "Matching",
"url" => "some/url" }],
"featured_attachments" => %w[attachment_id] } },
"/publication",
ApplicationController.new.view_context,
)
render(
partial: "content_items/context_and_title",
)

assert_includes rendered, "Correspondence overview:"
assert_select "h1 span"
end
end