Sha256: 5dd67d4efb4e1d8eaee6d015e7e9e274a92a5062a633be668ff6ad15b9221723

Contents?: true

Size: 1.06 KB

Versions: 12

Compression:

Stored size: 1.06 KB

Contents

module Hyrax
  # Presents a list of works in workflow
  class Admin::WorkflowsController < ApplicationController
    before_action :ensure_authorized!
    layout 'dashboard'
    class_attribute :deposited_workflow_state_name

    # Works that are in this workflow state (see workflow json template) are excluded from the
    # status list and display in the "Published" tab
    self.deposited_workflow_state_name = 'deposited'

    def index
      add_breadcrumb t(:'hyrax.controls.home'), root_path
      add_breadcrumb t(:'hyrax.dashboard.breadcrumbs.admin'), hyrax.dashboard_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_authorized!
        authorize! :review, :submissions
      end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
hyrax-2.0.3 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.1 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.rc3 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.rc2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.rc1 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.beta5 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.beta4 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.beta3 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.beta2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-2.0.0.beta1 app/controllers/hyrax/admin/workflows_controller.rb