View | Details | Raw Unified | Return to bug 33748
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt (-126 / +126 lines)
Lines 203-345 Link Here
203
                                                                    <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
203
                                                                    <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort2" value="[% biblio.sort2 | html %]" />
204
                                                                </li>
204
                                                                </li>
205
                                                            </ol>
205
                                                            </ol>
206
                                                            [% IF ( biblio.iteminfos.size ) %]
206
                                                        </fieldset> <!-- /.rows.order_details -->
207
                                                                <div class="item_edit_form">
207
                                                    </td>
208
                                                                    [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
208
                                                    <td class="actions">
209
                                                                    [% FOREACH item IN biblio.iteminfos %]
209
                                                        <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">MARC</a>
210
                                                                        <fieldset>
210
                                                        <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">Card</a>
211
                                                                            <legend>Item record [% item.item_id | html %]</legend>
211
                                                        <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;breedingid=[% biblio.import_record_id | uri %]&amp;import_batch_id=[% biblio.import_batch_id | uri %]&amp;biblionumber=[% biblio.match_biblionumber | uri %]" class="btn btn-default btn-xs">Add order</a>
212
                                                                            <ol>
212
                                                        [% IF ( biblio.iteminfos.size ) %]
213
                                                                                <li>
213
                                                            <div class="item_edit_form">
214
                                                                                    <label for="homebranch_item_[% item.item_id | html %]">homebranch</label>
214
                                                                [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %]
215
                                                                                    <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% biblio.import_record_id | html %]">
215
                                                                [% FOREACH item IN biblio.iteminfos %]
216
                                                                                        [% FOREACH l IN libraries %]
216
                                                                    <fieldset>
217
                                                                                            [% IF l.branchcode == item.homebranch %]
217
                                                                        <legend>Item record [% item.item_id | html %]</legend>
218
                                                                                                <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
218
                                                                        <ol>
219
                                                                                            [% ELSE %]
219
                                                                            <li>
220
                                                                                                <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
220
                                                                                <label for="homebranch_item_[% item.item_id | html %]">homebranch</label>
221
                                                                                            [% END %]
221
                                                                                <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% biblio.import_record_id | html %]">
222
                                                                                    [% FOREACH l IN libraries %]
223
                                                                                        [% IF l.branchcode == item.homebranch %]
224
                                                                                            <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
225
                                                                                        [% ELSE %]
226
                                                                                            <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
222
                                                                                        [% END %]
227
                                                                                        [% END %]
223
                                                                                    </select>
228
                                                                                    [% END %]
224
                                                                                </li>
229
                                                                                </select>
230
                                                                            </li>
225
231
226
                                                                                <li>
232
                                                                            <li>
227
                                                                                    <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label>
233
                                                                                <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label>
228
                                                                                    <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% biblio.import_record_id | html %]">
234
                                                                                <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% biblio.import_record_id | html %]">
229
                                                                                        [% FOREACH l IN libraries %]
235
                                                                                    [% FOREACH l IN libraries %]
230
                                                                                            [% IF l.branchcode == item.holdingbranch %]
236
                                                                                        [% IF l.branchcode == item.holdingbranch %]
231
                                                                                                <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
237
                                                                                            <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option>
232
                                                                                            [% ELSE %]
238
                                                                                        [% ELSE %]
233
                                                                                                <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
239
                                                                                            <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option>
234
                                                                                            [% END %]
235
                                                                                        [% END %]
240
                                                                                        [% END %]
236
                                                                                    </select>
241
                                                                                    [% END %]
237
                                                                                </li>
242
                                                                                </select>
238
                                                                                <li>
243
                                                                            </li>
239
                                                                                    <label for="itype_item_[% item.item_id | html %]">itype</label>
244
                                                                            <li>
240
                                                                                    <select id="itype_item_[% item.item_id | html %]" name="itype_[% biblio.import_record_id | html %]">
