Update templates to consistently use {% static %} instead of hard coding paths
[htsworkflow.git] / htsworkflow / frontend / templates / experiments / flowcell_lane_detail.html
index aceb186dcadcc9ca4e946345fc2d0bd186455f08..ebe2c59d261be2740b40ab5e6dc9e1c20e30ba7a 100644 (file)
@@ -1,86 +1,98 @@
 {% 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">
-  <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>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/>
-
-
-  <div rel="libns:library" resource="{{lib.get_absolute_url}}">
-  <h2>About the library</h2>
-  <b>Library ID</b>: 
-    <a href="{{lib.get_absolute_url}}" property="libns:library_id">{{ lib.id }}</a><br/>
-  <b>Name</b>: 
-    <span property="libns:name">{{ lib.library_name }}</span>
-  <br/>
-  <b>Species</b>: 
-    <a href="{{lib.library_species.get_absolute_url}}" rel="libns:species"><span property="libns:species_name">{{ lib.library_species.scientific_name }}</span></a>
-  <br/>
-  <b>Concentration</b>: 
-    <span property="libns:concentration">{{ lib.undiluted_concentration }} ng/µl</span>
-  <br/>
-  <b>Gel Cut Size</b>: 
-    <span property="libns:gel_cut">{{ lib.gel_cut_size }}</span>
-  <br/>
-  <b>Insert Size</b>: 
-    <span property="libns:insert_size">{{ lib.insert_size }}</span>
-  <br/>
-  <b>Background or Cell Line</b>:
-     <span property="libns:cell_line">{{ lib.cell_line }}</span>
-  <br/>
-  <b>Replicate</b>: 
-     <span property="libns:replicate">{{ lib.replicate }}</span>
-  <br/>
-  <b>Library Type</b>:
-     <span property="libns:library_type">{{ lib.library_type }}</span>
-  <br/>
-  <b>Experiment Type</b>:
-     <span property="libns:experiment_type">{{ lib.experiment_type }}</span>
-  <br/>
-  <b>Made By</b>: 
-    <span property="libns:made_by">{{ lib.made_by }}</span>
-  <br/>
-  <b>Creation Date</b>
-    <span property="libns:date" content="{{lib.creation_date|date:'Y-m-d'}}T00:00:00" datatype="xsd:dateTime">{{ lib.creation_date }}</span>
-  <br/> 
-  <b>Protocol Stopping Point</b>
-    <span property="libns:stopping_point">{{ lib.stopping_point_name }}</span>
-  <br/> 
-  <b>Affiliations</b>:
-  <ul>
-    {% for individual in lib.affiliations.all %}
-      <li property="libns:affliation" content="{{individual.name}}">
-        {{ individual.name }} ( {{ individual.contact }} )
-      </li>
-    {% endfor %}
-  </ul>
+          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/>
+  <div class="htsw_flowcell_ivc">
+  {% for run in flowcell.datarun_set.all %}
+     <h2>Run {{ run.runfolder_name }}</h2>
+     <table>
+       <thead>
+         <tr>
+           <td>Lane</td>
+           <td>IVC All</td>
+           <td>IVC Call</td>
+           <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 %}
+          {% if lane_file_set.ivc_all %}
+          <tr>
+            <td>{{lane_number}}</td>
+            <td>
+              <a href="{{ lane_file_set.ivc_all.get_absolute_url }}">
+              <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" 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" 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" 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"
+                   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 %}
+       </tbody>
+     </table>
+  {% endfor %}
   </div>
-</div>  
+</div>
+
 {% endblock %}