Lines 314-319
Link Here
|
314 |
[% IF CAN_user_tools_items_batchmod %] |
314 |
[% IF CAN_user_tools_items_batchmod %] |
315 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
315 |
<a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Modify selected items</a> |
316 |
[% END %] |
316 |
[% END %] |
|
|
317 |
[% IF biblio.volumes.count %] |
318 |
<a class="itemselection_action_volume_set" href="#"><i class="fa fa-book"></i> Add/move to volume</a> |
319 |
<a class="itemselection_action_volume_unset" href="#"><i class="fa fa-unlink"></i> Remove from volume</a> |
320 |
[% END %] |
317 |
</span> |
321 |
</span> |
318 |
[% END %] |
322 |
[% END %] |
319 |
</div> |
323 |
</div> |
Lines 328-333
Link Here
|
328 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
332 |
<th id="[% tab | html %]_holdingbranch" data-colname="[% tab | html %]_holdingbranch">Current library</th> |
329 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
333 |
<th id="[% tab | html %]_homebranch" data-colname="[% tab | html %]_homebranch">Home library</th> |
330 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
334 |
[% IF ( itemdata_ccode ) %]<th id="[% tab | html %]_ccode" data-colname="[% tab | html %]_ccode">Collection</th>[% END %] |
|
|
335 |
[% IF Koha.Preference('EnableVolumes') %]<th>Volume</th>[% END %] |
331 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
336 |
<th id="[% tab | html %]_itemcallnumber" data-colname="[% tab | html %]_itemcallnumber">Call number</th> |
332 |
[% IF volinfo %] |
337 |
[% IF volinfo %] |
333 |
<th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th> |
338 |
<th id="[% tab | html %]_enumchron" data-colname="[% tab | html %]_enumchron">Serial enumeration / chronology</th> |
Lines 402-407
Note that permanent location is a code, and location may be an authval.
Link Here
|
402 |
</span> |
407 |
</span> |
403 |
</td> |
408 |
</td> |
404 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
409 |
[% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %] |
|
|
410 |
[% IF Koha.Preference('EnableVolumes') %]<td>[% item.object.volume.description | html %]</td>[% END %] |
405 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
411 |
<td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td> |
406 |
[% IF ( volinfo ) %] |
412 |
[% IF ( volinfo ) %] |
407 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %] |
413 |
[% IF itemdata_publisheddate #If there is at least one published date, use it for sorting %] |
Lines 1106-1112
Note that permanent location is a code, and location may be an authval.
Link Here
|
1106 |
</div> |
1112 |
</div> |
1107 |
</div> |
1113 |
</div> |
1108 |
|
1114 |
|
1109 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-create-label"> |
1115 |
<div class="modal fade" id="modal-volume-delete" tabindex="-1" role="dialog" aria-labelledby="modal-volume-delete-label"> |
1110 |
<div class="modal-dialog"> |
1116 |
<div class="modal-dialog"> |
1111 |
<div class="modal-content"> |
1117 |
<div class="modal-content"> |
1112 |
<div class="modal-header"> |
1118 |
<div class="modal-header"> |
Lines 1124-1129
Note that permanent location is a code, and location may be an authval.
Link Here
|
1124 |
</div> |
1130 |
</div> |
1125 |
</div> |
1131 |
</div> |
1126 |
|
1132 |
|
|
|
1133 |
<div class="modal fade" id="modal-volume-set" tabindex="-1" role="dialog" aria-labelledby="modal-volume-set-label"> |
1134 |
<div class="modal-dialog"> |
1135 |
<div class="modal-content"> |
1136 |
<div class="modal-header"> |
1137 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1138 |
<h3 id="modal-volume-set-label"><i class='fa fa-book'></i> Set volume for items</h3> |
1139 |
</div> |
1140 |
<form id="modal-volume-set-form" class="validated"> |
1141 |
<div class="modal-body"> |
1142 |
<fieldset> |
1143 |
<p> |
1144 |
<label for="volume" class="required">Volume: </label> |
1145 |
<select name="volume" id="volume-add-form-select"> |
1146 |
[% FOREACH v IN biblio.volumes %] |
1147 |
<option value="[% v.id | html %]">[% v.description | html %]</option> |
1148 |
[% END %] |
1149 |
</select> |
1150 |
<span class="required">Required</span> |
1151 |
</p> |
1152 |
</fieldset> |
1153 |
</div> |
1154 |
<div class="modal-footer"> |
1155 |
<button id="modal-volume-set-submit" class="btn btn-default"><i class='fa fa-book'></i> Set volume</button> |
1156 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1157 |
</div> |
1158 |
</form> |
1159 |
</div> |
1160 |
</div> |
1161 |
</div> |
1162 |
|
1163 |
<div class="modal fade" id="modal-volume-unset" tabindex="-1" role="dialog" aria-labelledby="modal-volume-unset-label"> |
1164 |
<div class="modal-dialog"> |
1165 |
<div class="modal-content"> |
1166 |
<div class="modal-header"> |
1167 |
<button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button> |
1168 |
<h3 id="modal-volume-unset-label"><i class='fa fa-unlink'></i> Remove item from volume</h3> |
1169 |
</div> |
1170 |
<div class="modal-body"> |
1171 |
Are you sure you want to remove these item(s) from their volume(s)? |
1172 |
</div> |
1173 |
<div class="modal-footer"> |
1174 |
<button id="modal-volume-unset-submit" class="btn btn-danger"><i class='fa fa-unlink'></i> Remove</button> |
1175 |
<button class="btn btn-link" data-dismiss="modal" aria-hidden="true">Cancel</button> |
1176 |
</div> |
1177 |
</div> |
1178 |
</div> |
1179 |
</div> |
1180 |
|
1127 |
[% MACRO jsinclude BLOCK %] |
1181 |
[% MACRO jsinclude BLOCK %] |
1128 |
[% INCLUDE 'catalog-strings.inc' %] |
1182 |
[% INCLUDE 'catalog-strings.inc' %] |
1129 |
[% Asset.js("js/catalog.js") | $raw %] |
1183 |
[% Asset.js("js/catalog.js") | $raw %] |
Lines 1658-1663
Note that permanent location is a code, and location may be an authval.
Link Here
|
1658 |
} |
1712 |
} |
1659 |
}); |
1713 |
}); |
1660 |
}); |
1714 |
}); |
|
|
1715 |
|
1716 |
// Add item(s) to a volume |
1717 |
$('.itemselection_action_volume_set').on('click', function(){ |
1718 |
$('#modal-volume-set').modal('show'); |
1719 |
}); |
1720 |
|
1721 |
$("#modal-volume-set-form").validate({ |
1722 |
submitHandler: function(form) { |
1723 |
$('#modal-volume-set-submit').attr('disabled', 'disabled'); |
1724 |
|
1725 |
const volume_id = $('#volume-add-form-select').val(); |
1726 |
|
1727 |
let itemnumbers = new Array(); |
1728 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1729 |
const itemnumber = $(this).val(); |
1730 |
itemnumbers.push( itemnumber ); |
1731 |
}); |
1732 |
if (itemnumbers.length > 0) { |
1733 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=set_volume'; |
1734 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1735 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1736 |
url += `&volume_id=${volume_id}`; |
1737 |
|
1738 |
window.location.replace(url); |
1739 |
} |
1740 |
|
1741 |
$('#modal-volume-set').modal('hide'); |
1742 |
} |
1743 |
}); |
1744 |
|
1745 |
// Remove item(s) from a volume |
1746 |
$('.itemselection_action_volume_unset').on('click', function(){ |
1747 |
$('#modal-volume-unset').modal('show'); |
1748 |
}); |
1749 |
|
1750 |
$("#modal-volume-unset-submit").on('click', function(){ |
1751 |
$('#modal-volume-unset-submit').attr('disabled', 'disabled'); |
1752 |
|
1753 |
let itemnumbers = new Array(); |
1754 |
$("input[name='itemnumber'][type='checkbox']:checked").each(function() { |
1755 |
const itemnumber = $(this).val(); |
1756 |
itemnumbers.push( itemnumber ); |
1757 |
}); |
1758 |
if (itemnumbers.length > 0) { |
1759 |
let url = '/cgi-bin/koha/catalogue/detail.pl?op=unset_volume'; |
1760 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
1761 |
url += '&biblionumber=[% biblionumber | uri %]'; |
1762 |
|
1763 |
window.location.replace(url); |
1764 |
} |
1765 |
|
1766 |
$('#modal-volume-unset').modal('hide'); |
1767 |
}); |
1661 |
[% END %] |
1768 |
[% END %] |
1662 |
</script> |
1769 |
</script> |
1663 |
[% END %] |
1770 |
[% END %] |
1664 |
- |
|
|