245
                                                                                <label for="itype_item_[% item.item_id | html %]">itype</label>
241
                                                                                        [% FOREACH itemtype IN itemtypes %]
246
                                                                                <select id="itype_item_[% item.item_id | html %]" name="itype_[% biblio.import_record_id | html %]">
242
                                                                                            [% IF itemtype.itemtype == item.itype %]
247
                                                                                    [% FOREACH itemtype IN itemtypes %]
243
                                                                                                <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option>
248
                                                                                        [% IF itemtype.itemtype == item.itype %]
244
                                                                                            [% ELSE %]
249
                                                                                            <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option>
245
                                                                                                <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
250
                                                                                        [% ELSE %]
246
                                                                                            [% END %]
251
                                                                                            <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option>
247
                                                                                        [% END %]
252
                                                                                        [% END %]
248
                                                                                    </select>
253
                                                                                    [% END %]
249
                                                                                </li>
254
                                                                                </select>
255
                                                                            </li>
250
256
251
                                                                                <li>
257
                                                                            <li>
252
                                                                                    <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label>
258
                                                                                <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label>
253
                                                                                    <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% biblio.import_record_id | html %]" value="[% item.nonpublic_note | html %]">
259
                                                                                <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% biblio.import_record_id | html %]" value="[% item.nonpublic_note | html %]">
254
                                                                                </li>
260
                                                                            </li>
255
                                                                                <li>
261
                                                                            <li>
256
                                                                                    <label for="public_note_item_[% item.item_id | html %]">public_note</label>
262
                                                                                <label for="public_note_item_[% item.item_id | html %]">public_note</label>
257
                                                                                    <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% biblio.import_record_id | html %]" value="[% item.public_note | html %]">
263
                                                                                <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% biblio.import_record_id | html %]" value="[% item.public_note | html %]">
258
                                                                                </li>
264
                                                                            </li>
259
                                                                                <li>
265
                                                                            <li>
260
                                                                                    <label for="loc_item_[% item.item_id | html %]">loc</label>
266
                                                                                <label for="loc_item_[% item.item_id | html %]">loc</label>
261
                                                                                    <select id="loc_item_[% item.item_id | html %]" name="loc_[% biblio.import_record_id | html %]">
267
                                                                                <select id="loc_item_[% item.item_id | html %]" name="loc_[% biblio.import_record_id | html %]">
262
                                                                                        <option value=""> </option>
268
                                                                                    <option value=""> </option>
263
                                                                                        [% FOREACH locationloo IN locationloop %]
269
                                                                                    [% FOREACH locationloo IN locationloop %]
264
                                                                                            [% IF ( locationloo.code ) == (item.loc) %]
270
                                                                                        [% IF ( locationloo.code ) == (item.loc) %]
265
                                                                                                <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>
271
                                                                                            <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option>
266
                                                                                            [% ELSE %]
272
                                                                                        [% ELSE %]
267
                                                                                                <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>
273
                                                                                            <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option>
268
                                                                                            [% END %]
269
                                                                                        [% END %]
274
                                                                                        [% END %]
270
                                                                                    </select>
275
                                                                                    [% END %]
271
                                                                                </li>
276
                                                                                </select>
277
                                                                            </li>
272
278
273
                                                                                <li>
279
                                                                            <li>
274
                                                                                    <label for="ccode_item_[% item.item_id | html %]">ccode</label>
280
                                                                                <label for="ccode_item_[% item.item_id | html %]">ccode</label>
275
                                                                                    <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% biblio.import_record_id | html %]">
281
                                                                                <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% biblio.import_record_id | html %]">
276
                                                                                        <option value=""> </option>
282
                                                                                    <option value=""> </option>
277
                                                                                        [% FOREACH ccodeloo IN ccodeloop %]
283
                                                                                    [% FOREACH ccodeloo IN ccodeloop %]
278
                                                                                            [% IF ( ccodeloo.code ) == (item.ccode) %]
