[Koha-cvs] CVS: koha detail.pl,1.19,1.20 jmemberentry.pl,1.7,1.8 loadmodules.pl,1.13,1.14 MARCdetail.pl,1.11,1.12 modbib.pl,1.10,1.11 request.pl,1.20,1.21 updatebiblio.pl,1.7,1.8

Paul POULAIN tipaul at users.sourceforge.net
Mon Mar 10 16:17:02 CET 2003


Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv15575

Modified Files:
	detail.pl jmemberentry.pl loadmodules.pl MARCdetail.pl 
	modbib.pl request.pl updatebiblio.pl 
Log Message:
* graphic bugfixes
* minor improvement

Index: detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/detail.pl,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** detail.pl	9 Feb 2003 09:15:09 -0000	1.19
--- detail.pl	10 Mar 2003 15:16:54 -0000	1.20
***************
*** 85,100 ****
  
  
- $template->param(startfrom => $startfrom+1);
- $template->param(endat => $startfrom+20);
- $template->param(numrecords => $count);
  my $nextstartfrom=($startfrom+20<$count-20) ? ($startfrom+20) : ($count-20);
  my $prevstartfrom=($startfrom-20>0) ? ($startfrom-20) : (0);
! $template->param(nextstartfrom => $nextstartfrom);
! $template->param(prevstartfrom => $prevstartfrom);
! $template->param(BIBLIO_RESULTS => $resultsarray);
! $template->param(ITEM_RESULTS => $itemsarray);
! $template->param(WEB_RESULTS => $webarray);
! $template->param(SITE_RESULTS => $sitearray);
! $template->param(loggedinuser => $loggedinuser);
  output_html_with_http_headers $query, $cookie, $template->output;
  
--- 85,102 ----
  
  
  my $nextstartfrom=($startfrom+20<$count-20) ? ($startfrom+20) : ($count-20);
  my $prevstartfrom=($startfrom-20>0) ? ($startfrom-20) : (0);
! $template->param(startfrom => $startfrom+1,
! 						endat => $startfrom+20,
! 						numrecords => $count,
! 						nextstartfrom => $nextstartfrom,
! 						prevstartfrom => $prevstartfrom,
! 						BIBLIO_RESULTS => $resultsarray,
! 						ITEM_RESULTS => $itemsarray,
! 						WEB_RESULTS => $webarray,
! 						SITE_RESULTS => $sitearray,
! 						loggedinuser => $loggedinuser,
! 						biblionumber => $biblionumber);
! 
  output_html_with_http_headers $query, $cookie, $template->output;
  

Index: jmemberentry.pl
===================================================================
RCS file: /cvsroot/koha/koha/jmemberentry.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** jmemberentry.pl	2 Feb 2003 07:18:37 -0000	1.7
--- jmemberentry.pl	10 Mar 2003 15:16:55 -0000	1.8
***************
*** 28,31 ****
--- 28,32 ----
  use C4::Search;
  use HTML::Template;
+ use C4::Interface::CGI::Output;
  
  my $input = new CGI;

Index: loadmodules.pl
===================================================================
RCS file: /cvsroot/koha/koha/loadmodules.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** loadmodules.pl	4 Mar 2003 16:16:18 -0000	1.13
--- loadmodules.pl	10 Mar 2003 15:16:55 -0000	1.14
***************
*** 32,53 ****
  	if ($module eq 'acquisitions') { acquisitions(); last SWITCH; }
  	if ($module eq 'search') { catalogue_search(); last SWITCH; }
! 	if ($module eq 'cataloguing') {cataloguing(); last SWITCH; }
  	if ($module eq 'somethingelse') { somethingelse(); last SWITCH; }
  }
  
  sub acquisitions {
- 	my $aq_type = C4::Context->preference("acquisitions") || "normal";
- 		# Get the acquisition preference. This should be:
- 		#	"simple" - minimal information required
- 		#	"normal" - full information required
- 		#	other - Same as "normal"
- 
- 	if ($aq_type eq 'simple') {
- 		print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
- 	} elsif ($aq_type eq 'normal') {
- 		print $input ->redirect("/cgi-bin/koha/acqui/acqui-home.pl");
- 	} else {
  		print $input ->redirect("/cgi-bin/koha/acqui/acqui-home.pl");
- 	}
  }
  
