From b013398d1fd3edbeac245784331fc3936fa67f51 Mon Sep 17 00:00:00 2001
From: Aleisha Amohia <aleishaamohia@hotmail.com>
Date: Thu, 13 Feb 2020 04:24:08 +0000
Subject: [PATCH] Bug 6508: (follow-up) Change layout of price and hide tab if
 no fines

With this patch, the tab will not show if there are no fines.
I've also changed how the fines look in the tab header to look more like
the OPAC fines tab.
---
 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
index f40dd4c..ced2480 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -699,8 +699,8 @@
                                     <a href="#relatives-issues" id="relatives-issues-tab">[% relatives_issues_count | html %] Relatives' checkouts</a>
                                 </li>
                             [% END %]
-                            <li>
-                                <a href="#finesandcharges">[% fines | $Price %] Fines &amp; Charges</a>
+                            <li id="finestab">
+                                <a href="#finesandcharges">Fines &amp; Charges ([% fines | $Price %])</a>
                             </li>
                             [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
                                 <li>
@@ -888,6 +888,11 @@
         columns_settings_issues_table = [% ColumnsSettings.GetColumns( 'members', 'moremember', 'issues-table', 'json' ) | $raw %]
 
         $(document).ready(function() {
+            $("#finestab").hide();
+            [% IF fines %]
+                $("#finestab").show();
+            [% END %]
+
             if ( $('#clubs-tab').length ) {
                 $('#clubs-tab-link').on('click', function() {
                     $('#clubs-tab').text(_("Loading..."));
-- 
2.1.4