equal
deleted
inserted
replaced
145 self.w(u'</div>') |
145 self.w(u'</div>') |
146 |
146 |
147 def cell_call(self, row, col, width=None, height=None, link=False): |
147 def cell_call(self, row, col, width=None, height=None, link=False): |
148 entity = self.rset.get_entity(row, col) |
148 entity = self.rset.get_entity(row, col) |
149 #if entity.data_format.startswith('image/'): |
149 #if entity.data_format.startswith('image/'): |
150 imgtag = u'<img src="%s" alt="%s" ' % (xml_escape(entity.download_url()), |
150 imgtag = u'<img src="%s" alt="%s" ' % ( |
151 xml_escape(entity.download_file_name())) |
151 xml_escape(entity.download_url()), |
|
152 (self.req._('download %s') % xml_escape(entity.download_file_name()))) |
152 if width: |
153 if width: |
153 imgtag += u'width="%i" ' % width |
154 imgtag += u'width="%i" ' % width |
154 if height: |
155 if height: |
155 imgtag += u'height="%i" ' % height |
156 imgtag += u'height="%i" ' % height |
156 imgtag += u'/>' |
157 imgtag += u'/>' |
157 if link: |
158 if link: |
158 self.w(u'<a href="%s" alt="%s">%s</a>' % (entity.absolute_url(vid='download'), |
159 self.w(u'<a href="%s">%s</a>' % (entity.absolute_url(vid='download'), |
159 self.req._('download image'), |
160 imgtag)) |
160 imgtag)) |
|
161 else: |
161 else: |
162 self.w(imgtag) |
162 self.w(imgtag) |
163 |
163 |
164 |
164 |