blob: 21c3d36c722b22f62f2a82307eb6e6ea8df91e1b [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>
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050035 <button class="btn search-submit-{{table_name}}">
36 Search
37 </button>
38 <button class="btn btn-link show-all-{{table_name}} remove-search-btn-{{table_name}}">
39 Show all
Patrick Williamsc124f4f2015-09-15 14:41:29 -050040 </button>
41 </form>
42 </div>
43</div>
44
45<div id="table-container-{{table_name}}" style="visibility: hidden">
46 <!-- control header -->
47 <div class="navbar" id="table-chrome-{{table_name}}">
48 <div class="navbar-inner">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050049 <div class="navbar-search input-append pull-left span6">
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051 <input id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052 <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
53 <i class="icon-remove"></i>
54 </a>
55 <button class="btn" id="search-submit-{{table_name}}" >Search</button>
56 </div>
57
58 <div class="pull-right">
59 <div class="btn-group">
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050060 <button id="edit-columns-button" class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
Patrick Williamsc124f4f2015-09-15 14:41:29 -050061 <span class="caret"></span>
62 </button>
63 <ul class="dropdown-menu editcol">
64 </ul>
65 </div>
66 <div style="display:inline">
67 <span class="divider-vertical"></span>
68 <span class="help-inline" style="padding-top:5px;">Show rows:</span>
69 <select style="margin-top:5px;margin-bottom:0px;" class="pagesize-{{table_name}}">
70 {% with "10 25 50 100 150" as list%}
71 {% for i in list.split %}
72 <option value="{{i}}">{{i}}</option>
73 {% endfor %}
74 {% endwith %}
75 </select>
76 </div>
77 </div>
78 </div>
79 </div>
80
81 <!-- The actual table -->
82 <table class="table table-bordered table-hover tablesorter" id="{{table_name}}">
83 <thead>
84 <tr><th></th></tr>
85 </thead>
86 <tbody></tbody>
87 </table>
88
89 <!-- Pagination controls -->
90 <div class="pagination pagination-centered" id="pagination-{{table_name}}">
91 <ul class="pagination" style="display: block-inline">
92 </ul>
93
94 <div class="pull-right">
95 <span class="help-inline" style="padding-top:5px;">Show rows:</span>
96 <select style="margin-top:5px;margin-bottom:0px;" class="pagesize-{{table_name}}">
97 {% with "10 25 50 100 150" as list%}
98 {% for i in list.split %}
99 <option value="{{i}}">{{i}}</option>
100 {% endfor %}
101 {% endwith %}
102 </select>
103 </div>
104 </div>
105</div>