- if Dunlop.has_workflow?
  .ui.top.attached.block.header= WorkflowInstance.model_name.human_plural
  table.roles.workflow-instance-roles.ui.bottom.attached.compact.celled.table
    caption= WorkflowInstance.model_name.human
    tbody
      tr
        th Download
        td= dunlop_class_ability :download, WorkflowInstance
      tr
        th Categorize
        td= dunlop_class_ability :categorize, WorkflowInstance
      tr
        th Update
        td= dunlop_class_ability :update, WorkflowInstance
      tr
        th Archive / Revive
        td= dunlop_class_ability :archive, WorkflowInstance
      tr
        th Reset
        td= dunlop_class_ability :reset, WorkflowInstance

  table.roles.workflow-step-roles.ui.bottom.attached.compact.celled.table
    caption Workflow
    thead
      tr
        th
        th Read
        th Manage
    tbody
      = hidden_field_tag "user[role_names][]", "read-class-WorkflowInstance"
      tr
        th= WorkflowInstanceBatch.model_name.human
        td= dunlop_class_ability :read, WorkflowInstanceBatch
        td= dunlop_class_ability :manage, WorkflowInstanceBatch
      - WorkflowInstance.possible_workflow_step_names.each do |step_name|
        - step_class = step_name.to_s.classify.constantize
        tr
          th= step_class.model_name.human
          td= dunlop_class_ability :read, step_class
          td= dunlop_class_ability :manage, step_class
