Lines 278-283
Link Here
|
278 |
[% IF CAN_user_tools_items_batchmod %] |
278 |
[% IF CAN_user_tools_items_batchmod %] |
279 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
279 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
280 |
[% END %] |
280 |
[% END %] |
|
|
281 |
[% IF biblio.volumes.count %] |
282 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
283 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
284 |
[% END %] |
281 |
</span> |
285 |
</span> |
282 |
[% END %] |
286 |
[% END %] |
283 |
</div> |
287 |
</div> |
Lines 292-297
Link Here
|
292 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
296 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
293 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
297 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
294 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
298 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
|
|
299 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
295 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
300 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
296 |
[% IF volinfo %] |
301 |
[% IF volinfo %] |
297 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
302 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
Lines 370-375
Note that permanent location is a code, and location may be an authval.
Link Here
|
370 |
</span> |
375 |
</span> |
371 |
</td> |
376 |
</td> |
372 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
377 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
378 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
373 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
379 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
374 |
[% IF ( volinfo ) %] |
380 |
[% IF ( volinfo ) %] |
375 |
<td class="enumchron"> |
381 |
<td class="enumchron"> |
Lines 1071-1077
Note that permanent location is a code, and location may be an authval.
Link Here
|
1071 |
</div> |
1077 |
</div> |
1072 |
</div> |
1078 |
</div> |
1073 |
|
1079 |
|
1074 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
1080 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
1075 |
<div class="modal-dialog"> |
1081 |
<div class="modal-dialog"> |
1076 |
<div class="modal-content"> |
1082 |
<div class="modal-content"> |
1077 |
<div class="modal-header"> |
1083 |
<div class="modal-header"> |
Lines 1089-1094
Note that permanent location is a code, and location may be an authval.
Link Here
|
1089 |
</div> |
1095 |
</div> |
1090 |
</div> |
1096 |
</div> |
1091 |
|
1097 |
|
|
|
1098 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
1099 |
<div class="modal-dialog"> |
1100 |
<div class="modal-content"> |
1101 |
<div class="modal-header"> |
1102 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1103 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
1104 |
</div> |
1105 |
<form id="modal-volume-set-form" class="validated"> |
1106 |
<div class="modal-body"> |
1107 |
<fieldset> |
1108 |
<p> |
1109 |
<label for="volume" class="required">Volume: </label> |
1110 |
<select name="volume" id="volume-add-form-select"> |
1111 |
[% FOREACH v IN biblio.volumes %] |
1112 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
1113 |
[% END %] |
1114 |
</select> |
1115 |
<span class="required">Required</span> |
1116 |
</p> |
1117 |
</fieldset> |
1118 |
</div> |
1119 |
<div class="modal-footer"> |
1120 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
1121 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1122 |
</div> |
1123 |
</form> |
1124 |
</div> |
1125 |
</div> |
1126 |
</div> |
1127 |
|
1128 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
1129 |
<div class="modal-dialog"> |
1130 |
<div class="modal-content"> |
1131 |
<div class="modal-header"> |
1132 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1133 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
1134 |
</div> |
1135 |
<div class="modal-body"> |
1136 |
Are you sure you want to remove these item(s) from their volume(s)? |
1137 |
</div> |
1138 |
<div class="modal-footer"> |
1139 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
1140 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1141 |
</div> |
1142 |
</div> |
1143 |
</div> |
1144 |
</div> |
1145 |
|
1092 |
[% MACRO jsinclude BLOCK %] |
1146 |
[% MACRO jsinclude BLOCK %] |
1093 |
[% INCLUDE 'catalog-strings.inc' %] |
1147 |
[% INCLUDE 'catalog-strings.inc' %] |
1094 |
[% Asset.js("js/catalog.js") | $raw %] |
1148 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1594-1599
Note that permanent location is a code, and location may be an authval.
Link Here
|
1594 |
} |
1648 |
} |
1595 |
}); |
1649 |
}); |
1596 |
}); |
1650 |
}); |
|
|
1651 |
|
1652 |
// Add item(s) to a volume |
1653 |
$('.itemselection_action_volume_set').on('click', function(){ |
1654 |
$('#modal-volume-set').modal('show'); |
1655 |
}); |
1656 |
|
1657 |
$("#modal-volume-set-form").validate({ |
1658 |
submitHandler: function(form) { |
1659 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1660 |
|
1661 |
const volume_id = $('#volume-add-form-select').val(); |
1662 |
|
1663 |
let itemnumbers = new Array(); |
1664 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1665 |
const itemnumber = $(this).val(); |
1666 |
itemnumbers.push( itemnumber ); |
1667 |
}); |
1668 |
if (itemnumbers.length > 0) { |
1669 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1670 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1671 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1672 |
url += `&volume_id=${volume_id}`; |
1673 |
|
1674 |
window.location.replace(url); |
1675 |
} |
1676 |
|
1677 |
$('#modal-volume-set').modal('hide'); |
1678 |
} |
1679 |
}); |
1680 |
|
1681 |
// Remove item(s) from a volume |
1682 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1683 |
$('#modal-volume-unset').modal('show'); |
1684 |
}); |
1685 |
|
1686 |
$("#modal-volume-unset-submit").on('click', function(){ |
1687 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1688 |
|
1689 |
let itemnumbers = new Array(); |
1690 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1691 |
const itemnumber = $(this).val(); |
1692 |
itemnumbers.push( itemnumber ); |
1693 |
}); |
1694 |
if (itemnumbers.length > 0) { |
1695 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1696 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1697 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1698 |
|
1699 |
window.location.replace(url); |
1700 |
} |
1701 |
|
1702 |
$('#modal-volume-unset').modal('hide'); |
1703 |
}); |
1597 |
[% END %] |
1704 |
[% END %] |
1598 |
</script> |
1705 |
</script> |
1599 |
[% END %] |
1706 |
[% END %] |
1600 |
- |
|
|