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 Signed-off-by: Manvi <manvisharma1006@gmail.com> Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
91a78d1aec
commit
64796fde35
|
|
@ -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 -%]
|
||||
|
|
|
|||
Loading…
Reference in New Issue