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