From 708e0db05c677ac0f79e6372455b0cbc4645f285 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 17 Feb 2021 12:25:34 +0000 Subject: [PATCH] Bug 27717: Display date of birth even if the patron is under 1 This patch moves the 'age' condition to below the date of birth display, allowing the date to display for babies. Test plan 1/ Add a user with a date of birth within the last year 2/ Check that the date of birth appears on the patron details page (under contact details) with the patch applied. --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc index 74aa7dc6cd..153d9bac41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc @@ -4,7 +4,7 @@ [%- IF ( patron ) -%] [%- IF ( patron.dateofbirth ) -%] [%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%] - [%- IF age %] + [%- IF age >= 0 %] [%- patron.dateofbirth | $KohaDates -%] [% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %] [%- END -%] -- 2.20.1