simplify library report
[htsworkflow.git] / htsworkflow / templates / samples / library_index.html
1 {% extends "base_site.html" %}
2 {% load admin_list i18n %}
3 {% load staticfiles %}
4 {% block extrahead %}
5     <!-- App Stuff -->
6     <link type="text/css" rel="stylesheet" href="{% static "css/app.css" %}"/>
7
8     {% block additional_javascript %}
9     <script type="text/javascript" src="{% static "js/jquery.min.js" %}"></script>
10     <script type="text/javascript" src="{% static "js/htsw.js" %}"></script>
11     <script type="text/javascript">
12       $(document).ready(function() {
13         $(window).resize(function() {
14            var window_height = $(window).height();
15            var position = $("#changelist table").position();
16            height = window_height - position.top;
17            $("#changelist table.filtered").height(height);
18            $("#changelist-filter").height(height);
19         });
20         $(window).resize();
21       });
22     </script>
23     {% endblock %}
24 {% endblock %}
25 {% block bodyclass %}change-list{% endblock %}
26 {% block coltype %}flex{% endblock %}
27
28 {% block content %}
29 <div id="library_header_link">
30 {% if todo_only %}<a href="..">All</a>{% else %}<a href="not_run/">Not run</a>
31 {% endif %}
32 </div>
33 <div id="library-index-div" >
34   <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
35     {% block search %}{% search_form cl %}{% endblock %}
36
37     {% block pagination %}{% pagination cl %}{% endblock %}
38
39     {% block filters %}
40     {% if cl.has_filters %}
41     <div id="changelist-filter">
42       <h2 >{% trans 'Filter' %}</h2>
43       {% for spec in cl.filter_specs %}
44          {% admin_list_filter cl spec %}
45          {% endfor %}
46     </div>
47     {% endif %}
48     {% endblock %}
49   {% block summary_stats %}
50   <table class="{% if cl.has_filters %} filtered{% endif %}">
51     <thead >
52       <tr >
53         <td >Parent</td>
54         <td >Library ID</td>
55         <td >Species</td>
56         <td >Library Name</td>
57         <td colspan="3" >Single</td>
58         <td colspan="3" >Paired</td>
59         <td >HD</td>
60       </tr>
61       <tr >
62         <td colspan="4"></td>
63         <td>&lt;40</td>
64         <td>&lt;100</td>
65         <td>100+</td>
66         <td>&lt;40</td>
67         <td>&lt;100</td>
68         <td>100+</td>
69         <td></td>
70       </tr>
71     </thead>
72     <tbody >
73       {% for lib in library_list %}
74       <tr typeof="libns:Library" about="{{lib.get_absolute_url}}">
75         <td >
76           <a href="{{lib.amplified_from_sample.get_absolute_url }}">
77             {{ lib.amplified_from_sample.id }}
78           </a>
79         </td>
80         <td >
81           <a href="{{lib.get_absolute_url}}">
82             <span property="libns:library_id">{{ lib.id }}</span>
83           </a>
84         </td>
85         <td rel="libns:species">
86           <a typeof="libns:Species"
87              href="{{ lib.library_species.get_absolute_url }}">
88             <span property="libns:species_name">{{ lib.library_species.scientific_name }}</span>
89           </a>
90         </td>
91         <td >
92           <a href="{{ lib.get_absolute_url }}">
93             <span property="libns:name">{{ lib.library_name }}</span>
94           </a>
95         </td>
96         {% for ended in lib.lanes_sequenced %}
97           {% cycle '#00BFFF' '#66CDAA' as bincolor silent %}
98           {% for bin in ended %}
99           <td bgcolor="{{ bincolor }}">{% if bin %}{{ bin }}{% endif %}</td>
100           {% endfor %}
101         {% endfor %}
102         {% if lib.is_archived %}
103           <td ><img src="{% static "img/hdd_unmount.png" %}" alt="Archived" /></td>
104         {% else %}
105           <td ></td>
106         {% endif %}
107       </tr>
108       {% endfor %}
109     </tbody>
110   </table>
111   </div>
112   {% endblock %}
113 </div>
114 {% endblock %}