Bug 24666: Display not registered guarantors on the patron detail page

There was no way to see the not registered guarantors apart of editing
the patron.

Test plan:
- Create a patron with category type "Child"
- Define a "guarantor surname" and/or "guarantor firstname" in the
"Contact" block (the patron is not registered)
- See the patron's detail page and notice that the info appear
- Edit and add a registered guarantor
- See the patron's detail page and notice that the 2 guarantors info appear

Note that the relationship has been added.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2020-02-17 14:39:50 +01:00 committed by Martin Renvoize
parent 7472977655
commit 18eeaed95f
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 6 additions and 3 deletions

View File

@ -263,9 +263,9 @@
[% END %]
</ul>
</li>
[% ELSIF guarantor_relationships.count > 0 %]
[% ELSIF guarantor_relationships.count > 0 OR ( patron.contactfirstname OR patron.contactname ) %]
<li>
[% IF guarantor_relationships.count > 1 %]
[% IF guarantor_relationships.count > 1 OR guarantor_relationships.count == 0 AND ( patron.contactfirstname OR patron.contactname ) %]
<span class="label">Guarantors:</span>
[% ELSE %]
<span class="label">Guarantor:</span>
@ -274,9 +274,12 @@
[% FOREACH gr IN guarantor_relationships %]
[% SET guarantor = gr.guarantor %]
[% IF logged_in_user.can_see_patron_infos( guarantor ) %]
<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.id | uri %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a></li>
<li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.id | uri %]">[% guarantor.firstname | html %] [% guarantor.surname | html %][% IF gr.relationship %] ([% gr.relationship %])[% END %]</a></li>
[% END %]
[% END %]
[% IF patron.contactfirstname OR patron.contactname %]
<li>[% patron.contactfirstname %] [% patron.contactname %][% IF patron.relationship %] ([% patron.relationship %])[% END %]</li>
[% END %]
</ul>
</li>
[% END %]