koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/authorities auth_finder.pl,NONE,1.1 detail.pl,NONE,


From: Paul POULAIN
Subject: [Koha-cvs] CVS: koha/authorities auth_finder.pl,NONE,1.1 detail.pl,NONE,1.1 authorities-home.pl,1.1,1.2 authorities.pl,1.1,1.2
Date: Thu, 10 Jun 2004 01:28:42 -0700

Update of /cvsroot/koha/koha/authorities
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9465/authorities

Modified Files:
        authorities-home.pl authorities.pl 
Added Files:
        auth_finder.pl detail.pl 
Log Message:
MARC authority management (continued)

--- NEW FILE ---
#!/usr/bin/perl
# WARNING: 4-character tab stops here

# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA  02111-1307 USA

use strict;
require Exporter;
use CGI;
use C4::Auth;
use HTML::Template;
use C4::Context;
use C4::Search;
use C4::Auth;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::AuthoritiesMarc;
use C4::SearchMarc;
use C4::Catalogue;
use C4::Koha; # XXX subfield_is_koha_internal_p

my $query=new CGI;
my $op = $query->param('op');
my $authtypecode = $query->param('authtypecode');
my $dbh = C4::Context->dbh;

my $startfrom=$query->param('startfrom');
$startfrom=0 if(!defined $startfrom);
my ($template, $loggedinuser, $cookie);
my $resultsperpage;

my $authtypes = getauthtypes;
my @authtypesloop;
foreach my $thisauthtype (keys %$authtypes) {
        my $selected = 1 if $thisauthtype eq $authtypecode;
        my %row =(value => $thisauthtype,
                                selected => $selected,
                                authtypetext => 
$authtypes->{$thisauthtype}{'authtypetext'},
                        );
        push @authtypesloop, \%row;
}

if ($op eq "do_search") {
        my @marclist = $query->param('marclist');
        my @and_or = $query->param('and_or');
        my @excluding = $query->param('excluding');
        my @operator = $query->param('operator');
        my @value = $query->param('value');

        $resultsperpage= $query->param('resultsperpage');
        $resultsperpage = 19 if(!defined $resultsperpage);
        my $orderby = $query->param('orderby');

        # builds tag and subfield arrays
        my @tags;

        my ($results,$total) = authoritysearch($dbh, 
address@hidden,address@hidden,
                                                                                
address@hidden, address@hidden, address@hidden,
                                                                                
$startfrom*$resultsperpage, $resultsperpage,$orderby);

        ($template, $loggedinuser, $cookie)
                = get_template_and_user({template_name => 
"authorities/auth_finder.tmpl",
                                query => $query,
                                type => 'intranet',
                                authnotrequired => 0,
                                flagsrequired => {borrowers => 1},
                                flagsrequired => {catalogue => 1},
                                debug => 1,
                                });

        # multi page display gestion
        my $displaynext=0;
        my $displayprev=$startfrom;
        if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
                $displaynext = 1;
        }

        my @field_data = ();


        for(my $i = 0 ; $i <= $#marclist ; $i++)
        {
                push @field_data, { term => "marclist", val=>$marclist[$i] };
                push @field_data, { term => "and_or", val=>$and_or[$i] };
                push @field_data, { term => "excluding", val=>$excluding[$i] };
                push @field_data, { term => "operator", val=>$operator[$i] };
                push @field_data, { term => "value", val=>$value[$i] };
        }

        my @numbers = ();

        if ($total>$resultsperpage)
        {
                for (my $i=1; $i<$total/$resultsperpage+1; $i++)
                {
                        if ($i<16)
                        {
                        my $highlight=0;
                        ($startfrom==($i-1)) && ($highlight=1);
                        push @numbers, { number => $i,
                                        highlight => $highlight ,
                                        searchdata=> address@hidden,
                                        startfrom => ($i-1)};
                        }
        }
        }

        my $from = $startfrom*$resultsperpage+1;
        my $to;

        if($total < (($startfrom+1)*$resultsperpage))
        {
                $to = $total;
        } else {
                $to = (($startfrom+1)*$resultsperpage);
        }
        $template->param(result => $results,
                                                        startfrom=> $startfrom,
                                                        displaynext=> 
$displaynext,
                                                        displayprev=> 
$displayprev,
                                                        resultsperpage => 
$resultsperpage,
                                                        startfromnext => 
$startfrom+1,
                                                        startfromprev => 
$startfrom-1,
                                                        
searchdata=>address@hidden,
                                                        total=>$total,
                                                        from=>$from,
                                                        to=>$to,
                                                        numbers=>address@hidden,
                                                        );

} else {
        ($template, $loggedinuser, $cookie)
                = get_template_and_user({template_name => 
"authorities/auth_finder.tmpl",
                                query => $query,
                                type => 'intranet',
                                authnotrequired => 0,
                                flagsrequired => {catalogue => 1},
                                debug => 1,
                                });

}

