Sha256: 3a05ea6eb504af6c7099762da69a9642a8008fe0abe446fc4c2ee2e78eb2a50d

Contents?: true

Size: 615 Bytes

Versions: 10

Compression:

Stored size: 615 Bytes

Contents

module Hyrax
  module Admin
    module StatsBehavior
      extend ActiveSupport::Concern
      included do
        layout 'admin'
      end

      def show
        authorize! :read, Hyrax::Statistics
        stats_filters = params.fetch(:stats_filters, {})
        limit = params.fetch(:limit, "5").to_i
        @presenter = AdminStatsPresenter.new(stats_filters, limit)
        add_breadcrumb t(:'hyrax.controls.home'), root_path
        add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path
        add_breadcrumb t(:'hyrax.admin.sidebar.statistics'), hyrax.admin_stats_path
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.1.0 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.5 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.4 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.3 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.2 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.1 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.0.rc2 app/controllers/concerns/hyrax/admin/stats_behavior.rb
hyrax-1.0.0.rc1 app/controllers/concerns/hyrax/admin/stats_behavior.rb
test_hyrax-0.0.1.alpha app/controllers/concerns/hyrax/admin/stats_behavior.rb