1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/52395842f8e6/ changeset: 52395842f8e6 user: jgoecks date: 2013-01-15 22:16:55 summary: Change 'clone workflow/visualization' to 'copy workflow/visualization' in user interface and associated code. affected #: 4 files diff -r f93113b8e4771c31aed6dd39aba38d09e11ffb31 -r 52395842f8e65a6484268d3db1e3dbac09d60089 lib/galaxy/webapps/galaxy/controllers/visualization.py --- a/lib/galaxy/webapps/galaxy/controllers/visualization.py +++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py @@ -190,7 +190,7 @@ grids.GridOperation( "Open", allow_multiple=False, url_args=get_url_args ), grids.GridOperation( "Open in Circster", allow_multiple=False, condition=( lambda item: item.type == 'trackster' ), url_args=dict( action='circster' ) ), grids.GridOperation( "Edit Attributes", allow_multiple=False, url_args=dict( action='edit') ), - grids.GridOperation( "Copy", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False, url_args=dict( action='clone') ), + grids.GridOperation( "Copy", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False, url_args=dict( action='copy') ), grids.GridOperation( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ), grids.GridOperation( "Delete", condition=( lambda item: not item.deleted ), async_compatible=True, confirm="Are you sure you want to delete this visualization?" ), ] @@ -352,7 +352,7 @@ @web.expose @web.require_login() - def clone(self, trans, id, *args, **kwargs): + def copy(self, trans, id, *args, **kwargs): visualization = self.get_visualization( trans, id, check_ownership=False ) user = trans.get_user() owner = ( visualization.user == user ) @@ -360,15 +360,15 @@ if not owner: new_title += " shared by %s" % visualization.user.email - cloned_visualization = visualization.copy( user=trans.user, title=new_title ) + copied_viz = visualization.copy( user=trans.user, title=new_title ) # Persist session = trans.sa_session - session.add( cloned_visualization ) + session.add( copied_viz ) session.flush() # Display the management page - trans.set_message( 'Copy created with name "%s"' % cloned_visualization.title ) + trans.set_message( 'Created new visualization with name "%s"' % copied_viz.title ) return self.list( trans ) @web.expose diff -r f93113b8e4771c31aed6dd39aba38d09e11ffb31 -r 52395842f8e65a6484268d3db1e3dbac09d60089 lib/galaxy/webapps/galaxy/controllers/workflow.py --- a/lib/galaxy/webapps/galaxy/controllers/workflow.py +++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py @@ -51,7 +51,7 @@ operations = [ grids.GridOperation( "Edit", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ), grids.GridOperation( "Run", condition=( lambda item: not item.deleted ), async_compatible=False ), - grids.GridOperation( "Clone", condition=( lambda item: not item.deleted ), async_compatible=False ), + grids.GridOperation( "Copy", condition=( lambda item: not item.deleted ), async_compatible=False ), grids.GridOperation( "Rename", condition=( lambda item: not item.deleted ), async_compatible=False ), grids.GridOperation( "Sharing", condition=( lambda item: not item.deleted ), async_compatible=False ), grids.GridOperation( "Delete", condition=( lambda item: item.deleted ), async_compatible=True ), @@ -499,8 +499,8 @@ @web.expose @web.require_login( "use Galaxy workflows" ) - def clone( self, trans, id ): - # Get workflow to clone. + def copy( self, trans, id ): + # Get workflow to copy. stored = self.get_stored_workflow( trans, id, check_ownership=False ) user = trans.get_user() if stored.user == user: @@ -511,11 +511,11 @@ error( "Workflow is not owned by or shared with current user" ) owner = False - # Clone. + # Copy. new_stored = model.StoredWorkflow() - new_stored.name = "Clone of '%s'" % stored.name + new_stored.name = "Copy of '%s'" % stored.name new_stored.latest_workflow = stored.latest_workflow - # Clone annotation. + # Copy annotation. annotation_obj = self.get_item_annotation_obj( trans.sa_session, stored.user, stored ) if annotation_obj: self.add_item_annotation( trans.sa_session, trans.get_user(), new_stored, annotation_obj.annotation ) @@ -528,7 +528,7 @@ session.add( new_stored ) session.flush() # Display the management page - trans.set_message( 'Clone created with name "%s"' % new_stored.name ) + trans.set_message( 'Created new workflow with name "%s"' % new_stored.name ) return self.list( trans ) @web.expose diff -r f93113b8e4771c31aed6dd39aba38d09e11ffb31 -r 52395842f8e65a6484268d3db1e3dbac09d60089 templates/visualization/list.mako --- a/templates/visualization/list.mako +++ b/templates/visualization/list.mako @@ -48,7 +48,7 @@ <td><div popupmenu="shared-${i}-popup"><a class="action-button" href="${h.url_for( action='display_by_username_and_slug', username=visualization.user.username, slug=visualization.slug)}" target="_top">View</a> - <a class="action-button" href="${h.url_for( action='clone', id=trans.security.encode_id(visualization.id) )}">Copy</a> + <a class="action-button" href="${h.url_for( action='copy', id=trans.security.encode_id(visualization.id) )}">Copy</a></div></td></tr> diff -r f93113b8e4771c31aed6dd39aba38d09e11ffb31 -r 52395842f8e65a6484268d3db1e3dbac09d60089 templates/workflow/list.mako --- a/templates/workflow/list.mako +++ b/templates/workflow/list.mako @@ -67,7 +67,7 @@ <a class="action-button" href="${h.url_for( controller='root', action='index', workflow_id=trans.security.encode_id( workflow.id ) )}" target="_parent">Run</a><a class="action-button" href="${h.url_for( controller='workflow', action='sharing', id=trans.security.encode_id( workflow.id ) )}">Share or Publish</a><a class="action-button" href="${h.url_for( controller='workflow', action='export', id=trans.security.encode_id( workflow.id ) )}">Download or Export</a> - <a class="action-button" href="${h.url_for( controller='workflow', action='clone', id=trans.security.encode_id( workflow.id ) )}">Clone</a> + <a class="action-button" href="${h.url_for( controller='workflow', action='copy', id=trans.security.encode_id( workflow.id ) )}">Copy</a><a class="action-button" href="${h.url_for( controller='workflow', action='rename', id=trans.security.encode_id( workflow.id ) )}">Rename</a><a class="action-button" href="${h.url_for( controller='workflow', action='display_by_id', id=trans.security.encode_id( workflow.id ) )}" target="_top">View</a><a class="action-button" confirm="Are you sure you want to delete workflow '${h.to_unicode( workflow.name ) | h}'?" href="${h.url_for( controller='workflow', action='delete', id=trans.security.encode_id( workflow.id ) )}">Delete</a> @@ -102,7 +102,7 @@ <div popupmenu="shared-${i}-popup"><a class="action-button" href="${h.url_for( controller='workflow', action='display_by_username_and_slug', username=workflow.user.username, slug=workflow.slug )}" target="_top">View</a><a class="action-button" href="${h.url_for( controller='workflow', action='run', id=trans.security.encode_id( workflow.id ) )}">Run</a> - <a class="action-button" href="${h.url_for( controller='workflow', action='clone', id=trans.security.encode_id( workflow.id ) )}">Clone</a> + <a class="action-button" href="${h.url_for( controller='workflow', action='copy', id=trans.security.encode_id( workflow.id ) )}">Copy</a><a class="action-button" confirm="Are you sure you want to remove the shared workflow '${h.to_unicode( workflow.name ) | h}'?" href="${h.url_for( controller='workflow', action='sharing', unshare_me=True, id=trans.security.encode_id( workflow.id ))}">Remove</a></div></td> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.