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