284
                                                                                        [% IF ( ccodeloo.code ) == (item.ccode) %]
279
                                                                                                <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>
285
                                                                                            <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option>
280
                                                                                            [% ELSE %]
286
                                                                                        [% ELSE %]
281
                                                                                                <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>
287
                                                                                            <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option>
282
                                                                                            [% END %]
283
                                                                                        [% END %]
288
                                                                                        [% END %]
284
                                                                                    </select>
289
                                                                                    [% END %]
285
                                                                                </li>
290
                                                                                </select>
291
                                                                            </li>
286
292
287
                                                                                <li>
293
                                                                            <li>
288
                                                                                    <label for="notforloan_item_[% item.item_id | html %]">notforloan</label>
294
                                                                                <label for="notforloan_item_[% item.item_id | html %]">notforloan</label>
289
                                                                                    <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% biblio.import_record_id | html %]">
295
                                                                                <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% biblio.import_record_id | html %]">
290
                                                                                        <option value=""> </option>
296
                                                                                    <option value=""> </option>
291
                                                                                        [% FOREACH n IN notforloanloop %]
297
                                                                                    [% FOREACH n IN notforloanloop %]
292
                                                                                            [% IF n.code == item.notforloan %]
298
                                                                                        [% IF n.code == item.notforloan %]
293
                                                                                                <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
299
                                                                                            <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option>
294
                                                                                            [% ELSE %]
300
                                                                                        [% ELSE %]
295
                                                                                                <option value="[% n.code | html %]">[% n.description | html %]</option>
301
                                                                                            <option value="[% n.code | html %]">[% n.description | html %]</option>
296
                                                                                            [% END %]
297
                                                                                        [% END %]
302
                                                                                        [% END %]
298
                                                                                    </select>
303
                                                                                    [% END %]
299
                                                                                </li>
304
                                                                                </select>
300
                                                                                <li>
305
                                                                            </li>
301
                                                                                    <label for="uri_item_[% item.item_id | html %]">uri</label>
306
                                                                            <li>
302
                                                                                    <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% biblio.import_record_id | html %]" value="[% item.uri | html %]">
307
                                                                                <label for="uri_item_[% item.item_id | html %]">uri</label>
303
                                                                                </li>
308
                                                                                <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% biblio.import_record_id | html %]" value="[% item.uri | html %]">
304
                                                                                <li>
309
                                                                            </li>
305
                                                                                    <label for="copyno_item_[% item.item_id | html %]">copyno</label>
310
                                                                            <li>
306
                                                                                    <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% biblio.import_record_id | html %]" value="[% item.copyno | html %]">
311
                                                                                <label for="copyno_item_[% item.item_id | html %]">copyno</label>
307
                                                                                </li>
312
                                                                                <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% biblio.import_record_id | html %]" value="[% item.copyno | html %]">
308
                                                                                <li>
313
                                                                            </li>
309
                                                                                    <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
314
                                                                            <li>
310
                                                                                    <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]">
315
                                                                                <label for="budget_code_item_[% item.item_id | html %]">budget_code</label>
311
                                                                                        <option value="">Select a fund (will use default if set)</option>
316
                                                                                <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]">
312
                                                                                        [% FOREACH budget_loo IN budget_loop %]
317
                                                                                    <option value="">Select a fund (will use default if set)</option>
