[Koha-cvs] CVS: koha/opac opac-serial-issues.pl,1.1.2.4,1.1.2.5

Henri-Damien LAURENT hdl at users.sourceforge.net
Thu Jun 2 23:04:37 CEST 2005


Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17766/opac

Modified Files:
      Tag: rel_2_2
	opac-serial-issues.pl 
Log Message:
Adding full history support to opac serial
Needs fixing

Index: opac-serial-issues.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-serial-issues.pl,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -C2 -r1.1.2.4 -r1.1.2.5
*** opac-serial-issues.pl	1 Jun 2005 20:05:41 -0000	1.1.2.4
--- opac-serial-issues.pl	2 Jun 2005 21:04:35 -0000	1.1.2.5
***************
*** 15,22 ****
--- 15,58 ----
  my $op = $query->param('op');
  my $dbh = C4::Context->dbh;
+ my $selectview = C4::Context->preference("SubscriptionHistory");
+ warn "selectview : ".$selectview;
+ 
  my $sth;
  # my $id;
  my ($template, $loggedinuser, $cookie);
  my $biblionumber = $query->param('biblionumber');
+ if ($selectview eq "full"){
+ my $subscriptions = get_full_subscription_list_from_biblionumber($biblionumber);
+ 
+ my $year;
+ my $yearmin=$subscriptions->[1]{year};
+ warn "yearmin".$yearmin;
+ my $yearmax;
+ my @loopissues;
+ my $yearmax=$subscriptions->[scalar(@$subscriptions)]{year};
+ warn "yearmax".$yearmax;
+ 
+ 
+ ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "opac-full-serial-issues.tmpl",
+ 				query => $query,
+ 				type => "opac",
+ 				authnotrequired => 1,
+ 				debug => 1,
+ 				});
+ 
+ # replace CR by <br> in librarian note
+ # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
+ 
+ $template->param(
+ 	biblionumber => $query->param('biblionumber'),
+ 	years => $subscriptions,
+ 	yearmin => $yearmin,
+ 	yearmax =>$yearmax,
+ 	suggestion => C4::Context->preference("suggestion"),
+ 	virtualshelves => C4::Context->preference("virtualshelves"),
+ 	);
+ 
+ } else {
  my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
  
***************
*** 38,41 ****
  	virtualshelves => C4::Context->preference("virtualshelves"),
  	);
! 
  output_html_with_http_headers $query, $cookie, $template->output;
--- 74,77 ----
  	virtualshelves => C4::Context->preference("virtualshelves"),
  	);
! }
  output_html_with_http_headers $query, $cookie, $template->output;





More information about the Koha-cvs mailing list