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

(-)a/Koha/Template/Plugin/Biblio.pm (+35 lines)
Line 0 Link Here
1
package Koha::Template::Plugin::Biblio;
2
3
# Copyright ByWater Solutions 2015
4
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
22
use Template::Plugin;
23
use base qw( Template::Plugin );
24
25
use Koha::Holds;
26
27
sub HoldsCount {
28
    my ( $self, $biblionumber ) = @_;
29
30
    my $holds = Koha::Holds->search( { biblionumber => $biblionumber } );
31
32
    return $holds->count();
33
}
34
35
1;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc (-2 / +2 lines)
Lines 1-3 Link Here
1
[% USE Biblio %]
1
[% SET biblio_object_id = object || biblionumber %]
2
[% SET biblio_object_id = object || biblionumber %]
2
<div id="menu">
3
<div id="menu">
3
<ul>
4
<ul>
Lines 22-28 Link Here
22
    [% IF ( moredetailview ) %]<li class="active">[% ELSE %]<li>[% END %]
23
    [% IF ( moredetailview ) %]<li class="active">[% ELSE %]<li>[% END %]
23
    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio_object_id %]">Items</a></li>
24
    <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% biblio_object_id %]">Items</a></li>
24
    [% IF ( CAN_user_reserveforothers ) %]
25
    [% IF ( CAN_user_reserveforothers ) %]
25
    [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio_object_id %]">Holds</a></li>
26
    [% 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>
26
    [% END %]
27
    [% END %]
27
    [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]&amp;analyze=1">Analytics</a></li>[% END %]
28
    [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio_object_id %]&amp;analyze=1">Analytics</a></li>[% END %]
28
29
29
- 

Return to bug 14557