1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/3d32fa091951/ changeset: 3d32fa091951 user: jgoecks date: 2012-08-25 00:15:29 summary: Enable function to be used for generating a grid operation link; use this functionality to generate link for viewing/editing visualization. affected #: 2 files diff -r df99df26d92fa8a5e3eaef4fd1eef4b6ee18f86d -r 3d32fa091951e9aa72f3c69272960b3f6b648722 lib/galaxy/web/controllers/visualization.py --- a/lib/galaxy/web/controllers/visualization.py +++ b/lib/galaxy/web/controllers/visualization.py @@ -5,7 +5,7 @@ from galaxy.util.sanitize_html import sanitize_html class VisualizationListGrid( grids.Grid ): - def get_link( item ): + def get_url_args( item ): """ Returns dictionary used to create item link. """ @@ -24,7 +24,7 @@ default_sort_key = "-update_time" default_filter = dict( title="All", deleted="False", tags="All", sharing="All" ) columns = [ - grids.TextColumn( "Title", key="title", attach_popup=True, link=get_link ), + grids.TextColumn( "Title", key="title", attach_popup=True, link=get_url_args ), grids.TextColumn( "Type", key="type" ), grids.TextColumn( "Dbkey", key="dbkey" ), grids.IndividualTagsColumn( "Tags", key="tags", model_tag_association_class=model.VisualizationTagAssociation, filterable="advanced", grid_name="VisualizationListGrid" ), @@ -42,7 +42,7 @@ grids.GridAction( "Create new visualization", dict( action='create' ) ) ] operations = [ - grids.GridOperation( "View/Edit", allow_multiple=False, url_args=dict( controller='tracks', action='browser' ) ), + grids.GridOperation( "View/Edit", allow_multiple=False, url_args=get_url_args ), 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( "Share or Publish", allow_multiple=False, condition=( lambda item: not item.deleted ), async_compatible=False ), diff -r df99df26d92fa8a5e3eaef4fd1eef4b6ee18f86d -r 3d32fa091951e9aa72f3c69272960b3f6b648722 lib/galaxy/web/framework/helpers/grids.py --- a/lib/galaxy/web/framework/helpers/grids.py +++ b/lib/galaxy/web/framework/helpers/grids.py @@ -728,9 +728,12 @@ self.global_operation = global_operation def get_url_args( self, item ): if self.url_args: - temp = dict( self.url_args ) - temp['id'] = item.id - return temp + if hasattr( self.url_args, '__call__' ): + url_args = self.url_args( item ) + else: + url_args = dict( self.url_args ) + url_args['id'] = item.id + return url_args else: return dict( operation=self.label, id=item.id ) def allowed( self, item ): 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.