commit/galaxy-central: natefoo: Allow viewing deleted datasets from /history/view.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/ddd51b0d4556/ changeset: ddd51b0d4556 user: natefoo date: 2011-06-29 17:07:37 summary: Allow viewing deleted datasets from /history/view. affected #: 3 files (453 bytes) --- a/lib/galaxy/web/controllers/history.py Tue Jun 28 16:19:30 2011 -0400 +++ b/lib/galaxy/web/controllers/history.py Wed Jun 29 11:07:37 2011 -0400 @@ -738,7 +738,7 @@ """ % ( web.url_for( id=id, confirm=True, referer=trans.request.referer ), referer_message ), use_panels=True ) @web.expose - def view( self, trans, id=None ): + def view( self, trans, id=None, show_deleted=False ): """View a history. If a history is importable, then it is viewable by any user.""" # Get history to view. if not id: @@ -751,11 +751,12 @@ if not trans.user_is_admin() and not history_to_view.importable: error( "Either you are not allowed to view this history or the owner of this history has not made it accessible." ) # View history. - datasets = self.get_history_datasets( trans, history_to_view ) + show_deleted = util.string_as_bool( show_deleted ) + datasets = self.get_history_datasets( trans, history_to_view, show_deleted=show_deleted ) return trans.stream_template_mako( "history/view.mako", history = history_to_view, datasets = datasets, - show_deleted = False ) + show_deleted = show_deleted ) @web.expose def display_by_username_and_slug( self, trans, username, slug ): --- a/templates/history/view.mako Tue Jun 28 16:19:30 2011 -0400 +++ b/templates/history/view.mako Wed Jun 29 11:07:37 2011 -0400 @@ -84,7 +84,9 @@ <a href="${h.url_for( action='imp', id=trans.security.encode_id(history.id) )}">import and start using history</a> | <a href="${get_history_link( history )}">${_('refresh')}</a> %if show_deleted: - | <a href="${h.url_for('history', show_deleted=False)}">${_('hide deleted')}</a> + | <a href="${h.url_for( id=trans.security.encode_id(history.id), show_deleted=False )}">${_('hide deleted')}</a> + %else: + | <a href="${h.url_for( id=trans.security.encode_id(history.id), show_deleted=True )}">${_('show deleted')}</a> %endif | <a href="#" class="toggle">collapse all</a></div> --- a/templates/root/history_common.mako Tue Jun 28 16:19:30 2011 -0400 +++ b/templates/root/history_common.mako Wed Jun 29 11:07:37 2011 -0400 @@ -49,11 +49,14 @@ %if data.dataset.purged or data.purged: This dataset has been deleted and removed from disk. %else: - This dataset has been deleted. Click <a href="${h.url_for( controller='dataset', action='undelete', id=data.id )}" class="historyItemUndelete" id="historyItemUndeleter-${data.id}" target="galaxy_history">here</a> to undelete - %if trans.app.config.allow_user_dataset_purge: - or <a href="${h.url_for( controller='dataset', action='purge', id=data.id )}" class="historyItemPurge" id="historyItemPurger-${data.id}" target="galaxy_history">here</a> to immediately remove it from disk. - %else: - it. + This dataset has been deleted. + %if for_editing: + Click <a href="${h.url_for( controller='dataset', action='undelete', id=data.id )}" class="historyItemUndelete" id="historyItemUndeleter-${data.id}" target="galaxy_history">here</a> to undelete + %if trans.app.config.allow_user_dataset_purge: + or <a href="${h.url_for( controller='dataset', action='purge', id=data.id )}" class="historyItemPurge" id="historyItemPurger-${data.id}" target="galaxy_history">here</a> to immediately remove it from disk. + %else: + it. + %endif %endif %endif </strong></div> @@ -151,7 +154,9 @@ An error occurred running this job: <i>${data.display_info().strip()}</i></div><div> - <a href="${h.url_for( controller='dataset', action='errors', id=data.id )}" target="galaxy_main" title="View or report this error" class="icon-button bug tooltip"></a> + %if for_editing: + <a href="${h.url_for( controller='dataset', action='errors', id=data.id )}" target="galaxy_main" title="View or report this error" class="icon-button bug tooltip"></a> + %endif %if data.has_data(): ${render_download_links( data, dataset_id )} %endif 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.
participants (1)
-
Bitbucket