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

(-)a/circ/circulation.pl (-8 / +5 lines)
Lines 361-381 if (@$barcodes) { Link Here
361
361
362
        # if multiple hits, offer options to librarian
362
        # if multiple hits, offer options to librarian
363
        if ( $total_hits > 0 ) {
363
        if ( $total_hits > 0 ) {
364
            my @options = ();
364
            my @barcodes;
365
            foreach my $hit ( @{$results} ) {
365
            foreach my $hit ( @{$results} ) {
366
                my $chosen =
366
                my $chosen = # Maybe easier to retrieve the itemnumber from $hit?
367
                  TransformMarcToKoha( C4::Search::new_record_from_zebra('biblioserver',$hit) );
367
                  TransformMarcToKoha( C4::Search::new_record_from_zebra('biblioserver',$hit) );
368
368
369
                # offer all barcodes individually
369
                # offer all barcodes individually
370
                if ( $chosen->{barcode} ) {
370
                if ( $chosen->{barcode} ) {
371
                    foreach my $barcode ( sort split(/\s*\|\s*/, $chosen->{barcode}) ) {
371
                    push @barcodes, sort split(/\s*\|\s*/, $chosen->{barcode});
372
                        my %chosen_single = %{$chosen};
373
                        $chosen_single{barcode} = $barcode;
374
                        push( @options, \%chosen_single );
375
                    }
376
                }
372
                }
377
            }
373
            }
378
            $template_params->{options} = \@options;
374
            my $items = Koha::Items->search({ barcode => {-in => \@barcodes}});
375
            $template_params->{options} = $items;
379
        }
376
        }
380
    }
377
    }
381
378
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-5 / +8 lines)
Lines 446-456 Link Here
446
                                            </div>
446
                                            </div>
447
                                            <div class="modal-body">
447
                                            <div class="modal-body">
448
                                                <table class="table_borrowers">
448
                                                <table class="table_borrowers">
449
                                                    [% FOREACH book IN options %]
449
                                                    [% FOREACH item IN options %]
450
                                                        <tr>
450
                                                        <tr>
451
                                                            <td>
451
                                                            <td>
452
                                                                <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% book.biblionumber | html %]">[% book.title | html %] <i class="fa fa-window-restore"></i></a>
452
                                                                <a target="_blank" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% item.biblionumber | html %]">[% item.biblio.title | html %] <i class="fa fa-window-restore"></i></a>
453
                                                                [% book.barcode | html %]
453
                                                                [% item.barcode | html %]
454
                                                                [% IF item.itemcallnumber %]Callnumber: [% item.itemcallnumber %][% END %]
455
                                                                [% IF item.copynumber %]Copy number: [% item.copynumber %][% END %]
456
                                                                [% IF item.stocknumber %]Inventory number: [% item.stocknumber %][% END %]
457
                                                                [% IF item.enumchron %]Serial enumeration: [% item.enumchron %][% END %]
454
                                                            </td>
458
                                                            </td>
455
                                                            <td>
459
                                                            <td>
456
                                                                <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
460
                                                                <form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
Lines 462-468 Link Here
462
                                                                    <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
466
                                                                    <input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
463
                                                                    <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
467
                                                                    <input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
464
                                                                    <input type="hidden" name="branch" value="[% branch | html %]" />
468
                                                                    <input type="hidden" name="branch" value="[% branch | html %]" />
465
                                                                    <input type="hidden" name="barcode" value="[% book.barcode | html %]" />
469
                                                                    <input type="hidden" name="barcode" value="[% item.barcode | html %]" />
466
                                                                    <input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" />
470
                                                                    <input type="hidden" name="onsite_checkout" value="[% onsite_checkout | html %]" />
467
                                                                    <input type="hidden" name="auto_renew" value="[% auto_renew | html %]" />
471
                                                                    <input type="hidden" name="auto_renew" value="[% auto_renew | html %]" />
468
                                                                    <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
472
                                                                    <button class="btn btn-default btn-xs" type="submit" name="x"><i class="fa fa-check"></i> Check out</button>
469
- 

Return to bug 18912