[idownloadable primary view] when file is an image, display attributes below the image stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 26 Jul 2010 12:06:55 +0200
branchstable
changeset 6009 9633d2376687
parent 6008 e1c43115af3b
child 6010 9d40ee3d0551
[idownloadable primary view] when file is an image, display attributes below the image
web/views/idownloadable.py
--- a/web/views/idownloadable.py	Mon Jul 26 12:06:52 2010 +0200
+++ b/web/views/idownloadable.py	Mon Jul 26 12:06:55 2010 +0200
@@ -113,7 +113,6 @@
     __select__ = adaptable('IDownloadable')
 
     def render_entity_attributes(self, entity):
-        super(IDownloadablePrimaryView, self).render_entity_attributes(entity)
         self.w(u'<div class="content">')
         adapter = entity.cw_adapt_to('IDownloadable')
         contenttype = adapter.download_content_type()
@@ -121,7 +120,9 @@
             self._cw.add_js('cubicweb.image.js')
             self.wview('image', entity.cw_rset, row=entity.cw_row, col=entity.cw_col,
                        link=True, klass='contentimage')
+            super(IDownloadablePrimaryView, self).render_entity_attributes(entity)
         else:
+            super(IDownloadablePrimaryView, self).render_entity_attributes(entity)
             self.wview('downloadlink', entity.cw_rset, title=self._cw._('download'), row=entity.cw_row)
             self.render_data(entity, contenttype, 'text/html')
         self.w(u'</div>')