Lines 8-17
Link Here
|
8 |
$(document).ready(function() { |
8 |
$(document).ready(function() { |
9 |
var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, { |
9 |
var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, { |
10 |
"aoColumnDefs": [ |
10 |
"aoColumnDefs": [ |
|
|
11 |
{ "aTargets": [ 0 ], "bVisible": false, "bSearchable": false }, |
11 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
12 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
12 |
], |
13 |
], |
13 |
"sPaginationType": "four_button" |
14 |
"sPaginationType": "four_button" |
14 |
} ) ); |
15 |
} ) ); |
|
|
16 |
$("#show_only_mine").on('click', function(){ |
17 |
suggestionst.fnFilter('^[% loggedinuser %]$', 0, true); |
18 |
}); |
19 |
$("#show_all").on('click', function(){ |
20 |
suggestionst.fnFilter('', 0 ); |
21 |
}); |
15 |
}); |
22 |
}); |
16 |
//]]> |
23 |
//]]> |
17 |
</script> |
24 |
</script> |
Lines 30-38
Link Here
|
30 |
|
37 |
|
31 |
<h1>Suggestions</h1> |
38 |
<h1>Suggestions</h1> |
32 |
[% IF ( suggestions_loop ) %] |
39 |
[% IF ( suggestions_loop ) %] |
|
|
40 |
<a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a> |
33 |
<table id="suggestionst"> |
41 |
<table id="suggestionst"> |
34 |
<thead> |
42 |
<thead> |
35 |
<tr> |
43 |
<tr> |
|
|
44 |
<th>Mine</th> |
36 |
<th>Suggestion</th> |
45 |
<th>Suggestion</th> |
37 |
<th>Suggested by</th> |
46 |
<th>Suggested by</th> |
38 |
<th>Accepted by</th> |
47 |
<th>Accepted by</th> |
Lines 42-47
Link Here
|
42 |
<tbody> |
51 |
<tbody> |
43 |
[% FOREACH suggestions_loo IN suggestions_loop %] |
52 |
[% FOREACH suggestions_loo IN suggestions_loop %] |
44 |
<tr> |
53 |
<tr> |
|
|
54 |
<td>[% suggestions_loo.managedby %]</td> |
45 |
<td> |
55 |
<td> |
46 |
<p>[% suggestions_loo.title |html %] - [% suggestions_loo.author %]</p> |
56 |
<p>[% suggestions_loo.title |html %] - [% suggestions_loo.author %]</p> |
47 |
<p> |
57 |
<p> |
48 |
- |
|
|