blob: 98a715f27d93332c286e70b955d02cd823cdab74 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001
2{% load static %}
3{% load projecttags %}
4
5<script src="{% static 'js/table.js' %}"></script>
6<script src="{% static 'js/layerBtn.js' %}"></script>
7<script>
8 $(document).ready(function() {
9 (function(){
10
11 var ctx = {
12 tableName : "{{table_name}}",
13 url : "{{ xhr_table_url }}?format=json",
14 title : "{{title}}",
Patrick Williamsc124f4f2015-09-15 14:41:29 -050015 };
16
17 try {
18 tableInit(ctx);
19 } catch (e) {
20 document.write("Problem loading table widget: " + e);
21 }
22 })();
23 });
24</script>
25
26{% include 'toastertable-filter.html' %}
27
28<div class="row-fluid" id="no-results-{{table_name}}" style="display:none">
29 <div class="alert">
30 <form class="no-results input-append">
31 <input class="input-xxlarge" id="new-search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search %}{{request.GET.search}}{%endif%}"/>
32 <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
33 <i class="icon-remove"></i>
34 </a>
35 <button class="btn search-submit-{{table_name}}" >Search</button>
36 <button class="btn btn-link remove-search-btn-{{table_name}}">Show {{title|lower}}
37 </button>
38 </form>
39 </div>
40</div>
41
42<div id="table-container-{{table_name}}" style="visibility: hidden">
43 <!-- control header -->
44 <div class="navbar" id="table-chrome-{{table_name}}">
45 <div class="navbar-inner">
46 <div class="navbar-search input-append pull-left">
47
48 <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
49 <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
50 <i class="icon-remove"></i>
51 </a>
52 <button class="btn" id="search-submit-{{table_name}}" >Search</button>
53 </div>
54
55 <div class="pull-right">
56 <div class="btn-group">
57 <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
58 <span class="caret"></span>
59 </button>
60 <ul class="dropdown-menu editcol">
61 </ul>
62 </div>
63 <div style="display:inline">
64 <span class="divider-vertical"></span>
65 <span class="help-inline" style="padding-top:5px;">Show rows:</span>
66 <select style="margin-top:5px;margin-bottom:0px;" class="pagesize-{{table_name}}">
67 {% with "10 25 50 100 150" as list%}
68 {% for i in list.split %}
69 <option value="{{i}}">{{i}}</option>
70 {% endfor %}
71 {% endwith %}
72 </select>
73 </div>
74 </div>
75 </div>
76 </div>
77
78 <!-- The actual table -->
79 <table class="table table-bordered table-hover tablesorter" id="{{table_name}}">
80 <thead>
81 <tr><th></th></tr>
82 </thead>
83 <tbody></tbody>
84 </table>
85
86 <!-- Pagination controls -->
87 <div class="pagination pagination-centered" id="pagination-{{table_name}}">
88 <ul class="pagination" style="display: block-inline">
89 </ul>
90
91 <div class="pull-right">
92 <span class="help-inline" style="padding-top:5px;">Show rows:</span>
93 <select style="margin-top:5px;margin-bottom:0px;" class="pagesize-{{table_name}}">
94 {% with "10 25 50 100 150" as list%}
95 {% for i in list.split %}
96 <option value="{{i}}">{{i}}</option>
97 {% endfor %}
98 {% endwith %}
99 </select>
100 </div>
101 </div>
102</div>