[hg] galaxy 3580: lims: fixed a bug in selecting workflow in the...
details: http://www.bx.psu.edu/hg/galaxy/rev/8268439390c6 changeset: 3580:8268439390c6 user: rc date: Tue Mar 30 15:39:14 2010 -0400 description: lims: fixed a bug in selecting workflow in the samples page diffstat: templates/admin/requests/show_request.mako | 10 ++++++---- templates/requests/show_request.mako | 20 +++++++++++++++++++- 2 files changed, 25 insertions(+), 5 deletions(-) diffs (60 lines): diff -r 153e7dd5ba1e -r 8268439390c6 templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Tue Mar 30 09:34:56 2010 -0400 +++ b/templates/admin/requests/show_request.mako Tue Mar 30 15:39:14 2010 -0400 @@ -287,10 +287,12 @@ %elif field['type'] == 'WorkflowField': <select name="sample_${index}_field_${field_index}"> %for option_index, option in enumerate(request.user.stored_workflows): - %if option == sample_values[field_index]: - <option value="${option.id}" selected>${option.name}</option> - %else: - <option value="${option.id}">${option.name}</option> + %if not option.deleted: + %if str(option.id) == str(sample_values[field_index]): + <option value="${option.id}" selected>${option.name}</option> + %else: + <option value="${option.id}">${option.name}</option> + %endif %endif %endfor </select> diff -r 153e7dd5ba1e -r 8268439390c6 templates/requests/show_request.mako --- a/templates/requests/show_request.mako Tue Mar 30 09:34:56 2010 -0400 +++ b/templates/requests/show_request.mako Tue Mar 30 15:39:14 2010 -0400 @@ -212,6 +212,18 @@ %endif %endfor </select> + %elif field['type'] == 'WorkflowField': + <select name="sample_${index}_field_${field_index}"> + %for option_index, option in enumerate(request.user.stored_workflows): + %if not option.deleted: + %if str(option.id) == str(sample_values[field_index]): + <option value="${option.id}" selected>${option.name}</option> + %else: + <option value="${option.id}">${option.name}</option> + %endif + %endif + %endfor + </select> %elif field['type'] == 'CheckboxField': <input type="checkbox" name="sample_${index}_field_${field_index}" value="Yes"/> %endif @@ -229,10 +241,16 @@ %for field_index, field in fields_dict.items(): <td> %if sample_values[field_index]: - ${sample_values[field_index]} + %if field['type'] == 'WorkflowField': + <% workflow = trans.sa_session.query( trans.app.model.StoredWorkflow ).get( int(sample_values[field_index]) ) %> + <a href="${h.url_for( controller='workflow', action='run', id=trans.security.encode_id(workflow.id) )}">${workflow.name}</a> + %else: + ${sample_values[field_index]} + %endif %else: <i>None</i> %endif + </td> %endfor </%def>
participants (1)
-
Greg Von Kuster