From 52855c873e30ec7e6a00622bab35663ce05a6a99 Mon Sep 17 00:00:00 2001 From: Fulvio Sciarretta Date: Thu, 1 Mar 2012 17:11:06 +0100 Subject: [PATCH] [#1788] fix for IE 6/7/8 conditional comments which prevented execution of Python code in Genshi, and caused html5 support script not being loaded/executed. This required the addition of a pure Python function, and call of that function inside layout_base.html to resolve h.url_for_static() calls. --- ckan/templates/_util.html | 19 +++++++++++++++++++ ckan/templates/layout_base.html | 8 ++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ckan/templates/_util.html b/ckan/templates/_util.html index 31a741b3799..8aab26807ba 100644 --- a/ckan/templates/_util.html +++ b/ckan/templates/_util.html @@ -480,4 +480,23 @@ + + + ''' + tagContent + ''' + ''') + return html + ?> diff --git a/ckan/templates/layout_base.html b/ckan/templates/layout_base.html index 18dd8646a21..6ced02a0588 100644 --- a/ckan/templates/layout_base.html +++ b/ckan/templates/layout_base.html @@ -34,13 +34,9 @@ - - + ${jsConditionalForIe(8, '<link rel="stylesheet" href="' + h.url_for_static('/css/blueprint/ie.css') + '" type="text/css" media="screen, projection">')} + ${jsConditionalForIe(9, '<script type="text/javascript" src=" + h.url_for_static('/scripts/vendor/html5shiv/html5.js') + "></script>')} ${optional_head()}