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 %] |
238 |
[% IF volinfo %] |
234 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
239 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
Lines 290-295
Note that permanent location is a code, and location may be an authval.
Link Here
|
290 |
</span> |
295 |
</span> |
291 |
</td> |
296 |
</td> |
292 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
297 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
298 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
293 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
299 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
294 |
[% IF ( volinfo ) %] |
300 |
[% IF ( volinfo ) %] |
295 |
<td class="enumchron"> |
301 |
<td class="enumchron"> |
Lines 898-904
Note that permanent location is a code, and location may be an authval.
Link Here
|
898 |
</div> |
904 |
</div> |
899 |
</div> |
905 |
</div> |
900 |
|
906 |
|
901 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
907 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
902 |
<div class="modal-dialog"> |
908 |
<div class="modal-dialog"> |
903 |
<div class="modal-content"> |
909 |
<div class="modal-content"> |
904 |
<div class="modal-header"> |
910 |
<div class="modal-header"> |
Lines 916-921
Note that permanent location is a code, and location may be an authval.
Link Here
|
916 |
</div> |
922 |
</div> |
917 |
</div> |
923 |
</div> |
918 |
|
924 |
|
|
|
925 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
926 |
<div class="modal-dialog"> |
927 |
<div class="modal-content"> |
928 |
<div class="modal-header"> |
929 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
930 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
931 |
</div> |
932 |
<form id="modal-volume-set-form" class="validated"> |
933 |
<div class="modal-body"> |
934 |
<fieldset> |
935 |
<p> |
936 |
<label for="volume" class="required">Volume: </label> |
937 |
<select name="volume" id="volume-add-form-select"> |
938 |
[% FOREACH v IN biblio.volumes %] |
939 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
940 |
[% END %] |
941 |
</select> |
942 |
<span class="required">Required</span> |
943 |
</p> |
944 |
</fieldset> |
945 |
</div> |
946 |
<div class="modal-footer"> |
947 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
948 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
949 |
</div> |
950 |
</form> |
951 |
</div> |
952 |
</div> |
953 |
</div> |
954 |
|
955 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
956 |
<div class="modal-dialog"> |
957 |
<div class="modal-content"> |
958 |
<div class="modal-header"> |
959 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
960 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
961 |
</div> |
962 |
<div class="modal-body"> |
963 |
Are you sure you want to remove these item(s) from their volume(s)? |
964 |
</div> |
965 |
<div class="modal-footer"> |
966 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
967 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
968 |
</div> |
969 |
</div> |
970 |
</div> |
971 |
</div> |
972 |
|
919 |
[% MACRO jsinclude BLOCK %] |
973 |
[% MACRO jsinclude BLOCK %] |
920 |
[% INCLUDE 'catalog-strings.inc' %] |
974 |
[% INCLUDE 'catalog-strings.inc' %] |
921 |
[% Asset.js("js/catalog.js") | $raw %] |
975 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1352-1357
Note that permanent location is a code, and location may be an authval.
Link Here
|
1352 |
} |
1406 |
} |
1353 |
}); |
1407 |
}); |
1354 |
}); |
1408 |
}); |
|
|
1409 |
|
1410 |
// Add item(s) to a volume |
1411 |
$('.itemselection_action_volume_set').on('click', function(){ |
1412 |
$('#modal-volume-set').modal('show'); |
1413 |
}); |
1414 |
|
1415 |
$("#modal-volume-set-form").validate({ |
1416 |
submitHandler: function(form) { |
1417 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1418 |
|
1419 |
const volume_id = $('#volume-add-form-select').val(); |
1420 |
|
1421 |
let itemnumbers = new Array(); |
1422 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1423 |
const itemnumber = $(this).val(); |
1424 |
itemnumbers.push( itemnumber ); |
1425 |
}); |
1426 |
if (itemnumbers.length > 0) { |
1427 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1428 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1429 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1430 |
url += `&volume_id=${volume_id}`; |
1431 |
|
1432 |
window.location.replace(url); |
1433 |
} |
1434 |
|
1435 |
$('#modal-volume-set').modal('hide'); |
1436 |
} |
1437 |
}); |
1438 |
|
1439 |
// Remove item(s) from a volume |
1440 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1441 |
$('#modal-volume-unset').modal('show'); |
1442 |
}); |
1443 |
|
1444 |
$("#modal-volume-unset-submit").on('click', function(){ |
1445 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1446 |
|
1447 |
let itemnumbers = new Array(); |
1448 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1449 |
const itemnumber = $(this).val(); |
1450 |
itemnumbers.push( itemnumber ); |
1451 |
}); |
1452 |
if (itemnumbers.length > 0) { |
1453 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1454 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1455 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1456 |
|
1457 |
window.location.replace(url); |
1458 |
} |
1459 |
|
1460 |
$('#modal-volume-unset').modal('hide'); |
1461 |
}); |
1355 |
[% END %] |
1462 |
[% END %] |
1356 |
</script> |
1463 |
</script> |
1357 |
[% END %] |
1464 |
[% END %] |
1358 |
- |
|
|