$template->param(authtypesloop => address@hidden);

# Print the page
output_html_with_http_headers $query, $cookie, $template->output;

# Local Variables:
# tab-width: 4
# End:

--- NEW FILE ---
#!/usr/bin/perl

# Copyright 2000-2002 Katipo Communications
#
# This file is part of Koha.
#
# Koha is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA  02111-1307 USA

=head1 NAME

etail.pl : script to show an authority in MARC format

=head1 SYNOPSIS


=head1 DESCRIPTION

This script needs an authid

It shows the authority in a (nice) MARC format depending on authority MARC
parameters tables.

=head1 FUNCTIONS

=over 2

=cut


use strict;
require Exporter;
use C4::AuthoritiesMarc;
use C4::Auth;
use C4::Context;
use C4::Output;
use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
use C4::Koha;
# use C4::Biblio;
# use C4::Catalogue;
use HTML::Template;

my $query=new CGI;

my $dbh=C4::Context->dbh;

my $authid = $query->param('authid');
my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);

my $record =AUTHgetauthority($dbh,$authid);
# open template
my ($template, $loggedinuser, $cookie)
                = get_template_and_user({template_name => 
"authorities/detail.tmpl",
                             query => $query,
                             type => "intranet",
                             authnotrequired => 0,
                             flagsrequired => {catalogue => 1},
                             debug => 1,
                             });

# fill arrays
my @loop_data =();
my $tag;
# loop through each tab 0 through 9
# for (my $tabloop = 0; $tabloop<=10;$tabloop++) {
# loop through each tag
        my @fields = $record->fields();
        my @loop_data =();
        foreach my $field (@fields) {
                        my @subfields_data;
                # if tag <10, there's no subfield, use the "@" trick
                if ($field->tag()<10) {
#                       next if ($tagslib->{$field->tag()}->{'@'}->{tab}  ne 
$tabloop);
                        next if ($tagslib->{$field->tag()}->{'@'}->{hidden});
                        my %subfield_data;
                        
$subfield_data{marc_lib}=$tagslib->{$field->tag()}->{'@'}->{lib};
                        $subfield_data{marc_value}=$field->data();
                        $subfield_data{marc_subfield}='@';
                        $subfield_data{marc_tag}=$field->tag();
                        push(@subfields_data, \%subfield_data);
                } else {
                        my @subf=$field->subfields;
        # loop through each subfield
                        for my $i (0..$#subf) {
                                $subf[$i][0] = "@" unless $subf[$i][0];
#                               next if 
($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab}  ne $tabloop);
                                next if 
($tagslib->{$field->tag()}->{$subf[$i][0]}->{hidden});
                                my %subfield_data;
                                
$subfield_data{marc_lib}=$tagslib->{$field->tag()}->{$subf[$i][0]}->{lib};
                                if 
($tagslib->{$field->tag()}->{$subf[$i][0]}->{isurl}) {
                                        $subfield_data{marc_value}="<a 
href=\"$subf[$i][1]\">$subf[$i][1]</a>";
                                } else {
                                        $subfield_data{marc_value}=$subf[$i][1];
                                }
                                $subfield_data{marc_subfield}=$subf[$i][0];
                                $subfield_data{marc_tag}=$field->tag();
                                push(@subfields_data, \%subfield_data);
                        }
                }
                if ($#subfields_data>=0) {
                        my %tag_data;
                        $tag_data{tag}=$field->tag().' -'. 
$tagslib->{$field->tag()}->{lib};
                        $tag_data{subfield} = address@hidden;
                        push (@loop_data, \%tag_data);
                }
        }
        $template->param("0XX" =>address@hidden);
