[Koha-patches] [PATCH] Bug 5596 - add author to holds to pull report
Owen Leonard
oleonard at myacpl.org
Tue Mar 6 16:26:49 CET 2012
Adding output of author and, for good measure, subtitle.
---
circ/pendingreserves.pl | 6 ++++++
.../prog/en/modules/circ/pendingreserves.tt | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl
index d723bc2..ae5b58f 100755
--- a/circ/pendingreserves.pl
+++ b/circ/pendingreserves.pl
@@ -29,6 +29,7 @@ use C4::Context;
use C4::Output;
use CGI;
use C4::Auth;
+use C4::Biblio;
use C4::Dates qw/format_date format_date_in_iso/;
use C4::Debug;
use Date::Calc qw/Today Add_Delta_YMD/;
@@ -184,6 +185,10 @@ if ( $run_report ) {
my $previous;
my $this;
while ( my $data = $sth->fetchrow_hashref ) {
+ my $record = GetMarcBiblio($data->{biblionumber});
+ if ($record){
+ $data->{subtitle} = GetRecordValue('subtitle',$record,'')->[0]->{subfield};
+ }
$this=$data->{biblionumber}.":".$data->{borrowernumber};
my @itemlist;
push(
@@ -193,6 +198,7 @@ if ( $run_report ) {
priority => $data->{priority},
name => $data->{l_patron},
title => $data->{title},
+ subtitle => $data->{subtitle},
author => $data->{author},
borrowernumber => $data->{borrowernumber},
itemnum => $data->{itemnumber},
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
index c965e5c..c1c977d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
@@ -125,8 +125,8 @@ $.tablesorter.addParser({
<td>
<p>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
- [% reserveloo.title |html %] [% reserveloo.subtitle %]
- </a>
+ [% reserveloo.title |html %] [% IF ( reserveloo.subtitle ) %][% reserveloo.subtitle %][% END %]
+ </a> [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% ELSE %][% END %]
</p>
</td>
[% ELSE %]
--
1.7.3
More information about the Koha-patches
mailing list