313
                                                                                            [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
318
                                                                                    [% FOREACH budget_loo IN budget_loop %]
314
                                                                                            [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
319
                                                                                        [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option>
315
                                                                                            [% END %]
320
                                                                                        [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option>
316
                                                                                        [% END %]
321
                                                                                        [% END %]
317
                                                                                    </select>
322
                                                                                    [% END %]
318
                                                                                    <span class="item_fund required">Required</span>
323
                                                                                </select>
319
                                                                                </li>
324
                                                                                <span class="item_fund required">Required</span>
320
                                                                                <li>
325
                                                                            </li>
321
                                                                                    <label for="price_item_[% item.item_id | html %]">price</label>
326
                                                                            <li>
322
                                                                                    <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% biblio.import_record_id | html %]" value="[% item.itemprice | html %]">
327
                                                                                <label for="price_item_[% item.item_id | html %]">price</label>
323
                                                                                </li>
328
                                                                                <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% biblio.import_record_id | html %]" value="[% item.itemprice | html %]">
324
                                                                                <li>
329
                                                                            </li>
325
                                                                                    <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label>
330
                                                                            <li>
326
                                                                                    <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% biblio.import_record_id | html %]" value="[% item.replacementprice | html %]">
331
                                                                                <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label>
327
                                                                                </li>
332
                                                                                <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% biblio.import_record_id | html %]" value="[% item.replacementprice | html %]">
328
                                                                                <li>
333
                                                                            </li>
329
                                                                                    <label for="callnumber_item_[% item.item_id | html %]">callnumber</label>
334
                                                                            <li>
330
                                                                                    <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% biblio.import_record_id | html %]" value="[% item.itemcallnumber | html %]">
335
                                                                                <label for="callnumber_item_[% item.item_id | html %]">callnumber</label>
331
                                                                                </li>
336
                                                                                <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% biblio.import_record_id | html %]" value="[% item.itemcallnumber | html %]">
332
                                                                            </ol>
337
                                                                            </li>
333
                                                                        </fieldset>
338
                                                                        </ol>
334
                                                                    [% END # /FOREACH item %]
339
                                                                    </fieldset>
335
                                                                </div> <!-- /.item_edit_form -->
340
                                                                [% END # /FOREACH item %]
336
                                                            [% END %]
341
                                                            </div> <!-- /.item_edit_form -->
337
                                                        </fieldset> <!-- /.rows.order_details -->
342
                                                        [% END %]
338
                                                    </td>
339
                                                    <td class="actions">
340
                                                        <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">MARC</a>
341
                                                        <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">Card</a>
342
                                                        <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;breedingid=[% biblio.import_record_id | uri %]&amp;import_batch_id=[% biblio.import_batch_id | uri %]&amp;biblionumber=[% biblio.match_biblionumber | uri %]" class="btn btn-default btn-xs">Add order</a>
343
                                                    </td>
343
                                                    </td>
344
                                                </tr>
344
                                                </tr>
345
                                            [% END # /FOREACH biblio %]
345
                                            [% END # /FOREACH biblio %]
(-)a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js (-2 / +4 lines)
Lines 19-34 $(document).ready(function() { Link Here
19
    });
19
    });
20
20
21
    $(".order_details").hide();
21
    $(".order_details").hide();
22
    $('.item_edit_form').hide();
22
    $('input:checkbox[name="import_record_id"]').change(function(){
23
    $('input:checkbox[name="import_record_id"]').change(function(){
23
        var container = $(this).parents("tr");
24
        var container = $(this).closest("tr");
24
        if ( $(this).is(':checked') ) {
25
        if ( $(this).is(':checked') ) {
25
            $(container).addClass("selected");
26
            $(container).addClass("selected");
26
            $(container).removeClass("unselected");
27
            $(container).removeClass("unselected");
27
            $(container).find(".order_details").toggle(true);
28
            $(container).find(".order_details").toggle(true);
29
            $(container).find('.item_edit_form').toggle(true);
28
        } else {
30
        } else {
29
            $(container).addClass("unselected");
31
            $(container).addClass("unselected");
30
            $(container).removeClass("selected");
32
            $(container).removeClass("selected");
31
            $(container).find(".order_details").toggle(false);
33
            $(container).find(".order_details").toggle(false);
34
            $(container).find('.item_edit_form').toggle(false);
32
        }
35
        }
33
    } );
36
    } );
34
37
35
- 

Return to bug 33748