details: http://www.bx.psu.edu/hg/galaxy/rev/fa0483a31237 changeset: 2920:fa0483a31237 user: rc date: Mon Oct 26 15:05:20 2009 -0400 description: Samples go to to next state when bar codes are assigned to them 3 file(s) affected in this change: lib/galaxy/web/controllers/requests.py lib/galaxy/web/controllers/requests_admin.py templates/admin/requests/show_request.mako diffs (58 lines): diff -r ef5215401458 -r fa0483a31237 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Mon Oct 26 14:01:46 2009 -0400 +++ b/lib/galaxy/web/controllers/requests.py Mon Oct 26 15:05:20 2009 -0400 @@ -460,7 +460,7 @@ select_request_type = self.__select_request_type(trans, request_type.id) # list of widgets to be rendered on the request form widgets = [] - widgets.append(dict(label='Name', + widgets.append(dict(label='Name of the Experiment', widget=TextField('name', 40, util.restore_text( params.get( 'name', '' ) )), helptext='(Required)')) diff -r ef5215401458 -r fa0483a31237 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Mon Oct 26 14:01:46 2009 -0400 +++ b/lib/galaxy/web/controllers/requests_admin.py Mon Oct 26 15:05:20 2009 -0400 @@ -358,7 +358,7 @@ widgets.append(dict(label='Select user', widget=self.__select_user(trans, user_id), helptext='The request would be submitted on behalf of this user (Required)')) - widgets.append(dict(label='Name', + widgets.append(dict(label='Name of the Experiment', widget=TextField('name', 40, util.restore_text( params.get( 'name', '' ) )), helptext='(Required)')) @@ -391,7 +391,7 @@ def __get_email(user): return user.email user_list = trans.sa_session.query( trans.app.model.User ) - user_list.sort(key=__get_email) + #user_list.sort(key=__get_email) for user in user_list: if not user.deleted: if userid == str(user.id): @@ -1038,6 +1038,12 @@ bar_code = util.restore_text(params.get('sample_%i_bar_code' % index, '')) sample.bar_code = bar_code sample.flush() + # change the state of all the samples to the next state + # get the new state + new_state = request.type.states[1] + for s in request.samples: + event = trans.app.model.SampleEvent(s, new_state, 'Bar code added to this sample') + event.flush() return trans.response.send_redirect( web.url_for( controller='requests_admin', action='bar_codes', request_id=request.id, diff -r ef5215401458 -r fa0483a31237 templates/admin/requests/show_request.mako --- a/templates/admin/requests/show_request.mako Mon Oct 26 14:01:46 2009 -0400 +++ b/templates/admin/requests/show_request.mako Mon Oct 26 15:05:20 2009 -0400 @@ -180,7 +180,7 @@ ${render_sample_form( sample_index, sample[0], sample[1], grid_index, fields_dict)} %endif <td> - %if request.unsubmitted() and grid_index == 0: + %if grid_index == 0: <a class="action-button" href="${h.url_for( controller='requests_admin', action='delete_sample', request_id=request.id, sample_id=sample_index)}"> <img src="${h.url_for('/static/images/delete_icon.png')}" /> <span></span></a>