[Koha-patches] [PATCH] Bug 5596 [REVISED] add author to holds to pull report
Owen Leonard
oleonard at myacpl.org
Mon Mar 12 13:53:26 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 52a0450..d44a96a 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/;
@@ -158,6 +159,10 @@ if ( $run_report ) {
$sth->execute(@query_params);
while ( my $data = $sth->fetchrow_hashref ) {
+ my $record = GetMarcBiblio($data->{biblionumber});
+ if ($record){
+ $data->{subtitle} = GetRecordValue('subtitle',$record,'')->[0]->{subfield};
+ }
push(
@reservedata,
{
@@ -165,6 +170,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 c11bdd7..9b72691 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
@@ -91,8 +91,8 @@ $(document).ready(function() {
<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