[views] Update Gene primary view to display several chromosomes if applicable (closes #3344757)
authorVladimir Popescu <vladimir.popescu@logilab.fr>
Mon, 09 Dec 2013 08:06:03 +0000
changeset 551 8a97cbbec436
parent 550 a050c3245a7a
child 562 bc6a8e888cb1
[views] Update Gene primary view to display several chromosomes if applicable (closes #3344757)
views/primary.py
--- a/views/primary.py	Tue Dec 03 15:10:48 2013 +0100
+++ b/views/primary.py	Mon Dec 09 08:06:03 2013 +0000
@@ -728,7 +728,7 @@
         fields = [(self._cw._('Identifier'), entity.gene_id),
                   (self._cw._('Start position'), entity.start_position),
                   (self._cw._('Stop position'), entity.stop_position),
-                  (self._cw._('Chromosome'), entity.chromosome[0].view('outofcontext'))]
+                  (self._cw._('Chromosomes'), '; '.join(chrom.view('incontext') for chrom in entity.chromosomes))]
         return fields
 
     def display_main_col(self, entity):
@@ -763,7 +763,7 @@
                   (self._cw._('Width'), entity.width),
                   (self._cw._('Cytoband start'), entity.cytoband_start),
                   (self._cw._('Cytoband stop'), entity.cytoband_stop),
-                  (self._cw._('Chromosome'), entity.chromosome[0].view('outofcontext')),
+                  (self._cw._('Chromosome'), entity.chromosome[0].view('incontext')),
                   (self._cw._('Genes'), u'<a href="%s">%s</a>' % (genes_url, self._cw._('See all genes')))]
         return fields