From 1a9873a218fbcc06280c1c79d7596a5e569a846a Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Mon, 17 Mar 2008 18:32:27 -0400 Subject: [PATCH] Fix for bug 1593: Fix item type image handling in OPAC Also cleans up dates in a couple places Signed-off-by: Joshua Ferraro --- .../opac-tmpl/prog/en/modules/opac-readingrecord.tmpl | 6 +++--- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 6 +++--- opac/opac-readingrecord.pl | 7 ++++++- opac/opac-user.pl | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl index bad859f0f3..aa2b06ee26 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl @@ -34,7 +34,7 @@ You have never borrowed anything from this library. TitleTitle -Item Type +Item Type Call No. DateDate @@ -47,7 +47,7 @@ TMPL_ELSE -->Title - +" title="" alt="" /> (Checked out) @@ -65,4 +65,4 @@ TMPL_ELSE -->Title - \ No newline at end of file + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl index 447e08c50a..71d8c3402d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -147,7 +147,7 @@ $.tablesorter.addParser({   Title - Item Type + Item Type Call No. Due @@ -179,9 +179,9 @@ $.tablesorter.addParser({ - + " title="" alt="" /> - + diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl index a63e4ab0bc..f24af9044b 100755 --- a/opac/opac-readingrecord.pl +++ b/opac/opac-readingrecord.pl @@ -45,6 +45,9 @@ my ( $borr, $flags ) = GetMemberDetails( $borrowernumber ); $template->param($borr); +my $imgdir = getitemtypeimagesrc(); +my $itemtypes = GetItemTypes(); + # get the record my $order = $query->param('order'); my $order2 = $order; @@ -89,12 +92,14 @@ for ( my $i = 0 ; $i < $count ; $i++ ) { $line{biblionumber} = $issues->[$i]->{'biblionumber'}; $line{title} = $issues->[$i]->{'title'}; $line{author} = $issues->[$i]->{'author'}; - $line{isbn} = $issues->[$i]->{'isbn'}; + $line{isbn} = $issues->[$i]->{'isbn'}; $line{itemcallnumber} = $issues->[$i]->{'itemcallnumber'}; $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; + $line{'description'} = $itemtypes->{ $issues->[$i]->{'itemtype'} }->{'description'}; + $line{imageurl} = $imgdir."/".$itemtypes->{ $issues->[$i]->{'itemtype'} }->{'imageurl'}; push( @loop_reading, \%line ); } diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 8626fda1b8..576c911d23 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -135,6 +135,7 @@ foreach my $issue ( @$issues ) { $issue->{'imageurl'} = $imgdir."/".$itemtypes->{$itemtype}->{'imageurl'}; $issue->{'description'} = $itemtypes->{$itemtype}->{'description'}; } + $issue->{date_due} = format_date($issue->{date_due}); push @issuedat, $issue; $count++; } -- 2.39.5