Fix RDF schema problems with lane_number and species.
[htsworkflow.git] / htsworkflow / frontend / templates / samples / library_detail.html
index b7a182e1961b4d1588554cc4c92e09adcc1ce835..1db49dffbb92dd225c345d855d1af074118dfb66 100644 (file)
@@ -28,6 +28,7 @@
     </tr>
   </thead>
   <tbody>
+  {% if eland_results %}
     {% for result in eland_results %}
     <tr about="{{result.flowcell.get_absolute_url}}">
       <td property="libns:date" content="{{result.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ result.run_date|date}}</td>
@@ -48,6 +49,9 @@
       </td>
     </tr>
     {% endfor %}
+  {% else %}
+    <tr><td colspan="8">No data</td></tr>
+  {% endif %}
   </tbody>
   </table>
 
@@ -85,7 +89,7 @@
       </tr>
     </thead>
     <tbody>
-
+    {% if lane_summary_list %}
       {# ls short for lane summary #}
       {% for ls in lane_summary_list %}
       <tr about="{{ls.lane.get_absolute_url}}">
         <td>{{ ls.repeat_reads|intcomma }}</td>
       </tr>
       {% endfor %}
-    </tbody>
-  </table>
+      {% else %}
+       <tr><td colspan="20">No data</td></tr>
+    {% endif %}
+  </tbody>
+    </table>
 
   <h2>Flowcell Notes</h2>
   <table>
        <td>Comment</td>
       </tr>
     </thead>
+    {% if lib.lane_set.all %}
     <tbody>
       {% for lane in lib.lane_set.all %}
-      <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}">
+      <tr rel="libns:has_lane" 
+          about="{{lib.get_absolute_url}}"
+          resource="{{lane.get_absolute_url}}">
         <td>
           <a typeof="libns:IlluminaFlowcell" href="{{lane.flowcell.get_absolute_url}}">
             <span property="libns:flowcell_id"
         <td typeof="libns:IlluminaLane" about="{{lane.get_absolute_url}}">
           <span rel="libns:flowcell" resource="{{lane.flowcell.get_absolute_url}}"></span>
           <a href="{{lane.get_absolute_url}}">
-            <span property="libns:lane_number"  datatype="xsd:decimal"
+            <span property="libns:lane_number"
                >{{ lane.lane_number }}</span>
             </a></td>
         <td>{{ lane.comment }}</td>
       </tr>
          {% endfor %}
     </tbody>
+    {% endif %}
   </table>
   <br/>
   <hr/>