Koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
Owen Leonard 94eae1df00 Bug 2930 [REVISED] Put other name on checkout screen
This patch adds other name to the include which is used
to display patron names and adds this include in several
places where it can be used in place of direct output.

The patron-title include has been modified to handle the
two possible variable scopes throughout patron-related
templates. This is a hack similar to having both
circ-menu.tt and circ-menu.inc, but keeping both in the
same file.

Changes to some scripts were necessary to make the
othernames variable available to the include.

This patch also corrects some <title> tags and fixes
some incorrect capitalization (see Bug 2780).

To test, view each of the pages affected by these
template changes and confirm that the patron's name
displays correctly, including their "other name."

Signed-off-by: Marc Veron <veron@veron.ch>
Followed instructions above, works as expected.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-10-09 12:23:39 +02:00

23 lines
No EOL
1,006 B
PHP

[% IF ( borrower.borrowernumber ) %]
[% IF borrower.category_type == 'I' %]
[% borrower.surname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %]
[% ELSE %]
[% IF invert_name %]
[% borrower.surname %], [% borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %]
[% ELSE %]
[% borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% borrower.surname %]
[% END %]
[% END %]
([% borrower.cardnumber %])
[% ELSIF ( borrowernumber ) %]
[% IF category_type == 'I' %]
[% surname %] [% IF othernames %] ([% othernames %]) [% END %]
[% ELSE %]
[% IF invert_name %]
[% surname %], [% firstname %] [% IF othernames %] ([% othernames %]) [% END %]
[% ELSE %]
[% firstname %] [% IF othernames %] ([% othernames %]) [% END %] [% surname %]
[% END %]
[% END %]
([% cardnumber %])
[% END %]