Lines 279-284
Link Here
|
279 |
[% IF CAN_user_tools_items_batchmod %] |
279 |
[% IF CAN_user_tools_items_batchmod %] |
280 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
280 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
281 |
[% END %] |
281 |
[% END %] |
|
|
282 |
[% IF biblio.volumes.count %] |
283 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
284 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
285 |
[% END %] |
282 |
</span> |
286 |
</span> |
283 |
[% END %] |
287 |
[% END %] |
284 |
</div> |
288 |
</div> |
Lines 290-295
Link Here
|
290 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
294 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
291 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
295 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
292 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
296 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
|
|
297 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
293 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
298 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
294 |
[% IF volinfo %] |
299 |
[% IF volinfo %] |
295 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
300 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting%] |
Lines 352-357
Note that permanent location is a code, and location may be an authval.
Link Here
|
352 |
</span> |
357 |
</span> |
353 |
</td> |
358 |
</td> |
354 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
359 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
360 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
355 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
361 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
356 |
[% IF ( volinfo ) %] |
362 |
[% IF ( volinfo ) %] |
357 |
<td class="enumchron"> |
363 |
<td class="enumchron"> |
Lines 1041-1047
Note that permanent location is a code, and location may be an authval.
Link Here
|
1041 |
</div> |
1047 |
</div> |
1042 |
</div> |
1048 |
</div> |
1043 |
|
1049 |
|
1044 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
1050 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
1045 |
<div class="modal-dialog"> |
1051 |
<div class="modal-dialog"> |
1046 |
<div class="modal-content"> |
1052 |
<div class="modal-content"> |
1047 |
<div class="modal-header"> |
1053 |
<div class="modal-header"> |
Lines 1059-1064
Note that permanent location is a code, and location may be an authval.
Link Here
|
1059 |
</div> |
1065 |
</div> |
1060 |
</div> |
1066 |
</div> |
1061 |
|
1067 |
|
|
|
1068 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
1069 |
<div class="modal-dialog"> |
1070 |
<div class="modal-content"> |
1071 |
<div class="modal-header"> |
1072 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1073 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
1074 |
</div> |
1075 |
<form id="modal-volume-set-form" class="validated"> |
1076 |
<div class="modal-body"> |
1077 |
<fieldset> |
1078 |
<p> |
1079 |
<label for="volume" class="required">Volume: </label> |
1080 |
<select name="volume" id="volume-add-form-select"> |
1081 |
[% FOREACH v IN biblio.volumes %] |
1082 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
1083 |
[% END %] |
1084 |
</select> |
1085 |
<span class="required">Required</span> |
1086 |
</p> |
1087 |
</fieldset> |
1088 |
</div> |
1089 |
<div class="modal-footer"> |
1090 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
1091 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1092 |
</div> |
1093 |
</form> |
1094 |
</div> |
1095 |
</div> |
1096 |
</div> |
1097 |
|
1098 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-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-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
1104 |
</div> |
1105 |
<div class="modal-body"> |
1106 |
Are you sure you want to remove these item(s) from their volume(s)? |
1107 |
</div> |
1108 |
<div class="modal-footer"> |
1109 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
1110 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1111 |
</div> |
1112 |
</div> |
1113 |
</div> |
1114 |
</div> |
1115 |
|
1062 |
[% MACRO jsinclude BLOCK %] |
1116 |
[% MACRO jsinclude BLOCK %] |
1063 |
[% INCLUDE 'catalog-strings.inc' %] |
1117 |
[% INCLUDE 'catalog-strings.inc' %] |
1064 |
[% Asset.js("js/catalog.js") | $raw %] |
1118 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1557-1562
Note that permanent location is a code, and location may be an authval.
Link Here
|
1557 |
} |
1611 |
} |
1558 |
}); |
1612 |
}); |
1559 |
}); |
1613 |
}); |
|
|
1614 |
|
1615 |
// Add item(s) to a volume |
1616 |
$('.itemselection_action_volume_set').on('click', function(){ |
1617 |
$('#modal-volume-set').modal('show'); |
1618 |
}); |
1619 |
|
1620 |
$("#modal-volume-set-form").validate({ |
1621 |
submitHandler: function(form) { |
1622 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1623 |
|
1624 |
const volume_id = $('#volume-add-form-select').val(); |
1625 |
|
1626 |
let itemnumbers = new Array(); |
1627 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1628 |
const itemnumber = $(this).val(); |
1629 |
itemnumbers.push( itemnumber ); |
1630 |
}); |
1631 |
if (itemnumbers.length > 0) { |
1632 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1633 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1634 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1635 |
url += `&volume_id=${volume_id}`; |
1636 |
|
1637 |
window.location.replace(url); |
1638 |
} |
1639 |
|
1640 |
$('#modal-volume-set').modal('hide'); |
1641 |
} |
1642 |
}); |
1643 |
|
1644 |
// Remove item(s) from a volume |
1645 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1646 |
$('#modal-volume-unset').modal('show'); |
1647 |
}); |
1648 |
|
1649 |
$("#modal-volume-unset-submit").on('click', function(){ |
1650 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1651 |
|
1652 |
let itemnumbers = new Array(); |
1653 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1654 |
const itemnumber = $(this).val(); |
1655 |
itemnumbers.push( itemnumber ); |
1656 |
}); |
1657 |
if (itemnumbers.length > 0) { |
1658 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1659 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1660 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1661 |
|
1662 |
window.location.replace(url); |
1663 |
} |
1664 |
|
1665 |
$('#modal-volume-unset').modal('hide'); |
1666 |
}); |
1560 |
[% END %] |
1667 |
[% END %] |
1561 |
</script> |
1668 |
</script> |
1562 |
[% END %] |
1669 |
[% END %] |
1563 |
- |
|
|