Bug 15400: Clarify usage of patron-age.inc
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
dd7490c808
commit
a2207a080b
1 changed files with 5 additions and 2 deletions
|
@ -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 -%]
|
||||
<span class='age_years'>[% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %]</span>
|
||||
[%- IF age %]
|
||||
[%- patron.dateofbirth | $KohaDates %]
|
||||
<span class='age_years'>[% I18N.tnx('({age} year)', '({age} years)', age, { age => age }) | html %]</span>
|
||||
[%- END -%]
|
||||
[%- END -%]
|
||||
[%- END -%]
|
||||
|
|
Loading…
Reference in a new issue