From 01168282a878e2c671fbae51f60a5b40b84b2c35 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 12 Mar 2020 07:07:48 -0400 Subject: [PATCH] Bug 24767: "Claim returned" feature cannot be 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! --- .../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 1eeb19e3af..15c40b1cd8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -861,23 +861,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
  • @@ -962,7 +964,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 cfc2a0ab23..51980f2806 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.21.1 (Apple Git-122.3)