galaxy-dist commit d2d0c199c20d: Improvements to annotation display when running workflows: (1) workflow annotation is shown at the top of the page; (2) step annotations are shown in the step header rather than at the bottom. Fixes Issue #420
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User jeremy goecks <jeremy.goecks@emory.edu> # Date 1289925819 18000 # Node ID d2d0c199c20ddf942e1e2587dc9aede8acd9cebc # Parent 5a217a7ce999bbe218432a7442751b5b78684798 Improvements to annotation display when running workflows: (1) workflow annotation is shown at the top of the page; (2) step annotations are shown in the step header rather than at the bottom. Fixes Issue #420 --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -1333,6 +1333,7 @@ class WorkflowController( BaseController # Connections by input name step.input_connections_by_name = dict( ( conn.input_name, conn ) for conn in step.input_connections ) # Render the form + stored.annotation = self.get_item_annotation_str( trans.sa_session, trans.user, stored ) return trans.fill_template( "workflow/run.mako", steps=workflow.steps, --- a/templates/workflow/run.mako +++ b/templates/workflow/run.mako @@ -20,6 +20,14 @@ margin-top: 10px; margin-bottom: 10px; } + .step-annotation { + margin-top: 0.25em; + font-weight: normal; + font-size: 97%; + } + .workflow-annotation { + margin-bottom: 1em; + } </style></%def> @@ -129,6 +137,11 @@ from galaxy.jobs.actions.post import Act </div> %endif +%if workflow.annotation: + <div class="workflow-annotation">Annotation: ${workflow.annotation}</div> + <hr/> +%endif + <form id="tool_form" name="tool_form" method="POST"> ## <input type="hidden" name="workflow_name" value="${h.to_unicode( workflow.name ) | h}" /> %for i, step in enumerate( steps ): @@ -136,7 +149,12 @@ from galaxy.jobs.actions.post import Act <% tool = app.toolbox.tools_by_id[step.tool_id] %><input type="hidden" name="${step.id}|tool_state" value="${step.state.encode( tool, app )}"><div class="toolForm"> - <div class="toolFormTitle">Step ${int(step.order_index)+1}: ${tool.name}</div> + <div class="toolFormTitle"> + Step ${int(step.order_index)+1}: ${tool.name} + % if step.annotations: + <div class="step-annotation">Annotation: ${h.to_unicode( step.annotations[0].annotation )}</div> + % endif + </div><div class="toolFormBody"> ${do_inputs( tool.inputs, step.state.inputs, errors.get( step.id, dict() ), "", step )} % if step.post_job_actions: @@ -150,27 +168,21 @@ from galaxy.jobs.actions.post import Act ${'<br/>'.join([ActionBox.get_short_str(pja) for pja in step.post_job_actions])} </div> % endif - % if step.annotations: - <hr/> - <div class='form-row'> - <label>Annotation:</label> ${h.to_unicode( step.annotations[0].annotation )} - </div> - % endif </div></div> %else: <% module = step.module %><input type="hidden" name="${step.id}|tool_state" value="${module.encode_runtime_state( t, step.state )}"><div class="toolForm"> - <div class="toolFormTitle">Step ${int(step.order_index)+1}: ${module.name}</div> + <div class="toolFormTitle"> + Step ${int(step.order_index)+1}: ${module.name} + % if step.annotations: + <div class="step-annotation">Annotation: ${step.annotations[0].annotation}</div> + % endif + + </div><div class="toolFormBody"> ${do_inputs( module.get_runtime_inputs(), step.state.inputs, errors.get( step.id, dict() ), "", step )} - % if step.annotations: - <hr/> - <div class='form-row'> - <label>Annotation:</label> ${step.annotations[0].annotation} - </div> - % endif </div></div> %endif
participants (1)
-
commits-noreply@bitbucket.org