--- 32,41 ----
  	if ($module eq 'acquisitions') { acquisitions(); last SWITCH; }
  	if ($module eq 'search') { catalogue_search(); last SWITCH; }
! 	if ($module eq 'MARC') {marc(); last SWITCH; }
  	if ($module eq 'somethingelse') { somethingelse(); last SWITCH; }
  }
  
  sub acquisitions {
  		print $input ->redirect("/cgi-bin/koha/acqui/acqui-home.pl");
  }
  
***************
*** 73,86 ****
  }
  
! sub cataloguing {
! 	my $marc_p = C4::Context->boolean_preference("marc");
! 	$marc_p = 1 unless defined $marc_p;
! 	my $query = new CGI;
! 	my $type = $query->param('type');
! 	if ($marc_p) {
! 		print $input->redirect("/cgi-bin/koha/cataloguing.marc/cataloguing-home.pl");
! 	} else {
! 		print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
! 	}
  }
  
--- 61,74 ----
  }
  
! sub marc {
! #	my $marc_p = C4::Context->boolean_preference("marc");
! #	$marc_p = 1 unless defined $marc_p;
! #	my $query = new CGI;
! #	my $type = $query->param('type');
! #	if ($marc_p) {
! #		print $input->redirect("/cgi-bin/koha/cataloguing.marc/cataloguing-home.pl");
! #	} else {
! 		print $input ->redirect("/cgi-bin/koha/acqui.simple/isbnsearch.pl");
! #	}
  }
  

Index: MARCdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/MARCdetail.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** MARCdetail.pl	13 Feb 2003 18:02:26 -0000	1.11
--- MARCdetail.pl	10 Mar 2003 15:16:55 -0000	1.12
***************
*** 167,171 ****
  						item_header_loop => \@header_value_loop,
  						biblionumber => $biblionumber,
! 						bibid => $bibid);
  output_html_with_http_headers $query, $cookie, $template->output;
  
--- 167,172 ----
  						item_header_loop => \@header_value_loop,
  						biblionumber => $biblionumber,
! 						bibid => $bibid,
! 						biblionumber => $biblionumber);
  output_html_with_http_headers $query, $cookie, $template->output;
  

Index: modbib.pl
===================================================================
RCS file: /cvsroot/koha/koha/modbib.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** modbib.pl	16 Dec 2002 00:26:18 -0000	1.10
--- modbib.pl	10 Mar 2003 15:16:55 -0000	1.11
***************
*** 32,35 ****
--- 32,38 ----
  use C4::Output;
  use HTML::Template;
+ use C4::Auth;
+ use C4::Context;
+ use C4::Interface::CGI::Output;
  
  my $input = new CGI;
***************
*** 37,43 ****
  my $bibnum=$input->param('bibnum');
  my $data=&bibdata($bibnum);
! my ($subjectcount, $subject)     = &subject($data->{'biblionumber'});
! my ($subtitlecount, $subtitle)   = &subtitle($data->{'biblionumber'});
! my ($addauthorcount, $addauthor) = &addauthor($data->{'biblionumber'});
  my $sub        = $subject->[0]->{'subject'};
  my $additional = $addauthor->[0]->{'author'};
--- 40,46 ----
  my $bibnum=$input->param('bibnum');
  my $data=&bibdata($bibnum);
! my ($subjectcount, $subject)     = &subject($bibnum);
! my ($subtitlecount, $subtitle)   = &subtitle($bibnum);
! my ($addauthorcount, $addauthor) = &addauthor($bibnum);
  my $sub        = $subject->[0]->{'subject'};
  my $additional = $addauthor->[0]->{'author'};
***************
*** 48,57 ****
  } # if
  
! #print $input->header;
! # my ($analytictitle)  = &analytic($biblionumber,'t');
! # my ($analyticauthor) = &analytic($biblionumber,'a');
! #print startpage();
! #print startmenu('catalogue');
! my $template = gettemplate("modbib.tmpl");
  
  # have to get all subtitles, subjects and additional authors
--- 51,62 ----
  } # if
  
! my ($template, $loggedinuser, $cookie)
!     = get_template_and_user({template_name => "modbib.tmpl",
! 			     query => $input,
! 			     type => "intranet",
! 			     authnotrequired => 0,
! 			     flagsrequired => {acquisition => 1},
! 			     debug => 1,
! 			     });
  
  # have to get all subtitles, subjects and additional authors
