@@ -, +, @@ --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc @@ -1,9 +1,12 @@ +[%# The variable patron must be passed, with either a Koha::Patron, or a HASHREF with the 'age' key -%] [%- USE KohaDates -%] [%- USE I18N -%] [%- IF ( patron ) -%] [%- IF ( patron.dateofbirth ) -%] - [%- patron.dateofbirth | $KohaDates %] [%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%] - [% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %] + [%- IF age %] + [%- patron.dateofbirth | $KohaDates %] + [% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %] + [%- END -%] [%- END -%] [%- END -%] --