<% from galaxy.util.expressions import ExpressionContext %> Galaxy ${h.css( "base", "autocomplete_tagging" )} ${h.js( "jquery", "galaxy.base", "jquery.autocomplete" )} <%def name="do_inputs( inputs, tool_state, errors, prefix, other_values=None )"> <% other_values = ExpressionContext( tool_state, other_values ) %> %for input_index, input in enumerate( inputs.itervalues() ): %if input.type == "repeat":
${input.title_plural}
<% repeat_state = tool_state[input.name] %> %for i in range( len( repeat_state ) ):
<% if input.name in errors: rep_errors = errors[input.name][i] else: rep_errors = dict() index = repeat_state[i]['__index__'] %>
${input.title} ${i + 1}
${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )}
%if rep_errors.has_key( '__index__' ):
 ${rep_errors['__index__']}
%endif %endfor
%elif input.type == "conditional": <% group_state = tool_state[input.name] group_errors = errors.get( input.name, {} ) current_case = group_state['__current_case__'] group_prefix = prefix + input.name + "|" %> %if input.value_ref_in_group: ${row_for_param( group_prefix, input.test_param, group_state, group_errors, other_values )} %endif ${do_inputs( input.cases[current_case].inputs, group_state, group_errors, group_prefix, other_values )} %elif input.type == "upload_dataset": %if input.get_datatype( trans, other_values ).composite_type is None: #have non-composite upload appear as before <% if input.name in errors: rep_errors = errors[input.name][0] else: rep_errors = dict() %> ${do_inputs( input.inputs, tool_state[input.name][0], rep_errors, prefix + input.name + "_" + str( 0 ) + "|", other_values )} %else:
${input.group_title( other_values )}
<% repeat_state = tool_state[input.name] %> %for i in range( len( repeat_state ) ):
<% if input.name in errors: rep_errors = errors[input.name][i] else: rep_errors = dict() index = repeat_state[i]['__index__'] %>
File Contents for ${input.title_by_index( trans, i, other_values )}
${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} ##
%endfor ##
%endif %else: ${row_for_param( prefix, input, tool_state, errors, other_values )} %endif %endfor <%def name="row_for_param( prefix, param, parent_state, parent_errors, other_values )"> <% if parent_errors.has_key( param.name ): cls = "form-row form-row-error" else: cls = "form-row" %>
<% label = param.get_label() %> %if label: %endif <% field = param.get_html_field( trans, parent_state[ param.name ], other_values ) field.refresh_on_change = param.refresh_on_change # Field may contain characters submitted by user and these characters may be unicode; handle non-ascii characters gracefully. field_html = field.get_html( prefix ) if type( field_html ) is not unicode: field_html = unicode( field_html, 'utf-8' ) %>
${field_html}
%if parent_errors.has_key( param.name ):
 ${parent_errors[param.name]}
%endif %if param.help:
${param.help}
%endif
%if add_frame.from_noframe:
Welcome to Galaxy
It appears that you found this tool from a link outside of Galaxy. If you're not familiar with Galaxy, please consider visiting the welcome page. To learn more about what Galaxy is and what it can do for you, please visit the Galaxy wiki.

%endif ## handle calculating the redict url for the special case where we have nginx proxy ## upload and need to do url_for on the redirect portion of the tool action <% try: tool_url = h.url_for(tool.action) except AttributeError: assert len(tool.action) == 2 tool_url = tool.action[0] + h.url_for(tool.action[1]) %>
%if tool.has_multiple_pages:
${tool.name} (step ${tool_state.page+1} of ${tool.npages})
%else:
${tool.name}
%endif
%if tool.display_by_page[tool_state.page]: ${trans.fill_template_string( tool.display_by_page[tool_state.page], context=tool.get_param_html_map( trans, tool_state.page, tool_state.inputs ) )} %else: ${do_inputs( tool.inputs_by_page[ tool_state.page ], tool_state.inputs, errors, "" )}
%if tool_state.page == tool.last_page: %else: %endif
%endif
%if tool.help:
<% if tool.has_multiple_pages: tool_help = tool.help_by_page[tool_state.page] else: tool_help = tool.help # Convert to unicode to display non-ascii characters. if type( tool_help ) is not unicode: tool_help = unicode( tool_help, 'utf-8') %> ${tool_help}
%endif