[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.28,1.29
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.28,1.29 |
Date: |
Fri, 20 Jun 2003 07:32:10 -0700 |
Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1:/tmp/cvs-serv30438/acqui.simple
Modified Files:
addbiblio.pl
Log Message:
repetable field support.
The 3 problem from yesterday are fixed :
* cc the + to each tab (for instance, only in tab 0)
* doing the french template
* fixing an annoying bug : everything is stored in the same field :
200$a$b$c$a$b$c and not
200$a$b$c
200$a$b$c
as expected.
100% FUNCTIONNAL (at least I expect !)
IMPORTANT NOTE :
ALL subfields from a field MUST be in the same tab. Otherwise, Koha can't
magically find how to group subfields in case of repeted fields.
I'll add a check in checkmarc immediatly.
That's not a "bug" in Koha. That's mandatory because of MARC structure.
Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbiblio.pl,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** addbiblio.pl 19 Jun 2003 16:38:50 -0000 1.28
--- addbiblio.pl 20 Jun 2003 14:32:08 -0000 1.29
***************
*** 180,183 ****
--- 180,185 ----
my ($function_name,$javascript) =
plugin_javascript($dbh,$rec,$tagslib,$i,$tabloop);
$subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" DISABLE READONLY size=47 maxlength=255
OnFocus=\"javascript:Focus$function_name($i)\"
OnBlur=\"javascript:Blur$function_name($i)\"> <a
href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
+ } elsif ($tag eq '') {
+ $subfield_data{marc_value}="<input type=\"hidden\"
name=\"field_value\" size=50 maxlength=255>"; #"
} else {
$subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=50 maxlength=255>"; #"
***************
*** 201,205 ****
my @loop_data = ();
foreach my $tag (sort(keys (%{$tagslib}))) {
- my $previous_tag = '';
my $indicator;
# if MARC::Record is not empty => use it as master loop, then add
missing subfields that should be in the tab.
--- 203,206 ----
***************
*** 240,243 ****
--- 241,256 ----
$tag_data{subfield_loop} =
address@hidden;
push (@loop_data, \%tag_data);
+ }
+ # If there is more than 1 field, add an empty hidden field as separator.
+ if ($#fields >=1) {
+ my @subfields_data;
+ my %tag_data;
+ push(@subfields_data,
&create_input('','','',$i,$tabloop,$record,$authorised_values_sth));
+ $tag_data{tag} = '';
+ $tag_data{tag_lib} = '';
+ $tag_data{indicator} = '';
+ $tag_data{subfield_loop} =
address@hidden;
+ push (@loop_data, \%tag_data);
+ $i++;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.28,1.29,
Paul POULAIN <=