Class: Hyrax::DashboardController

Inherits:
ApplicationController
  • Object
show all
Includes:
Blacklight::Base, Breadcrumbs
Defined in:
app/controllers/hyrax/dashboard_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Breadcrumbs

#add_breadcrumb_for_action, #add_breadcrumb_for_controller, #build_breadcrumbs, #default_trail, #trail_from_referer

Instance Attribute Details

Returns:

  • (Hash)


17
# File 'app/controllers/hyrax/dashboard_controller.rb', line 17

class_attribute :sidebar_partials

Instance Method Details

#showObject



20
21
22
23
24
25
26
27
28
29
# File 'app/controllers/hyrax/dashboard_controller.rb', line 20

def show
  if can? :read, :admin_dashboard
    @presenter = Hyrax::Admin::DashboardPresenter.new
    @admin_set_rows = Hyrax::AdminSetService.new(self).search_results_with_work_count(:read)
    render 'show_admin'
  else
    @presenter = Dashboard::UserPresenter.new(current_user, view_context, params[:since])
    render 'show_user'
  end
end