From 503a784e603624f7f889610764093d4ba8c1103c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 9 Aug 2016 10:14:02 -0400 Subject: [PATCH] Bug 16991: Add subtitle to holds to pull report This patch adds output of subtitle to the holds to pull report using keyword to MARC mapping information. To test, apply the patch and go to Circulation -> Holds to pull. The list of holds to pull should display subtitles. Signed-off-by: Hector Castro Subtitle added using keyword to MARC mapping with default framework. Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- circ/pendingreserves.pl | 6 ++++++ .../intranet-tmpl/prog/en/modules/circ/pendingreserves.tt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index 932b035c23..e9cee0c229 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -31,6 +31,7 @@ use C4::Context; use C4::Output; use CGI qw ( -utf8 ); use C4::Auth; +use Koha::Biblios; use C4::Debug; use Koha::DateUtils; use DateTime::Duration; @@ -152,6 +153,10 @@ if ( $run_report ) { $sth->execute(@query_params); while ( my $data = $sth->fetchrow_hashref ) { + my $record = Koha::Biblios->find($data->{biblionumber}); + if ($record){ + $data->{subtitle} = [ $record->subtitles ]; + } push( @reservedata, { @@ -159,6 +164,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 7bb77c8c92..11c7a0fbf4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -114,7 +114,7 @@ $(document).ready(function() {

[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] - [% reserveloo.title |html %]

+ [% reserveloo.title |html %] [% FOREACH s IN reserveloo.subtitle %] [% s %][% END %]

[% IF ( reserveloo.author ) %]

by [% reserveloo.author %]

[% END %] [% ELSE %] -- 2.39.5