Bugzilla – Attachment 55910 Details for
Bug 14876
Show number of holds per record on the search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14876 - Show number of holds per record on the search results
Bug-14876---Show-number-of-holds-per-record-on-the.patch (text/plain), 3.03 KB, created by
Nick Clemens (kidclamp)
on 2016-09-29 09:55:38 UTC
(
hide
)
Description:
Bug 14876 - Show number of holds per record on the search results
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-09-29 09:55:38 UTC
Size:
3.03 KB
patch
obsolete
>From 8c485d0df528d878f799edf502bfeda891c30d01 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 28 Sep 2016 15:28:17 +0000 >Subject: [PATCH] Bug 14876 - Show number of holds per record on the search > results >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch edits catalogue/search.pl to pass back the count of holds along with >other data for display in results.tt > >To test: >1 - Search in staff >2 - Note holds link has no extra information >3 - Apply patch >4 - Do search in staff that returns records with some holds (i.e. place > some holds) >5 - Note the number of holds now displays next to the text of the link: > Holds (#) > >Signed-off-by: Marc Véron <veron@veron.ch> >--- > catalogue/search.pl | 3 +++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 5855bf1..1afd7c9 100755 >--- a/catalogue/search.pl >+++ b/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 >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index 3cecf8a..3e8b8b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -587,7 +587,7 @@ var holdForPatron = function () { > [% IF ( SEARCH_RESULT.norequests ) %] > <span class="noholdstext">No holds allowed</span> > [% ELSE %] >- <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds</a> >+ <a id="reserve_[% SEARCH_RESULT.biblionumber %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]">Holds ([% SEARCH_RESULT.holdscount %])</a> > [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% SEARCH_RESULT.biblionumber %]&findborrower=[% holdfor_cardnumber %]">Place hold for [% holdfor_firstname %] [% holdfor_surname %] ([% holdfor_cardnumber %])</a></span>[% END %] > [% END %] > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14876
:
53402
|
53465
|
54578
|
55889
|
55892
|
55910
|
56082
|
57000
|
58013
|
58153