Skip to content

Commit

Permalink
Merge pull request #3920 from alphagov/remove_hardcoded_banner
Browse files Browse the repository at this point in the history
Remove hardcoded banner code
  • Loading branch information
hannako authored Dec 20, 2024
2 parents 0936c40 + 606affc commit aa5012f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 88 deletions.
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.

0 comments on commit aa5012f

Please sign in to comment.