Class: Hyrax::DashboardController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Hyrax::DashboardController
show all
- Includes:
- Blacklight::Base, Breadcrumbs
- Defined in:
- app/controllers/hyrax/dashboard_controller.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#add_breadcrumb_for_action, #add_breadcrumb_for_controller, #build_breadcrumbs, #default_trail, #trail_from_referer
Instance Attribute Details
17
|
# File 'app/controllers/hyrax/dashboard_controller.rb', line 17
class_attribute :sidebar_partials
|
Instance Method Details
#show ⇒ Object
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
|