3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Batch item deletion</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% Asset.css("css/datatables.css") %]
8 <style type="text/css">#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 ) %]
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;">
42 [% FOREACH notfoundbarcode IN notfoundbarcodes %]
43 <tr><td>[% notfoundbarcode.barcode |html %]</td></tr>
47 [% UNLESS ( too_many_items ) %]
48 [% IF ( item_loop ) %]<h4>The following barcodes were found: </h4>[% END %]
53 <form name="f" action="batchMod.pl" method="post">
54 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber %]" />
55 <input type="hidden" name="op" value="[% op %]" />
56 <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
57 <input type="hidden" name="completedJobID" id="completedJobID" value="" />
58 <input type="hidden" name="src" id="src" value="[% src %]" />
60 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber %]" />
63 [% IF ( item_loop ) %]
64 [% 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 %]
65 <div id="cataloguing_additem_itemlist">
67 <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>
68 [% FOREACH item_header_loo IN item_header_loop %]
69 <span class="selected"><input id="checkheader[% loop.count %]" type="checkbox" checked="checked" /> <label for="checkheader[% loop.count %]">[% item_header_loo.header_value %]</label> </span>
76 [% IF ( show ) %]<th> </th>[% END %]
77 <th class="anti-the">Title</th>
78 [% FOREACH item_header_loo IN item_header_loop %]
79 <th> [% item_header_loo.header_value %] </th>
84 [% FOREACH item_loo IN item_loop %] <tr> [% IF ( show ) %][% IF ( item_loo.nomod ) %] <td class="error">Cannot edit</td>[% ELSE %]<td><input type="checkbox" name="itemnumber" value="[% item_loo.itemnumber %]" id="row[% item_loo.itemnumber %]" checked="checked" /></td>[% END %][% END %]
85 <td><label for="row[% item_loo.itemnumber %]"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber %]">[% item_loo.title %]</a>[% IF ( item_loo.author ) %], by [% item_loo.author %][% END %]</label></td>
86 [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field |html %]</td>
94 [% IF ( simple_items_display ) %]
96 [% FOREACH simple_items_displa IN simple_items_display %]
98 <a href="[% simple_items_displa.itemnumber %]">[% simple_items_displa.barcode %]</a>
107 [% IF ( too_many_items ) %]
108 <p>Too many items ([% too_many_items %]) to display individually.</p>
109 [% FOREACH itemnumber IN itemnumbers_array %]
110 <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
114 [% IF ( itemresults ) %]
115 <div id="cataloguing_additem_newitem">
116 <input type="hidden" name="op" value="[% op %]" />
117 <p>This will delete [% IF ( too_many_items ) %]all the[% ELSE %]the selected[% END %] items.</p>
118 <input type="hidden" name="del" value="1" />
119 <fieldset class="action">
120 <input type="checkbox" name="del_records" id="del_records" /> <label for="del_records">Delete records if no items remain.</label>
121 [% IF too_many_items %]
122 <input type="submit" name="mainformsubmit" value="Delete ALL submitted items" />
124 <input type="submit" name="mainformsubmit" value="Delete selected items" />
127 <a href="/cgi-bin/koha/tools/batchMod.pl?del=1" class="cancel">Cancel</a>
131 <p><a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a></p>
138 <div class="dialog message">
139 <p>[% deleted_items %] item(s) deleted.</p>
140 [% IF delete_records %] <p>[% deleted_records %] record(s) deleted.</p> [% END %]
141 [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
142 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">Return to the record</a>
144 <a href="[% src %]">Return to where you were</a>
146 <a href="/cgi-bin/koha/tools/batchMod.pl?del=1">Return to batch item deletion</a>
149 [% IF ( not_deleted_items ) %]
150 <div style="width:55%;margin:auto;">
151 <p>[% not_deleted_items %] item(s) could not be deleted: [% FOREACH not_deleted_itemnumber IN not_deleted_itemnumbers %][% not_deleted_itemnumber.itemnumber %][% END %]</p>
152 [% IF ( not_deleted_loop ) %]
162 [% FOREACH not_deleted_loo IN not_deleted_loop %]
164 <td>[% not_deleted_loo.itemnumber %]</td>
165 <td>[% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% not_deleted_loo.biblionumber %]&itemnumber=[% not_deleted_loo.itemnumber %]">[% not_deleted_loo.barcode %]</a>[% ELSE %][% not_deleted_loo.barcode %][% END %]</td>
166 <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>
176 [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Delete items in a batch%]
177 <a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]"><i class="fa fa-check-square-o"></i> Return to the record</a>
179 <a class="btn btn-default" href="[% src %]"><i class="fa fa-check-square-o"></i> Return to where you were</a>
181 <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>
187 [% MACRO jsinclude BLOCK %]
188 [% Asset.js("js/tools-menu.js") %]
189 [% INCLUDE 'datatables.inc' %]
190 [% Asset.js("js/pages/batchMod.js") %]
191 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
192 <script type="text/javascript">
193 // Prepare array of all column headers, incrementing each index by
194 // two to accommodate control and title columns
195 var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count %]'[% UNLESS ( loop.last ) %],[% END %][% END %]);
196 for( x=0; x<allColumns.length; x++ ){
197 allColumns[x] = Number(allColumns[x]) + 2;
199 $(document).ready(function(){
200 $("#mainformsubmit").on("click",function(){
201 return submitBackgroundJob(this.form);
207 [% INCLUDE 'intranet-bottom.inc' %]