From e7662f7065f0a77dfdd121c133dbfc4ff46cc74b Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 17 Oct 2018 16:45:33 -0400 Subject: [PATCH] Fix workflow preview --- templates/display_base.mako | 4 +-- .../webapps/galaxy/workflow/display.mako | 28 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/templates/display_base.mako b/templates/display_base.mako index 3d2003998ef..853c5a9d2dc 100644 --- a/templates/display_base.mako +++ b/templates/display_base.mako @@ -79,7 +79,7 @@ <%def name="render_item_header( item )"> -

Galaxy ${get_class_display_name( item.__class__ )} '${get_item_name( item )| h}'

+

${get_item_name( item )| h}

%if hasattr( item, "annotation") and item.annotation is not None:
Annotation: ${item.annotation}
%endif @@ -115,7 +115,7 @@ href_to_user_items = h.url_for( controller='/' + modern_route, action='list_published', xxx=item.user.username) href_to_user_items = href_to_user_items.replace( 'xxx', 'f-username') %> -
+
${self.render_item_header( item )}
diff --git a/templates/webapps/galaxy/workflow/display.mako b/templates/webapps/galaxy/workflow/display.mako index 4c01992b98d..476144e6675 100644 --- a/templates/webapps/galaxy/workflow/display.mako +++ b/templates/webapps/galaxy/workflow/display.mako @@ -14,13 +14,13 @@ <%def name="do_inputs( inputs, values, prefix, step, other_values=None )"> %for input_index, input in enumerate( inputs.values() ): %if input.type == "repeat": -
-
${input.title_plural}
+
+
${input.title_plural}
<% repeat_values = values[input.name] %> %for i in range( len( repeat_values ) ): -
+
<% index = repeat_values[i]['__index__'] %> -
${input.title} ${i + 1}
+
${input.title} ${i + 1}
${do_inputs( input.inputs, repeat_values[ i ], prefix + input.name + "_" + str(index) + "|", step, other_values )}
%endfor @@ -34,9 +34,9 @@ %elif input.type == "section": <% new_prefix = prefix + input.name + "|" %> <% group_values = values[input.name] %> -
${input.title}:
-
-
+
${input.title}:
+
+
${do_inputs( input.inputs, group_values, new_prefix, step, other_values )}
@@ -100,22 +100,22 @@ <% tool = trans.app.toolbox.get_tool( step.tool_id ) %> -
+
%if tool: -
Step ${int(step.order_index)+1}: ${tool.name | h}
-
+
Step ${int(step.order_index)+1}: ${tool.name | h}
+
${do_inputs( tool.inputs, step.state.inputs, "", step )}
%else: -
Step ${int(step.order_index)+1}: Unknown Tool with id '${step.tool_id | h}'
+
Step ${int(step.order_index)+1}: Unknown Tool with id '${step.tool_id | h}'
%endif
%else: ## TODO: always input dataset? <% module = step.module %> -
-
Step ${int(step.order_index)+1}: ${module.name | h}
-
+
+
Step ${int(step.order_index)+1}: ${module.name | h}
+
${do_inputs( module.get_runtime_inputs(), step.state.inputs, "", step )}