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

(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-52 lines)
Lines 495-554 sub plugin { Link Here
495
            }
495
            }
496
        );
496
        );
497
497
498
        my $sth =
499
          $dbh->prepare(
500
            "Select itemtype,description from itemtypes order by description");
501
        $sth->execute;
502
        my @itemtype;
503
        my %itemtypes;
504
        push @itemtype, "";
505
        $itemtypes{''} = "";
506
        while ( my ( $value, $lib ) = $sth->fetchrow_array ) {
507
            push @itemtype, $value;
508
            $itemtypes{$value} = $lib;
509
        }
510
511
        my $CGIitemtype = CGI::scrolling_list(
512
            -name     => 'value',
513
            -values   => \@itemtype,
514
            -labels   => \%itemtypes,
515
            -size     => 1,
516
            -multiple => 0
517
        );
518
        $sth->finish;
519
520
        # To show list of branches please use GetBranchesLoop() and modify template
521
522
        my $req =
523
          $dbh->prepare(
524
"select distinctrow left(publishercode,45) from biblioitems order by publishercode"
525
          );
526
        $req->execute;
527
        my @select;
528
        push @select, "";
529
        while ( my ($value) = $req->fetchrow ) {
530
            push @select, $value;
531
        }
532
        my $CGIpublisher = CGI::scrolling_list(
533
            -name     => 'value',
534
            -id       => 'publisher',
535
            -values   => \@select,
536
            -size     => 1,
537
            -multiple => 0
538
        );
539
540
#         my $sth=$dbh->prepare("select description,itemtype from itemtypes order by description");
541
#         $sth->execute;
542
#         while (my ($description,$itemtype) = $sth->fetchrow) {
543
#             $classlist.="<option value=\"$itemtype\">$description</option>\n";
544
#         }
545
#         $sth->finish;
546
547
        my @itemtypes = C4::ItemType->all;
498
        my @itemtypes = C4::ItemType->all;
548
499
549
        $template->param(    #classlist => $classlist,
500
        $template->param(    #classlist => $classlist,
550
            CGIitemtype  => $CGIitemtype,
551
            CGIPublisher => $CGIpublisher,
552
            itypeloop    => \@itemtypes,
501
            itypeloop    => \@itemtypes,
553
            index        => $query->param('index'),
502
            index        => $query->param('index'),
554
            Search       => 1,
503
            Search       => 1,
555
- 

Return to bug 12694