Lines 67-72
Link Here
|
67 |
<div class="alert alert-warning">No missing issues found.</div> |
67 |
<div class="alert alert-warning">No missing issues found.</div> |
68 |
[% ELSE %] |
68 |
[% ELSE %] |
69 |
<div class="alert alert-info">Please choose a vendor.</div> |
69 |
<div class="alert alert-info">Please choose a vendor.</div> |
|
|
70 |
[% PROCESS select_vendor context => "main" %] |
70 |
[% END %] |
71 |
[% END %] |
71 |
[% END %] |
72 |
[% END %] |
72 |
[% END %] |
73 |
[% END %] |
Lines 79-123
Link Here
|
79 |
<div class="alert alert-warning"> No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>. </div> |
80 |
<div class="alert alert-warning"> No claims notice defined. <a href="/cgi-bin/koha/tools/letter.pl">Please define one</a>. </div> |
80 |
[% END %] |
81 |
[% END %] |
81 |
|
82 |
|
82 |
<form id="claims" name="claims" action="claims.pl" method="get"> |
|
|
83 |
<fieldset> |
84 |
<label for="supplierid">Vendor: </label> |
85 |
<select id="supplierid" name="supplierid"> |
86 |
[% FOREACH suploo IN suploop %] |
87 |
<option value="[% suploo.id | html %]" [% IF suploo.selected %]selected="selected"[% END %]> [% suploo.name | html %] ([% suploo.count | html %]) </option> |
88 |
[% END %] |
89 |
</select> |
90 |
<input type="submit" class="btn btn-primary" value="OK" /> |
91 |
</fieldset> |
92 |
</form> |
93 |
<!-- /#claims --> |
94 |
|
95 |
[% IF ( missingissues ) %] |
83 |
[% IF ( missingissues ) %] |
96 |
<h3>Missing issues</h3> |
84 |
<h3>Missing issues</h3> |
97 |
<form method="get" action="claims.pl" id="filter_claims_form"> |
|
|
98 |
<fieldset class="rows"> |
99 |
<legend>Filters:</legend> |
100 |
<ol> |
101 |
<li> |
102 |
<label for="from">From:</label> |
103 |
<input type="text" name="begindate" id="from" value="[% begindate | html %]" size="10" maxlength="10" class="flatpickr" data-date_to="to" /> |
104 |
<label for="to" style="float:none;">To:</label> |
105 |
<input type="text" name="enddate" id="to" value="[% enddate | html %]" size="10" maxlength="10" class="flatpickr" /> |
106 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
107 |
<input id="filterByDate" type="button" value="OK" /> |
108 |
<a href="#" id="clearfilter"><i class="fa fa-times"></i> Clear filter</a> |
109 |
</li> |
110 |
</ol> |
111 |
</fieldset> |
112 |
</form> |
113 |
|
85 |
|
114 |
<fieldset> |
86 |
<form action="claims.pl" method="post" id="claims_form"> |
115 |
<form action="claims.pl" method="post" id="claims_form"> |
87 |
<div class="page-section"> |
116 |
[% INCLUDE 'csrf-token.inc' %] |
88 |
[% INCLUDE 'csrf-token.inc' %] |
117 |
<table id="claimst"> |
89 |
<table id="claimst"> |
118 |
<thead> |
90 |
<thead> |
119 |
<tr> |
91 |
<tr> |
120 |
<th><input type="checkbox" id="CheckAll" /></th> |
92 |
<th class="NoSort"><input type="checkbox" id="CheckAll" /></th> |
121 |
<th>Vendor</th> |
93 |
<th>Vendor</th> |
122 |
<th>Library</th> |
94 |
<th>Library</th> |
123 |
<th class="anti-the">Title</th> |
95 |
<th class="anti-the">Title</th> |
Lines 138-144
Link Here
|
138 |
<tr> |
110 |
<tr> |
139 |
<td> |
111 |
<td> |
140 |
[% UNLESS missingissue.cannot_claim %] |
112 |
[% UNLESS missingissue.cannot_claim %] |
141 |
<input type="checkbox" name="serialid" value="[% missingissue.serialid | html %]" /> |
113 |
<input type="checkbox" class="select_serial" name="serialid" value="[% missingissue.serialid | html %]" /> |
142 |
[% END %] |
114 |
[% END %] |
143 |
</td> |
115 |
</td> |
144 |
<td>[% missingissue.name | html %]</td> |
116 |
<td>[% missingissue.name | html %]</td> |
Lines 179-232
Link Here
|
179 |
</tfoot> |
151 |
</tfoot> |
180 |
</table> |
152 |
</table> |
181 |
<!-- /#claimst --> |
153 |
<!-- /#claimst --> |
|
|
154 |
</div> |
155 |
<!-- /.page-section --> |
156 |
|
157 |
<hr /> |
182 |
|
158 |
|
|
|
159 |
<div class="row"> |
183 |
[% IF csv_profiles.count %] |
160 |
[% IF csv_profiles.count %] |
184 |
<fieldset class="action"> |
161 |
<div class="col"> |
185 |
<label for="csv_code">Select CSV profile:</label> |
162 |
<fieldset class="serial_batch_op" disabled="disabled"> |
186 |
<select id="csv_profile_for_export"> |
163 |
<fieldset class="brief"> |
187 |
[% FOR csv IN csv_profiles %] |
164 |
<legend>Download selected claims</legend> |
188 |
<option value="[% csv.export_format_id | html %]">[% csv.profile | html %]</option> |
165 |
<label for="csv_profile_for_export">Select CSV profile:</label> |
189 |
[% END %] |
166 |
<select id="csv_profile_for_export"> |
190 |
</select> |
167 |
[% FOR csv IN csv_profiles %] |
191 |
<span class="exportSelected"><a id="ExportSelected" href="/cgi-bin/koha/serials/claims.pl">Download selected claims</a></span> |
168 |
<option value="[% csv.export_format_id | html %]">[% csv.profile | html %]</option> |
192 |
</fieldset> |
169 |
[% END %] |
|
|
170 |
</select> |
171 |
<fieldset class="action"> |
172 |
<button class="btn btn-primary" id="ExportSelected" type="button">Download selected claims</button> |
173 |
</fieldset> |
174 |
</fieldset> |
175 |
</fieldset> |
176 |
</div> |
193 |
[% END %] |
177 |
[% END %] |
194 |
|
178 |
|
195 |
[% IF letters %] |
179 |
[% IF letters %] |
196 |
<fieldset class="action"> |
180 |
<div class="col"> |
197 |
<label for="letter_code">Select notice:</label> |
181 |
<fieldset class="serial_batch_op" disabled="disabled"> |
198 |
<select name="letter_code" id="letter_code"> |
182 |
<fieldset class="brief"> |
199 |
[% FOREACH letter IN letters %] |
183 |
<legend>Send claim notification</legend> |
200 |
<option value="[% letter.code | html %]">[% letter.name | html %]</option> |
184 |
<label for="letter_code">Select notice:</label> |
201 |
[% END %] |
185 |
<select name="letter_code" id="letter_code"> |
202 |
</select> |
186 |
[% FOREACH letter IN letters %] |
203 |
<input type="hidden" name="op" value="cud-send_alert" /> |
187 |
<option value="[% letter.code | html %]">[% letter.name | html %]</option> |
204 |
<input type="hidden" name="supplierid" value="[% supplierid | html %]" /> |
188 |
[% END %] |
205 |
<input type="submit" name="submit" class="btn btn-primary" value="Send notification" /> |
189 |
</select> |
206 |
</fieldset> |
190 |
<fieldset class="action"> |
|
|
191 |
<input type="hidden" name="op" value="cud-send_alert" /> |
192 |
<input type="hidden" name="supplierid" value="[% supplierid | html %]" /> |
193 |
<input type="submit" name="submit" class="btn btn-primary" value="Send notification" /> |
194 |
</fieldset> |
195 |
</fieldset> |
196 |
</fieldset> |
197 |
</div> |
207 |
[% END %] |
198 |
[% END %] |
208 |
</form> |
199 |
</div> |
209 |
<!-- /#claims_form --> |
200 |
</form> |
210 |
</fieldset> |
201 |
<!-- /#claims_form --> |
211 |
[% END # /missingissues %] |
202 |
[% END # /missingissues %] |
212 |
[% END %] |
203 |
[% END %] |
213 |
|
204 |
|
|
|
205 |
[% BLOCK select_vendor %] |
206 |
<form class="select_vendor" name="claims" action="claims.pl" method="get"> |
207 |
[% IF ( context == "main") %] |
208 |
[% SET form_class = "rows" %] |
209 |
[% ELSE %] |
210 |
[% SET form_class = "brief" %] |
211 |
[% END %] |
212 |
<fieldset class="[% form_class | html %]"> |
213 |
<h4>Choose vendor</h4> |
214 |
<label class="sr-only" for="supplierid">Choose vendor: </label> |
215 |
<select id="supplierid" name="supplierid"> |
216 |
[% FOREACH suploo IN suploop %] |
217 |
[% IF ( suploo.selected ) %] |
218 |
<option value="[% suploo.id | html %]" selected="selected"> [% suploo.name | html %] ([% suploo.count | html %]) </option> |
219 |
[% ELSE %] |
220 |
<option value="[% suploo.id | html %]"> [% suploo.name | html %] ([% suploo.count | html %]) </option> |
221 |
[% END %] |
222 |
[% END %] |
223 |
</select> |
224 |
</fieldset> |
225 |
<fieldset class="action"> |
226 |
<input type="submit" class="btn btn-primary" value="OK" /> |
227 |
</fieldset> |
228 |
</form> |
229 |
<!-- /#claims --> |
230 |
[% END %] |
231 |
|
214 |
[% MACRO jsinclude BLOCK %] |
232 |
[% MACRO jsinclude BLOCK %] |
215 |
[% INCLUDE 'calendar.inc' %] |
233 |
[% INCLUDE 'calendar.inc' %] |
216 |
[% INCLUDE 'datatables.inc' %] |
234 |
[% INCLUDE 'datatables.inc' %] |
217 |
<script> |
235 |
<script> |
218 |
var sTable; |
236 |
var sTable; |
219 |
$(document).ready(function () { |
237 |
$(document).ready(function () { |
|
|
238 |
enableSelectedActions(); |
220 |
sTable = $("#claimst").kohaTable({ |
239 |
sTable = $("#claimst").kohaTable({ |
221 |
dom: "t", |
240 |
dom: "t", |
|
|
241 |
order: [[7, "asc"]], |
222 |
columnDefs: [ |
242 |
columnDefs: [ |
223 |
{ targets: [0], orderable: false, searchable: false }, |
243 |
{ sortable: false, targets: ["NoSort"] }, |
224 |
{ type: "anti-the", targets: ["anti-the"] }, |
244 |
{ type: "anti-the", targets: ["anti-the"] }, |
225 |
], |
245 |
], |
226 |
paginate: false, |
246 |
paging: false, |
227 |
}); |
|
|
228 |
$("#supplierid").change(function () { |
229 |
$("#claims").submit(); |
230 |
}); |
247 |
}); |
231 |
|
248 |
|
232 |
// Checkboxes : Select All / None |
249 |
// Checkboxes : Select All / None |
Lines 234-239
Link Here
|
234 |
|
251 |
|
235 |
$("#CheckAll").click(function () { |
252 |
$("#CheckAll").click(function () { |
236 |
$("#claimst tr:visible :checkbox").prop("checked", $("#CheckAll").is(":checked")); |
253 |
$("#claimst tr:visible :checkbox").prop("checked", $("#CheckAll").is(":checked")); |
|
|
254 |
enableSelectedActions(); |
237 |
}); |
255 |
}); |
238 |
|
256 |
|
239 |
// Generates a dynamic link for exporting the selections data as CSV |
257 |
// Generates a dynamic link for exporting the selections data as CSV |
Lines 272-279
Link Here
|
272 |
$("#filter_claims_form").on("submit", function () { |
290 |
$("#filter_claims_form").on("submit", function () { |
273 |
return false; |
291 |
return false; |
274 |
}); |
292 |
}); |
|
|
293 |
|
294 |
$(".select_serial").on("change", function () { |
295 |
enableSelectedActions(); |
296 |
}); |
275 |
}); |
297 |
}); |
276 |
|
298 |
|
|
|
299 |
function enableSelectedActions() { |
300 |
var checkedBoxes = $(".select_serial:checked"); |
301 |
if (checkedBoxes.length) { |
302 |
$(".serial_batch_op").prop("disabled", false); |
303 |
} else { |
304 |
$(".serial_batch_op").prop("disabled", true); |
305 |
} |
306 |
} |
307 |
|
277 |
// Checks if the form can be sent (at least one checkbox must be checked) |
308 |
// Checks if the form can be sent (at least one checkbox must be checked) |
278 |
function checkForm() { |
309 |
function checkForm() { |
279 |
if ($("input:checked").length == 0) { |
310 |
if ($("input:checked").length == 0) { |
280 |
- |
|
|