View | Details | Raw Unified | Return to bug 3550
Collapse All | Expand All

(-)a/circ/reserveratios.pl (+4 lines)
Lines 28-33 use C4::Auth; Link Here
28
use C4::Dates qw/format_date format_date_in_iso/;
28
use C4::Dates qw/format_date format_date_in_iso/;
29
use C4::Debug;
29
use C4::Debug;
30
use Date::Calc qw/Today Add_Delta_YM/;
30
use Date::Calc qw/Today Add_Delta_YM/;
31
use C4::Biblio qw/GetMarcBiblio GetRecordValue GetFrameworkCode/;
31
32
32
my $input = new CGI;
33
my $input = new CGI;
33
my $order     = $input->param('order') || '';
34
my $order     = $input->param('order') || '';
Lines 144-149 while ( my $data = $sth->fetchrow_hashref ) { Link Here
144
    my $thisratio = $data->{reservecount} / $data->{itemcount};
145
    my $thisratio = $data->{reservecount} / $data->{itemcount};
145
    my $ratiocalc = ($thisratio / $ratio);
146
    my $ratiocalc = ($thisratio / $ratio);
146
    ($thisratio / $ratio) >= 1 or next;  # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
147
    ($thisratio / $ratio) >= 1 or next;  # TODO: tighter targeting -- get ratio limit into SQL using HAVING clause
148
    my $record = GetMarcBiblio($data->{biblionumber});
149
    $data->{subtitle} = GetRecordValue('subtitle', $record, GetFrameworkCode($data->{biblionumber}));
147
    push(
150
    push(
148
        @reservedata,
151
        @reservedata,
149
        {
152
        {
Lines 151-156 while ( my $data = $sth->fetchrow_hashref ) { Link Here
151
            priority         => $data->{priority},
154
            priority         => $data->{priority},
152
            name             => $data->{borrower},
155
            name             => $data->{borrower},
153
            title            => $data->{title},
156
            title            => $data->{title},
157
            subtitle            => $data->{subtitle},
154
            author           => $data->{author},
158
            author           => $data->{author},
155
            notes            => $data->{notes},
159
            notes            => $data->{notes},
156
            itemnum          => $data->{itemnumber},
160
            itemnum          => $data->{itemnumber},
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tmpl (-7 / +2 lines)
Lines 28-34 $.tablesorter.addParser({ Link Here
28
        );
28
        );
29
		$.tablesorter.defaults.widgets = ['zebra']; 
29
		$.tablesorter.defaults.widgets = ['zebra']; 
30
		$("#holdst:has(tbody tr)").tablesorter({    // only add sort if the table has a body and rows
30
		$("#holdst:has(tbody tr)").tablesorter({    // only add sort if the table has a body and rows
31
			sortList: [[0,0]],
31
			sortList: [[0,1]],
32
			headers: { 1: { sorter: 'articles' }}
32
			headers: { 1: { sorter: 'articles' }}
33
		}); 
33
		}); 
34
	 });
34
	 });
Lines 91-101 $.tablesorter.addParser({ Link Here
91
           	<td><p><!-- TMPL_VAR NAME="reservecount" --></p></td>
91
           	<td><p><!-- TMPL_VAR NAME="reservecount" --></p></td>
92
           	<td><p><!-- TMPL_VAR NAME="itemcount" --></p></td>
92
           	<td><p><!-- TMPL_VAR NAME="itemcount" --></p></td>
93
           	<td><p class="ratiolimit"><!-- TMPL_VAR NAME="thisratio" --></p></td>
93
           	<td><p class="ratiolimit"><!-- TMPL_VAR NAME="thisratio" --></p></td>
94
            <td><p>
94
            <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 -->
95
                <!-- TMPL_INCLUDE NAME="biblio-default-view.inc" --><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_VAR NAME="subtitle" -->
96
                   </a>
97
                </p>
98
                <p><!-- TMPL_VAR NAME="notes" --></p>
99
            </td>
95
            </td>
100
            <td><p><!-- TMPL_VAR NAME="listbranch" --></p></td>
96
            <td><p><!-- TMPL_VAR NAME="listbranch" --></p></td>
101
            <td><p><!-- TMPL_VAR NAME="location" --></p></td>
97
            <td><p><!-- TMPL_VAR NAME="location" --></p></td>
102
- 

Return to bug 3550