Method: WorkflowsHelper#link_to_workflow

Defined in:
app/helpers/workflows_helper.rb


3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/workflows_helper.rb', line 3

def link_to_workflow( workflow, context_infos = {} )
  user = context_infos[ :user ]
  title = user.name + " " if user
  title += workflow.name_as_verb
  title += " (#{workflow.wah_group.name})" if workflow.wah_group
  workflow_params = { user_id: user.id }
  link_to(
          (icon(workflow_icon(workflow)) + " " + workflow.name).html_safe,
          workflow_kit.execute_workflow_path( workflow, workflow_params ), 
          method: :put,
          :class => 'workflow_trigger',
          title: title
          )
end