diff --git a/Gemfile.lock b/Gemfile.lock index 6c022c17b..69bbdce7c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -182,7 +182,7 @@ GEM capybara (>= 3.36) puma selenium-webdriver (>= 4.0) - govuk_web_banners (0.1.0) + govuk_web_banners (0.2.0) govuk_publishing_components rails (>= 7) hashdiff (1.1.1) diff --git a/app/helpers/recruitment_banner_helper.rb b/app/helpers/recruitment_banner_helper.rb deleted file mode 100644 index c7eb0f3e9..000000000 --- a/app/helpers/recruitment_banner_helper.rb +++ /dev/null @@ -1,27 +0,0 @@ -module RecruitmentBannerHelper - def recruitment_banner - return false if recruitment_banners.nil? - - current_path = request.path - - recruitment_banners.find do |banner| - next unless valid?(banner) - - banner["page_paths"]&.include?(current_path) - end - end - - def recruitment_banners - recruitment_banners_urls_file_path = Rails.root.join("lib/data/recruitment_banners.yml") - recruitment_banners_data = YAML.load_file(recruitment_banners_urls_file_path) - recruitment_banners_data["banners"] - end - - def valid?(banner) - required_fields.select { |field| banner[field].present? } == required_fields - end - - def required_fields - %w[survey_url suggestion_text suggestion_link_text page_paths] - end -end diff --git a/app/views/content_items/answer.html.erb b/app/views/content_items/answer.html.erb index f581b025d..8f0ba9500 100644 --- a/app/views/content_items/answer.html.erb +++ b/app/views/content_items/answer.html.erb @@ -5,5 +5,4 @@ <%= @requested_variant.analytics_meta_tag.html_safe if @requested_variant.present? %> <% end %> -<%= render 'shared/intervention_banner' %> <%= render 'content_items/body_with_related_links' %> diff --git a/app/views/content_items/detailed_guide.html.erb b/app/views/content_items/detailed_guide.html.erb index 9c81cf657..5450fe1af 100644 --- a/app/views/content_items/detailed_guide.html.erb +++ b/app/views/content_items/detailed_guide.html.erb @@ -3,7 +3,6 @@ schema: :faq ) %> <% end %> -<%= render 'shared/intervention_banner' %> <%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %> diff --git a/app/views/content_items/document_collection.html.erb b/app/views/content_items/document_collection.html.erb index 9dcd15443..77208678b 100644 --- a/app/views/content_items/document_collection.html.erb +++ b/app/views/content_items/document_collection.html.erb @@ -6,7 +6,6 @@ <%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %> -<%= render 'shared/intervention_banner' %>