Bug 20981: Fix organization name when displaying patron's info
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Jun 2018 20:34:17 +0000 (17:34 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 22 Jun 2018 13:16:44 +0000 (13:16 +0000)
Caused by bug 18403.
From patron-title.inc, we need a IF instead of UNLESS.

Test plan:
Create organizations
Search for patrons
=> Without this patch the "Name" column is empty for organizations
=> With this patch applied you will see the surname (and othernames if
exists)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc

index 8d0aa74..1aa4a64 100644 (file)
     [%- ELSE %]<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]">
     [%- END -%]
 [%- END -%]
-[%- IF data.category_type == 'I' -%]
-    [%- UNLESS display_patron_name %][%- data.surname | html %] [% IF data.othernames %] [% END %]([% data.othernames | html %]) [% END -%]
-[%- ELSIF display_patron_name -%]
-    [%- IF invert_name -%]
+[%- IF display_patron_name -%]
+    [%- IF data.category_type == 'I' -%]
+        [%- data.surname | html %] [% IF data.othernames %] ([% data.othernames | html %])[% END -%]
+    [%- ELSIF invert_name -%]
         [% data.title%][%- data.surname | html %], [% data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END -%]
     [%- ELSE -%]
         [% data.title %][%- data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END %] [% data.surname | html -%]