From 6a59a12213f4e72aa6f8e96427192d3af062ec43 Mon Sep 17 00:00:00 2001 From: Jessica Jones Date: Wed, 8 Feb 2023 12:38:15 +0000 Subject: [PATCH 1/3] Remove unwanted home breadcrumb from /service-toolkit - missing from https://github.com/alphagov/government-frontend/pull/2583 --- app/controllers/content_items_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/content_items_controller.rb b/app/controllers/content_items_controller.rb index d758ad25d..6832e93af 100644 --- a/app/controllers/content_items_controller.rb +++ b/app/controllers/content_items_controller.rb @@ -95,6 +95,7 @@ def show_service_manual_page service_manual_service_standard service_manual_topic service_manual_homepage + service_manual_service_toolkit ] @do_not_show_breadcrumbs = From 2700fd4f21171df9b3b350da68adb60e14632378 Mon Sep 17 00:00:00 2001 From: Jessica Jones Date: Wed, 8 Feb 2023 12:47:17 +0000 Subject: [PATCH 2/3] Rename presenter method --- app/presenters/content_item_presenter.rb | 2 +- app/presenters/service_manual_presenter.rb | 2 +- app/views/layouts/application.html.erb | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index 45176be91..625b6d7c7 100644 --- a/app/presenters/content_item_presenter.rb +++ b/app/presenters/content_item_presenter.rb @@ -92,7 +92,7 @@ def show_phase_banner? phase.in?(%w[alpha beta]) end - def show_service_manual_phase_banner? + def service_manual? false end diff --git a/app/presenters/service_manual_presenter.rb b/app/presenters/service_manual_presenter.rb index 80d2fe57e..76d81b984 100644 --- a/app/presenters/service_manual_presenter.rb +++ b/app/presenters/service_manual_presenter.rb @@ -11,7 +11,7 @@ def include_search_in_header? true end - def show_service_manual_phase_banner? + def service_manual? true end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index db9782442..f32d8039c 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -32,14 +32,14 @@
- <% if @content_item.show_phase_banner? || @content_item.show_service_manual_phase_banner? %> + <% if @content_item.show_phase_banner? || @content_item.service_manual? %>
<% if @content_item.show_phase_banner? %> <%= render 'govuk_publishing_components/components/phase_banner', phase: @content_item.phase %> <% end %> - <% if @content_item.show_service_manual_phase_banner? %> + <% if @content_item.service_manual? %> <%= render_phase_label @content_item, content_for(:phase_message) %> <% end %>
From e02c3e0e7cbb6cdcf9fba1be70cd6ba96a7d4392 Mon Sep 17 00:00:00 2001 From: Jessica Jones Date: Wed, 8 Feb 2023 12:48:08 +0000 Subject: [PATCH 3/3] Add "Service Manual" to the page title - missing from https://github.com/alphagov/government-frontend/pull/2583 --- app/views/layouts/application.html.erb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f32d8039c..c54739613 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -30,6 +30,13 @@ <%= yield :extra_head_content %> + <% if @content_item.service_manual? %> +
+ + <%= "Service Manual" %> + +
+ <% end %>
<% if @content_item.show_phase_banner? || @content_item.service_manual? %>