Class: Hyrax::Admin::WorkflowRolePresenter
- Inherits:
-
Object
- Object
- Hyrax::Admin::WorkflowRolePresenter
- Defined in:
- app/presenters/hyrax/admin/workflow_role_presenter.rb
Overview
Displays a single workflow role
Instance Method Summary collapse
-
#initialize(workflow_role) ⇒ WorkflowRolePresenter
constructor
A new instance of WorkflowRolePresenter.
-
#label ⇒ String
A meaningful label for the given WorkflowRole.
Constructor Details
#initialize(workflow_role) ⇒ WorkflowRolePresenter
Returns a new instance of WorkflowRolePresenter.
6 7 8 9 10 |
# File 'app/presenters/hyrax/admin/workflow_role_presenter.rb', line 6 def initialize(workflow_role) @workflow = workflow_role.workflow @role = workflow_role.role @source_id = workflow..source_id end |
Instance Method Details
#label ⇒ String
TODO:
This is a hack; I don’t want to include reference to the admin set; However based on the current UI, in which we list all workflows (spanning all admin sets) this is required.
Returns A meaningful label for the given WorkflowRole.
15 16 17 |
# File 'app/presenters/hyrax/admin/workflow_role_presenter.rb', line 15 def label "#{admin_set_label(source_id)} - #{role.name} (#{workflow.name})" end |