Remove a few more fields that we dont use, and change the Lanes display
authorDiane Trout <diane@caltech.edu>
Thu, 26 Feb 2009 03:04:14 +0000 (03:04 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 26 Feb 2009 03:04:14 +0000 (03:04 +0000)
on the flowcell index page.

I switched from the <div><span> that Rami was using to a <ol><li>
hierarchy, I also made the items link to the corresponding library
page.

htsworkflow/frontend/experiments/admin.py
htsworkflow/frontend/experiments/models.py
htsworkflow/frontend/samples/admin.py

index d7793fd5262b08f401f43b34ba4df259a1f338de..50b8e3f6b442cedddd0c89d0c81966e091840048 100644 (file)
@@ -39,7 +39,7 @@ class FlowCellOptions(admin.ModelAdmin):
         '=lane_6_library__library_id',
         '=lane_7_library__library_id',
         '=lane_8_library__library_id')
-    list_display = ('flowcell_id','seq_mac_id','run_date', 'Create_LOG','Lanes')
+    list_display = ('flowcell_id','run_date','Lanes')
     list_filter = ('seq_mac_id','cluster_mac_id')
     fieldsets = (
         (None, {
index 92b0d37b3e362b91e3932fcb426542e1784725a7..5fdd7b25ce052564dc3caa152fdc5f159489c69a 100755 (executable)
@@ -81,7 +81,15 @@ class FlowCell(models.Model):
   Create_LOG.allow_tags = True 
 
   def Lanes(self):
-    return '<div><span style="margin-right:10px">1)%s</span><span style="margin-right:10px">2)%s</span><span style="margin-right:10px">3)%s</span><span style="margin-right:10px">4)%s</span><span style="margin-right:10px">5)%s</span><span style="margin-right:10px">6)%s</span><span style="margin-right:10px">7)%s</span><span style="margin-right:10px">8)%s</span></div>' % (self.lane_1_library,self.lane_2_library,self.lane_3_library,self.lane_4_library,self.lane_5_library,self.lane_6_library,self.lane_7_library,self.lane_8_library)
+    library_url = '/admin/samples/library/%s' 
+    html = ['<ol>']
+    for i in range(1,9):
+       library_id = getattr(self, 'lane_%d_library_id' % i)
+        library = getattr(self, 'lane_%d_library' % i)
+       element = '<li><a href="%s">%s</a></li>'
+        html.append(element % (library_url % library_id, library))
+    html.append('</ol>')
+    return "\n".join(html)
   Lanes.allow_tags = True
 
   class Meta:
index e237ea9c40752764d62e0f62af8475024f1c8875..9fb140845423e6e061eb88f80754bf95089f35ed 100644 (file)
@@ -30,17 +30,19 @@ class LibraryOptions(admin.ModelAdmin):
         #'aligned_reads',
         #'DataRun',
         'library_name',
-        'experiment_type',
+        #'experiment_type',
         #'organism',
         #'antibody_name',
         #'cell_line',
         #'libtags',
         #'made_for',
        'affiliation',
-        'made_by',
+        #'made_by',
         'undiluted_concentration',
         'creation_date',
+       'stopping_point',
         #'condition',
+
     )
     list_filter = (
         'experiment_type',