Bugzilla – Attachment 191216 Details for
Bug 41586
Spacing problem in display of patron names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41586: Fix spacing problem in display of patron names
Bug-41586-Fix-spacing-problem-in-display-of-patron.patch (text/plain), 4.64 KB, created by
Owen Leonard
on 2026-01-09 17:34:13 UTC
(
hide
)
Description:
Bug 41586: Fix spacing problem in display of patron names
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2026-01-09 17:34:13 UTC
Size:
4.64 KB
patch
obsolete
>From 60e9ad668c9a41a36dff72b6a41522b933f0492e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 9 Jan 2026 09:29:24 -0500 >Subject: [PATCH] Bug 41586: Fix spacing problem in display of patron names > >This patch updates patron-title.inc which generates the output of patron >names throughout Koha. Some whitespace is added to the display of >borrowers.othernames and spaces removed from the maybe_span WRAPPER. > >To test, apply the patch and create or edit a patron in the staff >client. > >- Add a value to all the name fields: Surname, first name, preferred > name, middle name, and other name. >- Save the patron and check the display of their name on the patron > detail page. The name in the page heading and sidebar should have > correct spacing. >- Place a hold for that patron to be picked up at the logged-in library. >- Go to Circulation -> Holds to pull and confirm that the patron name is > displayed correctly (this tests the display when the format is > lastname, firstname). >- Edit the same patron and change its category to an organizational one > (Inter-Library Loan, Library, or School in the sample data). >- View the same pages listed above and confirm that the name displays > correctly. > >Sponsored-by: Athens County Public Libraries >--- > .../prog/en/includes/patron-title.inc | 19 +++++++++++-------- > 1 file changed, 11 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc >index 7161ca7a3b9..5c75ec72ff0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc >@@ -64,18 +64,24 @@ > [%- IF display_patron_name -%] > [%- IF data.category_type == 'I' -%] > [%- WRAPPER maybe_span field_name = 'surname' -%][%- data.surname | html -%][%- END -%] >- [%- IF data.othernames -%]([%- WRAPPER maybe_span field_name='othernames' -%][%- data.othernames | html -%][%- END -%])[%- END -%] >+ [%- IF data.othernames -%] >+ ([%- WRAPPER maybe_span field_name='othernames' -%][%- data.othernames | html -%][%- END -%]) >+ [%- END -%] > [%- ELSIF invert_name -%] > [%- UNLESS no_title %][%- WRAPPER maybe_span field_name='patron_title' -%][%- data.title _ ' ' | html -%][%- END -%][%- END -%] > [%- WRAPPER maybe_span field_name='surname' -%][%- data.surname | html -%][%- END -%] > [%- IF ( data.preferred_name ) -%], [%- WRAPPER maybe_span field_name='preferred_name' -%][% data.preferred_name | html -%][%- END -%][%- END -%] > [%- IF data.middle_name -%][%- WRAPPER maybe_span field_name='middle_name' -%][% ' ' _ data.middle_name | html -%][%- END -%][%- END -%] >- [%- IF data.othernames -%]([%- WRAPPER maybe_span field_name='othernames' -%][%- data.othernames | html -%][%- END -%])[%- END -%] >+ [%- IF data.othernames -%] >+ ([%- WRAPPER maybe_span field_name='othernames' -%][%- data.othernames | html -%][%- END -%]) >+ [%- END -%] > [%- ELSE -%] > [%- UNLESS no_title %][%- WRAPPER maybe_span field_name='patron_title' -%][%- data.title _ ' ' | html -%][%- END -%][%- END -%] > [%- WRAPPER maybe_span field_name='preferred_name' -%][%- data.preferred_name | html %][% END -%] > [%- IF data.middle_name -%][%- WRAPPER maybe_span field_name='middle_name' -%][% ' ' _ data.middle_name | html -%][%- END -%][%- END -%] >- [%- IF data.othernames -%][%- WRAPPER maybe_span field_name='othernames' -%][%- ' (' _ data.othernames _ ')' | html -%][%- END -%][%- END -%] >+ [%- IF data.othernames -%] >+ [%- WRAPPER maybe_span field_name='othernames' -%][%- ' (' _ data.othernames _ ')' | html -%][%- END -%] >+ [%- END -%] > [%- WRAPPER maybe_span field_name='surname' -%][% ' ' _ data.surname | html -%][%- END -%] > [%- END -%] > [%- IF display_cardnumber AND data.cardnumber -%][%- WRAPPER maybe_span field_name='cardnumber' -%][%- ' (' _ data.cardnumber _ ')' | html -%][%- END -%][%- END -%] >@@ -89,9 +95,6 @@ > [%- END -%] > [% END %] > [%- BLOCK maybe_span -%] >- [%- IF no_html -%] >- [%- content | $raw #filtered before passed in -%] >- [%- ELSE -%] >- <span class="[% field_name | html %]">[%- content | $raw #filtered before passed in -%]</span> >- [%- END -%] >+ [%- # All on one line to prevent unwanted whitespace -%] >+ [%- IF no_html -%][%- content | $raw #filtered before passed in -%][%- ELSE -%]<span class="[% field_name | html %]">[%- content | $raw #filtered before passed in -%]</span>[%- END -%] > [%- END -%] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41586
: 191216