2eb84abc4ba73d0497610711ebce06a8313e6494
[htsworkflow.git] / htsworkflow / frontend / templates / inventory / inventory_index.html
1 {% extends "base_site.html" %}
2 {% load adminmedia admin_list i18n %}
3 {% block extrahead %}
4     <script type="text/javascript">
5       $(document).ready(function() {
6         $(window).resize(function() {
7            var window_height = $(window).height();
8            var position = $("#changelist table").position();
9            height = window_height - position.top;
10            $("#changelist table.filtered").height(height);
11            $("#changelist-filter").height(height);
12         });
13         $(window).resize();
14       });
15     </script>
16 {% endblock %}
17 {% block bodyclass %}change-list{% endblock %}
18 {% block coltype %}flex{% endblock %}
19 {% block content %}
20 <div id="inventory-index-div" >
21   <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
22     {% block search %}{% search_form item_changelist %}{% endblock %}
23  
24     {% block pagination %}{% pagination item_changelist %}{% endblock %}
25
26     {% block filters %}
27     {% if item_changelist.has_filters %}
28     <div id="changelist-filter">
29       <h2 >{% trans 'Filter' %}</h2>
30       {% for spec in item_changelist.filter_specs %}
31          {% admin_list_filter cl spec %}
32          {% endfor %}
33        </div>
34     {% endif %}
35     {% endblock %}
36   {% block summary_stats %}
37   <table class="{% if cl.has_filters %} filtered{% endif %}">
38     <thead >
39       <tr >
40         <td >Name</td>
41         <td >Description</td>
42       </tr>
43     </thead>
44     <tbody >
45       {% for itemtype in item_changelist.get_query_set %}
46       <tr >
47         <td ><a href="/inventory/it/{{ itemtype.name }}/">{{ itemtype.name }}</a></td>
48         <td >{{ itemtype.description }}</td>
49       </tr>
50       {% endfor %}
51     </tbody>
52   </table>
53   {% endblock %}
54 </div>
55 {% endblock %}