Lines 1-27
Link Here
|
1 |
[%- IF ( borrower.borrowernumber ) %] |
1 |
[%- USE Koha -%] |
2 |
[%- IF borrower.category_type == 'I' %] |
2 |
[%- USE Branches -%] |
3 |
[%- borrower.surname | html %] [% IF borrower.othernames %] ([% borrower.othernames | html %]) [% END %] |
3 |
[%- SET data = {} -%] |
4 |
[%- ELSE %] |
4 |
[%- IF patron -%] |
5 |
[%- IF invert_name %] |
5 |
[%- SET data.category_type = patron.category.category_type -%] |
6 |
[%- borrower.surname | html %], [% borrower.firstname | html %] [% IF borrower.othernames %] ([% borrower.othernames | html %]) [% END %] |
6 |
[%- SET data.surname = patron.surname -%] |
7 |
[%- ELSE %] |
7 |
[%- SET data.othernames = patron.othernames -%] |
8 |
[%- borrower.firstname | html %] [% IF borrower.othernames %] ([% borrower.othernames | html %]) [% END %] [% borrower.surname | html %] |
8 |
[%- SET data.surname = patron.surname -%] |
9 |
[%- END -%] |
9 |
[%- SET data.firstname = patron.firstname -%] |
|
|
10 |
[%- SET data.cardnumber = patron.cardnumber -%] |
11 |
[%- SET data.borrowernumber = patron.borrowernumber -%] |
12 |
[%- ELSIF ( borrower.borrowernumber ) -%] |
13 |
[%- SET data.category_type = borrower.category_type -%] |
14 |
[%- SET data.surname = borrower.surname -%] |
15 |
[%- SET data.othernames = borrower.othernames -%] |
16 |
[%- SET data.surname = borrower.surname -%] |
17 |
[%- SET data.firstname = borrower.firstname -%] |
18 |
[%- SET data.cardnumber = borrower.cardnumber -%] |
19 |
[%- SET data.borrowernumber = borrower.borrowernumber -%] |
20 |
[%- ELSIF ( borrowernumber ) -%] |
21 |
[%- SET data.category_type = category_type -%] |
22 |
[%- SET data.surname = surname -%] |
23 |
[%- SET data.othernames = othernames -%] |
24 |
[%- SET data.surname = surname -%] |
25 |
[%- SET data.firstname = firstname -%] |
26 |
[%- SET data.cardnumber = cardnumber -%] |
27 |
[%- SET data.borrowernumber = borrowernumber -%] |
28 |
[%- END -%] |
29 |
[%- SET display_patron_name = 1 -%] |
30 |
[%- SET display_cardnumber = 1 -%] |
31 |
[%- IF hide_patron_infos_if_needed %] [%# Should only be set if patron is set -%] |
32 |
[%- SET can_see_patron_infos = logged_in_user.can_see_patron_infos( patron ) -%] |
33 |
[%- UNLESS can_see_patron_infos -%] |
34 |
[%- SET display_patron_name = 0 -%] |
35 |
[%- SET display_cardnumber = 0 -%] |
36 |
[%- ELSIF Koha.Preference('HidePatronName') -%] |
37 |
[%- SET display_patron_name = 0 -%] |
38 |
[%- END -%] |
39 |
[%- END -%] |
40 |
[%- IF hide_patron_infos_if_needed AND ( display_patron_name OR display_cardnumber ) -%] |
41 |
[%- IF link_to == 'circulation_reserves' %]<a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% data.borrowernumber %]#reserves"> |
42 |
[%- ELSE %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]"> |
10 |
[%- END -%] |
43 |
[%- END -%] |
11 |
[%- IF ( borrower.cardnumber ) -%] |
44 |
[%- END -%] |
12 |
([% borrower.cardnumber | html %]) |
45 |
[%- IF data.category_type == 'I' -%] |
13 |
[%- END %] |
46 |
[%- UNLESS display_patron_name %][%- data.surname | html %] [% IF data.othernames %] [% END %]([% data.othernames | html %]) [% END -%] |
14 |
[%- ELSIF ( borrowernumber ) %] |
47 |
[%- ELSIF display_patron_name -%] |
15 |
[%- IF category_type == 'I' %] |
48 |
[%- IF invert_name -%] |
16 |
[%- surname | html %] [% IF othernames %] ([% othernames | html %]) [% END %] |
49 |
[%- data.surname | html %], [% data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END -%] |
17 |
[%- ELSE %] |
50 |
[%- ELSE -%] |
18 |
[%- IF invert_name %] |
51 |
[%- data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END %] [% data.surname | html -%] |
19 |
[%- surname | html %], [% firstname | html %] [% IF othernames %] ([% othernames | html %]) [% END %] |
52 |
[%- END -%] |
20 |
[%- ELSE %] |
53 |
[%- IF display_cardnumber AND data.cardnumber %]([% data.cardnumber | html %])[% END -%] |
21 |
[%- firstname | html %] [% IF othernames %] ([% othernames | html %]) [% END %] [% surname | html %] |
54 |
[%- ELSIF display_cardnumber -%] |
22 |
[%- END %] |
55 |
[%- IF data.cardnumber -%][%# FIXME Cardnumber should always be defined, right? -%] |
|
|
56 |
[%- data.cardnumber | html -%] |
23 |
[%- END -%] |
57 |
[%- END -%] |
24 |
[%- IF ( cardnumber ) -%] |
58 |
[%- ELSE -%] |
25 |
([% cardnumber | html %]) |
59 |
A patron from library [% Branches.GetName( patron.branchcode ) -%] |
26 |
[%- END %] |
60 |
[%- END -%] |
|
|
61 |
|
62 |
[%- IF hide_patron_infos_if_needed AND ( display_patron_name OR display_cardnumber ) -%] |
63 |
</a> |
27 |
[%- END -%] |
64 |
[%- END -%] |