web/views/idownloadable.py
changeset 2530 3cd117ecc3a8
parent 2524 2d0c04c8cbe4
child 2789 39712da6f397
child 3065 694c03f7d72f
equal deleted inserted replaced
2529:736893a990c4 2530:3cd117ecc3a8
   120 
   120 
   121 class IDownloadableLineView(baseviews.OneLineView):
   121 class IDownloadableLineView(baseviews.OneLineView):
   122     __select__ = implements(IDownloadable)
   122     __select__ = implements(IDownloadable)
   123 
   123 
   124     def cell_call(self, row, col, title=None, **kwargs):
   124     def cell_call(self, row, col, title=None, **kwargs):
   125         """the secondary view is a link to download the file"""
   125         """the oneline view is a link to download the file"""
   126         entity = self.entity(row, col)
   126         entity = self.entity(row, col)
   127         url = xml_escape(entity.absolute_url())
   127         url = xml_escape(entity.absolute_url())
   128         name = xml_escape(title or entity.download_file_name())
   128         name = xml_escape(title or entity.download_file_name())
   129         durl = xml_escape(entity.download_url())
   129         durl = xml_escape(entity.download_url())
   130         self.w(u'<a href="%s">%s</a> [<a href="%s">%s</a>]' %
   130         self.w(u'<a href="%s">%s</a> [<a href="%s">%s</a>]' %