Lines 221-226
Link Here
|
221 |
[% IF CAN_user_tools_items_batchmod %] |
221 |
[% IF CAN_user_tools_items_batchmod %] |
222 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
222 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
223 |
[% END %] |
223 |
[% END %] |
|
|
224 |
[% IF biblio.volumes.count %] |
225 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
226 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
227 |
[% END %] |
224 |
</span> |
228 |
</span> |
225 |
[% END %] |
229 |
[% END %] |
226 |
</div> |
230 |
</div> |
Lines 232-237
Link Here
|
232 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current location</th> |
236 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current location</th> |
233 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
237 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
234 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
238 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
|
|
239 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
235 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
240 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
236 |
[% IF volinfo %] |
241 |
[% IF volinfo %] |
237 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
242 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
Lines 293-298
Note that permanent location is a code, and location may be an authval.
Link Here
|
293 |
</span> |
298 |
</span> |
294 |
</td> |
299 |
</td> |
295 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
300 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
301 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
296 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
302 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
297 |
[% IF ( volinfo ) %] |
303 |
[% IF ( volinfo ) %] |
298 |
<td class="enumchron"> |
304 |
<td class="enumchron"> |
Lines 981-987
Note that permanent location is a code, and location may be an authval.
Link Here
|
981 |
</div> |
987 |
</div> |
982 |
</div> |
988 |
</div> |
983 |
|
989 |
|
984 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
990 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
985 |
<div class="modal-dialog"> |
991 |
<div class="modal-dialog"> |
986 |
<div class="modal-content"> |
992 |
<div class="modal-content"> |
987 |
<div class="modal-header"> |
993 |
<div class="modal-header"> |
Lines 999-1004
Note that permanent location is a code, and location may be an authval.
Link Here
|
999 |
</div> |
1005 |
</div> |
1000 |
</div> |
1006 |
</div> |
1001 |
|
1007 |
|
|
|
1008 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
1009 |
<div class="modal-dialog"> |
1010 |
<div class="modal-content"> |
1011 |
<div class="modal-header"> |
1012 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1013 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
1014 |
</div> |
1015 |
<form id="modal-volume-set-form" class="validated"> |
1016 |
<div class="modal-body"> |
1017 |
<fieldset> |
1018 |
<p> |
1019 |
<label for="volume" class="required">Volume: </label> |
1020 |
<select name="volume" id="volume-add-form-select"> |
1021 |
[% FOREACH v IN biblio.volumes %] |
1022 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
1023 |
[% END %] |
1024 |
</select> |
1025 |
<span class="required">Required</span> |
1026 |
</p> |
1027 |
</fieldset> |
1028 |
</div> |
1029 |
<div class="modal-footer"> |
1030 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
1031 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1032 |
</div> |
1033 |
</form> |
1034 |
</div> |
1035 |
</div> |
1036 |
</div> |
1037 |
|
1038 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
1039 |
<div class="modal-dialog"> |
1040 |
<div class="modal-content"> |
1041 |
<div class="modal-header"> |
1042 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1043 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
1044 |
</div> |
1045 |
<div class="modal-body"> |
1046 |
Are you sure you want to remove these item(s) from their volume(s)? |
1047 |
</div> |
1048 |
<div class="modal-footer"> |
1049 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
1050 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1051 |
</div> |
1052 |
</div> |
1053 |
</div> |
1054 |
</div> |
1055 |
|
1002 |
[% MACRO jsinclude BLOCK %] |
1056 |
[% MACRO jsinclude BLOCK %] |
1003 |
[% INCLUDE 'catalog-strings.inc' %] |
1057 |
[% INCLUDE 'catalog-strings.inc' %] |
1004 |
[% Asset.js("js/catalog.js") | $raw %] |
1058 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1448-1453
Note that permanent location is a code, and location may be an authval.
Link Here
|
1448 |
} |
1502 |
} |
1449 |
}); |
1503 |
}); |
1450 |
}); |
1504 |
}); |
|
|
1505 |
|
1506 |
// Add item(s) to a volume |
1507 |
$('.itemselection_action_volume_set').on('click', function(){ |
1508 |
$('#modal-volume-set').modal('show'); |
1509 |
}); |
1510 |
|
1511 |
$("#modal-volume-set-form").validate({ |
1512 |
submitHandler: function(form) { |
1513 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1514 |
|
1515 |
const volume_id = $('#volume-add-form-select').val(); |
1516 |
|
1517 |
let itemnumbers = new Array(); |
1518 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1519 |
const itemnumber = $(this).val(); |
1520 |
itemnumbers.push( itemnumber ); |
1521 |
}); |
1522 |
if (itemnumbers.length > 0) { |
1523 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1524 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1525 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1526 |
url += `&volume_id=${volume_id}`; |
1527 |
|
1528 |
window.location.replace(url); |
1529 |
} |
1530 |
|
1531 |
$('#modal-volume-set').modal('hide'); |
1532 |
} |
1533 |
}); |
1534 |
|
1535 |
// Remove item(s) from a volume |
1536 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1537 |
$('#modal-volume-unset').modal('show'); |
1538 |
}); |
1539 |
|
1540 |
$("#modal-volume-unset-submit").on('click', function(){ |
1541 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1542 |
|
1543 |
let itemnumbers = new Array(); |
1544 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1545 |
const itemnumber = $(this).val(); |
1546 |
itemnumbers.push( itemnumber ); |
1547 |
}); |
1548 |
if (itemnumbers.length > 0) { |
1549 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1550 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1551 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1552 |
|
1553 |
window.location.replace(url); |
1554 |
} |
1555 |
|
1556 |
$('#modal-volume-unset').modal('hide'); |
1557 |
}); |
1451 |
[% END %] |
1558 |
[% END %] |
1452 |
</script> |
1559 |
</script> |
1453 |
[% END %] |
1560 |
[% END %] |
1454 |
- |
|
|