<%inherit file="/base.mako"/> <%def name="javascripts()"> ${parent.javascripts()} ${h.js( "jquery.autocomplete" )} <%def name="stylesheets()"> ${parent.stylesheets()} ${h.css( "autocomplete_tagging" )} <% from galaxy.tools.parameters import DataToolParameter, RuntimeValue from galaxy.jobs.actions.post import ActionBox %> <%def name="do_inputs( inputs, values, errors, prefix, step, other_values = None )"> %if other_values is None: <% other_values = values %> %endif %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 ) ): %if input.name in errors: <% rep_errors = errors[input.name][i] %> %else: <% rep_errors = dict() %> %endif
<% index = repeat_values[i]['__index__'] %>
${input.title} ${i + 1}
${do_inputs( input.inputs, repeat_values[ i ], rep_errors, 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 + "|" %> <% group_errors = errors.get( input.name, {} ) %> ${row_for_param( input.test_param, group_values[ input.test_param.name ], other_values, group_errors, prefix, step )} ${do_inputs( input.cases[ current_case ].inputs, group_values, group_errors, new_prefix, step, other_values )} %else: ${row_for_param( input, values[ input.name ], other_values, errors, prefix, step )} %endif %endfor <%def name="row_for_param( param, value, other_values, error_dict, prefix, step )"> ## -- ${param.name} -- ${step.state.inputs} -- %if error_dict.has_key( param.name ): <% cls = "form-row form-row-error" %> %else: <% cls = "form-row" %> %endif
%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: ## FIXME: Initialize in the controller <% if value is None: value = other_values[ param.name ] = param.get_initial_value( t, other_values ) %> ${param.get_html_field( t, value, other_values ).get_html( str(step.id) + "|" + prefix )} %endif %elif isinstance( value, RuntimeValue ) or ( str(step.id) + '|__runtime__' + prefix + param.name ) in incoming: ## On the first load we may see a RuntimeValue, so we write ## an input field using the initial value for the param. ## Subsequents posts will no longer have the runtime value ## (since an actualy value will be posted) so we add a hidden ## field so we know to continue drawing form for this param. ## FIXME: This logic shouldn't be in the template. The ## controller should go through the inputs on the first ## load, fill in initial values where needed, and mark ## all that are runtime modifiable in some way. <% value = other_values[ param.name ] = param.get_initial_value( t, other_values ) %> ${param.get_html_field( t, value, other_values ).get_html( str(step.id) + "|" + prefix )} %else: ${param.value_to_display_text( value, app )} %endif
%if step.upgrade_messages and param.name in step.upgrade_messages:
${step.upgrade_messages[param.name]}
%endif %if error_dict.has_key( param.name ):
 ${error_dict[param.name]}
%endif

Running workflow "${h.to_unicode( workflow.name )}"

%if has_upgrade_messages:
Problems were encourered when loading this workflow, likely due to tool version changes. Missing parameter values have been replaced with default. Please review the parameter values below.
%endif
## %for i, step in enumerate( steps ): %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, errors.get( step.id, dict() ), "", step )} % if step.post_job_actions:
% if len(step.post_job_actions) > 1: % else: % endif ${'
'.join([ActionBox.get_short_str(pja) for pja in step.post_job_actions])}
% endif % if step.annotations:
${h.to_unicode( step.annotations[0].annotation )}
% endif
%else: <% module = step.module %>
Step ${int(step.order_index)+1}: ${module.name}
${do_inputs( module.get_runtime_inputs(), step.state.inputs, errors.get( step.id, dict() ), "", step )} % if step.annotations:
${step.annotations[0].annotation}
% endif
%endif %endfor