From 22f2494914a4bbec0bb4612e813515ee7412008a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 12 Mar 2020 07:07:48 -0400 Subject: [PATCH] Bug 24767: Hide the "Claim returned" tab if the feature is turned off The ability to claim an item "claim returned" is not there if the syspref is empty, however, the Claim Returned tab is stil present on the patrons detail page. Test Plan: 1) Ensure ClaimReturnedLostValue is not set 2) Note the claims tabs on the circulation and patron details pages 3) Apply this patch 4) Refresh those pages 5) The claims tabs should be gone! Signed-off-by: Sally Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- .../prog/en/modules/circ/circulation.tt | 40 ++++++++++--------- .../prog/en/modules/members/moremember.tt | 40 ++++++++++--------- 2 files changed, 44 insertions(+), 36 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 568eb5944a..8787de3232 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -860,23 +860,25 @@ [% END %] -
  • - [% IF ( patron.return_claims.count ) %] - - [% patron.return_claims.resolved.count | html %] - / - [% patron.return_claims.unresolved.count | html %] - Claim(s) - - [% ELSE %] - - 0 - / - 0 - Claim(s) - - [% END %] -
  • + [% IF Koha.Preference('ClaimReturnedLostValue') %] +
  • + [% IF ( patron.return_claims.count ) %] + + [% patron.return_claims.resolved.count | html %] + / + [% patron.return_claims.unresolved.count | html %] + Claim(s) + + [% ELSE %] + + 0 + / + 0 + Claim(s) + + [% END %] +
  • + [% END %]
  • [% debarments.count | html %] Restrictions
  • @@ -961,7 +963,9 @@ [% END # /IF holds_count %] - [% INCLUDE 'patron-return-claims.inc' %] + [% IF Koha.Preference('ClaimReturnedLostValue') %] + [% INCLUDE 'patron-return-claims.inc' %] + [% END %] [% IF Koha.Preference('ArticleRequests') %] [% INCLUDE 'patron-article-requests.inc' %] 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 f8ec612d47..ab3e89abf7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -722,23 +722,25 @@ [% END %] -
  • - [% IF ( patron.return_claims.count ) %] - - [% patron.return_claims.resolved.count | html %] - / - [% patron.return_claims.unresolved.count | html %] - Claim(s) - - [% ELSE %] - - 0 - / - 0 - Claim(s) - - [% END %] -
  • + [% IF Koha.Preference('ClaimReturnedLostValue') %] +
  • + [% IF ( patron.return_claims.count ) %] + + [% patron.return_claims.resolved.count | html %] + / + [% patron.return_claims.unresolved.count | html %] + Claim(s) + + [% ELSE %] + + 0 + / + 0 + Claim(s) + + [% END %] +
  • + [% END %]
  • [% debarments.size | html %] Restrictions @@ -834,7 +836,9 @@ [% # /div#reserves %] [% END %] - [% INCLUDE 'patron-return-claims.inc' %] + [% IF Koha.Preference('ClaimReturnedLostValue') %] + [% INCLUDE 'patron-return-claims.inc' %] + [% END %] [% IF Koha.Preference('ArticleRequests') %] [% INCLUDE 'patron-article-requests.inc' %] -- 2.39.5