diff --git a/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb b/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb index f8d2cb16ac..b709194a77 100644 --- a/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +++ b/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb @@ -5,6 +5,9 @@ module EmbargoesControllerBehavior include Hyrax::Collections::AcceptsBatches def index + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path + add_breadcrumb t(:'hyrax.embargoes.index.manage_embargoes'), hyrax.embargoes_path authorize! :index, Hydra::AccessControls::Embargo end @@ -40,5 +43,12 @@ def update def self.local_prefixes ['hyrax/base'] end + + def edit + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path + add_breadcrumb t(:'hyrax.embargoes.index.manage_embargoes'), hyrax.embargoes_path + add_breadcrumb t(:'hyrax.embargoes.edit.embargo_update'), '#' + end end end diff --git a/app/controllers/concerns/hyrax/leases_controller_behavior.rb b/app/controllers/concerns/hyrax/leases_controller_behavior.rb index 85b3f7135c..b6acb590ff 100644 --- a/app/controllers/concerns/hyrax/leases_controller_behavior.rb +++ b/app/controllers/concerns/hyrax/leases_controller_behavior.rb @@ -5,6 +5,9 @@ module LeasesControllerBehavior include Hyrax::Collections::AcceptsBatches def index + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path + add_breadcrumb t(:'hyrax.leases.index.manage_leases'), hyrax.leases_path authorize! :index, Hydra::AccessControls::Lease end @@ -33,5 +36,12 @@ def update def self.local_prefixes ['hyrax/base'] end + + def edit + add_breadcrumb t(:'hyrax.controls.home'), root_path + add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_path + add_breadcrumb t(:'hyrax.leases.index.manage_leases'), hyrax.leases_path + add_breadcrumb t(:'hyrax.leases.edit.lease_update'), '#' + end end end diff --git a/app/controllers/hyrax/batch_edits_controller.rb b/app/controllers/hyrax/batch_edits_controller.rb index 2b42ffcc25..dfb14253cc 100644 --- a/app/controllers/hyrax/batch_edits_controller.rb +++ b/app/controllers/hyrax/batch_edits_controller.rb @@ -11,6 +11,8 @@ class BatchEditsController < ApplicationController # provides the help_text view method helper PermissionsHelper + with_themed_layout 'dashboard' + def edit work = form_class.model_class.new work.depositor = current_user.user_key diff --git a/app/controllers/hyrax/embargoes_controller.rb b/app/controllers/hyrax/embargoes_controller.rb index ce8399059c..bbbb3c5229 100644 --- a/app/controllers/hyrax/embargoes_controller.rb +++ b/app/controllers/hyrax/embargoes_controller.rb @@ -1,5 +1,7 @@ module Hyrax class EmbargoesController < ApplicationController include Hyrax::EmbargoesControllerBehavior + + with_themed_layout 'dashboard' end end diff --git a/app/controllers/hyrax/file_sets_controller.rb b/app/controllers/hyrax/file_sets_controller.rb index 1841c60d06..085f502e8d 100644 --- a/app/controllers/hyrax/file_sets_controller.rb +++ b/app/controllers/hyrax/file_sets_controller.rb @@ -28,6 +28,8 @@ class FileSetsController < ApplicationController private :curation_concern= helper_method :file_set + layout :decide_layout + # GET /concern/file_sets/:id def edit initialize_edit_form @@ -168,5 +170,15 @@ def additional_response_formats(_); end def _prefixes @_prefixes ||= super + ['hyrax/base'] end + + def decide_layout + layout = case action_name + when 'show' + '1_column' + else + 'dashboard' + end + File.join(theme, layout) + end end end diff --git a/app/controllers/hyrax/leases_controller.rb b/app/controllers/hyrax/leases_controller.rb index a9101b447a..96fbeaf048 100644 --- a/app/controllers/hyrax/leases_controller.rb +++ b/app/controllers/hyrax/leases_controller.rb @@ -1,5 +1,7 @@ module Hyrax class LeasesController < ApplicationController include Hyrax::LeasesControllerBehavior + + with_themed_layout 'dashboard' end end diff --git a/app/views/hyrax/batch_edits/edit.html.erb b/app/views/hyrax/batch_edits/edit.html.erb index 1fd9dacedb..28a7d06665 100644 --- a/app/views/hyrax/batch_edits/edit.html.erb +++ b/app/views/hyrax/batch_edits/edit.html.erb @@ -5,31 +5,32 @@ <%= @form.names.join(", ").html_safe %> -