From 5d4f396c7e9114dbfb0bb45bc2b9e862b2af0ecd 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 Signed-off-by: Joy Nelson --- .../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 62b7fd1709..bbb77ce477 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 e9935edea1..bab29e47e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -719,23 +719,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 @@ -829,7 +831,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