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.
5 6 7 8 9 |
# File 'app/presenters/hyrax/admin/workflow_role_presenter.rb', line 5 def initialize(workflow_role) @workflow = workflow_role.workflow @role = workflow_role.role @admin_set_id = workflow..admin_set_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.
14 15 16 |
# File 'app/presenters/hyrax/admin/workflow_role_presenter.rb', line 14 def label "#{admin_set_label(admin_set_id)} - #{role.name} (#{workflow.name})" end |