Sha256: c7f499aa6418304d8359b2e0683127e5bdc7514f5762b34c7fef0fd3fde4733b

Contents?: true

Size: 544 Bytes

Versions: 9

Compression:

Stored size: 544 Bytes

Contents

module Hyrax
  class AdminController < ApplicationController
    include Blacklight::Base
    before_action :ensure_admin!
    layout 'admin'

    def show
      add_breadcrumb t(:'hyrax.controls.home'), root_path
      add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path
      @presenter = Hyrax::Admin::DashboardPresenter.new
      @admin_set_rows = Hyrax::AdminSetService.new(self).search_results_with_work_count(:read)
    end

    private

      def ensure_admin!
        authorize! :read, :admin_dashboard
      end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 app/controllers/hyrax/admin_controller.rb
hyrax-1.1.0 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.5 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.4 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.3 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.2 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.1 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.0.rc2 app/controllers/hyrax/admin_controller.rb
hyrax-1.0.0.rc1 app/controllers/hyrax/admin_controller.rb