[hg] galaxy 2890: Added anchors--identified by encoded id--to da...
details: http://www.bx.psu.edu/hg/galaxy/rev/16a0c13c94cc changeset: 2890:16a0c13c94cc user: jeremy goecks <jeremy.goecks at emory.edu> date: Fri Oct 16 15:54:43 2009 -0400 description: Added anchors--identified by encoded id--to datasets in a history so that HDAs can be directly referenced. Clicking on a dataset in the datasets (HDAs) grid now goes to the dataset within the history. 4 file(s) affected in this change: lib/galaxy/web/controllers/root.py templates/dataset/grid.mako templates/root/history.mako templates/root/history_common.mako diffs (59 lines): diff -r 15756ebb2b11 -r 16a0c13c94cc lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Thu Oct 15 20:10:32 2009 -0400 +++ b/lib/galaxy/web/controllers/root.py Fri Oct 16 15:54:43 2009 -0400 @@ -55,7 +55,7 @@ return trans.fill_template_mako( "/my_data.mako" ) @web.expose - def history( self, trans, as_xml=False, show_deleted=False ): + def history( self, trans, as_xml=False, show_deleted=False, hda_id=None ): """ Display the current history, creating a new history if necessary. NOTE: No longer accepts "id" or "template" options for security reasons. @@ -78,6 +78,7 @@ return trans.stream_template_mako( "root/history.mako", history = history, datasets = query.all(), + hda_id = hda_id, show_deleted = show_deleted ) @web.expose diff -r 15756ebb2b11 -r 16a0c13c94cc templates/dataset/grid.mako --- a/templates/dataset/grid.mako Thu Oct 15 20:10:32 2009 -0400 +++ b/templates/dataset/grid.mako Fri Oct 16 15:54:43 2009 -0400 @@ -110,7 +110,7 @@ %endif %if 'history' in refresh_frames: if ( parent.frames && parent.frames.galaxy_history ) { - parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history')}"; + parent.frames.galaxy_history.location.href="${h.url_for( controller='root', action='history', hda_id=str(ids) )}"; if ( parent.force_right_panel ) { parent.force_right_panel( 'show' ); } diff -r 15756ebb2b11 -r 16a0c13c94cc templates/root/history.mako --- a/templates/root/history.mako Thu Oct 15 20:10:32 2009 -0400 +++ b/templates/root/history.mako Fri Oct 16 15:54:43 2009 -0400 @@ -77,6 +77,10 @@ <% updateable = [data for data in reversed( datasets ) if data.visible and data.state not in [ "deleted", "empty", "error", "ok" ]] %> ${ ",".join( map(lambda data: "\"%s\" : \"%s\"" % (data.id, data.state), updateable) ) } }); + // Navigate to a dataset. + %if hda_id: + self.location = "#${hda_id}"; + %endif }); // Functionized so AJAX'd datasets can call them function initShowHide() { diff -r 15756ebb2b11 -r 16a0c13c94cc templates/root/history_common.mako --- a/templates/root/history_common.mako Thu Oct 15 20:10:32 2009 -0400 +++ b/templates/root/history_common.mako Fri Oct 16 15:54:43 2009 -0400 @@ -20,7 +20,8 @@ </div> %endif - ## Header row for history items (name, state, action buttons) + ## Header row for history items (name, state, action buttons) + <a name="${trans.security.encode_id(data.id)}"></a> <div style="overflow: hidden;" class="historyItemTitleBar"> <div class="historyItemButtons"> %if data_state == "upload":
participants (1)
-
Greg Von Kuster