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>
This commit is contained in:
parent
3779dcd085
commit
94eae1df00
2 changed files with 22 additions and 9 deletions
|
@ -1,10 +1,23 @@
|
|||
[% IF category_type == 'I' %]
|
||||
[% surname %] [% IF othernames %] ([% othernames %]) [% END %]
|
||||
[% ELSE %]
|
||||
[% IF invert_name %]
|
||||
[% surname %], [% firstname %]
|
||||
[% IF ( borrower.borrowernumber ) %]
|
||||
[% IF borrower.category_type == 'I' %]
|
||||
[% borrower.surname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %]
|
||||
[% ELSE %]
|
||||
[% firstname %] [% surname %]
|
||||
[% 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 %]
|
||||
[% END %]
|
||||
([% cardnumber %])
|
||||
([% 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 %]
|
|
@ -62,7 +62,7 @@
|
|||
<td>[% resultsloo.cardnumber %]</td>
|
||||
<td style="white-space: nowrap;">
|
||||
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">
|
||||
[% INCLUDE 'patron-title.inc' category_type = resultsloo.category_type firstname = resultsloo.firstname surname = resultsloo.surname othernames = resultsloo.othernames cardnumber = resultsloo.cardnumber invert_name = 1%]
|
||||
[% INCLUDE 'patron-title.inc' borrowernumber = resultsloo.borrowernumber category_type = resultsloo.category_type firstname = resultsloo.firstname surname = resultsloo.surname othernames = resultsloo.othernames cardnumber = resultsloo.cardnumber invert_name = 1%]
|
||||
</a> <br />
|
||||
[% IF ( resultsloo.streetnumber ) %][% resultsloo.streetnumber %] [% END %][% resultsloo.address %][% IF ( resultsloo.address2 ) %]<br />[% resultsloo.address2 %][% END %][% IF ( resultsloo.city ) %]<br />[% resultsloo.city %][% IF ( resultsloo.state ) %],[% END %][% END %][% IF ( resultsloo.state ) %] [% resultsloo.state %][% END %] [% IF ( resultsloo.zipcode ) %] [% resultsloo.zipcode %][% END %][% IF ( resultsloo.country ) %], [% resultsloo.country %][% END %]</td>
|
||||
<td>[% resultsloo.category_description %] ([% resultsloo.category_type %])</td>
|
||||
|
|
Loading…
Reference in a new issue