|
Lines 267-272
Link Here
|
| 267 |
[% IF CAN_user_tools_items_batchmod %] |
267 |
[% IF CAN_user_tools_items_batchmod %] |
| 268 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
268 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
| 269 |
[% END %] |
269 |
[% END %] |
|
|
270 |
[% IF biblio.volumes.count %] |
| 271 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
| 272 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
| 273 |
[% END %] |
| 270 |
</span> |
274 |
</span> |
| 271 |
[% END %] |
275 |
[% END %] |
| 272 |
</div> |
276 |
</div> |
|
Lines 278-283
Link Here
|
| 278 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
282 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
| 279 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
283 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
| 280 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
284 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
|
|
285 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
| 281 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
286 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
| 282 |
[% IF volinfo %] |
287 |
[% IF volinfo %] |
| 283 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
288 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
|
Lines 340-345
Note that permanent location is a code, and location may be an authval.
Link Here
|
| 340 |
</span> |
345 |
</span> |
| 341 |
</td> |
346 |
</td> |
| 342 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
347 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
348 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
| 343 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
349 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
| 344 |
[% IF ( volinfo ) %] |
350 |
[% IF ( volinfo ) %] |
| 345 |
<td class="enumchron"> |
351 |
<td class="enumchron"> |
|
Lines 1029-1035
Note that permanent location is a code, and location may be an authval.
Link Here
|
| 1029 |
</div> |
1035 |
</div> |
| 1030 |
</div> |
1036 |
</div> |
| 1031 |
|
1037 |
|
| 1032 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
1038 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
| 1033 |
<div class="modal-dialog"> |
1039 |
<div class="modal-dialog"> |
| 1034 |
<div class="modal-content"> |
1040 |
<div class="modal-content"> |
| 1035 |
<div class="modal-header"> |
1041 |
<div class="modal-header"> |
|
Lines 1047-1052
Note that permanent location is a code, and location may be an authval.
Link Here
|
| 1047 |
</div> |
1053 |
</div> |
| 1048 |
</div> |
1054 |
</div> |
| 1049 |
|
1055 |
|
|
|
1056 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
| 1057 |
<div class="modal-dialog"> |
| 1058 |
<div class="modal-content"> |
| 1059 |
<div class="modal-header"> |
| 1060 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 1061 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
| 1062 |
</div> |
| 1063 |
<form id="modal-volume-set-form" class="validated"> |
| 1064 |
<div class="modal-body"> |
| 1065 |
<fieldset> |
| 1066 |
<p> |
| 1067 |
<label for="volume" class="required">Volume: </label> |
| 1068 |
<select name="volume" id="volume-add-form-select"> |
| 1069 |
[% FOREACH v IN biblio.volumes %] |
| 1070 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
| 1071 |
[% END %] |
| 1072 |
</select> |
| 1073 |
<span class="required">Required</span> |
| 1074 |
</p> |
| 1075 |
</fieldset> |
| 1076 |
</div> |
| 1077 |
<div class="modal-footer"> |
| 1078 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
| 1079 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
| 1080 |
</div> |
| 1081 |
</form> |
| 1082 |
</div> |
| 1083 |
</div> |
| 1084 |
</div> |
| 1085 |
|
| 1086 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
| 1087 |
<div class="modal-dialog"> |
| 1088 |
<div class="modal-content"> |
| 1089 |
<div class="modal-header"> |
| 1090 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
| 1091 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
| 1092 |
</div> |
| 1093 |
<div class="modal-body"> |
| 1094 |
Are you sure you want to remove these item(s) from their volume(s)? |
| 1095 |
</div> |
| 1096 |
<div class="modal-footer"> |
| 1097 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
| 1098 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
| 1099 |
</div> |
| 1100 |
</div> |
| 1101 |
</div> |
| 1102 |
</div> |
| 1103 |
|
| 1050 |
[% MACRO jsinclude BLOCK %] |
1104 |
[% MACRO jsinclude BLOCK %] |
| 1051 |
[% INCLUDE 'catalog-strings.inc' %] |
1105 |
[% INCLUDE 'catalog-strings.inc' %] |
| 1052 |
[% Asset.js("js/catalog.js") | $raw %] |
1106 |
[% Asset.js("js/catalog.js") | $raw %] |
|
Lines 1545-1550
Note that permanent location is a code, and location may be an authval.
Link Here
|
| 1545 |
} |
1599 |
} |
| 1546 |
}); |
1600 |
}); |
| 1547 |
}); |
1601 |
}); |
|
|
1602 |
|
| 1603 |
// Add item(s) to a volume |
| 1604 |
$('.itemselection_action_volume_set').on('click', function(){ |
| 1605 |
$('#modal-volume-set').modal('show'); |
| 1606 |
}); |
| 1607 |
|
| 1608 |
$("#modal-volume-set-form").validate({ |
| 1609 |
submitHandler: function(form) { |
| 1610 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
| 1611 |
|
| 1612 |
const volume_id = $('#volume-add-form-select').val(); |
| 1613 |
|
| 1614 |
let itemnumbers = new Array(); |
| 1615 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 1616 |
const itemnumber = $(this).val(); |
| 1617 |
itemnumbers.push( itemnumber ); |
| 1618 |
}); |
| 1619 |
if (itemnumbers.length > 0) { |
| 1620 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
| 1621 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 1622 |
url += '&biblionumber=[% biblionumber | uri %]'; |
| 1623 |
url += `&volume_id=${volume_id}`; |
| 1624 |
|
| 1625 |
window.location.replace(url); |
| 1626 |
} |
| 1627 |
|
| 1628 |
$('#modal-volume-set').modal('hide'); |
| 1629 |
} |
| 1630 |
}); |
| 1631 |
|
| 1632 |
// Remove item(s) from a volume |
| 1633 |
$('.itemselection_action_volume_unset').on('click', function(){ |
| 1634 |
$('#modal-volume-unset').modal('show'); |
| 1635 |
}); |
| 1636 |
|
| 1637 |
$("#modal-volume-unset-submit").on('click', function(){ |
| 1638 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
| 1639 |
|
| 1640 |
let itemnumbers = new Array(); |
| 1641 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 1642 |
const itemnumber = $(this).val(); |
| 1643 |
itemnumbers.push( itemnumber ); |
| 1644 |
}); |
| 1645 |
if (itemnumbers.length > 0) { |
| 1646 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
| 1647 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 1648 |
url += '&biblionumber=[% biblionumber | uri %]'; |
| 1649 |
|
| 1650 |
window.location.replace(url); |
| 1651 |
} |
| 1652 |
|
| 1653 |
$('#modal-volume-unset').modal('hide'); |
| 1654 |
}); |
| 1548 |
[% END %] |
1655 |
[% END %] |
| 1549 |
</script> |
1656 |
</script> |
| 1550 |
[% END %] |
1657 |
[% END %] |
| 1551 |
- |
|
|