- Adding subtitle to Hold Ratio report output
- Sorting by default on ratio, descending
- Adding author
- Removing description
---
 circ/reserveratios.pl                              |    4 ++++
 .../prog/en/modules/circ/reserveratios.tmpl        |    8 ++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl
index 8807339..5a86675 100755
--- a/circ/reserveratios.pl
+++ b/circ/reserveratios.pl
@@ -28,6 +28,7 @@ use C4::Auth;
 use C4::Dates qw/format_date format_date_in_iso/;
 use C4::Debug;
 use Date::Calc qw/Today Add_Delta_YM/;
+use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/;
 
 my $input = new CGI;
 my $order     = $input->param('order') || '';
@@ -144,6 +145,8 @@ while ( my $data = $sth->fetchrow_hashref ) {
     my $thisratio = $data->{reservecount} / $data->{itemcount};
     my $ratiocalc = ($thisratio / $ratio);
     ($thisratio / $ratio) >= 1 or next;  # TODO: tighter targeting -- get 
ratio limit into SQL using HAVING clause
+    my $record = GetMarcBiblio($data->{biblionumber});
+    $data->{subtitle} = GetRecordValue('subtitle', $record, 
GetFrameworkCode($data->{biblionumber}));
     push(
         @reservedata,
         {
@@ -151,6 +154,7 @@ while ( my $data = $sth->fetchrow_hashref ) {
             priority         => $data->{priority},
             name             => $data->{borrower},
             title            => $data->{title},
+            subtitle            => $data->{subtitle},
             author           => $data->{author},
             notes            => $data->{notes},
             itemnum          => $data->{itemnumber},
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tmpl
index 68c4209..15d9cdb 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tmpl
@@ -28,7 +28,7 @@ $.tablesorter.addParser({
         );
                $.tablesorter.defaults.widgets = ['zebra']; 
                $("#holdst:has(tbody tr)").tablesorter({    // only add sort if 
the table has a body and rows
-                       sortList: [[0,0]],
+                       sortList: [[0,1]],
                        headers: { 1: { sorter: 'articles' }}
                }); 
         });
@@ -91,11 +91,7 @@ $.tablesorter.addParser({
                <td><p><!-- TMPL_VAR NAME="reservecount" --></p></td>
                <td><p><!-- TMPL_VAR NAME="itemcount" --></p></td>
                <td><p class="ratiolimit"><!-- TMPL_VAR NAME="thisratio" 
--></p></td>
-            <td><p>
-                <!-- TMPL_INCLUDE NAME="biblio-default-view.inc" --><!-- 
TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
-                   </a>
-                </p>
-                <p><!-- TMPL_VAR NAME="notes" --></p>
+            <td><!-- TMPL_INCLUDE NAME="biblio-default-view.inc" --><!-- 
TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_IF NAME="subtitle" --><!-- 
TMPL_LOOP NAME="subtitle" --><!-- TMPL_VAR NAME="subfield" --><!-- /TMPL_LOOP 
--><!-- /TMPL_IF --></a><!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR 
NAME="author" --><!-- /TMPL_IF -->
             </td>
             <td><p><!-- TMPL_VAR NAME="listbranch" --></p></td>
             <td><p><!-- TMPL_VAR NAME="location" --></p></td>
-- 
1.7.3

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to