blob: ce023f51af603d89483bf39981eb1f8f8c10d317 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001 </tbody>
2 </table>
3
4<!-- Show pagination controls -->
5<div class="pagination pagination-centered">
6 <div class="pull-left">
7 Showing {{objects.start_index}} to {{objects.end_index}} out of {{objects.paginator.count}} entries.
8 </div>
9
10 <ul class="pagination" style="display: block-inline">
11{%if objects.has_previous %}
12 <li><a href="javascript:reload_params({'page':{{objects.previous_page_number}}})">&laquo;</a></li>
13{%else%}
14 <li class="disabled"><a href="#">&laquo;</a></li>
15{%endif%}
16{% for i in objects.page_range %}
17 <li{%if i == objects.number %} class="active" {%endif%}><a href="javascript:reload_params({'page':{{i}}})">{{i}}</a></li>
18{% endfor %}
19{%if objects.has_next%}
20 <li><a href="javascript:reload_params({'page':{{objects.next_page_number}}})">&raquo;</a></li>
21{%else%}
22 <li class="disabled"><a href="#">&raquo;</a></li>
23{%endif%}
24 </ul>
25 <div class="pull-right">
26 <span class="help-inline" style="padding-top:5px;">Show rows:</span>
27 <select style="margin-top:5px;margin-bottom:0px;" class="pagesize">
28 {% with "10 25 50 100 150" as list%}
29 {% for i in list.split %}
30 <option value="{{i}}">{{i}}</option>
31 {% endfor %}
32 {% endwith %}
33 </select>
34 </div>
35</div>
36
37<!-- Update page display settings -->
38
39<script>
40 $(document).ready(function() {
41
42 // we load cookies for the column display
43 save = $.cookie('_displaycols_{{objectname}}');
44 if (save != undefined) {
45 setting = save.split(';');
46 for ( i = 0; i < setting.length; i++) {
47 if (setting[i].length > 0) {
48 splitlist = setting[i].split(':');
49 id = splitlist[0], v = splitlist[1];
50 if (v == 'true') {
51 $('.chbxtoggle#'+id).prop('checked', true);
52 }
53 else {
54 $('.chbxtoggle#'+id).prop('checked', false);
55 }
56 }
57 }
58 }
59
60 // load data for number of entries to be displayed on page
61 if ({{request.GET.count}} != "") {
62 pagesize = {{request.GET.count}};
63 }
64
65 $('.pagesize option').prop('selected', false)
66 .filter('[value="' + pagesize + '"]')
67 .attr('selected', true);
68
69 $('.chbxtoggle').each(function () {
70 showhideTableColumn($(this).attr('id'), $(this).is(':checked'))
71 });
72
73 //turn edit columns dropdown into a multi-select menu
74 $('.dropdown-menu input, .dropdown-menu label').click(function(e) {
75 e.stopPropagation();
76 });
77
78 //show tooltip with applied filter
79 $('#filtered').tooltip({container:'table', placement:'bottom', delay:{hide:1500}, html:true});
80
81 //progress bar tooltip
82 $('.progress, .lead span').tooltip({container:'table', placement:'top'});
83
84 $(".pagesize").change(function () {
85 reload_params({"count":$(this).val()});
86 });
87});
88</script>
89
90<!-- modal filter boxes -->
91 {% for tc in tablecols %}{% if tc.filter %}{% with objectname=objectname f=tc.filter %}
92 {% include "filtersnippet.html" %}
93 {% endwith %}{% endif %} {% endfor %}
94<!-- end modals -->