***************
*** 78,96 ****
  $data->{'title'} = &tidyhtml($data->{'title'});
  
! $template->param ( biblionumber => $data->{'biblionumber'});
! $template->param ( biblioitemnumber => $data->{'biblioitemnumber'});
! $template->param ( author => $data->{'author'});
! $template->param ( title => $data->{'title'});
! $template->param ( abstract => $data->{'abstract'});
! $template->param ( subject => $sub);
! $template->param ( copyrightdate => $data->{'copyrightdate'});
! $template->param ( seriestitle => $data->{'seriestitle'});
! $template->param ( additionalauthor => $additional);
! $template->param ( subtitle => $data->{'subtitle'});
! $template->param ( untitle => $data->{'untitle'});
! $template->param ( notes => $data->{'notes'});
! $template->param ( serial => $data->{'serial'});
  
! print "Content-Type: text/html\n\n", $template->output;
  
  sub tidyhtml {
--- 83,101 ----
  $data->{'title'} = &tidyhtml($data->{'title'});
  
! $template->param ( biblionumber => $bibnum,
! 						biblioitemnumber => $data->{'biblioitemnumber'},
! 						author => $data->{'author'},
! 						title => $data->{'title'},
! 						abstract => $data->{'abstract'},
! 						subject => $sub,
! 						copyrightdate => $data->{'copyrightdate'},
! 						seriestitle => $data->{'seriestitle'},
! 						additionalauthor => $additional,
! 						subtitle => $data->{'subtitle'},
! 						untitle => $data->{'untitle'},
! 						notes => $data->{'notes'},
! 						serial => $data->{'serial'});
  
! output_html_with_http_headers $input, $cookie, $template->output;
  
  sub tidyhtml {

Index: request.pl
===================================================================
RCS file: /cvsroot/koha/koha/request.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** request.pl	23 Jan 2003 09:48:44 -0000	1.20
--- request.pl	10 Mar 2003 15:16:55 -0000	1.21
***************
*** 25,29 ****
  
  use strict;
- #use DBI;
  use C4::Search;
  use C4::Output;
--- 25,28 ----
***************
*** 34,38 ****
  use C4::Circulation::Circ2;
  use HTML::Template;
! 
  use CGI;
  my $input = new CGI;
--- 33,37 ----
  use C4::Circulation::Circ2;
  use HTML::Template;
! use C4::Catalogue;
  use CGI;
  my $input = new CGI;
***************
*** 173,183 ****
  }
  
  #get the time for the form name...
  my $time = time();
  
- 
- 
- 
- 
  #setup colours
  my ($template, $borrowernumber, $cookie)
--- 172,192 ----
  }
  
+ my @branches;
+ my @select_branch;
+ my %select_branches;
+ my ($count2, at branches)=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     => 'pickup',
+ 			-values   => \@select_branch,
+ 			-labels   => \%select_branches,
+ 			-size     => 1,
+ 			-multiple => 0 );
+ 
  #get the time for the form name...
  my $time = time();
  
  #setup colours
  my ($template, $borrowernumber, $cookie)
***************
*** 189,197 ****
                           });
  $template->param(	optionloop =>\@optionloop,
! 								branchloop => \@branchloop,
  								reserveloop => \@reserveloop,
  								'time' => $time,
  								bibitemloop => \@bibitemloop,
! 								date => $date);
  # printout the page
  print $input->header(-expires=>'now'), $template->output;
--- 198,208 ----
                           });
  $template->param(	optionloop =>\@optionloop,
! 								CGIbranch => $CGIbranch,
  								reserveloop => \@reserveloop,
  								'time' => $time,
  								bibitemloop => \@bibitemloop,
! 								date => $date,
! 								bib => $bib,
! 								title =>$dat->{title});
  # printout the page
  print $input->header(-expires=>'now'), $template->output;

Index: updatebiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/updatebiblio.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** updatebiblio.pl	10 Jan 2003 22:21:50 -0000	1.7
--- updatebiblio.pl	10 Mar 2003 15:16:55 -0000	1.8
***************
*** 20,44 ****
  
  use strict;
  use CGI;
! use C4::Acquisitions;
  use C4::Output;
  use HTML::Template;
  
