Sha256: 13a0e1eae06cf66a72d438ee2ba1d3ac3dcb42ecc6d405da9e30e1f2df0029cd

Contents?: true

Size: 1.1 KB

Versions: 13

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 = actionable_objects.reject(&:published?)
      @published_list = actionable_objects.select(&:published?)
    end

    private

    def ensure_authorized!
      authorize! :review, :submissions
    end

    def actionable_objects
      @actionable_objects ||=
        Hyrax::Workflow::ActionableObjects.new(user: current_user)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
hyrax-4.0.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-4.0.0.rc3 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-4.0.0.rc2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-4.0.0.rc1 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.5.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-4.0.0.beta2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.4.2 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-4.0.0.beta1 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.4.1 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.4.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.3.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.2.0 app/controllers/hyrax/admin/workflows_controller.rb
hyrax-3.1.0 app/controllers/hyrax/admin/workflows_controller.rb