[pdf] remove buggy css, add alt to img for valid xhtml 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 27 Aug 2009 16:57:22 +0200
branch3.5
changeset 3037 45de36c7d47c
parent 3036 26827ed46860
child 3038 1261c3df0e5a
[pdf] remove buggy css, add alt to img for valid xhtml
web/views/basecomponents.py
--- a/web/views/basecomponents.py	Thu Aug 27 16:56:55 2009 +0200
+++ b/web/views/basecomponents.py	Thu Aug 27 16:57:22 2009 +0200
@@ -226,10 +226,10 @@
     }
 
     def call(self, vid):
-        self.req.add_css('cubes.confman.css')
         entity = self.entity(0,0)
-        self.w(u'<a href="%s" class="otherView"><img src="data/pdf_icon.gif"/></a>' %
-               (xml_escape(entity.absolute_url() + '?vid=%s&__template=pdf-main-template' % vid)))
+        url = entity.absolute_url(vid=vid, __template='pdf-main-template')
+        self.w(u'<a href="%s" class="otherView"><img src="data/pdf_icon.gif" alt="%s"/></a>' %
+               (xml_escape(url), self.req._('download page as pdf')))