Update templates to consistently use {% static %} instead of hard coding paths
[htsworkflow.git] / htsworkflow / frontend / templates / experiments / flowcell_detail.html
index 5ec9afe8a5944581a03a568b94ddc998b5abe60b..64da7e2886881d3609e4344353a0da75aceb00d5 100644 (file)
@@ -1,18 +1,19 @@
 {% extends "base_site.html" %}
-{% load adminmedia humanize i18n %}
+{% load staticfiles %}
+{% load humanize i18n %}
 {% 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="flowcell_detail">
+<div>
   {% include "experiments/flowcell_header.html" %}
-  <div class="htswdetail">
+  <div class="htswdetail" typeof="libns:IlluminaFlowcell" resource="{{flowcell.get_absolute_url}}">
     <h2>Lanes</h2>
     <table>
       <thead>
       </thead>
       <tbody>
       {% for lane in lanes %}
-        <tr rel="libns:has_lane" resource="{{lane.get_absolute_url}}" >
-          <td><a href="{{lane.get_absolute_url}}"> 
-              <span property="libns:lane_number">{{lane.lane_number}}</span></a></td>
-          <td><a href="{{lane.library.get_absolute_url}}" 
-                 rel="libns:library"><span property="libns:library_id"
-              >{{lane.library.id}}</span></a></td>
-          <td><a href="{{lane.library.get_absolute_url}}" rel="libns:library"><span property="libns:name">{{lane.library.library_name}}</span></a></td>
-          <td><a href="{{lane.library.library_species.get_absolute_url}}" rel="libns:species">
-              <span property="libns:species_name">{{ lane.library.library_species.scientific_name }}</span></a></td>
-          <td><span property="libns:comment">{{lane.comment}}</span></td>
+        <tr>
+          <td rel="libns:has_lane">
+            <a href="{{lane.get_absolute_url}}" typeof="libns:IlluminaLane">
+              <span property="libns:lane_number">{{lane.lane_number}}</span>
+            </a>
+          </td>
+          <td rel="libns:library"
+              about="{{lane.get_absolute_url}}"
+              resource="{{lane.library.get_absolute_url}}">
+            <a typeof="libns:Library" href="{{lane.library.get_absolute_url}}">
+              <span property="libns:library_id"
+                    >{{lane.library.id}}</span></a>
+              {% if user.is_staff %}
+              <a href="{{lane.library.get_admin_url}}">
+                  <img class="icon_button"
+                       src="{% static "admin/img/icon_changelink.gif" %}"/>
+              </a>{% endif %}
+          </td>
+          <td>
+            <a href="{{lane.library.get_absolute_url}}">
+              <span property="libns:name"
+                    about="{{lane.library.get_absolute_url}}"
+                    >{{lane.library.library_name}}</span>
+            </a>
+          </td>
+          <td about="{{lane.library.get_absolute_url}}" rel="libns:species">
+            <a href="{{lane.library.library_species.get_absolute_url}}"
+               typeof="libns:Species">
+              <span property="libns:species_name">{{ lane.library.library_species.scientific_name }}</span></a>
+          </td>
+          <td about="{{lane.get_absolute_url}}">
+            <span property="libns:comment">{{lane.comment}}</span>
+          </td>
         </tr>
       {% endfor %}
       </tbody>
     </table>
-    </div>
     <div class="htsw_flowcell_ivc">
     {% for run in flowcell.datarun_set.all %}
        <h2>Run {{ run.runfolder_name }}</h2>
+       {% if run.lane_files %}
        <table>
          <thead>
            <tr>
              <td>IVC Percent Base</td>
              <td>IVC Percent Base All</td>
              <td>IVC Percent Base Called</td>
+           </tr>
          </thead>
          <tbody>
             {% for lane_id, lane_file_set in run.lane_files.items %}
-           {% if lane_file_set.ivc_all %}
+            {% if lane_file_set.ivc_all %}
             <tr>
               <td>{{ lane_id }}</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>
             {% endif %}
-            {% endfor %} 
+            {% endfor %}
          </tbody>
        </table>
+       {% endif %}
     {% endfor %}
     </div>
-</div>  
+  </div>
+</div>
+<!-- end flowcell_detail -->
 {% endblock %}