Bug 10672 - Add subtitle to display of checkouts, overdues, and holds on the patron...
authorOwen Leonard <oleonard@myacpl.org>
Thu, 1 Aug 2013 14:57:02 +0000 (10:57 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Sat, 7 Sep 2013 21:07:28 +0000 (21:07 +0000)
In the OPAC, the patron summary page (opac-user.pl) should display
subtitle along with title in the lists of checkouts, overdues, and
holds. This patch adds it.

To test, log in to the OPAC as a patron who has checkouts, overdues, and
holds which include titles with subtitles. Titles should appear
correctly with and without subtitles.

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
opac/opac-user.pl

index 31d6c32..12b9f23 100644 (file)
@@ -177,7 +177,7 @@ var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended
 
 </td>[% END %]
 
-                <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a><span class="item-details">
+                <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %][% FOREACH subtitl IN ISSUE.subtitle %] [% subtitl.subfield %][% END %]</a><span class="item-details">
                         [% ISSUE.author %]
                     </span></td>
                 [% IF ( ISSUE.overdue ) %]
@@ -323,7 +323,7 @@ var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended
 [% END %]
 </td>[% END %]
 
-<td><a href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %]</a> <span class="item-details">[% OVERDUE.author %]</span></td>
+<td><a href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %][% FOREACH subtitl IN OVERDUE.subtitle %] [% subtitl.subfield %][% END %]</a> <span class="item-details">[% OVERDUE.author %]</span></td>
 
 [% UNLESS ( item_level_itypes ) %]<td>[% IF ( OVERDUE.imageurl ) %]<img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />[% END %] [% OVERDUE.description %]</td>[% END %]
 [% IF ( show_barcode ) %]<td>[% OVERDUE.barcode %]</td>[% END %]
@@ -379,7 +379,7 @@ var MSG_CONFIRM_RESUME_HOLDS  = _("Are you sure you want to resume all suspended
                     [% ELSE %]
                             <tr>
                     [% END %]
-                <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a>
+                <td class="title"><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %][% FOREACH subtitl IN RESERVE.subtitle %] [% subtitl.subfield %][% END %]</a>
                     [% RESERVE.author %]
                 </td>
                 <td class="reservedate"><span title="[% RESERVE.reservedate %]">[% RESERVE.reservedate | $KohaDates %]</span></td>
index 5c01ae2..731caf8 100755 (executable)
@@ -176,7 +176,7 @@ if ($issues){
             }
         }
         $issue->{'charges'} = $charges;
-
+        $issue->{'subtitle'} = GetRecordValue('subtitle', GetMarcBiblio($issue->{'biblionumber'}), GetFrameworkCode($issue->{'biblionumber'}));
         # check if item is renewable
         my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
         ($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
@@ -256,7 +256,7 @@ foreach my $res (@reserves) {
     if ( $res->{'expirationdate'} eq '0000-00-00' ) {
       $res->{'expirationdate'} = '';
     }
-
+    $res->{'subtitle'} = GetRecordValue('subtitle', GetMarcBiblio($res->{'biblionumber'}), GetFrameworkCode($res->{'biblionumber'}));
     $res->{'waiting'} = 1 if $res->{'found'} eq 'W';
     $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
     my $biblioData = GetBiblioData($res->{'biblionumber'});