Bugzilla – Attachment 41370 Details for
Bug 14557
Add holds count to holds tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14557 - Add holds count to holds tab
Bug-14557---Add-holds-count-to-holds-tab.patch (text/plain), 3.21 KB, created by
Jonathan Druart
on 2015-08-05 08:19:59 UTC
(
hide
)
Description:
Bug 14557 - Add holds count to holds tab
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-08-05 08:19:59 UTC
Size:
3.21 KB
patch
obsolete
>From c58cdb257a6bc4a12ef4cfef9ed3d8c0cb71dc1c Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 17 Jul 2015 07:37:33 -0400 >Subject: [PATCH] Bug 14557 - Add holds count to holds tab > >Some librarians have expressed that it would be helpful if the holds tab >displayed the count of holds for a record. > >Test Plan: >1) Apply this patch >2) Note the Holds tab for a record now displays the number of holds for that record > >Signed-off-by: Jason Robb <jrobb@sekls.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/Template/Plugin/Biblio.pm | 35 ++++++++++++++++++++++ > .../prog/en/includes/biblio-view-menu.inc | 3 +- > 2 files changed, 37 insertions(+), 1 deletion(-) > create mode 100644 Koha/Template/Plugin/Biblio.pm > >diff --git a/Koha/Template/Plugin/Biblio.pm b/Koha/Template/Plugin/Biblio.pm >new file mode 100644 >index 0000000..3f9cc4f >--- /dev/null >+++ b/Koha/Template/Plugin/Biblio.pm >@@ -0,0 +1,35 @@ >+package Koha::Template::Plugin::Biblio; >+ >+# Copyright ByWater Solutions 2015 >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use Template::Plugin; >+use base qw( Template::Plugin ); >+ >+use Koha::Holds; >+ >+sub HoldsCount { >+ my ( $self, $biblionumber ) = @_; >+ >+ my $holds = Koha::Holds->search( { biblionumber => $biblionumber } ); >+ >+ return $holds->count(); >+} >+ >+1; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >index 158827f..4258aa3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc >@@ -1,3 +1,4 @@ >+[% USE Biblio %] > [% SET biblio_object_id = object || biblionumber %] > <div id="menu"> > <ul> >@@ -22,7 +23,7 @@ > [% IF ( moredetailview ) %]<li class="active">[% ELSE %]<li>[% END %] > <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio_object_id %]">Items</a></li> > [% IF ( CAN_user_reserveforothers ) %] >- [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio_object_id %]">Holds</a></li> >+ [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio_object_id %]">Holds ([% Biblio.HoldsCount( biblio_object_id ) %])</a></li> > [% END %] > [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]&analyze=1">Analytics</a></li>[% END %] > >-- >2.1.0
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 14557
:
41058
|
41060
|
41061
|
41239
|
41240
|
41369
| 41370