4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha › Tools › Batch item deletion</title>
6 [% INCLUDE 'doc-head-close.inc' %]
8 <style>#selections { display: none; }</style>
11 <body id="tools_batchMod-del" class="tools">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'cat-search.inc' %]
15 <div id="breadcrumbs">
16 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
17 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
18 <a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Batch item deletion</a>
21 <div class="main container-fluid">
23 [% IF ( show ) %]<h1>Batch item deletion</h1>[% ELSE %]<h1>Batch item deletion results</h1>[% END %]
24 [% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %]
25 [% IF ( no_next_barcode ) %]<div class="dialog alert"><strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted.</div>[% END %]
26 [% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot delete</strong>: item is checked out.</div>[% END %]
27 [% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot delete</strong>: item has a waiting hold.</div>[% END %]
29 [% UNLESS ( action ) %]
31 [% IF ( notfoundbarcodes.size ) %]
32 <div class="dialog alert">
33 [% IF ( itemresults ) %]<p>Warning, the following barcodes were not found:</p>[% ELSE %]<p>Warning: no barcodes were found</p>[% END %]
35 <table style="margin:auto;">
37 <tr><th>Barcodes not found</th></tr>
40 [% FOREACH notfoundbarcode IN notfoundbarcodes %]
41 <tr><td>[% notfoundbarcode |html %]</td></td>
45 [% UNLESS ( too_many_items_display ) %]
46 [% IF ( item_loop ) %]
47 <h4>The following barcodes were found: </h4>
50 [% END %] <!-- /notfoundbarcodes -->
51 [% IF ( notfounditemnumbers.size ) %]
52 <div class="dialog alert">
53 [% IF ( itemresults ) %]<p>Warning, the following itemnumbers were not found:</p>[% ELSE %]<p>Warning: no itemnumbers were found</p>[% END %]
55 <table style="margin:auto;">
57 <tr><th>Itemnumbers not found</th></tr>
60 [% FOREACH notfounditemnumber IN notfounditemnumbers %]
61 <tr><td>[% notfounditemnumber |html %]</td></td>
65 [% UNLESS ( too_many_items_display ) %]
66 [% IF ( item_loop ) %]
67 <h4>The following itemnumbers were found: </h4>
70 [% END %] <!-- /notfounditemnumbers -->
75 <form name="f" action="batchMod.pl" method="post">
76 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
77 <input type="hidden" name="op" value="[% op | html %]" />
78 <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
79 <input type="hidden" name="completedJobID" id="completedJobID" value="" />
80 <input type="hidden" name="src" id="src" value="[% src | html %]" />
82 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" />
85 [% IF ( item_loop ) %]
86 [% IF ( show ) %]<div id="toolbar"><a id="selectallbutton" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="clearallbutton" href="#"><i class="fa fa-remove"></i> Clear all</a></div>[% END %]
87 <div id="cataloguing_additem_itemlist">
89 <p id="selections"><strong>Show/hide columns:</strong> <span class="selected"><input type="checkbox" checked="checked" id="showall"/><label for="showall">Show all columns</label></span> <span><input type="checkbox" id="hideall"/><label for="hideall">Hide all columns</label></span>
90 [% FOREACH item_header_loo IN item_header_loop %]
91 <span class="selected"><input id="checkheader[% loop.count | html %]" type="checkbox" checked="checked" /> <label for="checkheader[% loop.count | html %]">[% item_header_loo.header_value | html %]</label> </span>
98 [% IF ( show ) %]<th> </th>[% END %]
99 <th class="anti-the">Title</th>
100 <th class="holds_count" title="Item holds / Total holds">Holds</th>
101 [% FOREACH item_header_loo IN item_header_loop %]
102 <th> [% item_header_loo.header_value | html %] </th>
107 [% FOREACH item_loo IN item_loop %]
110 [% IF item_loo.nomod %]
111 <td class="error">Cannot edit</td>
113 <td><input type="checkbox" name="itemnumber" value="[% item_loo.itemnumber | html %]" id="row[% item_loo.itemnumber | html %]" checked="checked" data-is-onloan="[% item_loo.onloan | html %]" /></td>
119 <label for="row[% item_loo.itemnumber | html %]">
120 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber | uri %]">
121 [% item_loo.title | html %]
123 [% IF ( item_loo.author ) %], by [% item_loo.author | html %][% END %]
126 <td class="holds_count">
127 [% IF item_loo.holds %]
128 [% IF item_loo.item_holds %]
129 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="Holds on this item: [% item_loo.item_holds | html %] / Total holds on this record: [% item_loo.holds | html -%]" >
131 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="No holds on this item / Total holds on this record: [% item_loo.holds | html -%]" >
134 [% IF item_loo.holds %]
135 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="Holds on this record: [% item_loo.holds | html -%]" >
137 <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="No holds on this record" >
140 [% IF item_loo.holds %]
141 [% item_loo.item_holds | html %]/[% item_loo.holds | html %]
143 [% item_loo.holds | html %]
147 [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field | html %]</td>
155 [% IF ( simple_items_display ) %]
157 [% FOREACH simple_items_displa IN simple_items_display %]
159 <a href="[% simple_items_displa.itemnumber | url %]">[% simple_items_displa.barcode | html %]</a>
168 [% IF ( too_many_items_display ) %]
169 <p>Too many items ([% too_many_items_display | html %]) to display individually.</p>
170 [% FOREACH itemnumber IN itemnumbers_array %]
171 <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
175 [% IF ( itemresults ) %]
176 <div id="cataloguing_additem_newitem">
177 <input type="hidden" name="op" value="[% op | html %]" />
178 <p>This will delete [% IF ( too_many_items_display ) %]all the[% ELSE %]the selected[% END %] items.</p>
179 <input type="hidden" name="del" value="1" />
180 <fieldset class="action">
181 <input type="checkbox" name="del_records" id="del_records" /> <label for="del_records">Delete records if no items remain.</label>
182 [% IF too_many_items_display %]
183 <input type="submit" name="mainformsubmit" value="Delete ALL submitted items" />
185 <input type="submit" name="mainformsubmit" value="Delete selected items" />
188 <a href="/cgi-bin/koha/tools/batchMod.pl?del=1" class="cancel">Cancel</a>
192 <p><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a></p>
199 <div class="dialog message">
200 <p>[% deleted_items | html %] item(s) deleted.</p>
201 [% IF delete_records %] <p>[% deleted_records | html %] record(s) deleted.</p> [% END %]
202 [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
203 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a>
205 <a href="[% src | url %]">Return to where you were</a>
207 <a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a>
210 [% IF ( not_deleted_items ) %]
211 <div style="width:55%;margin:auto;">
212 <p>[% not_deleted_items | html %] item(s) could not be deleted: [% FOREACH not_deleted_itemnumber IN not_deleted_itemnumbers %][% not_deleted_itemnumber.itemnumber | html %][% END %]</p>
213 [% IF ( not_deleted_loop ) %]
223 [% FOREACH not_deleted_loo IN not_deleted_loop %]
225 <td>[% not_deleted_loo.itemnumber | html %]</td>
226 <td>[% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% not_deleted_loo.biblionumber | uri %]&itemnumber=[% not_deleted_loo.itemnumber | uri %]">[% not_deleted_loo.barcode | html %]</a>[% ELSE %][% not_deleted_loo.barcode | html %][% END %]</td>
227 <td>[% IF ( not_deleted_loo.book_on_loan ) %]Item is checked out[% ELSIF ( not_deleted_loo.book_reserved ) %]Item has a waiting hold[% END %]</td>
237 [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
238 <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | html %]"><i class="fa fa-check-square-o"></i> Return to the record</a>
240 <a class="btn btn-default" href="[% src | url %]"><i class="fa fa-check-square-o"></i> Return to where you were</a>
242 <a class="btn btn-default" href="/cgi-bin/koha/tools/batchMod.pl?del=1"><i class="fa fa-check-square-o"></i> Return to batch item deletion</a>
248 [% MACRO jsinclude BLOCK %]
249 [% Asset.js("js/tools-menu.js") | $raw %]
250 [% INCLUDE 'datatables.inc' %]
251 [% Asset.js("js/pages/batchMod.js") | $raw %]
252 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
253 <script type="text/javascript">
254 // Prepare array of all column headers, incrementing each index by
255 // two to accommodate control and title columns
256 var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count | html %]'[% UNLESS ( loop.last ) %],[% END %][% END %]);
257 for( x=0; x<allColumns.length; x++ ){
258 allColumns[x] = Number(allColumns[x]) + 2;
260 $(document).ready(function(){
261 $("#mainformsubmit").on("click",function(){
262 return submitBackgroundJob(this.form);
268 [% INCLUDE 'intranet-bottom.inc' %]