# }
# now, build item tab !
# the main difference is that datas are in lines and not in columns : thus, we 
build the <th> first, then the values...
# loop through each tag
# warning : we may have differents number of columns in each row. Thus, we 
first build a hash, complete it if necessary
# then construct template.
# my @fields = $record->fields();
# my %witness; #---- stores the list of subfields used at least once, with the 
"meaning" of the code
# my @big_array;
# foreach my $field (@fields) {
#       next if ($field->tag()<10);
#       my @subf=$field->subfields;
#       my %this_row;
# # loop through each subfield
#       for my $i (0..$#subf) {
#               next if ($tagslib->{$field->tag()}->{$subf[$i][0]}->{tab}  ne 
10);
#               $witness{$subf[$i][0]} = 
$tagslib->{$field->tag()}->{$subf[$i][0]}->{lib};
#               $this_row{$subf[$i][0]} =$subf[$i][1];
#       }
#       if (%this_row) {
#               push(@big_array, \%this_row);
#       }
# }
# #fill big_row with missing datas
# foreach my $subfield_code  (keys(%witness)) {
#       for (my $i=0;$i<=$#big_array;$i++) {
#               $big_array[$i]{$subfield_code}="&nbsp;" unless 
($big_array[$i]{$subfield_code});
#       }
# }
# # now, construct template !
# my @item_value_loop;
# my @header_value_loop;
# for (my $i=0;$i<=$#big_array; $i++) {
#       my $items_data;
#       foreach my $subfield_code (keys(%witness)) {
#               $items_data .="<td>".$big_array[$i]{$subfield_code}."</td>";
#       }
#       my %row_data;
#       $row_data{item_value} = $items_data;
#       push(@item_value_loop,\%row_data);
# }
# foreach my $subfield_code (keys(%witness)) {
#       my %header_value;
#       $header_value{header_value} = $witness{$subfield_code};
#       push(@header_value_loop, \%header_value);
# }

my $authtypes = getauthtypes;
my @authtypesloop;
foreach my $thisauthtype (keys %$authtypes) {
        my $selected = 1 if $thisauthtype eq $authtypecode;
        my %row =(value => $thisauthtype,
                                selected => $selected,
                                authtypetext => 
$authtypes->{$thisauthtype}{'authtypetext'},
                        );
        push @authtypesloop, \%row;
}

$template->param(authid => $authid,
                                authtypesloop => address@hidden);
output_html_with_http_headers $query, $cookie, $template->output;


Index: authorities-home.pl
===================================================================
RCS file: /cvsroot/koha/koha/authorities/authorities-home.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** authorities-home.pl 7 Jun 2004 07:36:46 -0000       1.1
--- authorities-home.pl 10 Jun 2004 08:28:40 -0000      1.2
***************
*** 34,94 ****
  use C4::Koha; # XXX subfield_is_koha_internal_p
  
