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

Remove hardcoded banner code #3920

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
27 changes: 0 additions & 27 deletions app/helpers/recruitment_banner_helper.rb

This file was deleted.

1 change: 1 addition & 0 deletions app/views/browse/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
} %>
<% end %>

<%= render "govuk_web_banners/recruitment_banner" %>
<% if page.popular_list %>
<div class="govuk-width-container">
<div class="browse__action-links">
Expand Down
6 changes: 6 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
unless (!content_item_h["locale"])
lang = content_item_h["locale"]
end
unless content_item_h["base_path"].include? "/browse"
call_recruitment_banner_partial = true
end
end
%>

Expand All @@ -19,6 +22,9 @@
<%= render 'breadcrumbs' %>
<% end %>
<% end %>
<% if call_recruitment_banner_partial %>
<%= render "govuk_web_banners/recruitment_banner" %>
<% end %>
<%=
content_tag(:main,
id: "content",
Expand Down
10 changes: 0 additions & 10 deletions app/views/shared/_intervention_banner.html.erb

This file was deleted.

1 change: 1 addition & 0 deletions features/step_definitions/viewing_browse_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def top_level_browse_pages

def add_browse_pages
stub_content_store_has_item "/browse",
base_path: "/browse",
links: {
top_level_browse_pages:,
}
Expand Down
1 change: 1 addition & 0 deletions spec/controllers/browse_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
before do
stub_content_store_has_item(
"/browse",
base_path: "/browse",
links: {
top_level_browse_pages:,
},
Expand Down
1 change: 1 addition & 0 deletions spec/features/content_store_organisations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@

def organisations_content_hash
@content_hash = {
base_path: "/government/organisations",
title: "Departments, agencies and public bodies",
details: {
ordered_ministerial_departments: [
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/graphql/world_index.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"data": {
"edition": {
"base_path": "/world",
"title": "Help and services around the world",
"details": {
"world_locations": [
Expand Down
51 changes: 0 additions & 51 deletions spec/helpers/recruitment_banner_helper_test.rb

This file was deleted.

Loading