[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.37,1.38 addbooks.pl,1.2
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.37,1.38 addbooks.pl,1.20,1.21 additem.pl,1.24,1.25 |
Date: |
Thu, 03 Jun 2004 02:59:39 -0700 |
Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24076/acqui.simple
Modified Files:
addbiblio.pl addbooks.pl additem.pl
Log Message:
* frameworks and itemtypes are independant
* in the MARC editor, showing the + to duplicate a tag only if the tag is
repeatable
Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbiblio.pl,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** addbiblio.pl 28 May 2004 08:22:10 -0000 1.37
--- addbiblio.pl 3 Jun 2004 09:59:36 -0000 1.38
***************
*** 166,170 ****
$subfield_data{tag}=$tag;
$subfield_data{subfield}=$subfield;
! $subfield_data{marc_lib}="<DIV
id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</div>";
$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
--- 166,170 ----
$subfield_data{tag}=$tag;
$subfield_data{subfield}=$subfield;
! $subfield_data{marc_lib}="<span
id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
***************
*** 241,244 ****
--- 241,245 ----
$tag_data{tag} = $tag;
$tag_data{tag_lib} =
$tagslib->{$tag}->{lib};
+ $tag_data{repeatable} =
$tagslib->{$tag}->{repeatable};
$tag_data{indicator} =
$record->field($tag)->indicator(1). $record->field($tag)->indicator(2) if
($tag>=10);
$tag_data{subfield_loop} =
address@hidden;
***************
*** 296,299 ****
--- 297,301 ----
next if ($subfield eq 'tab');
next if ($subfield eq 'mandatory');
+ next if ($subfield eq 'repeatable');
next if ($tagslib->{$tag}->{$subfield}->{'tab'} ne "-1");
my %subfield_data;
***************
*** 308,311 ****
--- 310,317 ----
}
+
+ # ========================
+ # MAIN
+ #=========================
my $input = new CGI;
my $error = $input->param('error');
***************
*** 314,327 ****
my $z3950 = $input->param('z3950');
my $op = $input->param('op');
! $itemtype = $input->param('itemtype');
my $dbh = C4::Context->dbh;
my $bibid;
if ($oldbiblionumber) {
$bibid =
&MARCfind_MARCbibid_from_oldbiblionumber($dbh,$oldbiblionumber);
! # find itemtype
! $itemtype = &MARCfind_itemtype($dbh,$bibid) if $bibid;
}else {
$bibid = $input->param('bibid');
! $itemtype = &MARCfind_itemtype($dbh,$bibid) if $bibid;
}
my ($template, $loggedinuser, $cookie)
--- 320,333 ----
my $z3950 = $input->param('z3950');
my $op = $input->param('op');
! my $frameworkcode = $input->param('frameworkcode');
my $dbh = C4::Context->dbh;
my $bibid;
if ($oldbiblionumber) {
$bibid =
&MARCfind_MARCbibid_from_oldbiblionumber($dbh,$oldbiblionumber);
! # find framework type
! $frameworkcode = &MARCfind_frameworkcode($dbh,$bibid) if $bibid;
}else {
$bibid = $input->param('bibid');
! $frameworkcode = &MARCfind_frameworkcode($dbh,$bibid) if $bibid;
}
my ($template, $loggedinuser, $cookie)
***************
*** 334,338 ****
});
! $tagslib = &MARCgettagslib($dbh,1,$itemtype);
my $record=-1;
my $encoding="";
--- 340,344 ----
});
! $tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
my $record=-1;
my $encoding="";
***************
*** 373,383 ****
my $oldbibitemnum;
if ($is_a_modif) {
! NEWmodbiblio($dbh,$record,$bibid);
} else {
! ($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$record);
}
# now, redirect to additem page
! print $input->redirect("additem.pl?bibid=$bibid&itemtype=$itemtype");
! warn "redirect : $itemtype";
exit;
#------------------------------------------------------------------------------------------------------------------------------
--- 379,388 ----
my $oldbibitemnum;
if ($is_a_modif) {
! NEWmodbiblio($dbh,$record,$bibid,$frameworkcode);
} else {
! ($bibid,$oldbibnum,$oldbibitemnum) =
NEWnewbiblio($dbh,$record,$frameworkcode);
}
# now, redirect to additem page
! print
$input->redirect("additem.pl?bibid=$bibid&frameworkcode=$frameworkcode");
exit;
#------------------------------------------------------------------------------------------------------------------------------
***************
*** 457,461 ****
}
$template->param(
! itemtype => $itemtype
);
output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
--- 462,467 ----
}
$template->param(
! frameworkcode => $frameworkcode,
! itemtype => $frameworkcode # HINT: if the library has itemtype
= framework, itemtype is auto filled !
);
output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
Index: addbooks.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbooks.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** addbooks.pl 18 May 2004 15:22:10 -0000 1.20
--- addbooks.pl 3 Jun 2004 09:59:37 -0000 1.21
***************
*** 58,74 ****
);
! # get itemtype list
! my $itemtypes = getitemtypes;
! my @itemtypesloop;
! foreach my $thisitemtype (keys %$itemtypes) {
! my %row =(value => $thisitemtype,
! description =>
$itemtypes->{$thisitemtype}->{'description'},
);
! push @itemtypesloop, \%row;
}
my $marc_p = C4::Context->boolean_preference("marc");
$template->param( NOTMARC => !$marc_p,
! itemtypeloop => address@hidden );
output_html_with_http_headers $query, $cookie, $template->output;
--- 58,74 ----
);
! # get framework list
! my $frameworks = getframeworks;
! my @frameworkcodeloop;
! foreach my $thisframeworkcode (keys %$frameworks) {
! my %row =(value => $thisframeworkcode,
! frameworktext =>
$frameworks->{$thisframeworkcode}->{'frameworktext'},
);
! push @frameworkcodeloop, \%row;
}
my $marc_p = C4::Context->boolean_preference("marc");
$template->param( NOTMARC => !$marc_p,
! frameworkcodeloop => address@hidden );
output_html_with_http_headers $query, $cookie, $template->output;
Index: additem.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/additem.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** additem.pl 18 May 2004 15:22:10 -0000 1.24
--- additem.pl 3 Jun 2004 09:59:37 -0000 1.25
***************
*** 57,61 ****
# find itemtype
! my $itemtype = &MARCfind_itemtype($dbh,$bibid);
my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
--- 57,61 ----
# find itemtype
! my $itemtype = &MARCfind_frameworkcode($dbh,$bibid);
my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.37,1.38 addbooks.pl,1.20,1.21 additem.pl,1.24,1.25,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha/z3950/server zed-koha-server.pl,1.3,1.4
- Next by Date:
[Koha-cvs] CVS: koha/admin biblio_framework.pl,NONE,1.1 auth_subfields_structure.pl,1.1,1.2 authtypes.pl,1.1,1.2 marc_subfields_structure.pl,1.22,1.23 marctagstructure.pl,1.21,1.22
- Previous by thread:
[Koha-cvs] CVS: koha/z3950/server zed-koha-server.pl,1.3,1.4
- Next by thread:
[Koha-cvs] CVS: koha/admin biblio_framework.pl,NONE,1.1 auth_subfields_structure.pl,1.1,1.2 authtypes.pl,1.1,1.2 marc_subfields_structure.pl,1.22,1.23 marctagstructure.pl,1.21,1.22
- Index(es):