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.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Aleisha Amohia 2020-02-13 04:24:08 +00:00 committed by Martin Renvoize
parent 242ced55e2
commit b36b76d201
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -702,8 +702,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>
@ -891,6 +891,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..."));