- # FIXME - This script uses a bunch of functions that appear in both
- # C4::Acquisitions and C4::Biblio. But I gather that the latter are
- # preferred. So should this script "use C4::Biblio;" ?
- 
  my $input       = new CGI;
  my $bibnum      = checkinp($input->param('biblionumber'));
  my $biblio = {
!     biblionumber => $bibnum,
!     title        => $input->param('title')?$input->param('title'):"",
!     author       => $input->param('author')?$input->param('author'):"",
!     abstract     => $input->param('abstract')?$input->param('abstract'):"",
!     copyright    => $input->param('copyrightdate')?$input->param('copyrightdate'):"",
!     seriestitle  => $input->param('seriestitle')?$input->param('seriestitle'):"",
!     serial       => $input->param('serial')?$input->param('serial'):"",
!     unititle     => $input->param('unititle')?$input->param('unititle'):"",
!     notes        => $input->param('notes')?$input->param('notes'):"",
  }; # my $biblio
  my $subtitle    = checkinp($input->param('subtitle'));
--- 20,46 ----
  
  use strict;
+ require Exporter;
+ use C4::Context;
+ use C4::Output;  # contains gettemplate
+ use C4::Search;
+ use C4::Auth;
+ use C4::Interface::CGI::Output;
  use CGI;
! use C4::Biblio;
  use C4::Output;
  use HTML::Template;
  
  my $input       = new CGI;
  my $bibnum      = checkinp($input->param('biblionumber'));
  my $biblio = {
! 	biblionumber => $bibnum,
! 	title        => $input->param('title')?$input->param('title'):"",
! 	author       => $input->param('author')?$input->param('author'):"",
! 	abstract     => $input->param('abstract')?$input->param('abstract'):"",
! 	copyrightdate    => $input->param('copyrightdate')?$input->param('copyrightdate'):"",
! 	seriestitle  => $input->param('seriestitle')?$input->param('seriestitle'):"",
! 	serial       => $input->param('serial')?$input->param('serial'):"",
! 	unititle     => $input->param('unititle')?$input->param('unititle'):"",
! 	notes        => $input->param('notes')?$input->param('notes'):"",
  }; # my $biblio
  my $subtitle    = checkinp($input->param('subtitle'));
***************
*** 62,66 ****
  
  for (my $i = 0; $i < $count; $i++) {
!     $sub[$i] =~ s/ +$//;
  } # for
  
--- 64,68 ----
  
  for (my $i = 0; $i < $count; $i++) {
! 	$sub[$i] =~ s/ +$//;
  } # for
  
***************
*** 68,91 ****
  
  if ($error ne ''){
! 	my $template = gettemplate("updatebiblio.tmpl");
! 
!     my @subs=split('\n',$error);
!     my @names=$input->param;
!     my $count=@names;
! 	my @dataloop;
!     for (my $i=0;$i<$count;$i++) {
! 	if ($names[$i] ne 'Force') {
! 		my %line;
! 	    $line{'value'}=$input->param("$names[$i]");
! 		$line{'name'}=$names[$i];
! 		push(@dataloop, \%line);
! 	} # if
!     } # for
!     template->param(substring =>$subs[0]);
!     template->param(error =>$error);
!     template->param(dataloop => \@dataloop);
! 	print "Content-Type: text/html\n\n", $template->output;
  } else {
!     print $input->redirect("detail.pl?type=intra&bib=$bibnum");
  } # else
  
--- 70,99 ----
  
  if ($error ne ''){
! 		my ($template, $loggedinuser, $cookie) = get_template_and_user({
! 			template_name   => "updatebiblio.tmpl",
! 			query           => $input,
! 			type            => "intranet",
! 			flagsrequired   => {catalogue => 1},
! 		});
! 
! 
! 	my @subs=split('\n',$error);
! 	my @names=$input->param;
! 	my $count=@names;
! 		my @dataloop;
! 	for (my $i=0;$i<$count;$i++) {
! 		if ($names[$i] ne 'Force') {
! 			my %line;
! 		$line{'value'}=$input->param("$names[$i]");
! 			$line{'name'}=$names[$i];
! 			push(@dataloop, \%line);
! 		} # if
! 	} # for
! 	$template->param(substring =>$subs[0],
! 						error =>$error,
! 						dataloop => \@dataloop);
! 		print "Content-Type: text/html\n\n", $template->output;
  } else {
! 	print $input->redirect("detail.pl?type=intra&bib=$bibnum");
  } # else
  





More information about the Koha-cvs mailing list