From d039a184a463ca21ab30324d89edc9c15dce7258 Mon Sep 17 00:00:00 2001 From: Catalina Ilie Date: Tue, 26 Sep 2023 09:30:32 +0100 Subject: [PATCH] Add user research banner --- app/controllers/finders_controller.rb | 2 ++ app/views/finders/_show_header.html.erb | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/app/controllers/finders_controller.rb b/app/controllers/finders_controller.rb index bef8ceaa0..fdec3b72e 100644 --- a/app/controllers/finders_controller.rb +++ b/app/controllers/finders_controller.rb @@ -17,6 +17,8 @@ def show format.html do raise UnsupportedContentItem unless content_item.is_finder? + @show_banner = content_item.base_path == "/government/organisations/hm-revenue-customs/contact" + if legacy_params_present? transform_legacy_announcement_params_and_redirect if content_item.base_path == "/search/news-and-communications" transform_legacy_publication_params_and_redirect if content_item.base_path == "/search/all" diff --git a/app/views/finders/_show_header.html.erb b/app/views/finders/_show_header.html.erb index 52cd97034..919245f9f 100644 --- a/app/views/finders/_show_header.html.erb +++ b/app/views/finders/_show_header.html.erb @@ -13,6 +13,15 @@ <%= render 'govuk_publishing_components/components/contextual_breadcrumbs', content_item: content_item.as_hash, inverse: inverse, ga4_tracking: true %> <% end %> + <% if @show_banner %> + <%= render "govuk_publishing_components/components/intervention", { + suggestion_text: "Help improve a new GOV.UK tool", + suggestion_link_text: "Sign up to take part in user research", + suggestion_link_url: "https://surveys.publishing.service.gov.uk/s/SNFVW1/", + new_tab: true, + } %> + <% end %> + <% if content_item.base_path == "/find-licences"%>
<%= render "govuk_publishing_components/components/intervention", {