Lines 9-381
Link Here
|
9 |
[% Asset.js("js/cataloging.js") | $raw %] |
9 |
[% Asset.js("js/cataloging.js") | $raw %] |
10 |
[% INCLUDE 'datatables.inc' %] |
10 |
[% INCLUDE 'datatables.inc' %] |
11 |
[% Asset.js("js/pages/batchMod.js") | $raw %] |
11 |
[% Asset.js("js/pages/batchMod.js") | $raw %] |
12 |
<script type="text/javascript"> |
12 |
<script> |
13 |
//<![CDATA[ |
13 |
// Prepare array of all column headers, incrementing each index by |
|
|
14 |
// two to accommodate control and title columns |
15 |
var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count | html %]'[% UNLESS ( loop.last ) %],[% END %][% END %]); |
16 |
for( x=0; x<allColumns.length; x++ ){ |
17 |
allColumns[x] = Number(allColumns[x]) + 2; |
18 |
} |
14 |
|
19 |
|
15 |
// Prepare array of all column headers, incrementing each index by |
20 |
$(document).ready(function(){ |
16 |
// two to accommodate control and title columns |
21 |
$("input[name='disable_input']").click(function() { |
17 |
var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count | html %]'[% UNLESS ( loop.last ) %],[% END %][% END %]); |
22 |
var row = $(this).attr("id"); |
18 |
for( x=0; x<allColumns.length; x++ ){ |
23 |
row = row.replace("row","hint"); |
19 |
allColumns[x] = Number(allColumns[x]) + 2; |
24 |
var todisable = $(this).parent().find("[name='field_value'],[name='tag'],[name='subfield'],[name='mandatory']"); |
20 |
} |
25 |
var regex_link = $(this).parent().find("[name='field_regex']"); |
21 |
$(document).ready(function(){ |
26 |
if ($(this).is(":checked")) { |
22 |
|
27 |
$(todisable).prop('disabled', true); |
23 |
$("input[name='disable_input']").click(function() { |
28 |
$("#"+row).html(_("This subfield will be deleted")); |
24 |
var row = $(this).attr("id"); |
29 |
$(regex_link).hide(); |
25 |
row = row.replace("row","hint"); |
30 |
} else { |
26 |
var todisable = $(this).parent().find("[name='field_value'],[name='tag'],[name='subfield'],[name='mandatory']"); |
31 |
$(todisable).prop('disabled', false); |
27 |
var regex_link = $(this).parent().find("[name='field_regex']"); |
32 |
$("#"+row).html(""); |
28 |
if ($(this).is(":checked")) { |
33 |
$(regex_link).show(); |
29 |
$(todisable).prop('disabled', true); |
34 |
} |
30 |
$("#"+row).html(_("This subfield will be deleted")); |
35 |
}); |
31 |
$(regex_link).hide(); |
36 |
$("#mainformsubmit").on("click",function(){ |
32 |
} else { |
37 |
return submitBackgroundJob(this.form); |
33 |
$(todisable).prop('disabled', false); |
38 |
}); |
34 |
$("#"+row).html(""); |
39 |
$('a[name="field_regex"]').click(function() { |
35 |
$(regex_link).show(); |
40 |
var id = $(this).attr('id'); |
36 |
} |
41 |
var editor = $(this).parent().find("[name='field_value']"); |
37 |
}); |
42 |
var regex = $(this).parent().find("[name='regex_fields']"); |
38 |
$("#mainformsubmit").on("click",function(){ |
43 |
var disable_input = $(this).parent().find("[name='disable_input']"); |
39 |
return submitBackgroundJob(this.form); |
44 |
if ($(this).html() == 'RegEx') { |
40 |
}); |
45 |
$(editor).hide(); |
41 |
$('a[name="field_regex"]').click(function() { |
46 |
$(regex).show(); |
42 |
var id = $(this).attr('id'); |
47 |
$(this).html('Text'); |
43 |
var editor = $(this).parent().find("[name='field_value']"); |
48 |
$(disable_input).prop('disabled', true); |
44 |
var regex = $(this).parent().find("[name='regex_fields']"); |
49 |
} else { |
45 |
var disable_input = $(this).parent().find("[name='disable_input']"); |
50 |
$(editor).show(); |
46 |
if ($(this).html() == 'RegEx') { |
51 |
$(regex).hide(); |
47 |
$(editor).hide(); |
52 |
$(this).html('RegEx'); |
48 |
$(regex).show(); |
53 |
$(disable_input).prop('disabled', false); |
49 |
$(this).html('Text'); |
54 |
} |
50 |
$(disable_input).prop('disabled', true); |
55 |
return false; |
51 |
} else { |
56 |
}); |
52 |
$(editor).show(); |
|
|
53 |
$(regex).hide(); |
54 |
$(this).html('RegEx'); |
55 |
$(disable_input).prop('disabled', false); |
56 |
} |
57 |
return false; |
58 |
}); |
57 |
}); |
59 |
}); |
|
|
60 |
//]]> |
61 |
</script> |
58 |
</script> |
62 |
<!--[if IE]> |
|
|
63 |
<style>#selections { display: none; }</style> |
64 |
<![endif]--> |
65 |
<style>input[type=checkbox]{ margin : 0 .5em; }</style> |
59 |
<style>input[type=checkbox]{ margin : 0 .5em; }</style> |
66 |
[% Asset.css("css/addbiblio.css") | $raw %] |
60 |
[% Asset.css("css/addbiblio.css") | $raw %] |
67 |
[% Asset.css("css/humanmsg.css") | $raw %] |
61 |
[% Asset.css("css/humanmsg.css") | $raw %] |
68 |
[% INCLUDE 'select2.inc' %] |
62 |
[% INCLUDE 'select2.inc' %] |
69 |
|
|
|
70 |
</head> |
63 |
</head> |
|
|
64 |
|
71 |
<body id="tools_batchMod-edit" class="tools"> |
65 |
<body id="tools_batchMod-edit" class="tools"> |
72 |
[% INCLUDE 'header.inc' %] |
66 |
[% INCLUDE 'header.inc' %] |
73 |
[% INCLUDE 'cat-search.inc' %] |
67 |
[% INCLUDE 'cat-search.inc' %] |
74 |
|
68 |
|
75 |
<div id="breadcrumbs"> |
69 |
<div id="breadcrumbs"> |
76 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
70 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
77 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
71 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
78 |
<a href="/cgi-bin/koha/tools/batchMod.pl">Batch item modification</a> |
72 |
<a href="/cgi-bin/koha/tools/batchMod.pl">Batch item modification</a> |
79 |
</div> |
73 |
</div> |
80 |
|
74 |
|
81 |
<div class="main container-fluid"> |
75 |
<div class="main container-fluid"> |
82 |
|
76 |
|
83 |
[% IF ( show ) %] |
77 |
[% IF ( show ) %] |
84 |
<h1>Batch item modification</h1> |
78 |
<h1>Batch item modification</h1> |
85 |
[% ELSE %] |
79 |
[% ELSE %] |
86 |
<h1>Batch item modification results</h1> |
80 |
<h1>Batch item modification results</h1> |
87 |
<div class="dialog message"> |
81 |
<div class="dialog message"> |
88 |
[% IF (modified_items) %] |
82 |
[% IF (modified_items) %] |
89 |
[% modified_items | html %] item(s) modified (with [% modified_fields | html %] field(s) modified). |
83 |
[% modified_items | html %] item(s) modified (with [% modified_fields | html %] field(s) modified). |
90 |
[% ELSE %] |
84 |
[% ELSE %] |
91 |
No items modified. |
85 |
No items modified. |
92 |
[% END %] |
86 |
[% END %] |
93 |
<fieldset class="action"> |
87 |
<fieldset class="action"> |
94 |
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] |
88 |
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] |
95 |
[% IF searchid %] |
89 |
[% IF searchid %] |
96 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]">Return to the record</a> |
90 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]">Return to the record</a> |
97 |
[% ELSE %] |
91 |
[% ELSE %] |
98 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a> |
92 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]">Return to the record</a> |
99 |
[% END %] |
93 |
[% END %] |
100 |
[% ELSIF src %] |
94 |
[% ELSIF src %] |
101 |
<a href="[% src | url %]">Return to where you were</a> |
95 |
<a href="[% src | url %]">Return to where you were</a> |
102 |
[% ELSE %] |
96 |
[% ELSE %] |
103 |
<a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a> |
97 |
<a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a> |
104 |
[% END %] |
98 |
[% END %] |
105 |
</fieldset> |
99 |
</fieldset> |
106 |
</div> |
100 |
</div> |
107 |
[% END %] |
101 |
[% END %] |
108 |
[% IF ( barcode_not_unique ) %]<div class="dialog alert"><strong>Error saving item</strong>: Barcode must be unique.</div>[% END %] |
|
|
109 |
[% 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 %] |
110 |
|
102 |
|
111 |
[% IF ( notfoundbarcodes.size ) %] |
103 |
[% IF ( barcode_not_unique ) %] |
112 |
<div class="dialog alert"><p>Warning, the following barcodes were not found:</p></div> |
104 |
<div class="dialog alert"> |
113 |
<table style="margin:auto;"> |
105 |
<strong>Error saving item</strong>: Barcode must be unique. |
114 |
<thead> |
106 |
</div> |
115 |
<tr><th>Barcodes not found</th></tr> |
|
|
116 |
</thead> |
117 |
<tbody> |
118 |
[% FOREACH notfoundbarcode IN notfoundbarcodes %] |
119 |
<tr><td>[% notfoundbarcode |html %]</td></td> |
120 |
[% END %] |
121 |
</tbody> |
122 |
</table> |
123 |
[% IF ( item_loop ) %] |
124 |
[% UNLESS ( too_many_items_display ) %] |
125 |
<h4>The following barcodes were found: </h4> |
126 |
[% END %] |
127 |
[% END %] |
107 |
[% END %] |
128 |
[% END %] <!-- /notfoundbarcodes --> |
108 |
[% IF ( no_next_barcode ) %] |
129 |
[% IF ( notfounditemnumbers.size ) %] |
109 |
<div class="dialog alert"> |
130 |
<div class="dialog alert"><p>Warning, the following itemnumbers were not found:</p></div> |
110 |
<strong>Error saving items</strong>: Unable to automatically determine values for barcodes. No item has been inserted. |
131 |
<table style="margin:auto;"> |
111 |
</div> |
132 |
<thead> |
112 |
[% END %] |
133 |
<tr><th>Itemnumbers not found</th></tr> |
113 |
|
134 |
</thead> |
114 |
[% IF ( notfoundbarcodes.size ) %] |
135 |
<tbody> |
115 |
<div class="dialog alert"> |
136 |
[% FOREACH notfounditemnumber IN notfounditemnumbers %] |
116 |
<p>Warning, the following barcodes were not found:</p> |
137 |
<tr><td>[% notfounditemnumber |html %]</td></td> |
117 |
</div> |
|
|
118 |
|
119 |
<table style="margin:auto;"> |
120 |
<thead> |
121 |
<tr><th>Barcodes not found</th></tr> |
122 |
</thead> |
123 |
<tbody> |
124 |
[% FOREACH notfoundbarcode IN notfoundbarcodes %] |
125 |
<tr><td>[% notfoundbarcode |html %]</td></td> |
126 |
[% END %] |
127 |
</tbody> |
128 |
</table> |
129 |
|
130 |
[% IF ( item_loop ) %] |
131 |
[% UNLESS ( too_many_items_display ) %] |
132 |
<h4>The following barcodes were found: </h4> |
138 |
[% END %] |
133 |
[% END %] |
139 |
</tbody> |
|
|
140 |
</table> |
141 |
[% IF ( item_loop ) %] |
142 |
[% UNLESS ( too_many_items_display ) %] |
143 |
<h4>The following itemnumbers were found: </h4> |
144 |
[% END %] |
134 |
[% END %] |
145 |
[% END %] |
135 |
[% END %] <!-- /notfoundbarcodes --> |
146 |
[% END %] <!-- /notfounditemnumbers --> |
|
|
147 |
|
136 |
|
|
|
137 |
[% IF ( notfounditemnumbers.size ) %] |
138 |
<div class="dialog alert"> |
139 |
<p>Warning, the following itemnumbers were not found:</p> |
140 |
</div> |
141 |
|
142 |
<table style="margin:auto;"> |
143 |
<thead> |
144 |
<tr><th>Itemnumbers not found</th></tr> |
145 |
</thead> |
146 |
<tbody> |
147 |
[% FOREACH notfounditemnumber IN notfounditemnumbers %] |
148 |
<tr><td>[% notfounditemnumber |html %]</td></td> |
149 |
[% END %] |
150 |
</tbody> |
151 |
</table> |
152 |
[% IF ( item_loop ) %] |
153 |
[% UNLESS ( too_many_items_display ) %] |
154 |
<h4>The following itemnumbers were found: </h4> |
155 |
[% END %] |
156 |
[% END %] |
157 |
[% END %] <!-- /notfounditemnumbers --> |
148 |
|
158 |
|
149 |
<form name="f" action="batchMod.pl" method="post"> |
|
|
150 |
<input type="hidden" name="op" value="[% op | html %]" /> |
151 |
<input type="hidden" name="searchid" value="[% searchid | html %]" /> |
152 |
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> |
153 |
<input type="hidden" name="runinbackground" id="runinbackground" value="" /> |
154 |
<input type="hidden" name="completedJobID" id="completedJobID" value="" /> |
155 |
<input type="hidden" name="src" id="src" value="[% src | html %]" /> |
156 |
[% IF biblionumber %] |
157 |
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" /> |
158 |
[% END %] |
159 |
|
159 |
|
160 |
[% IF ( item_loop ) %] |
160 |
<form name="f" action="batchMod.pl" method="post"> |
161 |
[% IF show %] |
161 |
<input type="hidden" name="op" value="[% op | html %]" /> |
162 |
<div id="toolbar"> |
162 |
<input type="hidden" name="searchid" value="[% searchid | html %]" /> |
163 |
<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> |
163 |
<input type="hidden" name="uploadedfileid" id="uploadedfileid" value="" /> |
164 |
</div> |
164 |
<input type="hidden" name="runinbackground" id="runinbackground" value="" /> |
165 |
[% END %] |
165 |
<input type="hidden" name="completedJobID" id="completedJobID" value="" /> |
166 |
<div id="cataloguing_additem_itemlist"> |
166 |
<input type="hidden" name="src" id="src" value="[% src | html %]" /> |
|
|
167 |
[% IF biblionumber %] |
168 |
<input type="hidden" name="biblionumber" id="biblionumber" value="[% biblionumber | html %]" /> |
169 |
[% END %] |
167 |
|
170 |
|
168 |
<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> |
171 |
[% IF ( item_loop ) %] |
169 |
[% FOREACH item_header_loo IN item_header_loop %] |
|
|
170 |
<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> |
171 |
[% END %] |
172 |
</p> |
173 |
<table id="itemst"> |
174 |
<thead> |
175 |
<tr> |
176 |
<th> </th> |
177 |
<th class="anti-the">Title</th> |
178 |
<th class="holds_count" title="Item holds / Total holds">Holds</th> |
179 |
[% FOREACH item_header_loo IN item_header_loop %] |
180 |
<th> [% item_header_loo.header_value | html %] </th> |
181 |
[% END %] |
182 |
</tr> |
183 |
</thead> |
184 |
<tbody> |
185 |
[% FOREACH item_loo IN item_loop %] |
186 |
<tr> |
187 |
[% IF show %] |
172 |
[% IF show %] |
188 |
[% IF item_loo.nomod %] |
173 |
<div id="toolbar"> |
189 |
<td class="error">Cannot edit</td> |
174 |
<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> |
190 |
[% ELSE %] |
175 |
</div> |
191 |
<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> |
|
|
192 |
[% END %] |
193 |
[% ELSE %] |
194 |
<td> </td> |
195 |
[% END %] |
176 |
[% END %] |
196 |
<td> |
|
|
197 |
<label for="row[% item_loo.itemnumber | html %]"> |
198 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber | uri %]"> |
199 |
[% item_loo.title | html %] |
200 |
</a> |
201 |
[% IF ( item_loo.author ) %], by [% item_loo.author | html %][% END %] |
202 |
</label> |
203 |
</td> |
204 |
<td class="holds_count"> |
205 |
[% IF item_loo.holds %] |
206 |
[% IF item_loo.item_holds %] |
207 |
<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 -%]" > |
208 |
[% ELSE %] |
209 |
<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 -%]" > |
210 |
[% END %] |
211 |
[% ELSE %] |
212 |
[% IF item_loo.holds %] |
213 |
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="Holds on this record: [% item_loo.holds | html -%]" > |
214 |
[% ELSE %] |
215 |
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="No holds on this record" > |
216 |
[% END %] |
217 |
[% END %] |
218 |
[% IF item_loo.holds %] |
219 |
[% item_loo.item_holds | html %]/[% item_loo.holds | html %] |
220 |
[% ELSE %] |
221 |
[% item_loo.holds | html %] |
222 |
[% END %] |
223 |
</a> |
224 |
</td> |
225 |
[% FOREACH item_valu IN item_loo.item_value %] <td>[% item_valu.field | html %]</td> |
226 |
[% END %] </tr> |
227 |
[% END %] |
228 |
</tbody> |
229 |
</table> |
230 |
</div> |
231 |
[% END %]<!-- /item_loop --> |
232 |
|
177 |
|
233 |
[% IF ( simple_items_display || job_completed ) %] |
178 |
<div id="cataloguing_additem_itemlist"> |
234 |
[% IF ( too_many_items_display ) %] |
|
|
235 |
<p>Too many items ([% too_many_items_display | html %]): You have edited more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.</p> |
236 |
[% ELSE %] |
237 |
<p>The following items were modified:</p> |
238 |
<ul> |
239 |
[% FOREACH simple_items_displa IN simple_items_display %] |
240 |
<li> |
241 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% simple_items_displa.biblionumber | uri %]&itemnumber=[% simple_items_displa.itemnumber | uri %]">[% simple_items_displa.barcode | html %]</a>[% ELSE %][% simple_items_displa.barcode | html %][% END %] |
242 |
</li> |
243 |
[% END %] |
244 |
</ul> |
245 |
[% END %] |
246 |
[% END %]<!-- /simple_items_display --> |
247 |
|
179 |
|
248 |
[% IF ( show ) %] |
180 |
<p id="selections"> |
|
|
181 |
<strong>Show/hide columns:</strong> |
182 |
<span class="selected"> |
183 |
<input type="checkbox" checked="checked" id="showall" /> |
184 |
<label for="showall">Show all columns</label> |
185 |
</span> |
186 |
<span> |
187 |
<input type="checkbox" id="hideall" /> |
188 |
<label for="hideall">Hide all columns</label> |
189 |
</span> |
249 |
|
190 |
|
250 |
[% IF ( too_many_items_process ) %] |
191 |
[% FOREACH item_header_loo IN item_header_loop %] |
251 |
<p>Too many items ([% too_many_items_process | html %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') | html %] items in a batch.</p> |
192 |
<span class="selected"> |
252 |
[% ELSIF ( too_many_items_display ) %] |
193 |
<input id="checkheader[% loop.count | html %]" type="checkbox" checked="checked" /> |
253 |
<p>Too many items ([% too_many_items_display | html %]): You are editing more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.</p> |
194 |
<label for="checkheader[% loop.count | html %]">[% item_header_loo.header_value | html %]</label> |
254 |
[% FOREACH itemnumber IN itemnumbers_array %] |
195 |
</span> |
255 |
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" /> |
196 |
[% END %] |
256 |
[% END %] |
197 |
</p> |
257 |
[% END %]<!-- /too_many_items --> |
|
|
258 |
|
198 |
|
259 |
[% UNLESS (too_many_items_process) %] |
199 |
<table id="itemst"> |
260 |
<div id="cataloguing_additem_newitem"> |
200 |
<thead> |
261 |
<h2>Edit items</h2> |
201 |
<tr> |
262 |
<div class="hint">Checking the box right next to the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div> |
202 |
<th> </th> |
263 |
<fieldset class="rows"> |
203 |
<th class="anti-the">Title</th> |
264 |
<ol> |
204 |
<th class="holds_count" title="Item holds / Total holds">Holds</th> |
265 |
[% FOREACH ite IN item %] |
205 |
[% FOREACH item_header_loo IN item_header_loop %] |
266 |
<li> |
206 |
<th> [% item_header_loo.header_value | html %] </th> |
267 |
<div class="subfield_line" style="[% ite.visibility | html %]" id="subfield[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %]"> |
207 |
[% END %] |
268 |
[% SET mv = ite.marc_value %] |
208 |
</tr> |
269 |
[% IF ( ite.mandatory ) %] |
209 |
</thead> |
270 |
<label class="required" for="[%- mv.id | html -%]"> |
210 |
<tbody> |
271 |
[% ELSE %] |
211 |
[% FOREACH item_loo IN item_loop %] |
272 |
<label for="[%- mv.id | html -%]"> |
212 |
<tr> |
273 |
[% END %] |
213 |
[% IF show %] |
274 |
[% ite.subfield | html %] - [% ite.marc_lib | $raw %] |
214 |
[% IF item_loo.nomod %] |
275 |
</label> |
215 |
<td class="error">Cannot edit</td> |
|
|
216 |
[% ELSE %] |
217 |
<td> |
218 |
<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 %]" /> |
219 |
</td> |
220 |
[% END %] |
221 |
[% ELSE %] |
222 |
<td> </td> |
223 |
[% END %] |
224 |
<td> |
225 |
<label for="row[% item_loo.itemnumber | html %]"> |
226 |
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item_loo.biblionumber | uri %]"> |
227 |
[% item_loo.title | html %] |
228 |
</a> |
229 |
[% IF ( item_loo.author ) %], by [% item_loo.author | html %][% END %] |
230 |
</label> |
231 |
</td> |
232 |
<td class="holds_count"> |
233 |
[% IF item_loo.holds %] |
234 |
[% IF item_loo.item_holds %] |
235 |
<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 -%]" > |
236 |
[% ELSE %] |
237 |
<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 -%]" > |
238 |
[% END %] |
239 |
[% ELSE %] |
240 |
[% IF item_loo.holds %] |
241 |
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="Holds on this record: [% item_loo.holds | html -%]" > |
242 |
[% ELSE %] |
243 |
<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% item_loo.biblionumber | uri %]" title="No holds on this record" > |
244 |
[% END %] |
245 |
[% END %] |
246 |
[% IF item_loo.holds %] |
247 |
[% item_loo.item_holds | html %]/[% item_loo.holds | html %] |
248 |
[% ELSE %] |
249 |
[% item_loo.holds | html %] |
250 |
[% END %] |
251 |
</a> |
252 |
</td> |
253 |
[% FOREACH item_valu IN item_loo.item_value %] |
254 |
<td> |
255 |
[% item_valu.field | html %] |
256 |
</td> |
257 |
[% END %] |
258 |
</tr> |
259 |
[% END %] |
260 |
</tbody> |
261 |
</table> |
262 |
</div> |
263 |
[% END %]<!-- /item_loop --> |
276 |
|
264 |
|
277 |
[% IF ( mv.type == 'select' ) -%] |
265 |
[% IF ( simple_items_display || job_completed ) %] |
278 |
<select name="[%- mv.name | html -%]" id="[%- mv.id | html -%]" size="1" tabindex="1" class="input_marceditor select2"> |
266 |
[% IF ( too_many_items_display ) %] |
279 |
[%- FOREACH aval IN mv.values %] |
267 |
<p>Too many items ([% too_many_items_display | html %]): You have edited more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.</p> |
280 |
[% ite.subfield | html %] - |
|
|
281 |
[% IF aval == mv.default %] |
282 |
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> |
283 |
[% ELSE %] |
284 |
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> |
285 |
[% END %] |
286 |
[%- END -%] |
287 |
</select> |
288 |
[% ELSIF ( mv.type == 'text1' ) %] |
289 |
<input type="text" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
290 |
<a href="#" class="buttonDot" onclick="Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=[%- mv.authtypecode | uri -%]&index=[%- mv.id | uri -%]','[%- mv.id | uri -%]'); return false;" title="Tag editor">...</a> |
291 |
[% ELSIF ( mv.type == 'text2' ) %] |
292 |
<input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
293 |
[% IF mv.noclick %] |
294 |
<a href="#" class="buttonDot disabled" title="No popup">...</a> |
295 |
[% ELSE %] |
268 |
[% ELSE %] |
296 |
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot" title="Tag editor">...</a> |
269 |
<p>The following items were modified:</p> |
|
|
270 |
<ul> |
271 |
[% FOREACH simple_items_displa IN simple_items_display %] |
272 |
<li> |
273 |
[% IF ( CAN_user_editcatalogue_edit_items ) %]<a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% simple_items_displa.biblionumber | uri %]&itemnumber=[% simple_items_displa.itemnumber | uri %]">[% simple_items_displa.barcode | html %]</a>[% ELSE %][% simple_items_displa.barcode | html %][% END %] |
274 |
</li> |
275 |
[% END %] |
276 |
</ul> |
297 |
[% END %] |
277 |
[% END %] |
298 |
[% mv.javascript | $raw %] |
278 |
[% END %]<!-- /simple_items_display --> |
299 |
[% ELSIF ( mv.type == 'text' ) %] |
|
|
300 |
<input type="text" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
301 |
[% ELSIF ( mv.type == 'hidden' ) %] |
302 |
<input type="hidden" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
303 |
[% ELSIF ( mv.type == 'textarea' ) %] |
304 |
<textarea tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255">[%- mv.value | html -%]"</textarea> |
305 |
[%- END -%] |
306 |
|
279 |
|
307 |
<span name="regex_fields" style="display: none;"> |
280 |
[% IF ( show ) %] |
308 |
s/<input type="text" id="[% mv.id | html %]" name="regex_search" placeholder="regex pattern" />/ |
|
|
309 |
<input type="text" id="[% mv.id | html %]" name="regex_replace" placeholder="regex replacement" />/ |
310 |
<input type="text" id="[% mv.id | html %]" name="regex_modifiers" placeholder="ig" size="3" /> |
311 |
</span> |
312 |
|
281 |
|
313 |
[% UNLESS ( ite.mandatory ) %] |
282 |
[% IF ( too_many_items_process ) %] |
314 |
<input type="checkbox" id="row[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %]" title="Check to delete subfield [% ite.subfield | html %]" name="disable_input" value="[% ite.subfield | html %]" /> |
283 |
<p>Too many items ([% too_many_items_process | html %]): You are not allowed to edit more than [% Koha.Preference('MaxItemsToProcessForBatchMod') | html %] items in a batch.</p> |
315 |
[% ELSE %] |
284 |
[% ELSIF ( too_many_items_display ) %] |
316 |
<span class="required">Required</span> |
285 |
<p>Too many items ([% too_many_items_display | html %]): You are editing more than [% Koha.Preference('MaxItemsToDisplayForBatchMod') | html %] items in a batch, items will not be shown.</p> |
317 |
[% END %] |
286 |
[% FOREACH itemnumber IN itemnumbers_array %] |
|
|
287 |
<input type="hidden" name="itemnumber" value="[% itemnumber | html %]" /> |
288 |
[% END %] |
289 |
[% END %]<!-- /too_many_items --> |
318 |
|
290 |
|
319 |
[% IF (mv.type == 'text' || mv.type == 'textarea' ) %] |
291 |
[% UNLESS (too_many_items_process) %] |
320 |
<a href="#" name="field_regex" id="[% ite.id | html %]" >RegEx</a> |
292 |
<div id="cataloguing_additem_newitem"> |
321 |
[% END %] |
293 |
<h2>Edit items</h2> |
|
|
294 |
<div class="hint">Checking the box right next to the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.</div> |
295 |
<fieldset class="rows"> |
296 |
<ol> |
297 |
[% FOREACH ite IN item %] |
298 |
<li> |
299 |
<div class="subfield_line" style="[% ite.visibility | html %]" id="subfield[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %]"> |
300 |
[% SET mv = ite.marc_value %] |
301 |
[% IF ( ite.mandatory ) %] |
302 |
<label class="required" for="[%- mv.id | html -%]"> |
303 |
[% ELSE %] |
304 |
<label for="[%- mv.id | html -%]"> |
305 |
[% END %] |
306 |
[% ite.subfield | html %] - [% ite.marc_lib | $raw %] |
307 |
</label> |
322 |
|
308 |
|
323 |
<input type="hidden" name="tag" value="[% ite.tag | html %]" /> |
309 |
[% IF ( mv.type == 'select' ) -%] |
324 |
<input type="hidden" name="subfield" value="[% ite.subfield | html %]" /> |
310 |
<select name="[%- mv.name | html -%]" id="[%- mv.id | html -%]" size="1" tabindex="1" class="input_marceditor select2"> |
325 |
<input type="hidden" name="mandatory" value="[% ite.mandatory | html %]" /> |
311 |
[%- FOREACH aval IN mv.values %] |
326 |
[% IF ( ite.repeatable ) %] |
312 |
[% ite.subfield | html %] - |
327 |
<a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;"> |
313 |
[% IF aval == mv.default %] |
328 |
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
314 |
<option value="[%- aval | html -%]" selected="selected">[%- mv.labels.$aval | html -%]</option> |
329 |
</a> |
315 |
[% ELSE %] |
330 |
[% END %] |
316 |
<option value="[%- aval | html -%]">[%- mv.labels.$aval | html -%]</option> |
331 |
<span class="hint" id="hint[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %]"></span> |
317 |
[% END %] |
332 |
</div> |
318 |
[%- END -%] |
333 |
</li> |
319 |
</select> |
334 |
[% END %] |
320 |
[% ELSIF ( mv.type == 'text1' ) %] |
335 |
</ol> |
321 |
<input type="text" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
336 |
</fieldset> |
322 |
<a href="#" class="buttonDot" onclick="Dopop('/cgi-bin/koha/authorities/auth_finder.pl?authtypecode=[%- mv.authtypecode | uri -%]&index=[%- mv.id | uri -%]','[%- mv.id | uri -%]'); return false;" title="Tag editor">...</a> |
337 |
<fieldset class="rows"> |
323 |
[% ELSIF ( mv.type == 'text2' ) %] |
338 |
<legend>Other attributes</legend> |
324 |
<input type="text" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
339 |
<ol> |
325 |
[% IF mv.noclick %] |
340 |
<li> |
326 |
<a href="#" class="buttonDot disabled" title="No popup">...</a> |
341 |
<div class="subfield_line"> |
327 |
[% ELSE %] |
342 |
<label for="exclude_from_local_holds_priority">Exclude from local holds priority:</label> |
328 |
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot" title="Tag editor">...</a> |
343 |
<select id="exclude_from_local_holds_priority" name="exclude_from_local_holds_priority" class="input_marceditor select2" style="width: 50px"> |
329 |
[% END %] |
344 |
<option selected></option> |
330 |
[% mv.javascript | $raw %] |
345 |
<option value="1">Yes</option> |
331 |
[% ELSIF ( mv.type == 'text' ) %] |
346 |
<option value="0">No</option> |
332 |
<input type="text" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
347 |
</select> |
333 |
[% ELSIF ( mv.type == 'hidden' ) %] |
348 |
</div> |
334 |
<input type="hidden" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
349 |
</li> |
335 |
[% ELSIF ( mv.type == 'textarea' ) %] |
350 |
</ol> |
336 |
<textarea tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255">[%- mv.value | html -%]"</textarea> |
351 |
</fieldset> |
337 |
[%- END -%] |
352 |
<fieldset class="action"> |
338 |
|
353 |
<div id="jobpanel"> |
339 |
<span name="regex_fields" style="display: none;"> |
354 |
<div id="jobstatus" class="progress_panel">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> |
340 |
s/<input type="text" id="[% mv.id | html %]" name="regex_search" placeholder="regex pattern" />/ |
355 |
<div id="jobfailed"></div> |
341 |
<input type="text" id="[% mv.id | html %]" name="regex_replace" placeholder="regex replacement" />/ |
356 |
</div> |
342 |
<input type="text" id="[% mv.id | html %]" name="regex_modifiers" placeholder="ig" size="3" /> |
357 |
<input type="submit" id="mainformsubmit" value="Save" /> |
343 |
</span> |
358 |
<a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel">Cancel</a> |
344 |
|
359 |
</fieldset> |
345 |
[% UNLESS ( ite.mandatory ) %] |
360 |
</div> |
346 |
<input type="checkbox" id="row[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %]" title="Check to delete subfield [% ite.subfield | html %]" name="disable_input" value="[% ite.subfield | html %]" /> |
361 |
[% ELSE %] |
347 |
[% ELSE %] |
362 |
<p><a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a></p> |
348 |
<span class="required">Required</span> |
363 |
[% END %] |
349 |
[% END %] |
364 |
[% ELSE %] <!-- // show --> |
350 |
|
365 |
<fieldset class="action"> |
351 |
[% IF (mv.type == 'text' || mv.type == 'textarea' ) %] |
366 |
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] |
352 |
<a href="#" name="field_regex" id="[% ite.id | html %]" >RegEx</a> |
367 |
[% IF searchid %] |
353 |
[% END %] |
368 |
<a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a> |
354 |
|
369 |
[% ELSE %] |
355 |
<input type="hidden" name="tag" value="[% ite.tag | html %]" /> |
370 |
<a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a> |
356 |
<input type="hidden" name="subfield" value="[% ite.subfield | html %]" /> |
371 |
[% END %] |
357 |
<input type="hidden" name="mandatory" value="[% ite.mandatory | html %]" /> |
372 |
[% ELSIF src %] |
358 |
[% IF ( ite.repeatable ) %] |
373 |
<a class="btn btn-default" href="[% src | url %]"><i class="fa fa-check-square-o"></i> Return to where you were</a> |
359 |
<a href="#" class="buttonPlus" onclick="CloneItemSubfield(this.parentNode.parentNode); return false;"> |
374 |
[% ELSE %] |
360 |
<img src="[% interface | html %]/[% theme | html %]/img/clone-subfield.png" alt="Clone" title="Clone this subfield" /> |
375 |
<a class="btn btn-default" href="/cgi-bin/koha/tools/batchMod.pl"><i class="fa fa-check-square-o"></i> Return to batch item modification</a> |
361 |
</a> |
376 |
[% END %] |
362 |
[% END %] |
377 |
</fieldset> |
363 |
<span class="hint" id="hint[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %]"></span> |
|
|
364 |
</div> |
365 |
</li> |
366 |
[% END %] |
367 |
</ol> |
368 |
</fieldset> |
378 |
|
369 |
|
379 |
[% END %] |
370 |
<fieldset class="rows"> |
|
|
371 |
<legend>Other attributes</legend> |
372 |
<ol> |
373 |
<li> |
374 |
<div class="subfield_line"> |
375 |
<label for="exclude_from_local_holds_priority">Exclude from local holds priority:</label> |
376 |
<select id="exclude_from_local_holds_priority" name="exclude_from_local_holds_priority" class="input_marceditor select2" style="width: 50px"> |
377 |
<option selected></option> |
378 |
<option value="1">Yes</option> |
379 |
<option value="0">No</option> |
380 |
</select> |
381 |
</div> |
382 |
</li> |
383 |
</ol> |
384 |
</fieldset> |
380 |
|
385 |
|
|
|
386 |
<fieldset class="action"> |
387 |
<div id="jobpanel"> |
388 |
<div id="jobstatus" class="progress_panel">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> |
389 |
<div id="jobfailed"></div> |
390 |
</div> |
391 |
<input type="submit" id="mainformsubmit" value="Save" /> |
392 |
<a href="/cgi-bin/koha/tools/batchMod.pl" class="cancel">Cancel</a> |
393 |
</fieldset> |
394 |
</div> |
395 |
[% ELSE %] |
396 |
<p><a href="/cgi-bin/koha/tools/batchMod.pl">Return to batch item modification</a></p> |
397 |
[% END %] |
398 |
[% ELSE %] <!-- // show --> |
399 |
<fieldset class="action"> |
400 |
[% IF src == 'CATALOGUING' # from catalogue/detail.pl > Edit items in a batch%] |
401 |
[% IF searchid %] |
402 |
<a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]&searchid=[% searchid | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a> |
403 |
[% ELSE %] |
404 |
<a class="btn btn-default" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblionumber | uri %]"><i class="fa fa-check-square-o"></i> Return to the record</a> |
405 |
[% END %] |
406 |
[% ELSIF src %] |
407 |
<a class="btn btn-default" href="[% src | url %]"><i class="fa fa-check-square-o"></i> Return to where you were</a> |
408 |
[% ELSE %] |
409 |
<a class="btn btn-default" href="/cgi-bin/koha/tools/batchMod.pl"><i class="fa fa-check-square-o"></i> Return to batch item modification</a> |
410 |
[% END %] |
411 |
</fieldset> |
412 |
[% END %] |
413 |
</form> |
381 |
[% INCLUDE 'intranet-bottom.inc' %] |
414 |
[% INCLUDE 'intranet-bottom.inc' %] |
382 |
- |
|
|