Skip to content

Commit

Permalink
Remove unused layouts
Browse files Browse the repository at this point in the history
- remove omit_emergency_banner code only used by no_emergency_banner layout.
- update test with removal of chromeless
  • Loading branch information
KludgeKML committed Aug 27, 2024
1 parent 70a32a2 commit e1c3d6f
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 15 deletions.
4 changes: 0 additions & 4 deletions app/controllers/root_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ class RootController < ApplicationController
502
503
504
chromeless
gem_layout
gem_layout_account_manager
gem_layout_explore_header
gem_layout_full_width
gem_layout_full_width_explore_header
gem_layout_full_width_no_footer_navigation
gem_layout_homepage
gem_layout_homepage_new
gem_layout_no_emergency_banner
gem_layout_no_feedback_form
gem_layout_no_footer_navigation
scheduled_maintenance
Expand Down
3 changes: 1 addition & 2 deletions app/views/root/_gem_base.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<%
logo_link ||= Plek.new.website_root.present? ? Plek.new.website_root : "https://www.gov.uk/"
full_width ||= false
omit_emergency_banner ||= false
omit_feedback_form ||= nil
omit_footer_navigation ||= nil
omit_footer_border ||= nil
Expand All @@ -19,7 +18,7 @@
homepage ||= false
homepage_blue_navbar ||= false

@emergency_banner = !omit_emergency_banner && emergency_banner_notification
@emergency_banner = emergency_banner_notification

if @emergency_banner
emergency_banner = render "govuk_publishing_components/components/emergency_banner", {
Expand Down
1 change: 0 additions & 1 deletion app/views/root/chromeless.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion app/views/root/gem_layout_explore_header.html.erb

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions app/views/root/gem_layout_no_emergency_banner.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion test/integration/templates_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class TemplatesTest < ActionDispatch::IntegrationTest
context "fetching templates" do
should "be 200 for templates that exist" do
%w[404 406 500 chromeless gem_layout scheduled_maintenance].each do |template|
%w[404 406 500 gem_layout scheduled_maintenance].each do |template|
get "/templates/#{template}.html.erb"
assert_equal 200, last_response.status
end
Expand Down

0 comments on commit e1c3d6f

Please sign in to comment.