details: http://www.bx.psu.edu/hg/galaxy/rev/11951fe9c714
changeset: 3789:11951fe9c714
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Sat May 15 13:12:38 2010 -0400
description:
Better UI flow for changing an HDA's data type.
diffstat:
lib/galaxy/web/controllers/root.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diffs (11 lines):
diff -r 00a558d5ad25 -r 11951fe9c714 lib/galaxy/web/controllers/root.py
--- a/lib/galaxy/web/controllers/root.py Sat May 15 11:25:05 2010 -0400
+++ b/lib/galaxy/web/controllers/root.py Sat May 15 13:12:38 2010 -0400
@@ -276,6 +276,7 @@
return trans.show_error_message( "This dataset is currently being used as input or output. You cannot change datatype until the jobs have completed or you have canceled them." )
trans.app.datatypes_registry.change_datatype( data, params.datatype )
trans.sa_session.flush()
+ return trans.show_ok_message( "Changed the type of dataset '%s' to %s" % ( data.name, params.datatype ), refresh_frames=['history'] )
else:
return trans.show_error_message( "You are unable to change datatypes in this manner. Changing %s to %s is not allowed." % ( data.extension, params.datatype ) )
elif params.save:
details: http://www.bx.psu.edu/hg/galaxy/rev/9ab8480354c7
changeset: 3787:9ab8480354c7
user: Greg Von Kuster <greg(a)bx.psu.edu>
date: Fri May 14 11:25:03 2010 -0400
description:
Fixes for editing tool information and submitting a tool for approval in the community space.
diffstat:
lib/galaxy/webapps/community/controllers/common.py | 13 +++++++++
lib/galaxy/webapps/community/datatypes/__init__.py | 2 +-
templates/webapps/community/tool/edit_tool.mako | 30 +++++++++++-----------
3 files changed, 29 insertions(+), 16 deletions(-)
diffs (100 lines):
diff -r 48432330228e -r 9ab8480354c7 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py Fri May 14 10:37:36 2010 -0400
+++ b/lib/galaxy/webapps/community/controllers/common.py Fri May 14 11:25:03 2010 -0400
@@ -43,6 +43,19 @@
message=message,
status='done' ) )
elif params.get( 'approval_button', False ):
+ if params.get( 'in_categories', False ):
+ in_categories = [ trans.sa_session.query( trans.app.model.Category ).get( x ) for x in util.listify( params.in_categories ) ]
+ trans.app.security_agent.set_entity_category_associations( tools=[ tool ], categories=in_categories )
+ else:
+ # There must not be any categories associated with the tool
+ trans.app.security_agent.set_entity_category_associations( tools=[ tool ], categories=[] )
+ user_description = util.restore_text( params.get( 'user_description', '' ) )
+ if user_description:
+ tool.user_description = user_description
+ else:
+ tool.user_description = ''
+ trans.sa_session.add( tool )
+ trans.sa_session.flush()
# Move the state from NEW to WAITING
event = trans.app.model.Event( state=trans.app.model.Tool.states.WAITING )
tea = trans.app.model.ToolEventAssociation( tool, event )
diff -r 48432330228e -r 9ab8480354c7 lib/galaxy/webapps/community/datatypes/__init__.py
--- a/lib/galaxy/webapps/community/datatypes/__init__.py Fri May 14 10:37:36 2010 -0400
+++ b/lib/galaxy/webapps/community/datatypes/__init__.py Fri May 14 11:25:03 2010 -0400
@@ -122,7 +122,7 @@
raise DatatypeVerificationError( 'Tool XML file does not conform to the specification. Missing required <tool> tag attribute: %s' % e )
rval.description = ''
desc_tag = root.find( 'description' )
- if desc_tag:
+ if desc_tag is not None:
description = desc_tag.text
if description:
rval.description = description.strip()
diff -r 48432330228e -r 9ab8480354c7 templates/webapps/community/tool/edit_tool.mako
--- a/templates/webapps/community/tool/edit_tool.mako Fri May 14 10:37:36 2010 -0400
+++ b/templates/webapps/community/tool/edit_tool.mako Fri May 14 11:25:03 2010 -0400
@@ -16,6 +16,13 @@
$(function(){
$("input:text:first").focus();
})
+ function confirmSubmit() {
+ if ( confirm( "After you have submitted your tool to be published, you will no longer be able to modify it. Click OK to submit it." ) ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
</script>
</%def>
@@ -89,9 +96,6 @@
%endif
<div style="clear: both"></div>
</div>
- <div class="form-row">
- <input type="submit" id="edit_tool_button" name="edit_tool_button" value="Save">
- </div>
</div>
</div>
<p/>
@@ -115,29 +119,25 @@
</div>
</div>
</div>
- </form>
- <p/>
- <div class="toolForm">
+ <p/>
%if tool.is_new():
- <div class="toolFormTitle">Get approval for publishing</div>
- <div class="toolFormBody">
- <form name="get_approval" id="get_approval" action="${h.url_for( controller='common', action='edit_tool' )}" method="post" >
- <input type="hidden" name="id" value="${trans.app.security.encode_id( tool.id )}"/>
- <input type="hidden" name="cntrller" value="${cntrller}"/>
+ <div class="toolForm">
+ <div class="toolFormTitle">Get approval for publishing</div>
+ <div class="toolFormBody">
<div class="form-row">
- <input type="submit" name="approval_button" value="Submit for approval"/>
+ <input type="submit" name="approval_button" id="approval_button" value="Submit for approval" onClick="return confirmSubmit()" />
</div>
<div class="form-row">
<div class="toolParamHelp" style="clear: both;">
Tools must be approved before they are made available to others in the community. After you have submitted
your tool to be published, you will no longer be able to modify it, so make sure the information above is
- correct and and save any changes before submitting for approval.
+ correct before submitting for approval.
</div>
</div>
- </form>
+ </div>
</div>
%endif
- </div>
+ </form>
%else:
${render_msg( "You are not allowed to edit this tool", "error" )}
%endif
details: http://www.bx.psu.edu/hg/galaxy/rev/5ead6e4c2ef4
changeset: 3785:5ead6e4c2ef4
user: jeremy goecks <jeremy.goecks(a)emory.edu>
date: Fri May 14 10:19:12 2010 -0400
description:
Fix comment.
diffstat:
tools/ngs_rna/gff_filtering.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r b5391bd3e9c7 -r 5ead6e4c2ef4 tools/ngs_rna/gff_filtering.py
--- a/tools/ngs_rna/gff_filtering.py Fri May 14 10:15:48 2010 -0400
+++ b/tools/ngs_rna/gff_filtering.py Fri May 14 10:19:12 2010 -0400
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# This tool takes a gff file as input and creates filters on attributes based on certain properties.
# The tool will skip over invalid lines within the file, informing the user about the number of lines skipped.
-# TODO: much of this code is copied from the Filter1 tool (filtering.py in this directory). The commonalities should be
+# TODO: much of this code is copied from the Filter1 tool (filtering.py in tools/stats/). The commonalities should be
# abstracted and leveraged in each filtering tool.
from __future__ import division