From 65bf0fad91ef93dcd367173aa91cad22067b27cb Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Wed, 3 Jun 2020 23:09:28 -0500 Subject: [PATCH] APO controller should not use a fluid layout --- app/controllers/apo_controller.rb | 4 ++-- app/helpers/argo_helper.rb | 2 ++ app/views/layouts/one_column.html.erb | 7 +++++++ app/views/shared/_header_navbar.html.erb | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 app/views/layouts/one_column.html.erb diff --git a/app/controllers/apo_controller.rb b/app/controllers/apo_controller.rb index a0019831b2..3aed33c7aa 100644 --- a/app/controllers/apo_controller.rb +++ b/app/controllers/apo_controller.rb @@ -24,13 +24,13 @@ class ApoController < ApplicationController def edit authorize! :create, Dor::AdminPolicyObject @form = ApoForm.new(@object) - render layout: 'blacklight' + render layout: 'one_column' end def new authorize! :create, Dor::AdminPolicyObject @form = ApoForm.new(Dor::AdminPolicyObject.new) - render layout: 'blacklight' + render layout: 'one_column' end def create diff --git a/app/helpers/argo_helper.rb b/app/helpers/argo_helper.rb index 300db7a205..5a81bdf87a 100644 --- a/app/helpers/argo_helper.rb +++ b/app/helpers/argo_helper.rb @@ -7,6 +7,8 @@ module ArgoHelper # This overrides a blacklight helper so that the page is full-width def container_classes + return super if controller_name == 'apo' + 'container-fluid' end diff --git a/app/views/layouts/one_column.html.erb b/app/views/layouts/one_column.html.erb new file mode 100644 index 0000000000..5cb8dc539c --- /dev/null +++ b/app/views/layouts/one_column.html.erb @@ -0,0 +1,7 @@ +<% content_for(:content) do %> +
+ <%= yield %> +
+<% end %> + +<%= render template: "layouts/blacklight/base" %> diff --git a/app/views/shared/_header_navbar.html.erb b/app/views/shared/_header_navbar.html.erb index 9e5be33302..0a72e6747b 100644 --- a/app/views/shared/_header_navbar.html.erb +++ b/app/views/shared/_header_navbar.html.erb @@ -1,5 +1,5 @@