From e842e3dd8cae0bf49c2bf2d331452c5bc7e5ea7f Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Mon, 4 Nov 2024 15:10:17 +0000 Subject: [PATCH 1/3] Remove take_part page examples --- config/govuk_examples.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/config/govuk_examples.yml b/config/govuk_examples.yml index f19693a31..0f8adcaab 100644 --- a/config/govuk_examples.yml +++ b/config/govuk_examples.yml @@ -136,19 +136,6 @@ statistics_announcement_8: '/government/statistics/announcements/enterprise-inve statistics_announcement_9: '/government/statistics/announcements/esa-outcomes-of-work-capability-assessments-including-mandatory-reconsiderations-and-appeals-september-2016' statistics_announcement_10: '/government/statistics/announcements/independent-schools-inspection-outcomes-official-statistics-as-at-31-march-2016' -take_part: '/government/get-involved/take-part/become-a-councillor' - -# Most visited take_part pages (2 September 2016) -take_part_1: '/government/get-involved/take-part/volunteer' -take_part_2: '/government/get-involved/take-part/national-citizen-service' -take_part_3: '/government/get-involved/take-part/set-up-a-new-school' -take_part_4: '/government/get-involved/take-part/help-run-a-charity' -take_part_5: '/government/get-involved/take-part/volunteer-as-a-school-governor' -take_part_6: '/government/get-involved/take-part/set-up-a-town-or-parish-council' -take_part_7: '/government/get-involved/take-part/start-a-public-service-mutual' -take_part_8: '/government/get-involved/take-part/take-over-a-local-pub-shop-or-green-space-for-the-community' -take_part_9: '/government/get-involved/take-part/create-a-community-library' - topical_event_about_page_slim: '/government/topical-events/battle-of-the-somme-centenary-commemorations/about' topical_event_about_page: '/government/topical-events/ebola-virus-government-response/about' From 9559fc4b90b734a7a91d85ee9027ebb0d0ccb232 Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Mon, 4 Nov 2024 15:12:56 +0000 Subject: [PATCH 2/3] Remove take_part page presenter, views and tests --- app/presenters/take_part_presenter.rb | 14 --------- app/views/content_items/take_part.html.erb | 35 --------------------- test/integration/take_part_test.rb | 17 ---------- test/presenters/take_part_presenter_test.rb | 15 --------- 4 files changed, 81 deletions(-) delete mode 100644 app/presenters/take_part_presenter.rb delete mode 100644 app/views/content_items/take_part.html.erb delete mode 100644 test/integration/take_part_test.rb delete mode 100644 test/presenters/take_part_presenter_test.rb diff --git a/app/presenters/take_part_presenter.rb b/app/presenters/take_part_presenter.rb deleted file mode 100644 index d36a40f24..000000000 --- a/app/presenters/take_part_presenter.rb +++ /dev/null @@ -1,14 +0,0 @@ -class TakePartPresenter < ContentItemPresenter - include ContentItem::Body - include ContentItem::TitleAndContext - - def image - content_item["details"]["image"] - end - - def title_and_context - super.tap do |t| - t.delete(:average_title_length) - end - end -end diff --git a/app/views/content_items/take_part.html.erb b/app/views/content_items/take_part.html.erb deleted file mode 100644 index ed124a4c1..000000000 --- a/app/views/content_items/take_part.html.erb +++ /dev/null @@ -1,35 +0,0 @@ -<% content_for :extra_head_content do %> - <%= machine_readable_metadata( - schema: :article - ) %> -<% end %> - -
-
- <%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %> - <%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %> -
- - <%= render 'shared/translations' %> -
- -
-
-
- <%= render 'components/figure', - src: @content_item.image["url"], - alt: @content_item.image["alt_text"], - credit: @content_item.image["credit"], - caption: @content_item.image["caption"] if @content_item.image %> - - <%= render "govuk_publishing_components/components/govspeak", { - direction: page_text_direction - } do %> - <%= raw(@content_item.body) %> - <% end %> -
-
- <%= render 'shared/sidebar_navigation' %> -
- -<%= render 'shared/footer_navigation' %> diff --git a/test/integration/take_part_test.rb b/test/integration/take_part_test.rb deleted file mode 100644 index b4d01259e..000000000 --- a/test/integration/take_part_test.rb +++ /dev/null @@ -1,17 +0,0 @@ -require "test_helper" - -class TakePartTest < ActionDispatch::IntegrationTest - test "take part pages" do - setup_and_visit_content_item("take_part") - - assert_has_component_title(@content_item["title"]) - assert page.has_text?(@content_item["description"]) - - assert page.has_text?("There are roughly 20,000 local councillors in England. Councillors are elected to the local council to represent their own local community, so they must either live or work in the area.") - end - - test "does not render with the single page notification button" do - setup_and_visit_content_item("take_part") - assert_not page.has_css?(".gem-c-single-page-notification-button") - end -end diff --git a/test/presenters/take_part_presenter_test.rb b/test/presenters/take_part_presenter_test.rb deleted file mode 100644 index 61204af38..000000000 --- a/test/presenters/take_part_presenter_test.rb +++ /dev/null @@ -1,15 +0,0 @@ -require "presenter_test_helper" - -class TakePartPresenterTest < PresenterTestCase - def schema_name - "take_part" - end - - test "presents the basic details of a content item" do - assert_equal schema_item["description"], presented_item.description - assert_equal schema_item["schema_name"], presented_item.schema_name - assert_equal schema_item["locale"], presented_item.locale - assert_equal schema_item["title"], presented_item.title - assert_equal schema_item["details"]["body"], presented_item.body - end -end From d2d1b490d2d9010b8e4def4b6a88296d2820a0ea Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Mon, 4 Nov 2024 15:13:11 +0000 Subject: [PATCH 3/3] Remove take_part schema references --- app/controllers/development_controller.rb | 1 - test/support/govuk_content_schema_examples.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/app/controllers/development_controller.rb b/app/controllers/development_controller.rb index 14bbe1421..9d8816f3e 100644 --- a/app/controllers/development_controller.rb +++ b/app/controllers/development_controller.rb @@ -22,7 +22,6 @@ def index speech statistical_data_set statistics_announcement - take_part topical_event_about_page travel_advice working_group] diff --git a/test/support/govuk_content_schema_examples.rb b/test/support/govuk_content_schema_examples.rb index d143b76a4..aa38b5f26 100644 --- a/test/support/govuk_content_schema_examples.rb +++ b/test/support/govuk_content_schema_examples.rb @@ -50,7 +50,6 @@ def supported_schemas service_manual_service_standard service_manual_topic statistics_announcement - take_part topical_event_about_page working_group ]