|
Lines 34-42
Link Here
|
| 34 |
</div> |
34 |
</div> |
| 35 |
|
35 |
|
| 36 |
[% IF items.count %] |
36 |
[% IF items.count %] |
|
|
37 |
<div class="lostitems-table_table_controls"> |
| 38 |
| <a href="#" class="SelectAll"><i class="fa fa-check"></i> Select all</a> | |
| 39 |
<a href="#" class="ClearAll"><i class="fa fa-remove"></i> Clear all</a> |
| 40 |
<span class="itemselection_actions"> |
| 41 |
| Actions: |
| 42 |
<a class="itemselection_action_export"><i class="fa fa-trash"></i> Export selected items</a> |
| 43 |
</span> |
| 44 |
</div> |
| 45 |
|
| 37 |
<table id="lostitems-table"> |
46 |
<table id="lostitems-table"> |
| 38 |
<thead> |
47 |
<thead> |
| 39 |
<tr> |
48 |
<tr> |
|
|
49 |
<th class="NoSort"></th> |
| 40 |
<th>Title</th> |
50 |
<th>Title</th> |
| 41 |
<th>Author</th> |
51 |
<th>Author</th> |
| 42 |
<th>Lost status</th> |
52 |
<th>Lost status</th> |
|
Lines 57-62
Link Here
|
| 57 |
<tbody> |
67 |
<tbody> |
| 58 |
[% FOREACH item IN items %] |
68 |
[% FOREACH item IN items %] |
| 59 |
<tr> |
69 |
<tr> |
|
|
70 |
<td style="text-align:center;vertical-align:middle"> |
| 71 |
<input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> |
| 72 |
</td> |
| 60 |
<td> |
73 |
<td> |
| 61 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a> |
74 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber %]" title="[% item.itemnotes %]">[% item.biblio.title |html %]</a> |
| 62 |
</td> |
75 |
</td> |
|
Lines 146-151
Link Here
|
| 146 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> |
159 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script> |
| 147 |
[% INCLUDE 'columns_settings.inc' %] |
160 |
[% INCLUDE 'columns_settings.inc' %] |
| 148 |
<script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters.js"></script> |
161 |
<script type="text/javascript" src="[% interface %]/[% theme %]/js/table_filters.js"></script> |
|
|
162 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
| 149 |
<script type='text/javascript'> |
163 |
<script type='text/javascript'> |
| 150 |
$(document).ready(function() { |
164 |
$(document).ready(function() { |
| 151 |
var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %]; |
165 |
var columns_settings = [% ColumnsSettings.GetColumns( 'reports', 'lostitems', 'lostitems-table', 'json' ) %]; |
|
Lines 153-164
Link Here
|
| 153 |
"dom": 'B<"clearfix">t', |
167 |
"dom": 'B<"clearfix">t', |
| 154 |
"aaSorting": [], |
168 |
"aaSorting": [], |
| 155 |
"aoColumnDefs": [ |
169 |
"aoColumnDefs": [ |
| 156 |
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false }, |
170 |
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] }, |
| 157 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] } |
171 |
{ "sType": "title-string", "aTargets" : [ "title-string" ] } |
| 158 |
], |
172 |
], |
| 159 |
'bAutoWidth': false, |
173 |
'bAutoWidth': false, |
| 160 |
"bPaginate": false, |
174 |
"bPaginate": false, |
| 161 |
}, columns_settings, 'with_filters'); |
175 |
}, columns_settings, 'with_filters'); |
|
|
176 |
|
| 177 |
function itemSelectionBuildExportLink() { |
| 178 |
var itemnumbers = new Array(); |
| 179 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 180 |
itemnumbers.push($(this).val()); |
| 181 |
}); |
| 182 |
if (itemnumbers.length > 0) { |
| 183 |
var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; |
| 184 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 185 |
$('a.itemselection_action_export').attr('href', url); |
| 186 |
} else { |
| 187 |
return false; |
| 188 |
} |
| 189 |
return true; |
| 190 |
} |
| 191 |
|
| 192 |
function itemSelectionBuildActionLinks() { |
| 193 |
var export_link_ok = itemSelectionBuildExportLink(); |
| 194 |
if (export_link_ok) { |
| 195 |
$('.itemselection_actions').show(); |
| 196 |
} else { |
| 197 |
$('.itemselection_actions').hide(); |
| 198 |
} |
| 199 |
} |
| 200 |
|
| 201 |
itemSelectionBuildActionLinks(); |
| 202 |
|
| 203 |
$("input[name='itemnumber'][type='checkbox']").change(function() { |
| 204 |
itemSelectionBuildActionLinks(); |
| 205 |
}); |
| 206 |
|
| 207 |
$(".SelectAll").on("click",function(e){ |
| 208 |
e.preventDefault(); |
| 209 |
$("#lostitems-table").checkCheckboxes(); |
| 210 |
itemSelectionBuildActionLinks(); |
| 211 |
}); |
| 212 |
|
| 213 |
$(".ClearAll").on("click",function(e){ |
| 214 |
e.preventDefault(); |
| 215 |
$("#lostitems-table").unCheckCheckboxes(); |
| 216 |
itemSelectionBuildActionLinks(); |
| 217 |
}); |
| 162 |
}); |
218 |
}); |
| 163 |
</script> |
219 |
</script> |
| 164 |
[% END %] |
220 |
[% END %] |
| 165 |
- |
|
|