Skip to content

Commit

Permalink
Merge pull request #2648 from alphagov/design-system-mop-up-v2
Browse files Browse the repository at this point in the history
Remove legacy layout
  • Loading branch information
chrislo authored Jan 22, 2024
2 parents 41a7129 + b3bcb4e commit ef2f4e2
Show file tree
Hide file tree
Showing 66 changed files with 137 additions and 2,077 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ gem "rails", "7.0.8"

gem "activejob-retry"
gem "addressable"
gem "alphabetical_paginate"
gem "ancestry"
gem "bootsnap", require: false
gem "bootstrap-kaminari-views"
gem "browser"
gem "devise"
gem "devise-encryptable"
Expand Down Expand Up @@ -35,7 +33,6 @@ gem "whenever"

# GDS Gems
gem "gds-api-adapters"
gem "govuk_admin_template"
gem "govuk_app_config"
gem "govuk_publishing_components"
gem "govuk_sidekiq"
Expand Down
21 changes: 0 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,9 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
alphabetical_paginate (2.3.4)
ancestry (4.3.3)
activerecord (>= 5.2.6)
ast (2.4.2)
autoprefixer-rails (10.4.16.0)
execjs (~> 2)
bcrypt (3.1.20)
better_errors (2.10.1)
erubi (>= 1.0.0)
Expand All @@ -86,12 +83,6 @@ GEM
debug_inspector (>= 0.0.1)
bootsnap (1.17.1)
msgpack (~> 1.2)
bootstrap-kaminari-views (0.0.5)
kaminari (>= 0.13)
rails (>= 3.1)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
brakeman (6.1.1)
racc
browser (5.3.1)
Expand Down Expand Up @@ -163,11 +154,6 @@ GEM
google-protobuf (3.25.2-x86_64-linux)
googleapis-common-protos-types (1.11.0)
google-protobuf (~> 3.18)
govuk_admin_template (6.10.0)
bootstrap-sass (~> 3.4)
jquery-rails (~> 4.3)
plek (>= 2.1)
rails (>= 6)
govuk_app_config (9.8.1)
logstasher (~> 2.1)
opentelemetry-exporter-otlp (>= 0.25, < 0.27)
Expand Down Expand Up @@ -214,10 +200,6 @@ GEM
http-form_data (2.3.0)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
jquery-rails (4.6.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.7.1)
jsonpath (1.1.5)
multi_json
Expand Down Expand Up @@ -701,12 +683,10 @@ PLATFORMS
DEPENDENCIES
activejob-retry
addressable
alphabetical_paginate
ancestry
better_errors
binding_of_caller
bootsnap
bootstrap-kaminari-views
browser
capybara
capybara-email
Expand All @@ -718,7 +698,6 @@ DEPENDENCIES
doorkeeper
factory_bot_rails
gds-api-adapters
govuk_admin_template
govuk_app_config
govuk_publishing_components
govuk_sidekiq
Expand Down
2 changes: 0 additions & 2 deletions app/assets/config/manifest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//= link_tree ../images
//= link application.css
//= link legacy_layout.css
//= link application.js
//= link legacy_layout.js
9 changes: 0 additions & 9 deletions app/assets/javascripts/legacy/modules/chosen.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/assets/javascripts/legacy_layout.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/assets/stylesheets/legacy/_admin.scss

This file was deleted.

38 changes: 0 additions & 38 deletions app/assets/stylesheets/legacy/_bootstrap_chosen.scss

This file was deleted.

8 changes: 0 additions & 8 deletions app/assets/stylesheets/legacy/_thin_form.scss

This file was deleted.

6 changes: 0 additions & 6 deletions app/assets/stylesheets/legacy_layout.scss

This file was deleted.

2 changes: 0 additions & 2 deletions app/controllers/account/activities_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::ActivitiesController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :authorise_user

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/applications_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::ApplicationsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!

def show
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/emails_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::EmailsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :authorise_user

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/organisations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::OrganisationsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :authorise_user

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/passwords_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::PasswordsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :authorise_user

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/permissions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::PermissionsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :set_application
before_action :set_permissions
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/roles_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::RolesController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :authorise_user

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/account/signin_permissions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Account::SigninPermissionsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!

