From 2e45325b9bdfe5030f12404abd43ac2deee354b1 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Fri, 25 Apr 2008 16:40:07 +0000 Subject: [PATCH] Convert history?as_xml to use a mako template. --- lib/galaxy/web/controllers/root.py | 6 +++--- templates/history.xml | 8 -------- templates/root/history_as_xml.mako | 8 ++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 templates/history.xml create mode 100644 templates/root/history_as_xml.mako diff --git a/lib/galaxy/web/controllers/root.py b/lib/galaxy/web/controllers/root.py index 96de1dfd68a..3f895dae385 100644 --- a/lib/galaxy/web/controllers/root.py +++ b/lib/galaxy/web/controllers/root.py @@ -84,11 +84,11 @@ class Universe( BaseController ): return self.history_new(trans) if as_xml: trans.response.set_content_type('text/xml') - template = "history.xml" + return trans.fill_template_mako( "root/history_as_xml.mako", history=history ) else: template = "root/history.mako" - mode = trans.get_cookie(name=self.pref_cookie_name) - return trans.fill_template(template, history=history, mode=mode ) + mode = trans.get_cookie( name=self.pref_cookie_name ) + return trans.fill_template( "root/history.mako", history=history, mode=mode ) @web.expose def display(self, trans, id=None, hid=None, tofile=None, toext=".txt"): diff --git a/templates/history.xml b/templates/history.xml deleted file mode 100644 index 89c6f045cb6..00000000000 --- a/templates/history.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - #for $data in $history.active_datasets - - $data.blurb - - #end for - diff --git a/templates/root/history_as_xml.mako b/templates/root/history_as_xml.mako new file mode 100644 index 00000000000..1b2d88ea59a --- /dev/null +++ b/templates/root/history_as_xml.mako @@ -0,0 +1,8 @@ + + + %for data in history.active_datasets: + + ${data.blurb} + + %endfor +