- # Creates the list of active tags using the active MARC configuration
- sub create_marclist {
-       my $dbh = C4::Context->dbh;
-       my $tagslib = AUTHgettagslib($dbh,1);
-       my @marcarray;
-       push @marcarray,"";
-       my $widest_menu_item_width = 0;
-       for (my $pass = 1; $pass <= 2; $pass += 1)
-       {
-               for (my $tabloop = 0; $tabloop<=9;$tabloop++)
-               {
-                       my $separator_inserted_p = 0; # FIXME... should not 
use!!
-                       foreach my $tag (sort(keys (%{$tagslib})))
-                       {
-                               foreach my $subfield (sort(keys 
%{$tagslib->{$tag}}))
-                               {
-                                       next if 
subfield_is_koha_internal_p($subfield);
-                                       next unless 
($tagslib->{$tag}->{$subfield}->{tab} eq $tabloop);
-                                       my $menu_item = "$tag$subfield - 
$tagslib->{$tag}->{$subfield}->{lib}";
-                                       if ($pass == 1)
-                                       {
-                                               $widest_menu_item_width = 
length $menu_item if($widest_menu_item_width < length $menu_item);
-                                       } else {
-                                               if (!$separator_inserted_p)
-                                               {
-                                                       my $w = 
int(($widest_menu_item_width - 3 + 0.5)/2);
-                                                       my $s = ('-' x ($w * 
4/5));
-                                                       push @marcarray,  "$s 
$tabloop $s";
-                                                       $separator_inserted_p = 
1;
-                                               }
-                                       push @marcarray, $menu_item;
-                                       }
-                               }
-                       }
-               }
-       }
-       return address@hidden;
- }
- 
- # Creates a scrolling list with the associated default value.
- # Using more than one scrolling list in a CGI assigns the same default value 
to all the
- # scrolling lists on the page !?!? That's why this function was written.
- sub create_scrolling_list {
-       my ($params) = @_;
-       my $scrollist = sprintf("<select name=\"%s\" size=\"%d\" 
onChange='%s'>\n", $params->{'name'}, $params->{'size'}, $params->{'onChange'});
- 
-       foreach my $tag (@{$params->{'values'}})
-       {
-               my $selected = "selected " if($params->{'default'} eq $tag);
-               $scrollist .= sprintf("<option %svalue=\"%s\">%s</option>\n", 
$selected, $tag, $tag);
-       }
- 
-       $scrollist .= "</select>\n";
- 
-       return $scrollist;
- }
- 
  my $query=new CGI;
  my $op = $query->param('op');
--- 34,37 ----
***************
*** 109,113 ****
                                authtypetext => 
$authtypes->{$thisauthtype}{'authtypetext'},
                        );
-       warn "X = $authtypes->{$thisauthtype}{'authtypetext'}";
        push @authtypesloop, \%row;
  }
--- 52,55 ----
***************
*** 122,149 ****
        $resultsperpage= $query->param('resultsperpage');
        $resultsperpage = 19 if(!defined $resultsperpage);
-       my $orderby = $query->param('orderby');
- 
-       # builds tag and subfield arrays
        my @tags;
  
!       foreach my $marc (@marclist) {
!               if ($marc) {
!                       my ($tag,$subfield) = 
MARCfind_marc_from_kohafield($dbh,$marc);
!                       if ($tag) {
!                               push @tags,$dbh->quote("$tag$subfield");
!                       } else {
!                               push @tags, $dbh->quote(substr($marc,0,4));
!                       }
!               } else {
!                       push @tags, "";
!               }
!       }
!       findseealso($dbh,address@hidden);
!       my ($results,$total) = catalogsearch($dbh, 
address@hidden,address@hidden,
                                                                                
address@hidden, address@hidden, address@hidden,
!                                                                               
$startfrom*$resultsperpage, $resultsperpage,$orderby);
! 
        ($template, $loggedinuser, $cookie)
