Skip to content

Commit

Permalink
APO controller should not use a fluid layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jun 4, 2020
1 parent 7a67771 commit 65bf0fa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/controllers/apo_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions app/helpers/argo_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions app/views/layouts/one_column.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% content_for(:content) do %>
<section class="col-md-12">
<%= yield %>
</section>
<% end %>

<%= render template: "layouts/blacklight/base" %>
4 changes: 2 additions & 2 deletions app/views/shared/_header_navbar.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<nav class="navbar navbar-expand-md navbar-dark bg-dark topbar" role="navigation">
<div class="<%= container_classes %>">
<div class="container-fluid">
<%= link_to application_name, root_path, class: 'mb-0 navbar-brand navbar-logo' %>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#user-util-collapse" aria-controls="user-util-collapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
Expand All @@ -12,7 +12,7 @@
</nav>

<div class="navbar-search navbar navbar-light bg-light" role="navigation">
<div class="<%= container_classes %>">
<div class="container-fluid">
<%= render_search_bar %>
</div>
</div>

0 comments on commit 65bf0fa

Please sign in to comment.