|
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 1333-1338
Note that permanent location is a code, and location may be an authval.
Link Here
|
| 1333 |
alert(message); |
1387 |
alert(message); |
| 1334 |
}); |
1388 |
}); |
| 1335 |
}); |
1389 |
}); |
|
|
1390 |
|
| 1391 |
// Add item(s) to a volume |
| 1392 |
$('.itemselection_action_volume_set').on('click', function(){ |
| 1393 |
$('#modal-volume-set').modal('show'); |
| 1394 |
}); |
| 1395 |
|
| 1396 |
$("#modal-volume-set-form").validate({ |
| 1397 |
submitHandler: function(form) { |
| 1398 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
| 1399 |
|
| 1400 |
const volume_id = $('#volume-add-form-select').val(); |
| 1401 |
|
| 1402 |
let itemnumbers = new Array(); |
| 1403 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 1404 |
const itemnumber = $(this).val(); |
| 1405 |
itemnumbers.push( itemnumber ); |
| 1406 |
}); |
| 1407 |
if (itemnumbers.length > 0) { |
| 1408 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
| 1409 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 1410 |
url += '&biblionumber=[% biblionumber | uri %]'; |
| 1411 |
url += `&volume_id=${volume_id}`; |
| 1412 |
|
| 1413 |
window.location.replace(url); |
| 1414 |
} |
| 1415 |
|
| 1416 |
$('#modal-volume-set').modal('hide'); |
| 1417 |
} |
| 1418 |
}); |
| 1419 |
|
| 1420 |
// Remove item(s) from a volume |
| 1421 |
$('.itemselection_action_volume_unset').on('click', function(){ |
| 1422 |
$('#modal-volume-unset').modal('show'); |
| 1423 |
}); |
| 1424 |
|
| 1425 |
$("#modal-volume-unset-submit").on('click', function(){ |
| 1426 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
| 1427 |
|
| 1428 |
let itemnumbers = new Array(); |
| 1429 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 1430 |
const itemnumber = $(this).val(); |
| 1431 |
itemnumbers.push( itemnumber ); |
| 1432 |
}); |
| 1433 |
if (itemnumbers.length > 0) { |
| 1434 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
| 1435 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 1436 |
url += '&biblionumber=[% biblionumber | uri %]'; |
| 1437 |
|
| 1438 |
window.location.replace(url); |
| 1439 |
} |
| 1440 |
|
| 1441 |
$('#modal-volume-unset').modal('hide'); |
| 1442 |
}); |
| 1336 |
[% END %] |
1443 |
[% END %] |
| 1337 |
</script> |
1444 |
</script> |
| 1338 |
[% END %] |
1445 |
[% END %] |
| 1339 |
- |
|
|