[Koha-cvs] CVS: koha/opac opac-detail.pl,1.1.2.6,1.1.2.7 opac-user.pl,1.1.2.9,1.1.2.10 opac-userupdate.pl,1.1.2.5,1.1.2.6

Finlay Thompson finlayt at users.sourceforge.net
Wed Nov 27 02:46:56 CET 2002


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

Modified Files:
      Tag: rel-1-2
	opac-detail.pl opac-user.pl opac-userupdate.pl 
Log Message:

more improovements for the hlt opac



Index: opac-detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-detail.pl,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -r1.1.2.6 -r1.1.2.7
*** opac-detail.pl	28 Oct 2002 19:56:04 -0000	1.1.2.6
--- opac-detail.pl	27 Nov 2002 01:46:54 -0000	1.1.2.7
***************
*** 2,6 ****
  use strict;
  require Exporter;
- use C4::Output;  # contains gettemplate
  use CGI;
  use C4::Search;
--- 2,5 ----
***************
*** 8,22 ****
  
  my $query=new CGI;
! 
! 
! my $flagsrequired;
! $flagsrequired->{borrow}=1;
! 
! my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 1, $flagsrequired);
! 
! 
! my $template = gettemplate ("opac-detail.tmpl", "opac");
! 
! $template->param(loggedinuser => $loggedinuser);
  
  my $biblionumber=$query->param('bib');
--- 7,17 ----
  
  my $query=new CGI;
! my ($template, $borrowernumber, $cookie) 
!     = get_template_and_user({template_name => "opac-detail.tmpl",
! 			     query => $query,
! 			     type => "opac",
! 			     authnotrequired => 1,
! 			     flagsrequired => {borrow => 1},
! 			     });
  
  my $biblionumber=$query->param('bib');
***************
*** 41,53 ****
  foreach my $itm (@items) {
      $norequests = 0 unless $itm->{'notforloan'};
  }
  
  $template->param(norequests => $norequests);
  
! 
! 
! my @results;
! 
! $results[0]=$dat;
  
  my $resultsarray=\@results;
--- 36,45 ----
  foreach my $itm (@items) {
      $norequests = 0 unless $itm->{'notforloan'};
+     $itm->{$itm->{'publictype'}} = 1;
  }
  
  $template->param(norequests => $norequests);
  
! my @results = ($dat,);
  
  my $resultsarray=\@results;
***************
*** 56,74 ****
  my $sitearray=\@websites;
  
- 
- my $startfrom=$query->param('startfrom');
- ($startfrom) || ($startfrom=0);
- 
- my $count=1;
- 
- # now to get the items into a hash we can use and whack that thru
- $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);
--- 48,51 ----
***************
*** 76,79 ****
  $template->param(SITE_RESULTS => $sitearray);
  
! print "Content-Type: text/html\n\n", $template->output;
  
--- 53,56 ----
  $template->param(SITE_RESULTS => $sitearray);
  
! print $query->header(-cookie => $cookie), $template->output;
  

Index: opac-user.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-user.pl,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -r1.1.2.9 -r1.1.2.10
*** opac-user.pl	26 Nov 2002 04:40:02 -0000	1.1.2.9
--- opac-user.pl	27 Nov 2002 01:46:54 -0000	1.1.2.10
***************
*** 69,73 ****
      if ($issue->{'overdue'}) {
  	push @overdues, $issue;
- 	foreach my $k (keys %$issue) {warn "$k : $issue->{$k}";}
  	$overdues_count++;
  	$issue->{'status'} = "<font color='red'>OVERDUE</font>";
--- 69,72 ----

Index: opac-userupdate.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-userupdate.pl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** opac-userupdate.pl	28 Oct 2002 20:54:34 -0000	1.1.2.5
--- opac-userupdate.pl	27 Nov 2002 01:46:54 -0000	1.1.2.6
***************
*** 14,24 ****
  my $query = new CGI;
  
! my $flagsrequired;
! $flagsrequired->{borrow}=1;
! 
! my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 0, $flagsrequired);
  
  # get borrower information ....
- my $borrowernumber = getborrowernumber($loggedinuser);
  my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  
--- 14,27 ----
  my $query = new CGI;
  
! my ($template, $borrowernumber, $cookie) 
!     = get_template_and_user({template_name => "opac-userupdate.tmpl",
! 			     query => $query,
! 			     type => "opac",
! 			     authnotrequired => 0,
! 			     flagsrequired => {borrow => 1},
! 			     debug => 1,
! 			     });
  
  # get borrower information ....
  my ($borr, $flags) = getpatroninformation(undef, $borrowernumber);
  
***************
*** 67,72 ****
  }
  
- my $template = gettemplate("opac-userupdate.tmpl", "opac");
- 
  
  $borr->{'dateenrolled'} = slashifyDate($borr->{'dateenrolled'});
--- 70,73 ----
***************
*** 81,86 ****
  $template->param(BORROWER_INFO => \@bordat);
  
! 
! $template->param(loggedinuser => $loggedinuser);
! 
! print "Content-Type: text/html\n\n", $template->output;
--- 82,84 ----
  $template->param(BORROWER_INFO => \@bordat);
  
! print $query->header(-cookie => $cookie), $template->output;





More information about the Koha-cvs mailing list