Sha256: 17133442b615e73e699322fc3acb989a6f524123f0d8f290960c628ab7c4ec63

Contents?: true

Size: 998 Bytes

Versions: 10

Compression:

Stored size: 998 Bytes

Contents

module Hyrax
  # Presents a list of works in workflow
  class Admin::WorkflowsController < ApplicationController
    before_action :ensure_admin!
    layout 'admin'

    def index
      add_breadcrumb t(:'hyrax.controls.home'), root_path
      add_breadcrumb t(:'hyrax.toolbar.admin.menu'), hyrax.admin_path
      add_breadcrumb t(:'hyrax.admin.sidebar.tasks'), '#'
      add_breadcrumb t(:'hyrax.admin.sidebar.workflow_review'), request.path
      @status_list = Hyrax::Workflow::StatusListService.new(self, "-workflow_state_name_ssim:#{deposited_workflow_state_name}")
      @published_list = Hyrax::Workflow::StatusListService.new(self, "workflow_state_name_ssim:#{deposited_workflow_state_name}")
    end

    private

      def ensure_admin!
        # Even though the user can view this admin set, they may not be able to view
        # it on the admin page.
        authorize! :read, :admin_dashboard
      end

      def deposited_workflow_state_name
        'deposited'
      end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

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