From b393358fab8a834b816f253e6a76e07cd582e5be 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! Signed-off-by: Sally --- .../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.11.0