[primary] Display CGHimage if existing
authorVincent Michel <vincent.michel@logilab.fr>
Fri, 08 Nov 2013 11:08:28 +0000
changeset 501 fe6d699ca8e8
parent 500 12633f30d0bc
child 502 3b73b96326c8
[primary] Display CGHimage if existing
views/primary.py
--- a/views/primary.py	Mon Nov 25 13:23:53 2013 +0000
+++ b/views/primary.py	Fri Nov 08 11:08:28 2013 +0000
@@ -691,6 +691,10 @@
                                             {'e': entity.eid})
         if cgh_results or mutation_results:
             if cgh_results:
+                # Add image
+                image = [e for e in entity.results_file if e.data_format.startswith('image')]
+                if image:
+                    self.w(u'<img src="%s"/>' % image[0].download_url())
                 self.w(u'<h3>%s</h3>' % self._cw._('CGH results'))
                 self.wview('cgh-table-view', rset=cgh_results)
             if mutation_results: