--- a/web/views/idownloadable.py Sun Nov 08 21:53:18 2009 +0100
+++ b/web/views/idownloadable.py Fri Nov 20 19:35:54 2009 +0100
@@ -25,7 +25,7 @@
return 0
return 1
-def download_box(w, entity, title=None, label=None):
+def download_box(w, entity, title=None, label=None, footer=u''):
req = entity._cw
w(u'<div class="sideBox">')
if title is None:
@@ -37,8 +37,8 @@
% (xml_escape(entity.download_url()),
req.external_resource('DOWNLOAD_ICON'),
_('download icon'), xml_escape(label or entity.dc_title())))
- w(u'</div>')
- w(u'</div>\n</div>\n')
+ w(u'%s</div>' % footer)
+ w(u'</div></div>\n')
class DownloadBox(EntityBoxTemplate):
@@ -113,7 +113,8 @@
except TransformError:
pass
except Exception, ex:
- msg = self._cw._("can't display data, unexpected error: %s") % ex
+ msg = self._cw._("can't display data, unexpected error: %s") \
+ % xml_escape(str(ex))
self.w('<div class="error">%s</div>' % msg)
self.w(u'</div>')