Lines 1-4
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
|
|
2 |
[% USE KohaAuthorisedValues %] |
2 |
<title>Koha › Serials › Claims</title> |
3 |
<title>Koha › Serials › Claims</title> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'calendar.inc' %] |
5 |
[% INCLUDE 'calendar.inc' %] |
Lines 9-23
Link Here
|
9 |
<script type="text/javascript"> |
10 |
<script type="text/javascript"> |
10 |
//<![CDATA[ |
11 |
//<![CDATA[ |
11 |
[% IF (dateformat == 'metric') %]dt_add_type_uk_date();[% END %] |
12 |
[% IF (dateformat == 'metric') %]dt_add_type_uk_date();[% END %] |
|
|
13 |
var sTable; |
12 |
$(document).ready(function() { |
14 |
$(document).ready(function() { |
13 |
[% UNLESS ( preview ) %] |
15 |
[% UNLESS ( preview ) %] |
14 |
var sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, { |
16 |
sTable = $("#claimst").dataTable($.extend(true, {}, dataTablesDefaults, { |
15 |
"sDom": 't', |
17 |
"sDom": 't', |
16 |
"aoColumnDefs": [ |
18 |
"aoColumnDefs": [ |
17 |
{ "aTargets": [ 0,1 ], "bSortable": false, "bSearchable": false } |
19 |
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false } |
18 |
], |
20 |
], |
19 |
"bPaginate": false |
21 |
"bPaginate": false |
20 |
})); |
22 |
})); |
|
|
23 |
sTable.fnAddFilters("filter", "200"); |
21 |
[% END %] |
24 |
[% END %] |
22 |
$('#supplierid').change(function() { |
25 |
$('#supplierid').change(function() { |
23 |
$('#claims').submit(); |
26 |
$('#claims').submit(); |
Lines 51-63
Link Here
|
51 |
return false; |
54 |
return false; |
52 |
}); |
55 |
}); |
53 |
|
56 |
|
54 |
$("#titlefilter").keyup( function () { |
|
|
55 |
sTable.fnFilter( this.value, 3 ); // 3 is position of title column |
56 |
} ); |
57 |
|
58 |
$("#branchfilter").keyup(function() { |
59 |
sTable.fnFilter( this.value, 2 ); // 2 is the position of the author column |
60 |
}); |
61 |
}); |
57 |
}); |
62 |
|
58 |
|
63 |
// Checks if the form can be sent (at least one checkbox must be checked) |
59 |
// Checks if the form can be sent (at least one checkbox must be checked) |
Lines 68-98
Link Here
|
68 |
} |
64 |
} |
69 |
} |
65 |
} |
70 |
|
66 |
|
71 |
// Filter by status |
|
|
72 |
function filterByStatus() { |
73 |
selectedStatus = $("#statusfilter").val(); |
74 |
if (selectedStatus == "all") { |
75 |
clearFilters(); |
76 |
} else { |
77 |
$("table#claimst tbody tr").hide(); |
78 |
$("table#claimst tbody tr").each( function() { |
79 |
if ( $(this).find("span.status-" + selectedStatus).size() > 0 ) { |
80 |
$(this).show(); |
81 |
} |
82 |
}); |
83 |
} |
84 |
} |
85 |
|
86 |
// Filter by branch |
87 |
function filterByBranch() { |
88 |
selectedBranch = $("#branchfilter").val(); |
89 |
if (selectedBranch == "all") { |
90 |
clearFilters(); |
91 |
} else { |
92 |
$("table#claimst tbody tr").hide(); |
93 |
$("table#claimst tbody tr:contains(" + selectedBranch + ")").show(); |
94 |
} |
95 |
} |
96 |
// Filter by date |
67 |
// Filter by date |
97 |
function filterByDate() { |
68 |
function filterByDate() { |
98 |
var beginDate = Date_from_syspref($("#from").val()).getTime(); |
69 |
var beginDate = Date_from_syspref($("#from").val()).getTime(); |
Lines 140-145
Link Here
|
140 |
// Clears filters : shows everything |
111 |
// Clears filters : shows everything |
141 |
function clearFilters() { |
112 |
function clearFilters() { |
142 |
$("table#claimst tbody tr").show(); |
113 |
$("table#claimst tbody tr").show(); |
|
|
114 |
|
143 |
} |
115 |
} |
144 |
|
116 |
|
145 |
function popup(supplierid,serialid){ |
117 |
function popup(supplierid,serialid){ |
Lines 203-244
Link Here
|
203 |
|
175 |
|
204 |
<ol> |
176 |
<ol> |
205 |
<li> |
177 |
<li> |
206 |
<label for="statusfilter">Status : </label> |
|
|
207 |
<select id="statusfilter" onchange="filterByStatus();"> |
208 |
<option value="all" selected="selected">(All)</option> |
209 |
<option value="expected">Expected</option> |
210 |
<option value="late">Late</option> |
211 |
<option value="missing">Missing</option> |
212 |
<option value="claimed">Claimed</option> |
213 |
</select> |
214 |
</li> |
215 |
|
216 |
<li> |
217 |
<label for="titlefilter">Title : </label> |
218 |
<input id="titlefilter" type="text" /> |
219 |
</li> |
220 |
<li> |
221 |
<label for="branchfilter">Library: </label> |
222 |
<select id="branchfilter" onchange="filterByBranch();"> |
223 |
[% FOREACH branchloo IN branchloop %] |
224 |
[% IF ( branchloo.selected ) %] |
225 |
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> |
226 |
[% ELSE %] |
227 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option> |
228 |
[% END %] |
229 |
[% END %] |
230 |
</select> |
231 |
</li> |
232 |
|
233 |
<li> |
234 |
<label for="from">From:</label> |
178 |
<label for="from">From:</label> |
235 |
<input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" /> |
179 |
<input type="text" name="begindate" id="from" value="[% begindate %]" size="10" maxlength="10" class="datepickerfrom" /> |
236 |
<label for="to" style="float:none;">To:</label> |
180 |
<label for="to" style="float:none;">To:</label> |
237 |
<input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" /> |
181 |
<input type="text" name="enddate" id="to" value="[% enddate %]" size="10" maxlength="10" class="datepickerto" /> |
238 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
182 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
239 |
<input type="button" value="OK" onclick="filterByDate();" /> |
183 |
<input type="button" value="OK" onclick="filterByDate();" /> |
240 |
</li> |
184 |
</li> |
241 |
|
185 |
|
242 |
<li> |
186 |
<li> |
243 |
<input type="reset" value="Clear filters" onclick="clearFilters();" /> |
187 |
<input type="reset" value="Clear filters" onclick="clearFilters();" /> |
244 |
</li> |
188 |
</li> |
Lines 261-267
Link Here
|
261 |
<th>Status</th> |
205 |
<th>Status</th> |
262 |
<th>Since</th> |
206 |
<th>Since</th> |
263 |
<th>Claim date</th> |
207 |
<th>Claim date</th> |
|
|
208 |
[% FOR field IN additional_fields_for_subscription %] |
209 |
<th>[% field.name %]</th> |
210 |
[% END %] |
264 |
</tr></thead> |
211 |
</tr></thead> |
|
|
212 |
<tfoot> |
213 |
<tr> |
214 |
[% IF ( letter ) %] |
215 |
<td></td> |
216 |
[% END %] |
217 |
<td><input type="text" class="filter" data-column_num="1" placeholder="Search vendor" /></td> |
218 |
<td><input type="text" class="filter" data-column_num="2" placeholder="Search library" /></td> |
219 |
<td><input type="text" class="filter" data-column_num="3" placeholder="Search title" /></td> |
220 |
<td><input type="text" class="filter" data-column_num="4" placeholder="Search issue number" /></td> |
221 |
<td><input type="text" class="filter" data-column_num="5" placeholder="Search status" /></td> |
222 |
<td></td> |
223 |
<td><input type="text" class="filter" data-column_num="7" placeholder="Search claim date" /></td> |
224 |
[% FOR field IN additional_fields_for_subscription %] |
225 |
<td><input type="text" class="filter" data-column_num="[% loop.count + 7 %]" placeholder="Search [% field.name %]" /></td> |
226 |
[% END %] |
227 |
</tr> |
228 |
</tfoot> |
265 |
<tbody>[% FOREACH missingissue IN missingissues %] |
229 |
<tbody>[% FOREACH missingissue IN missingissues %] |
266 |
<tr> |
230 |
<tr> |
267 |
[% IF ( letter ) %] |
231 |
[% IF ( letter ) %] |
Lines 293-298
Link Here
|
293 |
<td> |
257 |
<td> |
294 |
[% missingissue.claimdate %] |
258 |
[% missingissue.claimdate %] |
295 |
</td> |
259 |
</td> |
|
|
260 |
[% FOR field IN additional_fields_for_subscription %] |
261 |
[% IF field.authorised_value_category %] |
262 |
<td>[% KohaAuthorisedValues.GetByCode( field.authorised_value_category, missingissue.additional_fields.${field.name} ) %]</td> |
263 |
[% ELSE %] |
264 |
<td>[% missingissue.additional_fields.${field.name} %]</td> |
265 |
[% END %] |
266 |
[% END %] |
296 |
</tr> |
267 |
</tr> |
297 |
[% END %]</tbody> |
268 |
[% END %]</tbody> |
298 |
</table> |
269 |
</table> |