Lines 304-309
Link Here
|
304 |
[% IF CAN_user_tools_items_batchmod %] |
304 |
[% IF CAN_user_tools_items_batchmod %] |
305 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
305 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
306 |
[% END %] |
306 |
[% END %] |
|
|
307 |
[% IF biblio.volumes.count %] |
308 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
309 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
310 |
[% END %] |
307 |
</span> |
311 |
</span> |
308 |
[% END %] |
312 |
[% END %] |
309 |
</div> |
313 |
</div> |
Lines 318-323
Link Here
|
318 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
322 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
319 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
323 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
320 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
324 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
|
|
325 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
321 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
326 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
322 |
[% IF volinfo %] |
327 |
[% IF volinfo %] |
323 |
<th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th> |
328 |
<th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th> |
Lines 392-397
Note that permanent location is a code, and location may be an authval.
Link Here
|
392 |
</span> |
397 |
</span> |
393 |
</td> |
398 |
</td> |
394 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
399 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
400 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
395 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
401 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
396 |
[% IF ( volinfo ) %] |
402 |
[% IF ( volinfo ) %] |
397 |
<td class="enumchron" data-order="[% item.publisheddate | html %]"> |
403 |
<td class="enumchron" data-order="[% item.publisheddate | html %]"> |
Lines 1092-1098
Note that permanent location is a code, and location may be an authval.
Link Here
|
1092 |
</div> |
1098 |
</div> |
1093 |
</div> |
1099 |
</div> |
1094 |
|
1100 |
|
1095 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
1101 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
1096 |
<div class="modal-dialog"> |
1102 |
<div class="modal-dialog"> |
1097 |
<div class="modal-content"> |
1103 |
<div class="modal-content"> |
1098 |
<div class="modal-header"> |
1104 |
<div class="modal-header"> |
Lines 1110-1115
Note that permanent location is a code, and location may be an authval.
Link Here
|
1110 |
</div> |
1116 |
</div> |
1111 |
</div> |
1117 |
</div> |
1112 |
|
1118 |
|
|
|
1119 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
1120 |
<div class="modal-dialog"> |
1121 |
<div class="modal-content"> |
1122 |
<div class="modal-header"> |
1123 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1124 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
1125 |
</div> |
1126 |
<form id="modal-volume-set-form" class="validated"> |
1127 |
<div class="modal-body"> |
1128 |
<fieldset> |
1129 |
<p> |
1130 |
<label for="volume" class="required">Volume: </label> |
1131 |
<select name="volume" id="volume-add-form-select"> |
1132 |
[% FOREACH v IN biblio.volumes %] |
1133 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
1134 |
[% END %] |
1135 |
</select> |
1136 |
<span class="required">Required</span> |
1137 |
</p> |
1138 |
</fieldset> |
1139 |
</div> |
1140 |
<div class="modal-footer"> |
1141 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
1142 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1143 |
</div> |
1144 |
</form> |
1145 |
</div> |
1146 |
</div> |
1147 |
</div> |
1148 |
|
1149 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
1150 |
<div class="modal-dialog"> |
1151 |
<div class="modal-content"> |
1152 |
<div class="modal-header"> |
1153 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1154 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
1155 |
</div> |
1156 |
<div class="modal-body"> |
1157 |
Are you sure you want to remove these item(s) from their volume(s)? |
1158 |
</div> |
1159 |
<div class="modal-footer"> |
1160 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
1161 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1162 |
</div> |
1163 |
</div> |
1164 |
</div> |
1165 |
</div> |
1166 |
|
1113 |
[% MACRO jsinclude BLOCK %] |
1167 |
[% MACRO jsinclude BLOCK %] |
1114 |
[% INCLUDE 'catalog-strings.inc' %] |
1168 |
[% INCLUDE 'catalog-strings.inc' %] |
1115 |
[% Asset.js("js/catalog.js") | $raw %] |
1169 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1622-1627
Note that permanent location is a code, and location may be an authval.
Link Here
|
1622 |
} |
1676 |
} |
1623 |
}); |
1677 |
}); |
1624 |
}); |
1678 |
}); |
|
|
1679 |
|
1680 |
// Add item(s) to a volume |
1681 |
$('.itemselection_action_volume_set').on('click', function(){ |
1682 |
$('#modal-volume-set').modal('show'); |
1683 |
}); |
1684 |
|
1685 |
$("#modal-volume-set-form").validate({ |
1686 |
submitHandler: function(form) { |
1687 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1688 |
|
1689 |
const volume_id = $('#volume-add-form-select').val(); |
1690 |
|
1691 |
let itemnumbers = new Array(); |
1692 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1693 |
const itemnumber = $(this).val(); |
1694 |
itemnumbers.push( itemnumber ); |
1695 |
}); |
1696 |
if (itemnumbers.length > 0) { |
1697 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1698 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1699 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1700 |
url += `&volume_id=${volume_id}`; |
1701 |
|
1702 |
window.location.replace(url); |
1703 |
} |
1704 |
|
1705 |
$('#modal-volume-set').modal('hide'); |
1706 |
} |
1707 |
}); |
1708 |
|
1709 |
// Remove item(s) from a volume |
1710 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1711 |
$('#modal-volume-unset').modal('show'); |
1712 |
}); |
1713 |
|
1714 |
$("#modal-volume-unset-submit").on('click', function(){ |
1715 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1716 |
|
1717 |
let itemnumbers = new Array(); |
1718 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1719 |
const itemnumber = $(this).val(); |
1720 |
itemnumbers.push( itemnumber ); |
1721 |
}); |
1722 |
if (itemnumbers.length > 0) { |
1723 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1724 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1725 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1726 |
|
1727 |
window.location.replace(url); |
1728 |
} |
1729 |
|
1730 |
$('#modal-volume-unset').modal('hide'); |
1731 |
}); |
1625 |
[% END %] |
1732 |
[% END %] |
1626 |
</script> |
1733 |
</script> |
1627 |
[% END %] |
1734 |
[% END %] |
1628 |
- |
|
|