xref: /openbmc/openbmc/poky/bitbake/lib/toaster/toastergui/templates/basetable_bottom.html (revision c124f4f2e04dca16a428a76c89677328bc7bf908)
1    </tbody>
2    </table>
3
4<!-- Show pagination controls -->
5<div id="pagination-basetable_bottom">
6   <!--span class="help-inline">Showing {{objects.start_index}} to {{objects.end_index}} out of {{objects.paginator.count}} entries.</span-->
7
8   <ul class="pagination">
9{%if objects.has_previous %}
10  <li><a href="javascript:reload_params({'page':{{objects.previous_page_number}}})">&laquo;</a></li>
11{%else%}
12  <li class="disabled"><a href="#">&laquo;</a></li>
13{%endif%}
14{% for i in objects.page_range %}
15  <li{%if i == objects.number %} class="active" {%endif%}><a href="javascript:reload_params({'page':{{i}}})">{{i}}</a></li>
16{% endfor %}
17{%if objects.has_next%}
18  <li><a href="javascript:reload_params({'page':{{objects.next_page_number}}})">&raquo;</a></li>
19{%else%}
20  <li class="disabled"><a href="#">&raquo;</a></li>
21{%endif%}
22  </ul>
23  <form class="navbar-form navbar-right">
24    <div class="form-group">
25      <label>Show rows:</label>
26      <select class="form-control pagesize">
27        {% with "10 25 50 100 150" as list%}
28        {% for i in list.split %}
29        <option value="{{i}}">{{i}}</option>
30        {% endfor %}
31        {% endwith %}
32      </select>
33    </div>
34  </form>
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 -->
95