Bugzilla – Attachment 55889 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), 2.91 KB, created by
Nick Clemens (kidclamp)
on 2016-09-28 15:31:29 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-28 15:31:29 UTC
Size:
2.91 KB
patch
obsolete
>From fb38b1a8e88086b904b6b15039651a4158ac0a7c 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 > >This patch edits C4/Search.pm 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 (#) >--- > C4/Search.pm | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index a1296f9..b216946 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -23,6 +23,7 @@ use C4::Biblio; # GetMarcFromKohaField, GetBiblioData > use C4::Koha; # getFacets > use Koha::DateUtils; > use Koha::Libraries; >+use Koha::Holds; > use Lingua::Stem; > use C4::Search::PazPar2; > use XML::Simple; >@@ -2247,6 +2248,7 @@ sub searchResults { > $oldbiblio->{onholdcount} = $item_onhold_count; > $oldbiblio->{orderedcount} = $ordered_count; > $oldbiblio->{notforloancount} = $notforloan_count; >+ $oldbiblio->{holdscount} = Koha::Holds->count( { biblionumber => $oldbiblio->{biblionumber} } ); > > if (C4::Context->preference("AlternateHoldingsField") && $items_count == 0) { > my $fieldspec = C4::Context->preference("AlternateHoldingsField"); >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