Lines 218-223
Link Here
|
218 |
[% IF CAN_user_tools_items_batchmod %] |
218 |
[% IF CAN_user_tools_items_batchmod %] |
219 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
219 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
220 |
[% END %] |
220 |
[% END %] |
|
|
221 |
[% IF biblio.volumes.count %] |
222 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
223 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
224 |
[% END %] |
221 |
</span> |
225 |
</span> |
222 |
[% END %] |
226 |
[% END %] |
223 |
</div> |
227 |
</div> |
Lines 229-234
Link Here
|
229 |
<th>Current location</th> |
233 |
<th>Current location</th> |
230 |
<th>Home library</th> |
234 |
<th>Home library</th> |
231 |
[% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %] |
235 |
[% IF ( itemdata_ccode ) %]<th>Collection</th>[% END %] |
|
|
236 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
232 |
<th>Call number</th> |
237 |
<th>Call number</th> |
233 |
[% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %] |
238 |
[% IF ( volinfo ) %]<th>Serial enumeration / chronology</th>[% END %] |
234 |
<th>Status</th> |
239 |
<th>Status</th> |
Lines 284-289
Note that permanent location is a code, and location may be an authval.
Link Here
|
284 |
</span> |
289 |
</span> |
285 |
</td> |
290 |
</td> |
286 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
291 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
292 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
287 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
293 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
288 |
[% IF ( volinfo ) %] |
294 |
[% IF ( volinfo ) %] |
289 |
<td class="enumchron"> |
295 |
<td class="enumchron"> |
Lines 886-892
Note that permanent location is a code, and location may be an authval.
Link Here
|
886 |
</div> |
892 |
</div> |
887 |
</div> |
893 |
</div> |
888 |
|
894 |
|
889 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
895 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
890 |
<div class="modal-dialog"> |
896 |
<div class="modal-dialog"> |
891 |
<div class="modal-content"> |
897 |
<div class="modal-content"> |
892 |
<div class="modal-header"> |
898 |
<div class="modal-header"> |
Lines 904-909
Note that permanent location is a code, and location may be an authval.
Link Here
|
904 |
</div> |
910 |
</div> |
905 |
</div> |
911 |
</div> |
906 |
|
912 |
|
|
|
913 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
914 |
<div class="modal-dialog"> |
915 |
<div class="modal-content"> |
916 |
<div class="modal-header"> |
917 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
918 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
919 |
</div> |
920 |
<form id="modal-volume-set-form" class="validated"> |
921 |
<div class="modal-body"> |
922 |
<fieldset> |
923 |
<p> |
924 |
<label for="volume" class="required">Volume: </label> |
925 |
<select name="volume" id="volume-add-form-select"> |
926 |
[% FOREACH v IN biblio.volumes %] |
927 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
928 |
[% END %] |
929 |
</select> |
930 |
<span class="required">Required</span> |
931 |
</p> |
932 |
</fieldset> |
933 |
</div> |
934 |
<div class="modal-footer"> |
935 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
936 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
937 |
</div> |
938 |
</form> |
939 |
</div> |
940 |
</div> |
941 |
</div> |
942 |
|
943 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
944 |
<div class="modal-dialog"> |
945 |
<div class="modal-content"> |
946 |
<div class="modal-header"> |
947 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
948 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
949 |
</div> |
950 |
<div class="modal-body"> |
951 |
Are you sure you want to remove these item(s) from their volume(s)? |
952 |
</div> |
953 |
<div class="modal-footer"> |
954 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
955 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
956 |
</div> |
957 |
</div> |
958 |
</div> |
959 |
</div> |
960 |
|
907 |
[% MACRO jsinclude BLOCK %] |
961 |
[% MACRO jsinclude BLOCK %] |
908 |
[% INCLUDE 'catalog-strings.inc' %] |
962 |
[% INCLUDE 'catalog-strings.inc' %] |
909 |
[% Asset.js("js/catalog.js") | $raw %] |
963 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1325-1330
Note that permanent location is a code, and location may be an authval.
Link Here
|
1325 |
alert(message); |
1379 |
alert(message); |
1326 |
}); |
1380 |
}); |
1327 |
}); |
1381 |
}); |
|
|
1382 |
|
1383 |
// Add item(s) to a volume |
1384 |
$('.itemselection_action_volume_set').on('click', function(){ |
1385 |
$('#modal-volume-set').modal('show'); |
1386 |
}); |
1387 |
|
1388 |
$("#modal-volume-set-form").validate({ |
1389 |
submitHandler: function(form) { |
1390 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1391 |
|
1392 |
const volume_id = $('#volume-add-form-select').val(); |
1393 |
|
1394 |
let itemnumbers = new Array(); |
1395 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1396 |
const itemnumber = $(this).val(); |
1397 |
itemnumbers.push( itemnumber ); |
1398 |
}); |
1399 |
if (itemnumbers.length > 0) { |
1400 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1401 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1402 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1403 |
url += `&volume_id=${volume_id}`; |
1404 |
|
1405 |
window.location.replace(url); |
1406 |
} |
1407 |
|
1408 |
$('#modal-volume-set').modal('hide'); |
1409 |
} |
1410 |
}); |
1411 |
|
1412 |
// Remove item(s) from a volume |
1413 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1414 |
$('#modal-volume-unset').modal('show'); |
1415 |
}); |
1416 |
|
1417 |
$("#modal-volume-unset-submit").on('click', function(){ |
1418 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1419 |
|
1420 |
let itemnumbers = new Array(); |
1421 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1422 |
const itemnumber = $(this).val(); |
1423 |
itemnumbers.push( itemnumber ); |
1424 |
}); |
1425 |
if (itemnumbers.length > 0) { |
1426 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1427 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1428 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1429 |
|
1430 |
window.location.replace(url); |
1431 |
} |
1432 |
|
1433 |
$('#modal-volume-unset').modal('hide'); |
1434 |
}); |
1328 |
[% END %] |
1435 |
[% END %] |
1329 |
</script> |
1436 |
</script> |
1330 |
[% END %] |
1437 |
[% END %] |
1331 |
- |
|
|