!               = get_template_and_user({template_name => 
"authorities/authorities-home.tmpl",
                                query => $query,
                                type => 'intranet',
--- 64,75 ----
        $resultsperpage= $query->param('resultsperpage');
        $resultsperpage = 19 if(!defined $resultsperpage);
        my @tags;
  
!       my ($results,$total) = authoritysearch($dbh, 
address@hidden,address@hidden,
                                                                                
address@hidden, address@hidden, address@hidden,
!                                                                               
$startfrom*$resultsperpage, $resultsperpage,$authtypecode);
!       warn "R : $results";
        ($template, $loggedinuser, $cookie)
!               = get_template_and_user({template_name => 
"authorities/searchresultlist.tmpl",
                                query => $query,
                                type => 'intranet',
***************
*** 200,204 ****
                $to = (($startfrom+1)*$resultsperpage);
        }
!       $template->param(result => $results,
                                                        startfrom=> $startfrom,
                                                        displaynext=> 
$displaynext,
--- 126,131 ----
                $to = (($startfrom+1)*$resultsperpage);
        }
!       $template->param(result => $results) if $results;
!       $template->param(
                                                        startfrom=> $startfrom,
                                                        displaynext=> 
$displaynext,
***************
*** 297,358 ****
                                debug => 1,
                                });
-       #$template->param(loggedinuser => $loggedinuser);
- 
-       my $marcarray = create_marclist();
- 
-       my $marclist = CGI::scrolling_list(-name=>"marclist",
-                                       -values=> $marcarray,
-                                       -size=>1,
-                                       -multiple=>0,
-                                       -onChange => "sql_update()",
-                                       );
- 
-       my @statements = ();
- 
-       # Considering initial search with 3 criterias
-       push @statements, { "marclist" => $marclist, "first" => 1 };
-       push @statements, { "marclist" => $marclist, "first" => 0 };
-       push @statements, { "marclist" => $marclist, "first" => 0 };
-       my $sth=$dbh->prepare("Select itemtype,description from itemtypes order 
by description");
-       $sth->execute;
-       my  @itemtype;
-       my %itemtypes;
-       push @itemtype, "";
-       $itemtypes{''} = "";
-       while (my ($value,$lib) = $sth->fetchrow_array) {
-               push @itemtype, $value;
-               $itemtypes{$value}=$lib;
-       }
- 
-       my $CGIitemtype=CGI::scrolling_list( -name     => 'value',
-                               -values   => address@hidden,
-                               -labels   => \%itemtypes,
-                               -size     => 1,
-                               -multiple => 0 );
-       $sth->finish;
- 
-       my @branches;
-       my @select_branch;
-       my %select_branches;
-       my ($count2,@branches)=branches();
-       push @select_branch, "";
-       $select_branches{''} = "";
-       for (my $i=0;$i<$count2;$i++){
-               push @select_branch, $branches[$i]->{'branchcode'};#
-               $select_branches{$branches[$i]->{'branchcode'}} = 
$branches[$i]->{'branchname'};
-       }
-       my $CGIbranch=CGI::scrolling_list( -name     => 'value',
-                               -values   => address@hidden,
-                               -labels   => \%select_branches,
-                               -size     => 1,
-                               -multiple => 0 );
-       $sth->finish;
- 
  
-       $template->param("statements" => address@hidden,
-                       "nbstatements" => 3,
-                       CGIitemtype => $CGIitemtype,
-                       CGIbranch => $CGIbranch,
-                       );
  }
  
--- 224,228 ----

Index: authorities.pl
===================================================================
RCS file: /cvsroot/koha/koha/authorities/authorities.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** authorities.pl      7 Jun 2004 07:36:46 -0000       1.1
--- authorities.pl      10 Jun 2004 08:28:40 -0000      1.2
***************
*** 173,176 ****
--- 173,177 ----
        foreach my $tag (sort(keys (%{$tagslib}))) {
                my $indicator;
+ #             warn "TAG : $tag => ".$tagslib->{$tag}->{lib}."//";
  # if MARC::Record is not empty => use it as master loop, then add missing 
subfields that should be in the tab.
  # if MARC::Record is empty => use tab as master loop.
***************
*** 286,292 ****
--- 287,295 ----
  my $z3950 = $input->param('z3950');
  my $op = $input->param('op');
+ # warn "OP : $op";
  my $authtypecode = $input->param('authtypecode');
  my $dbh = C4::Context->dbh;
  $authtypecode = &AUTHfind_authtypecode($dbh,$authid) if $authid;
+ # warn "authtypecode : $authtypecode && authid = $authid";
  my ($template, $loggedinuser, $cookie)
      = get_template_and_user({template_name => "authorities/authorities.tmpl",
***************
*** 301,309 ****
  my $record=-1;
  my $encoding="";
! $record = AUTHgetauth($dbh,$authid) if ($authid);
  
  $is_a_modif=0;
! my ($oldbiblionumtagfield,$oldbiblionumtagsubfield);
! my 
($oldbiblioitemnumtagfield,$oldbiblioitemnumtagsubfield,$bibitem,$oldbiblioitemnumber);
  if ($authid) {
        $is_a_modif=1;
--- 304,312 ----
  my $record=-1;
  my $encoding="";
! $record = AUTHgetauthority($dbh,$authid) if ($authid);
  
  $is_a_modif=0;
! # my ($oldbiblionumtagfield,$oldbiblionumtagsubfield);
! # my 
($oldbiblioitemnumtagfield,$oldbiblioitemnumtagsubfield,$bibitem,$oldbiblioitemnumber);
  if ($authid) {
        $is_a_modif=1;
***************
*** 332,335 ****
--- 335,339 ----
        my $record = 
AUTHhtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
  # MARC::Record built => now, record in DB
+       warn "IN ADD : ".$record->as_formatted();
        if ($is_a_modif) {
                 AUTHmodauthority($dbh,$record,$authid,$authtypecode);
***************
*** 385,413 ****
        build_hidden_data;
        $template->param(
!               authid                       => $authid,
!               oldbiblionumtagfield        => $oldbiblionumtagfield,
!               oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
!               oldbiblioitemnumtagfield    => $oldbiblioitemnumtagfield,
!               oldbiblioitemnumtagsubfield => $oldbiblioitemnumtagsubfield,
!               oldbiblioitemnumber         => $oldbiblioitemnumber );
  } elsif ($op eq "delete") {
  
#------------------------------------------------------------------------------------------------------------------------------
        &AUTHdelauthority($dbh,$authid);
  }
! 
#------------------------------------------------------------------------------------------------------------------------------
! 
#------------------------------------------------------------------------------------------------------------------------------
! # MAIN
! 
#------------------------------------------------------------------------------------------------------------------------------
  build_tabs ($template, $record, $dbh,$encoding);
  build_hidden_data;
  $template->param(
        authid                       => $authid,
!       oldbiblionumtagfield        => $oldbiblionumtagfield,
!       oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
!       oldbiblioitemnumtagfield    => $oldbiblioitemnumtagfield,
!       oldbiblioitemnumtagsubfield => $oldbiblioitemnumtagsubfield,
!       oldbiblioitemnumber         => $oldbiblioitemnumber );
! $template->param(
!               authtypecode => $authtypecode,
!               );
  output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
--- 389,427 ----
        build_hidden_data;
        $template->param(
!               authid                       => $authid,);
! #             oldbiblionumtagfield        => $oldbiblionumtagfield,
! #             oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
! #             oldbiblioitemnumtagfield    => $oldbiblioitemnumtagfield,
! #             oldbiblioitemnumtagsubfield => $oldbiblioitemnumtagsubfield,
! #             oldbiblioitemnumber         => $oldbiblioitemnumber );
  } elsif ($op eq "delete") {
  
#------------------------------------------------------------------------------------------------------------------------------
        &AUTHdelauthority($dbh,$authid);
  }
! 
  build_tabs ($template, $record, $dbh,$encoding);
  build_hidden_data;
  $template->param(
        authid                       => $authid,
! #     oldbiblionumtagfield        => $oldbiblionumtagfield,
! #     oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
! #     oldbiblioitemnumtagfield    => $oldbiblioitemnumtagfield,
! # #   oldbiblioitemnumtagsubfield => $oldbiblioitemnumtagsubfield,
! #     oldbiblioitemnumber         => $oldbiblioitemnumber,
!       authtypecode => $authtypecode,
!       );
! 
!       my $authtypes = getauthtypes;
! my @authtypesloop;
! foreach my $thisauthtype (keys %$authtypes) {
!       my $selected = 1 if $thisauthtype eq $authtypecode;
!       my %row =(value => $thisauthtype,
!                               selected => $selected,
!                               authtypetext => 
$authtypes->{$thisauthtype}{'authtypetext'},
!                       );
!       warn "X = $authtypes->{$thisauthtype}{'authtypetext'}";
!       push @authtypesloop, \%row;
! }
! 
! $template->param(authtypesloop => address@hidden);
  output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]