<%inherit file="/display_base.mako"/> <%! from galaxy.tools.parameters import DataToolParameter, RuntimeValue from galaxy.web import form_builder %> <%def name="stylesheets()"> ${parent.stylesheets()} ${h.css( "workflow" )} <%def name="do_inputs( inputs, values, prefix, step, other_values=None )"> %for input_index, input in enumerate( inputs.itervalues() ): %if input.type == "repeat":
${input.title_plural}
<% repeat_values = values[input.name] %> %for i in range( len( repeat_values ) ):
<% index = repeat_values[i]['__index__'] %>
${input.title} ${i + 1}
${do_inputs( input.inputs, repeat_values[ i ], prefix + input.name + "_" + str(index) + "|", step, other_values )}
%endfor
%elif input.type == "conditional": <% group_values = values[input.name] %> <% current_case = group_values['__current_case__'] %> <% new_prefix = prefix + input.name + "|" %> ${row_for_param( input.test_param, group_values[ input.test_param.name ], other_values, prefix, step )} ${do_inputs( input.cases[ current_case ].inputs, group_values, new_prefix, step, other_values )} %else: ${row_for_param( input, values[ input.name ], other_values, prefix, step )} %endif %endfor <%def name="row_for_param( param, value, other_values, prefix, step )"> <% cls = "form-row" %>
%if isinstance( param, DataToolParameter ): %if ( prefix + param.name ) in step.input_connections_by_name: <% conn = step.input_connections_by_name[ prefix + param.name ] %> Output dataset '${conn.output_name}' from step ${int(conn.output_step.order_index)+1} %else: select at runtime %endif %else: ${param.value_to_display_text( value, app )} %endif
<%def name="render_item_links( workflow )"> Import workflow <%def name="render_item( workflow, steps )"> <% # HACK: Rendering workflow steps requires that trans have a history; however, if it's user's first visit to Galaxy is here, he won't have a history # and an error will occur. To prevent this error, make sure user has a history. trans.get_history( create=True ) %> %for i, step in enumerate( steps ): %endfor
StepAnnotation
%if step.type == 'tool' or step.type is None: <% tool = app.toolbox.tools_by_id[step.tool_id] %>
Step ${int(step.order_index)+1}: ${tool.name}
${do_inputs( tool.inputs, step.state.inputs, "", step )}
%else: ## TODO: always input dataset? <% module = step.module %>
Step ${int(step.order_index)+1}: ${module.name}
${do_inputs( module.get_runtime_inputs(), step.state.inputs, "", step )}
%endif
%if hasattr( step, "annotation") and step.annotation is not None: ${step.annotation} %endif