@@ -, +, @@
results
some holds)
Holds (#)
---
catalogue/search.pl | 3 +++
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/catalogue/search.pl
+++ a/catalogue/search.pl
@@ -155,6 +155,7 @@ use Koha::LibraryCategories;
use Koha::Virtualshelves;
use Koha::SearchEngine::Search;
use Koha::SearchEngine::QueryBuilder;
+use Koha::Holds;
use URI::Escape;
@@ -613,6 +614,8 @@ for (my $i=0;$i<@servers;$i++) {
if ( grep {$_ eq $line->{'biblionumber'}} @cart_list) {
$line->{'incart'} = 1;
}
+ # also, let's get the number of holds here
+ $line->{holdscount} = Koha::Holds->count( { biblionumber => $line->{biblionumber} } );
}
$template->param(SEARCH_RESULTS => \@newresults);
## 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
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
@@ -587,7 +587,7 @@ var holdForPatron = function () {
[% IF ( SEARCH_RESULT.norequests ) %]
No holds allowed
[% ELSE %]
- Holds
+ Holds ([% SEARCH_RESULT.holdscount %])
[% IF ( holdfor ) %] | Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])[% END %]
[% END %]
--