2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Tools › Batch item modification</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript" src="[% interface %]/[% theme %]/js/background-job-progressbar.js"></script>
6 <script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging.js"></script>
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
8 [% INCLUDE 'datatables.inc' %]
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10 <script type="text/javascript" src="[% interface %]/[% theme %]/js/pages/batchMod.js"></script>
11 <script type="text/javascript">
14 // Prepare array of all column headers, incrementing each index by
15 // two to accommodate control and title columns
16 var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count %]'[% UNLESS ( loop.last ) %],[% END %][% END %]);
17 for( x=0; x<allColumns.length; x++ ){
18 allColumns[x] = Number(allColumns[x]) + 2;
20 $(document).ready(function(){
22 $("input[name='disable_input']").click(function() {
23 var row = $(this).attr("id");
24 row = row.replace("row","hint");
25 var subfield = $(this).next();
26 if ($(this).is(":checked")){
27 $(this).val($(this).siblings("[name='subfield']").val());
28 $(subfield).prop('disabled', true);
29 $("#"+row).html(_("This subfield will be deleted"));
31 $(subfield).prop('disabled', false);
35 $("#mainformsubmit").on("click",function(){
36 return submitBackgroundJob(this.form);
42 <style type="text/css">#selections { display: none; }</style>
44 <style type="text/css">input[type=checkbox]{ margin : 0 .5em; }</style>
45 <link type="text/css" rel="stylesheet" href="[% interface %]/[% theme %]/css/addbiblio.css" />
47 <body id="tools_batchMod-edit" class="tools">
48 [% INCLUDE 'header.inc' %]
49 [% INCLUDE 'cat-search.inc' %]
51 <div id="breadcrumbs">
52 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
53 <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> ›
54 <a href="/cgi-bin/koha/tools/batchMod.pl">Batch item modification</a>
57 <div id="doc3" class="yui-t7">
61 <h1>Batch item modification</h1>
63 <h1>Batch item modification results</h1>
64 <div class="dialog message">
65 [% modified_items %] item(s) modified (with [% modified_fields %] fields modified).
66 <fieldset class="action">
67 [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%]
68 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]">Return to the record</a>
70 <a href="[% src %]">Return to where you were</a>
72 <a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a>
77 [% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %]
78 [% 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 %]
79 [% IF ( book_on_loan ) %]<div class="dialog alert"><strong>Cannot Delete</strong>: item is checked out.</div>[% END %]
80 [% IF ( book_reserved ) %]<div class="dialogalert"><strong>Cannot Delete</strong>: item has a waiting hold.</div>[% END %]
82 [% IF ( notfoundbarcodes ) %]
83 <div class="dialog alert"><p>Warning, the following barcodes were not found:</p></div>
84 <table style="margin:auto;">
86 <tr><th>Barcodes not found</th></tr>
89 [% FOREACH notfoundbarcode IN notfoundbarcodes %]
90 <tr><td>[% notfoundbarcode.barcode %]</td></td>
94 [% IF ( item_loop ) %]
95 [% UNLESS ( too_many_items ) %]
96 <h4>The following barcodes were found: </h4>
99 [% END %] <!-- /notfoundbarcodes -->
101 <form name="f" action="batchMod.pl" method="post">
102 <input type="hidden" name="op" value="[% op %]" />
103 <input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" />
104 <input type="hidden" name="runinbackground" id="runinbackground" value="" />
105 <input type="hidden" name="completedJobID" id="completedJobID" value="" />
106 <input type="hidden" name="src" id="src" value="[% src %]" />
107 [% IF biblionumber %]
108 <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber %]" />
111 [% IF ( item_loop ) %]
114 <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> | <a id="clearonloanbutton" href="#">Clear on loan</a>
117 <div id="cataloguing_additem_itemlist">
119 <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>
120 [% FOREACH item_header_loo IN item_header_loop %]
121 <span class="selected"><input id="checkheader[% loop.count %]" type="checkbox" checked="checked" /> <label for="checkheader[% loop.count %]">[% item_header_loo.header_value %]</label> </span>
128 <th class="anti-the">Title</th>
129 [% FOREACH item_header_loo IN item_header_loop %]
130 <th> [% item_header_loo.header_value %] </th>
135 [% FOREACH item_loo IN item_loop %]
138 [% IF item_loo.nomod %]
139 <td class="error">Cannot edit</td>
141 <td><input type="checkbox" name="itemnumber" value="[% item_loo.itemnumber %]" id="row[% item_loo.itemnumber %]" checked="checked" data-is-onloan="[% item_loo.onloan %]" /></td>
146 <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>
147 [% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field |html %]</td>
153 [% END %]<!-- /item_loop -->
155 [% IF ( simple_items_display ) %]
156 <p>The following items were modified:</p>
158 [% FOREACH simple_items_displa IN simple_items_display %]
160 [% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% simple_items_displa.biblionumber %]&itemnumber=[% simple_items_displa.itemnumber %]">[% simple_items_displa.barcode %]</a>[% ELSE %][% simple_items_displa.barcode %][% END %]
164 [% END %]<!-- /simple_items_display -->
168 [% IF ( too_many_items ) %]
169 <p>Too many items ([% too_many_items %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') %] items in a batch.</p>
170 [% FOREACH itemnumber IN itemnumbers_array %]
171 <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
173 [% END %]<!-- /too_many_items -->
175 [% IF ( item_loop ) %]
176 <div id="cataloguing_additem_newitem">
178 <div class="hint">Checking the box right next the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div>
179 <fieldset class="rows">
181 [% FOREACH ite IN item %]
182 <li><div class="subfield_line" style="[% ite.visibility %]" id="subfield[% ite.tag %][% ite.subfield %][% ite.random %]">
183 [% IF ( ite.mandatory ) %]
184 <label class="required" for="tag_[% ite.tag %]_subfield_[% ite.subfield %]_[% ite.random %]">
186 <label for="tag_[% ite.tag %]_subfield_[% ite.subfield %]_[% ite.random %]">
191 [% UNLESS ( ite.mandatory ) %]<input type="checkbox" id="row[% ite.tag %][% ite.subfield %][% ite.random %]" title="Check to delete subfield [% ite.subfield %]" name="disable_input" value="[% ite.subfield %]" />[% ELSE %]<span class="required">Required</span>[% END %]
193 [% SET mv = ite.marc_value %]
194 [% IF ( mv.type == 'select' ) -%]
195 <select name="[%- mv.name -%]" id="[%- mv.id -%]" size="1" tabindex="1" class="input_marceditor">
196 [%- FOREACH aval IN mv.values %]
197 [% IF aval == mv.default %]
198 <option value="[%- aval -%]" selected="selected">[%- mv.labels.$aval -%]</option>
200 <option value="[%- aval -%]">[%- mv.labels.$aval -%]</option>
204 [% ELSIF ( mv.type == 'text1' ) %]
205 <input type="text" tabindex="1" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value -%]" />
206 <a href="#" class="buttonDot" onclick="Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=[%- mv.authtypecode -%]&index=[%- mv.id -%]','[%- mv.id -%]'); return false;" title="Tag editor">...</a>
207 [% ELSIF ( mv.type == 'text2' ) %]
208 <input type="text" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value -%]" />
210 <a href="#" class="buttonDot disabled" title="No popup">...</a>
212 <a href="#" id="buttonDot_[% mv.id %]" class="buttonDot" title="Tag editor">...</a>
215 [% ELSIF ( mv.type == 'text' ) %]
216 <input type="text" tabindex="1" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value -%]" />
217 [% ELSIF ( mv.type == 'hidden' ) %]
218 <input type="hidden" tabindex="1" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value -%]" />
219 [% ELSIF ( mv.type == 'textarea' ) %]
220 <textarea tabindex="1" id="[%- mv.id -%]" name="field_value" class="input_marceditor" size="50" maxlength="255">[%- mv.value -%]"</textarea>
223 <input type="hidden" name="tag" value="[% ite.tag %]" />
224 <input type="hidden" name="subfield" value="[% ite.subfield %]" />
225 <input type="hidden" name="mandatory" value="[% ite.mandatory %]" />
226 [% IF ( ite.repeatable ) %]
227 <a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode); return false;">
228 <img src="[% interface %]/[% theme %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" />
231 <span class="hint" id="hint[% ite.tag %][% ite.subfield %][% ite.random %]"></span>
236 <fieldset class="action">
238 <div id="jobstatus" class="progress_panel">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div>
239 <div id="jobfailed"></div>
241 <input type="submit" id="mainformsubmit" value="Save" />
242 <a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel">Cancel</a>
246 <p><a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a></p>
248 [% ELSE %] <!-- // show -->
249 <fieldset class="action">
250 [% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%]
251 <a class="btn" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber %]"><i class="fa fa-check-square-o"></i> Return to the record</a>
253 <a class="btn" href="[% src %]"><i class="fa fa-check-square-o"></i> Return to where you were</a>
255 <a class="btn" href="/cgi-bin/koha/tools/batchMod.pl"><i class="fa fa-check-square-o"></i> Return to batch item modification</a>
262 [% INCLUDE 'intranet-bottom.inc' %]