[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui.simple additem-nomarc.pl,1.6,1.7
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/acqui.simple additem-nomarc.pl,1.6,1.7 |
Date: |
Fri, 02 Sep 2005 07:46:42 -0700 |
Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv589/acqui.simple
Modified Files:
additem-nomarc.pl
Log Message:
* road to zebra for MARC=OFF
* removing Acquisitions/branches.pm call, as it's now in Koha.pm
Index: additem-nomarc.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/additem-nomarc.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** additem-nomarc.pl 4 Aug 2005 12:12:13 -0000 1.6
--- additem-nomarc.pl 2 Sep 2005 14:46:40 -0000 1.7
***************
*** 21,24 ****
--- 21,28 ----
# $Log$
+ # Revision 1.7 2005/09/02 14:46:40 tipaul
+ # * road to zebra for MARC=OFF
+ # * removing Acquisitions/branches.pm call, as it's now in Koha.pm
+ #
# Revision 1.6 2005/08/04 12:12:13 tipaul
# synch'ing 2.2 and head
***************
*** 40,45 ****
use CGI;
use strict;
- use C4::Acquisition;
use C4::Biblio;
use C4::Output;
use HTML::Template;
--- 44,49 ----
use CGI;
use strict;
use C4::Biblio;
+ use C4::Koha;
use C4::Output;
use HTML::Template;
***************
*** 57,143 ****
my @biblioitems;
my $branchcount;
! my @branches;
! my %branchnames;
my $itemcount;
my @items;
- my $itemtypecount;
- my @itemtypes;
- my %itemtypedescriptions;
if ( !$biblionumber ) {
! print $input->redirect('addbooks.pl');
}
else {
! ( $bibliocount, @biblios ) = &getbiblio($biblionumber);
!
! if ( !$bibliocount ) {
! print $input->redirect('addbooks.pl');
! }
! else {
!
! ( $biblioitemcount, @biblioitems ) =
! &getbiblioitembybiblionumber($biblionumber);
! ( $branchcount, @branches ) = &branches;
! ( $itemtypecount, @itemtypes ) = &getitemtypes;
!
! for ( my $i = 0 ; $i < $itemtypecount ; $i++ ) {
! $itemtypedescriptions{ $itemtypes[$i]->{'itemtype'} } =
! $itemtypes[$i]->{'description'};
! } # for
!
! for ( my $i = 0 ; $i < $branchcount ; $i++ ) {
! $branchnames{ $branches[$i]->{'branchcode'} } =
! $branches[$i]->{'branchname'};
! } # for
!
! # print $input->header;
! # print startpage();
! # print startmenu('acquisitions');
! my $input = new CGI;
! my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
! {
! template_name => "acqui.simple/additem-nomarc.tmpl",
! query => $input,
! type => "intranet",
! authnotrequired => 0,
! flagsrequired => { editcatalogue => 1 },
! debug => 1,
! }
! );
!
! if ( $error eq "nobarcode" ) {
! $template->param( NOBARCODE => 1 );
! }
! elsif ( $error eq "nobiblioitem" ) {
! $template->param( NOBIBLIOITEM => 1 );
! }
! elsif ( $error eq "barcodeinuse" ) {
! $template->param( BARCODEINUSE => 1 );
! } # elsif
!
! for ( my $i = 0 ; $i < $biblioitemcount ; $i++ ) {
! if ( $biblioitems[$i]->{'itemtype'} eq "WEB" ) {
! $biblioitems[$i]->{'WEB'} = 1;
!
! }
! $biblioitems[$i]->{'dewey'} =~ /(\d*\.\d\d)/;
! $biblioitems[$i]->{'dewey'} = $1;
! ( $itemcount, @items ) =
! &getitemsbybiblioitem( $biblioitems[$i]->{'biblioitemnumber'} );
! $biblioitems[$i]->{'items'} = address@hidden;
! } # for
! $template->param(
! BIBNUM => $biblionumber,
! AUTHOR => $biblios[0]->{'author'},
! TITLE => $biblios[0]->{'title'},
! COPYRIGHT => $biblios[0]->{'copyrightdate'},
! SERIES => $biblios[0]->{'seriestitle'},
! NOTES => $biblios[0]->{'notes'},
! BIBITEMS => address@hidden,
! BRANCHES => address@hidden,
! ITEMTYPES => address@hidden,
!
! );
output_html_with_http_headers $input, $cookie, $template->output;
--- 61,138 ----
my @biblioitems;
my $branchcount;
! # my @branches;
! # my %branchnames;
my $itemcount;
my @items;
if ( !$biblionumber ) {
! print $input->redirect('addbooks.pl');
}
else {
+ my $input = new CGI;
+ my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+ {
+ template_name => "acqui.simple/additem-nomarc.tmpl",
+ query => $input,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { editcatalogue => 1 },
+ debug => 1,
+ }
+ );
+ ( $bibliocount, @biblios ) = &getbiblio($biblionumber);
+
+ if ( !$bibliocount ) {
+ print $input->redirect('addbooks.pl');
+ }
+ else {
+ ( $biblioitemcount, @biblioitems ) =
&getbiblioitembybiblionumber($biblionumber);
+ my $branches = getbranches;
+ my @branchloop;
+ foreach my $thisbranch (sort keys %$branches) {
+ my %row =(value => $thisbranch,
+ branchname =>
$branches->{$thisbranch}->{'branchname'},
+ );
+ push @branchloop, \%row;
+ }
+ my $itemtypes = &getitemtypes;
+ my @itemtypeloop;
+ foreach my $thisitemtype (sort keys %$itemtypes) {
+ my %row =(value => $thisitemtype,
+ description =>
$itemtypes->{$thisitemtype}->{'description'},
+ );
+ push @itemtypeloop, \%row;
+ }
+ if ( $error eq "nobarcode" ) {
+ $template->param( NOBARCODE => 1 );
+ }
+ elsif ( $error eq "nobiblioitem" ) {
+ $template->param( NOBIBLIOITEM => 1 );
+ }
+ elsif ( $error eq "barcodeinuse" ) {
+ $template->param( BARCODEINUSE => 1 );
+ } # elsif
+
+ for ( my $i = 0 ; $i < $biblioitemcount ; $i++ ) {
+ if ( $biblioitems[$i]->{'itemtype'} eq "WEB" ) {
+ $biblioitems[$i]->{'WEB'} = 1;
+ }
+ $biblioitems[$i]->{'dewey'} =~ /(\d*\.\d\d)/;
+ $biblioitems[$i]->{'dewey'} = $1;
+ ( $itemcount, @items ) = &getitemsbybiblioitem(
$biblioitems[$i]->{'biblioitemnumber'} );
+ $biblioitems[$i]->{'items'} = address@hidden;
+ } # for
+ $template->param(
+ BIBNUM => $biblionumber,
+ AUTHOR => $biblios[0]->{'author'},
+ TITLE => $biblios[0]->{'title'},
+ COPYRIGHT => $biblios[0]->{'copyrightdate'},
+ SERIES => $biblios[0]->{'seriestitle'},
+ NOTES => $biblios[0]->{'notes'},
+ BIBITEMS => address@hidden,
+ branchloop => address@hidden,
+ itemtypeloop => address@hidden,
! );
output_html_with_http_headers $input, $cookie, $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui.simple additem-nomarc.pl,1.6,1.7,
Paul POULAIN <=