Koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-age.inc
Josef Moravec 9391d3b263 Bug 15400: (follow-up) Remove line break
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-06-29 12:37:02 +02:00

12 lines
525 B
PHP

[%# 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 ) -%]
[%- SET age = (patron.get_age != undef) ? patron.get_age : patron.age -%]
[%- IF age %]
[%- patron.dateofbirth | $KohaDates -%]
<span class='age_years'>[% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %]</span>
[%- END -%]
[%- END -%]
[%- END -%]