# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User rc # Date 1289922517 18000 # Node ID 5a217a7ce999bbe218432a7442751b5b78684798 # Parent 33dacaafc62eac4a8940c4bc978da1d1a6c68af9 Replaced request with 'sequencing request' in sample tracking ui. Show the request page instead of the request grid after submitting the request --- a/templates/admin/requests/edit_request_type.mako +++ b/templates/admin/requests/edit_request_type.mako @@ -28,7 +28,7 @@ </div><div class="form-row"><label> - Request Form definition: + Sequencing Request Form definition: </label><select name="form_id"> %for form in forms: --- a/templates/requests/common/edit_samples.mako +++ b/templates/requests/common/edit_samples.mako @@ -69,16 +69,16 @@ </div></ul> -%if request.samples_without_library_destinations: +%if request.is_rejected: <p> - <font color="red"><b><i>Select a target data library and folder for a sample before selecting it's datasets to transfer from the sequencer</i></b></font> + <font color="red"><b>${request.last_comment}</b></font></p> %endif -%if request.is_rejected: - <br/> - <font color="red"><b><i>Reason for rejection: </i></b></font><b>${request.last_comment}</b> - <br/> +%if request.samples_without_library_destinations: + <p> + <font color="red"><b><i>Select a target data library and folder for a sample before selecting it's datasets to transfer from the sequencer</i></b></font> + </p> %endif %if message: @@ -90,9 +90,9 @@ %if displayable_sample_widgets: <% if editing_samples: - grid_header = '<h3>Edit Current Samples of Request "%s"</h3>' % request.name + grid_header = '<h3>Edit Current Samples of Sequencing Request "%s"</h3>' % request.name else: - grid_header = '<h3>Add Samples to Request "%s"</h3>' % request.name + grid_header = '<h3>Add Samples to Sequencing Request "%s"</h3>' % request.name %> ${render_samples_grid( cntrller, request, displayable_sample_widgets, action='edit_samples', editing_samples=editing_samples, encoded_selected_sample_ids=encoded_selected_sample_ids, render_buttons=False, grid_header=grid_header )} %if editing_samples and len( sample_operation_select_field.options ) > 1 and not is_unsubmitted: --- a/lib/galaxy/web/controllers/requests_common.py +++ b/lib/galaxy/web/controllers/requests_common.py @@ -157,7 +157,7 @@ class RequestsCommon( BaseController, Us status = 'error' else: request = self.__save_request( trans, cntrller, **kwd ) - message = 'The request has been created.' + message = 'The sequencing request has been created.' if params.get( 'create_request_button', False ): return trans.response.send_redirect( web.url_for( controller=cntrller, action='browse_requests', @@ -316,7 +316,7 @@ class RequestsCommon( BaseController, Us trans.sa_session.flush() trans.sa_session.refresh( request ) # Create an event with state 'New' for this new request - comment = "Request created by %s" % trans.user.email + comment = "Sequencing request created by %s" % trans.user.email if request.user != trans.user: comment += " on behalf of %s." % request.user.email event = trans.model.RequestEvent( request, request.states.NEW, comment ) @@ -358,7 +358,7 @@ class RequestsCommon( BaseController, Us status='error', message=message ) ) # Change the request state to 'Submitted' - comment = "Request submitted by %s" % trans.user.email + comment = "Sequencing request submitted by %s" % trans.user.email if request.user != trans.user: comment += " on behalf of %s." % request.user.email event = trans.model.RequestEvent( request, request.states.SUBMITTED, comment ) @@ -373,7 +373,7 @@ class RequestsCommon( BaseController, Us # request's RequestType configured by the admin. initial_sample_state_after_request_submitted = request.type.states[0] for sample in request.samples: - event_comment = 'Request submitted and sample state set to %s.' % request.type.states[0].name + event_comment = 'Sequencing request submitted and sample state set to %s.' % request.type.states[0].name event = trans.model.SampleEvent( sample, initial_sample_state_after_request_submitted, event_comment ) @@ -381,9 +381,10 @@ class RequestsCommon( BaseController, Us trans.sa_session.add( request ) trans.sa_session.flush() request.send_email_notification( trans, initial_sample_state_after_request_submitted ) - message = 'The request has been submitted.' - return trans.response.send_redirect( web.url_for( controller=cntrller, - action='browse_requests', + message = 'The sequencing request has been submitted.' + # show the request page after submitting the request + return trans.response.send_redirect( web.url_for( controller='requests_common', + action='view_request', cntrller=cntrller, id=request_id, status=status, @@ -528,7 +529,7 @@ class RequestsCommon( BaseController, Us for s in request.samples: s.deleted = True trans.sa_session.add( s ) - comment = "Request marked deleted by %s." % trans.user.email + comment = "Sequencing request marked deleted by %s." % trans.user.email # There is no DELETED state for a request, so keep the current request state event = trans.model.RequestEvent( request, request.state, comment ) trans.sa_session.add( event ) @@ -568,7 +569,7 @@ class RequestsCommon( BaseController, Us for s in request.samples: s.deleted = False trans.sa_session.add( s ) - comment = "Request marked undeleted by %s." % trans.user.email + comment = "Sequencing request marked undeleted by %s." % trans.user.email event = trans.model.RequestEvent( request, request.state, comment ) trans.sa_session.add( event ) trans.sa_session.flush() @@ -686,11 +687,11 @@ class RequestsCommon( BaseController, Us request_type_state = request.type.final_sample_state if common_state.id == request_type_state.id: # since all the samples are in the final state, change the request state to 'Complete' - comment = "All samples of this request are in the final sample state (%s). " % request_type_state.name + comment = "All samples of this sequencing request are in the final sample state (%s). " % request_type_state.name state = request.states.COMPLETE final_state = True else: - comment = "All samples of this request are in the (%s) sample state. " % common_state.name + comment = "All samples of this sequencing request are in the (%s) sample state. " % common_state.name state = request.states.SUBMITTED event = trans.model.RequestEvent( request, state, comment ) trans.sa_session.add( event ) --- a/templates/admin/requests/view_request_type.mako +++ b/templates/admin/requests/view_request_type.mako @@ -38,7 +38,7 @@ <div style="clear: both"></div></div><div class="form-row"> - <label>Request form definition</label> + <label>Sequencing Request form definition</label> ${request_type.request_form.name} </div><div class="form-row"> --- a/lib/galaxy/web/controllers/requests_admin.py +++ b/lib/galaxy/web/controllers/requests_admin.py @@ -223,11 +223,11 @@ class RequestsAdmin( BaseController, Use status=status, message=message ) # Create an event with state 'Rejected' for this request - event_comment = "Request marked rejected by %s. Reason: %s " % ( trans.user.email, comment ) + event_comment = "Sequencing request marked rejected by %s. Reason: %s " % ( trans.user.email, comment ) event = trans.model.RequestEvent( request, request.states.REJECTED, event_comment ) trans.sa_session.add( event ) trans.sa_session.flush() - message='Request (%s) has been rejected.' % request.name + message='Sequencing request (%s) has been rejected.' % request.name return trans.response.send_redirect( web.url_for( controller='requests_admin', action='browse_requests', status=status, --- a/templates/admin/requests/reject.mako +++ b/templates/admin/requests/reject.mako @@ -5,7 +5,6 @@ ${render_msg( message, status )} %endif <br/><br/> -##<h2>Reject Sequencing Request "${request.name}"</h2><ul class="manage-table-actions"><li><a class="action-button" href="${h.url_for( controller='requests_common', action='view_request_history', cntrller=cntrller, id=trans.security.encode_id(request.id) )}">View history</a> --- a/templates/requests/common/view_request.mako +++ b/templates/requests/common/view_request.mako @@ -52,14 +52,14 @@ </ul> %if request.is_rejected: - <br/> - <font color="red"><b><i>Reason for rejection: </i></b></font><b>${request.last_comment}</b> - <br/> + <p> + <font color="red"><b>${request.last_comment}</b></font> + </p> %endif %if request.samples_without_library_destinations: <p> - <font color="red"><b><i>Select a target data library and folder for a sample before selecting it's datasets to transfer from the sequencer</i></b></font> + <font color="red"><b><i>Select a target data library and folder for a sample before selecting it's datasets to transfer from the sequencer</i></b></font></p> %endif --- a/templates/requests/common/common.mako +++ b/templates/requests/common/common.mako @@ -159,6 +159,8 @@ <input type="hidden" name="sample_${sample_widget_index}_bar_code" value="${sample_widget['bar_code']}"/> %endif </td> + %else: + <td></td> %endif %if sample: %if is_unsubmitted: