[Koha-cvs] CVS: koha/opac opac-readingrecord.pl,1.6.2.1,1.6.2.2

Owen Leonard oleonard at users.sourceforge.net
Tue Jul 12 22:12:17 CEST 2005


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

Modified Files:
      Tag: rel_2_2
	opac-readingrecord.pl 
Log Message:
Transferring some of the functionality from intranet's reading record script, improving column-ordering links

Index: opac-readingrecord.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-readingrecord.pl,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -C2 -r1.6.2.1 -r1.6.2.2
*** opac-readingrecord.pl	25 Mar 2005 17:04:27 -0000	1.6.2.1
--- opac-readingrecord.pl	12 Jul 2005 20:12:14 -0000	1.6.2.2
***************
*** 7,10 ****
--- 7,11 ----
  use C4::Koha;
  use C4::Circulation::Circ2;
+ use C4::Date;
  use C4::Search;
  use HTML::Template;
***************
*** 32,36 ****
--- 33,47 ----
  if ($order2 eq ''){
    $order2="date_due desc";
+   $template->param(orderbydate => 1);
  }
+ 
+ if($order2 eq 'title'){
+ 	$template->param(orderbytitle => 1);
+ 	}
+ 
+ if($order2 eq 'author'){
+ 	$template->param(orderbyauthor => 1);
+ }
+ 
  my $limit=$query->param('limit');
  if ($limit eq 'full'){
***************
*** 42,54 ****
  
  # add the row parity
! my $num = 0;
! foreach my $row (@$issues) {
!     $row->{'even'} = 1 if $num % 2 == 0;
!     $row->{'odd'} = 1 if $num % 2 == 1;
!     $num++;
  }
  
  $template->param(count => $count);
! $template->param(READING_RECORD => $issues,
  			     LibraryName => C4::Context->preference("LibraryName"),
  				suggestion => C4::Context->preference("suggestion"),
--- 53,85 ----
  
  # add the row parity
! #my $num = 0;
! #foreach my $row (@$issues) {
! #    $row->{'even'} = 1 if $num % 2 == 0;
! #    $row->{'odd'} = 1 if $num % 2 == 1;
! #    $num++;
! #}
! 
! my @loop_reading;
! 
! for (my $i=0;$i<$count;$i++){
!  	my %line;
! 	if($i%2){
! 		$line{'toggle'} = 1;
! 	}
! 	$line{biblionumber}=$issues->[$i]->{'biblionumber'};
! 	$line{title}=$issues->[$i]->{'title'};
! 	$line{author}=$issues->[$i]->{'author'};
! 	$line{classification} = $issues->[$i]->{'classification'};
! 	$line{date_due}=format_date($issues->[$i]->{'date_due'});
! 	$line{returndate}=format_date($issues->[$i]->{'returndate'});
! 	$line{volumeddesc}=$issues->[$i]->{'volumeddesc'};
! 	$line{counter} = $i + 1;
! 	push(@loop_reading,\%line);
  }
  
  $template->param(count => $count);
! $template->param(READING_RECORD => \@loop_reading,
! 				limit => $limit,
! 				showfulllink => ($count > 50),		
  			     LibraryName => C4::Context->preference("LibraryName"),
  				suggestion => C4::Context->preference("suggestion"),





More information about the Koha-cvs mailing list