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)

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

class_attribute :sidebar_partials

Instance Method Details

#showObject


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

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