Sha256: b195087f75e7546ff0a27f2e40af116a812bf6ebf99047dafb329e87d2354d7a

Contents?: true

Size: 1.1 KB

Versions: 6

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true
module Hyrax
  # Presents a list of works in workflow
  class Admin::WorkflowsController < ApplicationController
    before_action :ensure_authorized!
    with_themed_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

6 entries across 6 versions & 1 rubygems

Version Path
hyrax-3.0.2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.0.1 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.0.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.0.0.pre.rc4 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.0.0.pre.rc3 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.0.0.pre.rc2 app/controllers/hyrax/admin/workflows_controller.rb