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,-1 ], "bSortable": false, "bSearchable": false } |
19 |
{ "aTargets": [ 0,-1 ], "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-94
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:contains(" + selectedStatus + ")").show(); |
79 |
} |
80 |
} |
81 |
|
82 |
// Filter by branch |
83 |
function filterByBranch() { |
84 |
selectedBranch = $("#branchfilter").val(); |
85 |
if (selectedBranch == "all") { |
86 |
clearFilters(); |
87 |
} else { |
88 |
$("table#claimst tbody tr").hide(); |
89 |
$("table#claimst tbody tr:contains(" + selectedBranch + ")").show(); |
90 |
} |
91 |
} |
92 |
// Filter by date |
67 |
// Filter by date |
93 |
function filterByDate() { |
68 |
function filterByDate() { |
94 |
var beginDate = Date_from_syspref($("#from").val()).getTime(); |
69 |
var beginDate = Date_from_syspref($("#from").val()).getTime(); |
Lines 136-141
Link Here
|
136 |
// Clears filters : shows everything |
111 |
// Clears filters : shows everything |
137 |
function clearFilters() { |
112 |
function clearFilters() { |
138 |
$("table#claimst tbody tr").show(); |
113 |
$("table#claimst tbody tr").show(); |
|
|
114 |
|
139 |
} |
115 |
} |
140 |
|
116 |
|
141 |
function popup(supplierid,serialid){ |
117 |
function popup(supplierid,serialid){ |
Lines 199-242
Link Here
|
199 |
|
175 |
|
200 |
<ol> |
176 |
<ol> |
201 |
<li> |
177 |
<li> |
202 |
<label for="statusfilter">Status : </label> |
|
|
203 |
<select id="statusfilter" onchange="filterByStatus();"> |
204 |
<option value="all" selected="selected">(All)</option> |
205 |
<option>Expected</option> |
206 |
<option>Arrived</option> |
207 |
<option>Late</option> |
208 |
<option>Missing</option> |
209 |
<option>Claimed</option> |
210 |
<option>Stopped</option> |
211 |
</select> |
212 |
</li> |
213 |
|
214 |
<li> |
215 |
<label for="titlefilter">Title : </label> |
216 |
<input id="titlefilter" type="text" /> |
217 |
</li> |
218 |
<li> |
219 |
<label for="branchfilter">Library: </label> |
220 |
<select id="branchfilter" onchange="filterByBranch();"> |
221 |
[% FOREACH branchloo IN branchloop %] |
222 |
[% IF ( branchloo.selected ) %] |
223 |
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option> |
224 |
[% ELSE %] |
225 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option> |
226 |
[% END %] |
227 |
[% END %] |
228 |
</select> |
229 |
</li> |
230 |
|
231 |
<li> |
232 |
<label for="from">From:</label> |
178 |
<label for="from">From:</label> |
233 |
<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" /> |
234 |
<label for="to" style="float:none;">To:</label> |
180 |
<label for="to" style="float:none;">To:</label> |
235 |
<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" /> |
236 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
182 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
237 |
<input type="button" value="OK" onclick="filterByDate();" /> |
183 |
<input type="button" value="OK" onclick="filterByDate();" /> |
238 |
</li> |
184 |
</li> |
239 |
|
185 |
|
240 |
<li> |
186 |
<li> |
241 |
<input type="reset" value="Clear filters" onclick="clearFilters();" /> |
187 |
<input type="reset" value="Clear filters" onclick="clearFilters();" /> |
242 |
</li> |
188 |
</li> |
Lines 259-266
Link Here
|
259 |
<th>Status</th> |
205 |
<th>Status</th> |
260 |
<th>Since</th> |
206 |
<th>Since</th> |
261 |
<th>Claim date</th> |
207 |
<th>Claim date</th> |
262 |
<th>Begin claim</th> |
208 |
[% FOR field IN additional_fields_for_subscription %] |
|
|
209 |
<th>[% field.name %]</th> |
210 |
[% END %] |
211 |
<th></th> |
263 |
</tr></thead> |
212 |
</tr></thead> |
|
|
213 |
<tfoot> |
214 |
<tr> |
215 |
[% IF ( letter ) %] |
216 |
<td></td> |
217 |
[% END %] |
218 |
<td><input type="text" class="filter" data-column_num="1" placeholder="Search vendor" /></td> |
219 |
<td><input type="text" class="filter" data-column_num="2" placeholder="Search library" /></td> |
220 |
<td><input type="text" class="filter" data-column_num="3" placeholder="Search title" /></td> |
221 |
<td><input type="text" class="filter" data-column_num="4" placeholder="Search issue number" /></td> |
222 |
<td><input type="text" class="filter" data-column_num="5" placeholder="Search status" /></td> |
223 |
<td></td> |
224 |
<td><input type="text" class="filter" data-column_num="7" placeholder="Search claim date" /></td> |
225 |
[% FOR field IN additional_fields_for_subscription %] |
226 |
<td><input type="text" class="filter" data-column_num="[% loop.count + 7 %]" placeholder="Search [% field.name %]" /></td> |
227 |
[% END %] |
228 |
<td></td> |
229 |
</tr> |
230 |
</tfoot> |
264 |
<tbody>[% FOREACH missingissue IN missingissues %] |
231 |
<tbody>[% FOREACH missingissue IN missingissues %] |
265 |
<tr> |
232 |
<tr> |
266 |
[% IF ( letter ) %] |
233 |
[% IF ( letter ) %] |
Lines 294-299
Link Here
|
294 |
<td> |
261 |
<td> |
295 |
[% missingissue.claimdate %] |
262 |
[% missingissue.claimdate %] |
296 |
</td> |
263 |
</td> |
|
|
264 |
[% FOR field IN additional_fields_for_subscription %] |
265 |
[% IF field.authorised_value_category %] |
266 |
<td>[% KohaAuthorisedValues.GetByCode( field.authorised_value_category, missingissue.additional_fields.${field.name} ) %]</td> |
267 |
[% ELSE %] |
268 |
<td>[% missingissue.additional_fields.${field.name} %]</td> |
269 |
[% END %] |
270 |
[% END %] |
297 |
<td> |
271 |
<td> |
298 |
<a href="/cgi-bin/koha/serials/lateissues-excel.pl?supplierid=[% missingissue.supplieri %]&serialid=[% missingissue.serialid %]&op=claims">Export item data</a> |
272 |
<a href="/cgi-bin/koha/serials/lateissues-excel.pl?supplierid=[% missingissue.supplieri %]&serialid=[% missingissue.serialid %]&op=claims">Export item data</a> |
299 |
</td> |
273 |
</td> |