|
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 1556-1561
Note that permanent location is a code, and location may be an authval.
Link Here
|
| 1556 |
} |
1610 |
} |
| 1557 |
}); |
1611 |
}); |
| 1558 |
}); |
1612 |
}); |
|
|
1613 |
|
| 1614 |
// Add item(s) to a volume |
| 1615 |
$('.itemselection_action_volume_set').on('click', function(){ |
| 1616 |
$('#modal-volume-set').modal('show'); |
| 1617 |
}); |
| 1618 |
|
| 1619 |
$("#modal-volume-set-form").validate({ |
| 1620 |
submitHandler: function(form) { |
| 1621 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
| 1622 |
|
| 1623 |
const volume_id = $('#volume-add-form-select').val(); |
| 1624 |
|
| 1625 |
let itemnumbers = new Array(); |
| 1626 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 1627 |
const itemnumber = $(this).val(); |
| 1628 |
itemnumbers.push( itemnumber ); |
| 1629 |
}); |
| 1630 |
if (itemnumbers.length > 0) { |
| 1631 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
| 1632 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 1633 |
url += '&biblionumber=[% biblionumber | uri %]'; |
| 1634 |
url += `&volume_id=${volume_id}`; |
| 1635 |
|
| 1636 |
window.location.replace(url); |
| 1637 |
} |
| 1638 |
|
| 1639 |
$('#modal-volume-set').modal('hide'); |
| 1640 |
} |
| 1641 |
}); |
| 1642 |
|
| 1643 |
// Remove item(s) from a volume |
| 1644 |
$('.itemselection_action_volume_unset').on('click', function(){ |
| 1645 |
$('#modal-volume-unset').modal('show'); |
| 1646 |
}); |
| 1647 |
|
| 1648 |
$("#modal-volume-unset-submit").on('click', function(){ |
| 1649 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
| 1650 |
|
| 1651 |
let itemnumbers = new Array(); |
| 1652 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
| 1653 |
const itemnumber = $(this).val(); |
| 1654 |
itemnumbers.push( itemnumber ); |
| 1655 |
}); |
| 1656 |
if (itemnumbers.length > 0) { |
| 1657 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
| 1658 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 1659 |
url += '&biblionumber=[% biblionumber | uri %]'; |
| 1660 |
|
| 1661 |
window.location.replace(url); |
| 1662 |
} |
| 1663 |
|
| 1664 |
$('#modal-volume-unset').modal('hide'); |
| 1665 |
}); |
| 1559 |
[% END %] |
1666 |
[% END %] |
| 1560 |
</script> |
1667 |
</script> |
| 1561 |
[% END %] |
1668 |
[% END %] |
| 1562 |
- |
|
|