Update templates to consistently use {% static %} instead of hard coding paths
[htsworkflow.git] / htsworkflow / frontend / templates / samples / library_index.html
index 0c7b721c3d47190d99545a57050b7c38fbaf7d9b..6ee9750cd8e0bc282fe57202596fd803cdd4f2f6 100644 (file)
 {% extends "base_site.html" %}
-{% load adminmedia admin_list i18n %}
+{% load admin_list i18n %}
+{% load staticfiles %}
+{% block extrahead %}
+    <!-- App Stuff -->
+    <link type="text/css" rel="stylesheet" href="{% static "css/app.css" %}"/>
 
+    {% block additional_javascript %}
+    <script type="text/javascript" src="{% static "js/jquery.min.js" %}"></script>
+    <script type="text/javascript" src="{% static "js/htsw.js" %}"></script>
+    <script type="text/javascript">
+      $(document).ready(function() {
+        $(window).resize(function() {
+           var window_height = $(window).height();
+           var position = $("#changelist table").position();
+           height = window_height - position.top;
+           $("#changelist table.filtered").height(height);
+           $("#changelist-filter").height(height);
+        });
+        $(window).resize();
+      });
+    </script>
+    {% endblock %}
+{% endblock %}
 {% block bodyclass %}change-list{% endblock %}
 {% block coltype %}flex{% endblock %}
 
 {% block content %}
-<div id="library-index-div" class="djangocss">
+<div id="library_header_link">
+{% if todo_only %}<a href="..">All</a>{% else %}<a href="not_run/">Not run</a>
+{% endif %}
+</div>
+<div id="library-index-div" >
   <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
     {% block search %}{% search_form cl %}{% endblock %}
 
+    {% block pagination %}{% pagination cl %}{% endblock %}
+
     {% block filters %}
     {% if cl.has_filters %}
     <div id="changelist-filter">
-      <h2 class="djangocss">{% trans 'Filter' %}</h2>
+      <h2 >{% trans 'Filter' %}</h2>
       {% for spec in cl.filter_specs %}
          {% admin_list_filter cl spec %}
          {% endfor %}
-       </div>
-       {% endif %}
-       {% endblock %}
-
-  
- {% block pagination %}{% pagination cl %}{% endblock %}
-
-{% block summary_stats %}
-<table class="djangocss">
-  <thead class="djangocss">
-    <tr class="djangocss">
-      <td class="djangocss">Parent</td>
-      <td class="djangocss">Library ID</td>
-      <td class="djangocss">Species</td>
-      <td class="djangocss">Library Name</td>
-      <td colspan="3" class="djangocss">Single</td>
-      <td colspan="3" class="djangocss">Paired</td>
-      <td class="djangocss">HD</td>
-    </tr>
-    <tr class="djangocss">
-      <td colspan="4"></td>
-      <td>&lt;40</td>
-      <td>&lt;100</td>
-      <td>100+</td>
-      <td>&lt;40</td>
-      <td>&lt;100</td>
-      <td>100+</td>
-      <td></td>
-    </tr>
-  </thead>
-  <tbody class="djangocss">
-    {% for lib in library_list %}
-    <tr class="djangocss">
-      <td class="djangocss"><a href="/library/{{ lib.library_id }}">{{ lib.amplified_from }}</a></td>
-      <td class="djangocss"><a href="/library/{{ lib.library_id }}">{{ lib.library_id }}</a></td>
-      <td class="djangocss"><a href="/library/{{ lib.library_id }}">{{ lib.species_name }}</a></td>
-      <td class="djangocss"><a href="/library/{{ lib.library_id }}">{{ lib.library_name }}</a></td>
-      <td class="djangocss" bgcolor="#00BFFF">{{ lib.lanes_run.0.0 }}</td>      
-      <td class="djangocss" bgcolor="#00BFFF">{{ lib.lanes_run.0.1 }}</td>      
-      <td class="djangocss" bgcolor="#00BFFF">{{ lib.lanes_run.0.2 }}</td>      
-      <td class="djangocss" bgcolor="#66CDAA">{{ lib.lanes_run.1.0 }}</td>
-      <td class="djangocss" bgcolor="#66CDAA">{{ lib.lanes_run.1.1 }}</td>      
-      <td class="djangocss" bgcolor="#66CDAA">{{ lib.lanes_run.1.2 }}</td>      
-      {% if lib.is_archived %}
-        <td class="djangocss"><img src="/static/img/hdd_unmount.png" alt="Archived" /></td>
-      {% else %}
-        <td class="djangocss"></td>
-      {% endif %}
-    </tr>
-    {% endfor %}
-  </tbody>
-</table>
+    </div>
+    {% endif %}
+    {% endblock %}
+  {% block summary_stats %}
+  <table class="{% if cl.has_filters %} filtered{% endif %}">
+    <thead >
+      <tr >
+        <td >Parent</td>
+        <td >Library ID</td>
+        <td >Species</td>
+        <td >Library Name</td>
+        <td colspan="3" >Single</td>
+        <td colspan="3" >Paired</td>
+        <td >HD</td>
+      </tr>
+      <tr >
+        <td colspan="4"></td>
+        <td>&lt;40</td>
+        <td>&lt;100</td>
+        <td>100+</td>
+        <td>&lt;40</td>
+        <td>&lt;100</td>
+        <td>100+</td>
+        <td></td>
+      </tr>
+    </thead>
+    <tbody >
+      {% for lib in library_list %}
+      <tr typeof="libns:Library" about="{{lib.library.get_absolute_url}}">
+        <td ><a href="{{lib.library.get_absolute_url}}">{{ lib.amplified_from }}</a></td>
+        <td ><a href="{{lib.library.get_absolute_url}}"><span property="libns:library_id">{{ lib.library_id }}</span></a></td>
+        <td rel="libns:species">
+          <a typeof="libns:Species"
+             href="{{lib.library.library_species.get_absolute_url}}">
+            <span property="libns:species_name">{{ lib.species_name }}</span>
+          </a>
+        </td>
+        <td >
+          <a href="{{ lib.library.get_absolute_url }}">
+            <span property="libns:name">{{ lib.library_name }}</span>
+          </a>
+        </td>
+        <td  bgcolor="#00BFFF">{{ lib.lanes_run.0.0 }}</td>
+        <td  bgcolor="#00BFFF">{{ lib.lanes_run.0.1 }}</td>
+        <td  bgcolor="#00BFFF">{{ lib.lanes_run.0.2 }}</td>
+        <td  bgcolor="#66CDAA">{{ lib.lanes_run.1.0 }}</td>
+        <td  bgcolor="#66CDAA">{{ lib.lanes_run.1.1 }}</td>
+        <td  bgcolor="#66CDAA">{{ lib.lanes_run.1.2 }}</td>
+        {% if lib.is_archived %}
+          <td ><img src="{% static "img/hdd_unmount.png" %}" alt="Archived" /></td>
+        {% else %}
+          <td ></td>
+        {% endif %}
+      </tr>
+      {% endfor %}
+    </tbody>
+  </table>
+  </div>
+  {% endblock %}
 </div>
 {% endblock %}
-{% endblock %}