Update templates to consistently use {% static %} instead of hard coding paths
[htsworkflow.git] / htsworkflow / frontend / templates / experiments / flowcell_lane_detail.html
index bf9ee003711f12d386a227bc15cf070ed860a72f..ebe2c59d261be2740b40ab5e6dc9e1c20e30ba7a 100644 (file)
@@ -1,38 +1,37 @@
 {% extends "base_site.html" %}
-{% load adminmedia humanize i18n %}
+{% load humanize i18n %}
+{% load staticfiles %}
 {% block extrahead %}
     <!-- App Stuff -->
-    <link type="text/css" rel="stylesheet" href="/static/css/app.css" />
-    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
-    
+    <link type="text/css" rel="stylesheet" href="{% static "css/app.css" %}"/>
+    <script type="text/javascript" src="{% static "js/jquery.min.js" %}"></script>
+
     {% block additional_javascript %}
     {% endblock %}
 {% endblock %}
 
 {% block content %}
-<div id="lane_detail" class="htswdetail">
-  <h2>About this lane</h2>
+<div id="lane_detail" class="htswdetail" typeof="libns:IlluminaLane" resource="{{lane.get_absolute_url}}">
   <div rel="libns:flowcell" resource="{{flowcell.get_absolute_url}}">
-  <b>Flowcell</b>: 
-    <a href="{{flowcell.get_absolute_url}}">{{flowcell.flowcell_id}}</a><br/>
-  <b>Run Date</b>:
-    <span property="libns:date" content="{{flowcell.run_date|date:'Y-m-d\TH:i:s'}}" datatype="xsd:dateTime">{{ flowcell.run_date }}</span><br/>
-  <b>Type</b>: 
-    <span property="libns:flowcell_type">{{flowcell.flowcell_type}}</span><br/>
+  {% include "experiments/flowcell_header.html" %}
   </div>
-  <b>Lane</b>: 
-    <span property="libns:lane_number" datatype="xsd:decimal">{{lane.lane_number}}</span><br/>
-  <b>Cycles</b>: 
-    <span property="libns:read_length">{{lane.flowcell.read_length}}</span><br/>
-  <b>pM</b>
+  <div class="flowcell_lane_detail">
+  <h2>About this lane</h2>
+  <b>Lane</b>:
+    <span property="libns:lane_number">{{lane.lane_number}}</span><br/>
+  <b>pM</b>:
     <span property="libns:pM" datatype="xsd:decimal">{{ lane.pM }}</span><br/>
-  <b>Cluster Estimate</b>
+  {% if lane.cluster_estimate %}
+  <b>Cluster Estimate</b>:
     <span property="libns:cluster_estimate" datatype="xsd:decimal"
-          content="{{lane.cluster_estimate}}">{{ lane.cluster_estimate|intcomma }}</span><br/>
-  <b>Lane Status</b>: 
-    <span property="libns:status">{{ lane.status }}</span><br/>
-  <b>Comment</b>: 
-    <span property="libns:comment">{{ lane.comment }}</span><br/>
+          content="{{lane.cluster_estimate}}">{{ lane.cluster_estimate|intcomma }}</span><br/>{% endif %}
+  {% if lane.status %}
+  <b>Lane Status</b>:
+    <span property="libns:status">{{ lane.status }}</span><br/>{% endif %}
+  {% if lane.comment %}
+  <b>Comments</b>:
+    <span property="libns:comment">{{ lane.comment }}</span><br/>{% endif %}
+  </div>
   <hr/>
   {% include "sample_header.html" %}
   <hr/>
@@ -48,6 +47,7 @@
            <td>IVC Percent Base</td>
            <td>IVC Percent Base All</td>
            <td>IVC Percent Base Called</td>
+         </tr>
        </thead>
        <tbody>
           {% for run, lane_number, lane_file_set in filtered_dataruns %}
             <td>{{lane_number}}</td>
             <td>
               <a href="{{ lane_file_set.ivc_all.get_absolute_url }}">
-              <img height="84" width="126" src="{{ lane_file_set.ivc_all.get_absolute_url }}"/></a>
+              <img height="84" width="126" alt="Lane {{lane_id }} IVC All"
+                   src="{{ lane_file_set.ivc_all.get_absolute_url }}"/></a>
             </td>
             <td>
               <a href="{{ lane_file_set.ivc_call.get_absolute_url }}">
-              <img height="84" width="126" src="{{ lane_file_set.ivc_call.get_absolute_url }}"/>
+              <img height="84" width="126" alt="Lane {{lane_id }} IVC Call"
+                   src="{{ lane_file_set.ivc_call.get_absolute_url }}"/>
               </a>
             </td>
             <td>
               <a href="{{ lane_file_set.ivc_percent_base.get_absolute_url }}">
-              <img height="84" width="126" src="{{ lane_file_set.ivc_percent_base.get_absolute_url }}"/>
+              <img height="84" width="126" alt="Lane {{lane_id }} IVC % Base"
+                   src="{{ lane_file_set.ivc_percent_base.get_absolute_url }}"/>
               </a>
             </td>
             <td>
               <a href="{{ lane_file_set.ivc_percent_all.get_absolute_url }}">
-              <img height="84" width="126" src="{{ lane_file_set.ivc_percent_all.get_absolute_url }}"/>
+              <img height="84" width="126" alt="Lane {{lane_id }} IVC % Base All"
+                   src="{{ lane_file_set.ivc_percent_all.get_absolute_url }}"/>
               </a>
             </td>
             <td>
               <a href="{{ lane_file_set.ivc_percent_call.get_absolute_url }}">
-              <img height="84" width="126" src="{{ lane_file_set.ivc_percent_call.get_absolute_url }}"/>
+              <img height="84" width="126"
+                   alt="Lane {{lane_id }} IVC % Base Called"
+                   src="{{ lane_file_set.ivc_percent_call.get_absolute_url }}"/>
               </a>
             </td>
           </tr>
+          {% else %}
+            <tr><td colspan="6">No data</td></tr>
           {% endif %}
-          {% endfor %} 
+          {% endfor %}
        </tbody>
      </table>
   {% endfor %}
   </div>
+</div>
+
 {% endblock %}