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

(-)a/catalogue/search.pl (+3 lines)
Lines 155-160 use Koha::LibraryCategories; Link Here
155
use Koha::Virtualshelves;
155
use Koha::Virtualshelves;
156
use Koha::SearchEngine::Search;
156
use Koha::SearchEngine::Search;
157
use Koha::SearchEngine::QueryBuilder;
157
use Koha::SearchEngine::QueryBuilder;
158
use Koha::Holds;
158
159
159
use URI::Escape;
160
use URI::Escape;
160
161
Lines 613-618 for (my $i=0;$i<@servers;$i++) { Link Here
613
                if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) {
614
                if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) {
614
                    $line->{'incart'} = 1;
615
                    $line->{'incart'} = 1;
615
                }
616
                }
617
                # also, let's get the number of holds here
618
                $line->{holdscount} = Koha::Holds->count( { biblionumber => $line->{biblionumber} } );
616
            }
619
            }
617
            $template->param(SEARCH_RESULTS => \@newresults);
620
            $template->param(SEARCH_RESULTS => \@newresults);
618
            ## FIXME: add a global function for this, it's better than the current global one
621
            ## FIXME: add a global function for this, it's better than the current global one
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt (-2 / +1 lines)
Lines 587-593 var holdForPatron = function () { Link Here
587
                            [% IF ( SEARCH_RESULT.norequests ) %]
587
                            [% IF ( SEARCH_RESULT.norequests ) %]
588
                                <span class="noholdstext">No holds allowed</span>
588
                                <span class="noholdstext">No holds allowed</span>
589
                            [% ELSE %]
589
                            [% ELSE %]
590
                                <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a>
590
                                <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds ([% SEARCH_RESULT.holdscount %])</a>
591
                                [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
591
                                [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&amp;findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %]
592
                            [% END %]
592
                            [% END %]
593
593
594
- 

Return to bug 14876