Bug 17946: Show number of subscriptions on tab in OPAC record details
authorAleisha Amohia <aleishaamohia@hotmail.com>
Thu, 19 Jan 2017 21:54:12 +0000 (21:54 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 31 Mar 2017 13:49:49 +0000 (13:49 +0000)
This patch removes some duplicate code.

To test:
1) Edit at least one subscription (or add a new one) to have a record
2) Find that record on the OPAC
3) Confirm that the Subscriptions tab reads the correct number of
subscriptions attached to the record

Sponsored-by: Catalyst IT

Signed-off-by: JMBroust <jean-manuel.broust@univ-lyon2.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
opac/opac-detail.pl

index 7e53638..4e0a5e7 100644 (file)
 
                         [% IF ( subscriptionsnumber ) %]
                             [% IF ( defaulttab == 'subscriptions' ) %]<li id="tab_subscriptions" class="ui-tabs-active">[% ELSE %]<li id="tab_subscriptions">[% END %]
-                                <a href="#subscriptions">Subscriptions</a>
+                                <a href="#subscriptions">Subscriptions ( [% subscriptionsnumber %] )</a>
                             </li>
                         [% END %]
 
index 52deec6..1336ae1 100755 (executable)
@@ -856,7 +856,6 @@ if ( C4::Context->preference("OPACISBD") ) {
 $template->param(
     itemloop            => \@itemloop,
     otheritemloop       => \@otheritemloop,
-    subscriptionsnumber => $subscriptionsnumber,
     biblionumber        => $biblionumber,
     subscriptions       => \@subs,
     subscriptionsnumber => $subscriptionsnumber,