def create
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/accounts_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class AccountsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!

def show
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/api_users/applications_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ApiUsers::ApplicationsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!

def index
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/api_users/permissions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ApiUsers::PermissionsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :set_user
before_action :set_application
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/api_users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class ApiUsersController < ApplicationController
include UserPermissionsControllerMethods

layout "admin_layout", only: %w[index new create edit manage_tokens]

before_action :authenticate_user!
before_action :load_and_authorize_api_user, only: %i[edit manage_tokens]
helper_method :api_user_applications_and_permissions, :visible_applications
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/authorisations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class AuthorisationsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :load_api_user
before_action :build_authorisation, only: %i[new create]
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/batch_invitation_permissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ class BatchInvitationPermissionsController < ApplicationController
before_action :authorise_to_manage_permissions
before_action :prevent_updating

layout "admin_layout"

def new; end

def create
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/batch_invitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
class BatchInvitationsController < ApplicationController
before_action :authenticate_user!

layout "admin_layout"

def new
@batch_invitation = BatchInvitation.new(organisation_id: current_user.organisation_id)
authorize @batch_invitation
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/confirmations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Copied from
# https://github.com/plataformatec/devise/blob/v2.1.2/app/controllers/devise/confirmations_controller.rb#L19
class ConfirmationsController < Devise::ConfirmationsController
layout "admin_layout"

def new
handle_new_token_needed
end
Expand Down
1 change: 0 additions & 1 deletion app/controllers/devise/two_step_verification_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
class Devise::TwoStepVerificationController < DeviseController
before_action -> { authenticate_user!(force: true) }, only: :prompt
before_action :prepare_and_validate, except: :prompt
layout "admin_layout", only: %w[show update prompt]

attr_reader :otp_secret_key

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Devise::TwoStepVerificationSessionController < DeviseController
layout "admin_layout"

before_action { |c| c.authenticate_user! force: true }
before_action :ensure_user_has_2sv_setup

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/doorkeeper_applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ class DoorkeeperApplicationsController < ApplicationController

respond_to :html

layout "admin_layout"

def index
authorize Doorkeeper::Application
@applications = Doorkeeper::Application.all
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/invitations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class InvitationsController < Devise::InvitationsController
before_action :redirect_if_invitee_already_exists, only: :create
before_action :configure_permitted_parameters, only: :create

layout "admin_layout", only: %i[new create edit update]

include UserPermissionsControllerMethods
helper_method :applications_and_permissions

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/organisations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class OrganisationsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!

respond_to :html
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/passwords_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
class PasswordsController < Devise::PasswordsController
layout "admin_layout"
before_action :record_password_reset_request, only: :create # rubocop:disable Rails/LexicallyScopedActionFilter
before_action :record_reset_page_loaded, only: :edit

Expand All @@ -9,7 +8,7 @@ def edit
user = user_from_params
unless user && user.reset_password_period_valid?
record_reset_page_loaded_token_expired
render "devise/passwords/reset_error", layout: "admin_layout"
render "devise/passwords/reset_error"
end
end

Expand Down
2 changes: 0 additions & 2 deletions app/controllers/root_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class RootController < ApplicationController
layout "admin_layout"

include UserPermissionsControllerMethods
before_action :authenticate_user!, except: :privacy_notice
skip_after_action :verify_authorized
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class SessionsController < Devise::SessionsController
layout "admin_layout"

skip_before_action :handle_two_step_verification

def destroy
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/supported_permissions_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class SupportedPermissionsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :load_and_authorize_application
respond_to :html
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/suspensions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ class SuspensionsController < ApplicationController
before_action :authenticate_user!, :load_and_authorize_user
respond_to :html

layout "admin_layout"

def edit
@suspension = Suspension.new(suspend: @user.suspended?,
reason_for_suspension: @user.reason_for_suspension)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class TwoStepVerificationExemptionsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!, :load_and_authorize_user

def edit
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/users/applications_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Users::ApplicationsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!

def show
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/users/emails_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class Users::EmailsController < ApplicationController
layout "admin_layout"

before_action :authenticate_user!
before_action :load_user
before_action :authorize_user
Expand Down
Loading

0 comments on commit ef2f4e2

Please sign in to comment.