[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/acqui.simple addbiblio.pl [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/acqui.simple addbiblio.pl [rel_2_2] |
Date: |
Tue, 25 Jul 2006 16:22:13 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <tipaul> 06/07/25 16:22:13
Modified files:
acqui.simple : addbiblio.pl
Log message:
reverting kados changes
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/acqui.simple/addbiblio.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.52.2.49&r2=1.52.2.50
Patches:
Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/Attic/addbiblio.pl,v
retrieving revision 1.52.2.49
retrieving revision 1.52.2.50
diff -u -b -r1.52.2.49 -r1.52.2.50
--- addbiblio.pl 25 Jul 2006 12:40:19 -0000 1.52.2.49
+++ addbiblio.pl 25 Jul 2006 16:22:13 -0000 1.52.2.50
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: addbiblio.pl,v 1.52.2.49 2006/07/25 12:40:19 tipaul Exp $
+# $Id: addbiblio.pl,v 1.52.2.50 2006/07/25 16:22:13 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -26,7 +26,6 @@
use C4::Interface::CGI::Output;
use C4::Biblio;
use C4::SearchMarc; # also includes Biblio.pm, SearchMarc is used to
FindDuplicate
-use C4::Search;
use C4::Context;
use C4::Koha; # XXX subfield_is_koha_internal_p
#use Smart::Comments;
@@ -226,7 +225,7 @@
$subfield_data{marc_value}= build_authorized_values_list($tag,
$subfield, $value, $dbh,$authorised_values_sth);
# it's a thesaurus / authority field
} elsif ($tagslib->{$tag}->{$subfield}->{authtypecode}) {
- $subfield_data{marc_value}="<input
onblur=\"this.style.backgroundColor='#ffffff';\"
onfocus=\"this.style.backgroundColor='#ffff00;'\"\" tabindex=\"1\"
type=\"text\" name=\"field_value\" value=\"$value\" size=\"70\"
maxlength=\"255\" DISABLE READONLY> <a style=\"cursor: help;\"
href=\"javascript:openAuth('tag$tag','$tagslib->{$tag}->{$subfield}->{authtypecode}','subfield$tag$i')\">...</a>";
+ $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"67\" maxlength=\"255\" DISABLE
READONLY> <a
href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$i',$i)\">...</a>";
# it's a plugin field
} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
# opening plugin. Just check wether we are on a developper
computer on a production one
@@ -266,6 +265,10 @@
from authorised_values
where category=? order by lib");
+ # in this array, we will push all the 10 tabs
+ # to avoid having 10 tabs in the template : they will all be in the same
BIG_LOOP
+ my @BIG_LOOP;
+
# loop through each tab 0 through 9
for (my $tabloop = 0; $tabloop <= 9; $tabloop++) {
my @loop_data = ();
@@ -370,8 +373,17 @@
}
}
}
- $template->param($tabloop."XX" =>address@hidden);
- }
+ if ($#loop_data >=0) {
+ my %big_loop_line;
+ $big_loop_line{number}=$tabloop;
+ address@hidden;
+ push @BIG_LOOP,\%big_loop_line;
+ }
+# $template->param($tabloop."XX" =>address@hidden);
+ }
+# use Data::Dumper;
+# warn "DUMP : ".Dumper(@BIG_LOOP);
+ $template->param(BIG_LOOP => address@hidden);
}
@@ -488,11 +500,7 @@
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
if (C4::Context->preference('TemplateEncoding') eq "iso-8859-1") {
- my %indicators;
- for (my $i=0;$i<=$#ind_tag;$i++) {
- $indicators{$ind_tag[$i]} = $indicator[$i];
- }
- $record =
MARChtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
+ $record =
MARChtml2marc($dbh,address@hidden,address@hidden,address@hidden,address@hidden,address@hidden);
} else {
my $xml =
MARChtml2xml(address@hidden,address@hidden,address@hidden,address@hidden,address@hidden);
$record=MARC::Record->new_from_xml($xml,C4::Context->preference('TemplateEncoding'),C4::Context->preference('marcflavour'));
@@ -545,7 +553,7 @@
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
my $xml =
MARChtml2xml(address@hidden,address@hidden,address@hidden,address@hidden,address@hidden);
- my $record=MARC::Record->new_from_xml($xml, 'UTF-8');
#C4::Context->preference('TemplateEncoding'),C4::Context->preference('marcflavour'));
+ my $record=MARC::Record->new_from_xml($xml,
C4::Context->preference('TemplateEncoding'),C4::Context->preference('marcflavour'));
# adding an empty field
my $field =
MARC::Field->new("$addedfield",'','','$tagaddfield_subfield' => "");
$record->append_fields($field);