# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Greg Von Kuster <greg@bx.psu.edu> # Date 1282334161 14400 # Node ID 8a3d3fba037061a818b4417978542ae7b71f2e1a # Parent 6358247a4559c9ec757484e16c618a831711fbc9 Issue # 352: Set content type of HistoryController.list_as_xml to be text/xml Issue # 353: Add additional history attributes to the <history> tag in the ~/templates/root/history_as_xml.mako template --- a/templates/root/history_as_xml.mako +++ b/templates/root/history_as_xml.mako @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<history> +<history id="${trans.security.encode_id( history.id )}" num="${len(history.datasets)}" name="${history.name}" create="${history.create_time}" update="${history.update_time}"> %if show_deleted: %for data in history.activatable_datasets: <data id="${data.id}" hid="${data.hid}" name="${data.name}" state="${data.state}" dbkey="${data.dbkey}"> --- a/lib/galaxy/web/controllers/history.py +++ b/lib/galaxy/web/controllers/history.py @@ -155,6 +155,7 @@ class HistoryController( BaseController, @web.expose def list_as_xml( self, trans ): """XML history list for functional tests""" + trans.response.set_content_type( 'text/xml' ) return trans.fill_template( "/history/list_as_xml.mako" ) stored_list_grid = HistoryListGrid()