[Bug 24710] New: patron-title.inc should have seperate span classes for firstname, othername, surname
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Bug ID: 24710 Summary: patron-title.inc should have seperate span classes for firstname, othername, surname Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Some libraries would prefer to be able to customize how the name is displayed in the patron details. If these included <span> classes we could easily move/hide/reorder bits we don;t want. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 99428 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99428&action=edit Bug 24710: Add span classes to patron first/other/sur names This patch adds some <span> elements with classes to patron-title.inc TEST PLAN: 1. Have a patron with a firstname, surname, and othername 2. Apply patch 3. There should be no visible changes but if you inscept each element you should see seperate elements with clases. 4. Add each of these to IntranetUserCSS to make sure it hides that element (this effects patroninfo section AND breadcrumbs) .firstname {display: none;} .othernames {display:none}; .surname{display:none} 5. Sign-off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Sarah Cornell <sbcornell@cityofportsmouth.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sbcornell@cityofportsmouth. | |com --- Comment #2 from Sarah Cornell <sbcornell@cityofportsmouth.com> --- Here's our use case: We want to display the "other name" value at the end of the patron name because we use it for both additional patron names and for nicknames. Current display: Jo (Joy Harjo, Sharon Olds, Gertrude Stein, Mary Oliver) Tech (24518000721715) Ideal display: Jo Tech (Joy Harjo, Sharon Olds, Gertrude Stein, Mary Oliver) (24518000721715) I'd test Lucas' patch myself but I'm not good at the IntranetUserCSS syspref yet. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Maryse Simard <maryse.simard@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99428|0 |1 is obsolete| | --- Comment #3 from Maryse Simard <maryse.simard@inlibro.com> --- Created attachment 99451 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99451&action=edit Bug 24710: Add span classes to patron first/other/sur names This patch adds some <span> elements with classes to patron-title.inc TEST PLAN: 1. Have a patron with a firstname, surname, and othername 2. Apply patch 3. There should be no visible changes but if you inscept each element you should see seperate elements with clases. 4. Add each of these to IntranetUserCSS to make sure it hides that element (this effects patroninfo section AND breadcrumbs) .firstname {display: none;} .othernames {display:none}; .surname{display:none} 5. Sign-off Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Maryse Simard <maryse.simard@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |maryse.simard@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Lucas, looking at the patch I wonder why some classes seem to be missing: [%- IF display_patron_name -%] [%- IF data.category_type == 'I' -%] - [%- data.surname | html %] [% IF data.othernames %] ([% data.othernames | html %])[% END -%] + <span class="surname">[%- data.surname | html %]</span> [% IF data.othernames %] <span class="othernames">([% data.othernames | html %])</span>[% END -%] [%- ELSIF invert_name -%] - [% data.title | $raw %][%- data.surname | html %], [% data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END -%] + [% data.title | $raw %][%- data.surname | html %], <span class="firstname">[% data.firstname | html %]</span> [% IF data.othernames %] ([% data.othernames | html %]) [% END -%] Here the surname could have a class as well, to keep things consistent. [%- ELSE -%] - [% data.title | $raw %][%- data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END %] [% data.surname | html -%] + [% data.title | $raw %]<span class="firstname">[%- data.firstname | html %]</span> [% IF data.othernames %]<span class="othernames">([% data.othernames | html %])</span> [% END %]<span class="surname"> [% data.surname | html -%]</span> Should we add a class for title as well? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99451|0 |1 is obsolete| | --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 99472 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99472&action=edit Bug 24710: Add span classes to patron first/other/sur names This patch adds some <span> elements with classes to patron-title.inc TEST PLAN: 1. Have a patron with a title, firstname, surname, and othername 2. Apply patch 3. There should be no visible changes but if you inscept each element you should see seperate elements with clases. 4. Add each of these to IntranetUserCSS to make sure it hides that element (this effects patroninfo section AND breadcrumbs) .firstname {display: none;} .othernames {display:none}; .surname{display:none;} .title{display:none;} 5. Sign-off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Lucas, if you do a follow-up (a second patch with the requested changes) next time, you can keep the signed-off status most of the time (also applies to bug 23547) and the original sign-offer won't be lost either. It's how we usually handle things once the first sign-off has been achieved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99472|0 |1 is obsolete| | --- Comment #7 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 99683 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=99683&action=edit Bug 24710: Add span classes to patron first/other/sur names This patch adds some <span> elements with classes to patron-title.inc TEST PLAN: 1. Have a patron with a title, firstname, surname, and othername 2. Apply patch 3. There should be no visible changes but if you inscept each element you should see seperate elements with clases. 4. Add each of these to IntranetUserCSS to make sure it hides that element (this effects patroninfo section AND breadcrumbs) .firstname {display: none;} .othernames {display:none}; .surname{display:none;} .title{display:none;} 5. Sign-off Signed-off-by: George Williams <georgew@nekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Lucas, sorry, but after looking into this more deeply, I saw that I was mistaken to ask for a span around title - we already got one! I am sorry for not noticing these things earlier: 1) Remove the title span again, because: [%- IF data.title %] [%- IF no_html %] [%- span_start = '' %] [%- span_end = '' %] [%- ELSE %] [%- span_start = '<span class="patron-title">' %] [%- span_end = '</span>' %] [%- END %] [% data.title = data.title | html %] [%- SET data.title = span_start _ data.title _ span_end _ ' ' -%] This code already adds a class patron-title. See the no_html flag? 2) Change the other spans to be added the same way, to honor the no_html flag. I think the no_html is needed because there are some tags that don't allow the use of spans inside. Especially the title tag. Example: koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt:<title>Koha › Patrons › Purchase suggestions for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title> 3) There is a corresponding file for the OPAC we should change - prefrrably on this bug, but we could also do a separate one: koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #99683|0 |1 is obsolete| | --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 100078 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=100078&action=edit Bug 24710: patron-title.inc should have seperate span classes for names This patch adds some <span> elements with classes to patron-title.inc for both the staff client and OPAC TEST PLAN: 1. Have a patron with a firstname, surname, and othername and title 2. Apply patch 3. There should be no visible changes but if you inscept each element you should see seperate elements with clases. 4. Add each of these to IntranetUserCSS to make sure it hides that element (this effects patroninfo section AND breadcrumbs) .patron-firstname {display: none;} .patron-othernames {display:none}; .patron-surname{display:none} .patron-title{display:none} 5. On the OPAC navigate to /cgi-bin/koha/opac-user.pl and check the names by adding the same CSS to OPACUserCSS 6. Sign-off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #100078|0 |1 is obsolete| | --- Comment #10 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 101557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101557&action=edit Bug 24710: patron-title.inc should have seperate span classes for names This patch adds some <span> elements with classes to patron-title.inc for both the staff client and OPAC TEST PLAN: 1. Have a patron with a firstname, surname, and othername and title 2. Apply patch 3. There should be no visible changes but if you inscept each element you should see seperate elements with clases. 4. Add each of these to IntranetUserCSS to make sure it hides that element (this effects patroninfo section AND breadcrumbs) .patron-firstname {display: none;} .patron-othernames {display:none}; .patron-surname{display:none} .patron-title{display:none} 5. On the OPAC navigate to /cgi-bin/koha/opac-user.pl and check the names by adding the same CSS to OPACUserCSS 6. Sign-off Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Sally <sally.healey@cheshiresharedservices.gov.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Lucas, that will not work for all places where patron-title.inc is used, because of the no_html flag. Not against the approach but, because of the above, I am wondering if this really answer the need. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- This include file is getting too complex. We should move that the logic to a module. I am not asking that for now, but that needs to be taken into account for future changes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- Not sure how I should proceed here, should I go back to something more simple like in the first patch I provided where I simply added <span> classes to the include? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Lucas Gass from comment #13)
Not sure how I should proceed here, should I go back to something more simple like in the first patch I provided where I simply added <span> classes to the include?
The first version doesn't work - it will definitely create problems with the no_html flag. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Jonathan, why do you think the latest patch will break for the no_html flag? The latest patch looks good to me on first glance and the OPAC file is not used for a title tag as far as I can tell and is much simpler. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- When no_html is passed, the spans won't appear and the elements won't be hidden. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- There are also "\n" displayed in the patron search table. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Failing QA regarding the last 2 comments. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #19 from Sarah Cornell <sbcornell@cityofportsmouth.com> --- I'm just stopping by to poke this bug back into life. We're still interested in reordering title, firstname, surname, and othername values in patron details. Not sure how else I can help, though! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #20 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #16)
When no_html is passed, the spans won't appear and the elements won't be hidden.
Title elements cannot contain other html tags, and that's why we have the no_html option. If we want a fully working solution we should have a syspref that defines how patron's names are displayed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |DUPLICATE --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** This bug has been marked as a duplicate of bug 30568 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 --- Comment #22 from Lucas Gass <lucas@bywatersolutions.com> --- Could we have 2 includes here? A patron-title-html.inc and a patron-title-nohtml.inc? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24710 Steve, OSLRI, USA <sspohn@oslri.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sspohn@oslri.net --- Comment #23 from Steve, OSLRI, USA <sspohn@oslri.net> --- We are interested in this bug moving ahead. We are using "borrowers.othernames" to store what we are calling "legal name if different". Our primary intent is to serve trans patrons who may not have yet legally changed names. We would like this field in the system. However, we want to dramatically reduce where and how it displays. E.g., there is no need to see it when simply checking out a book. In fact, it's really only necessary when confirming ID, pursuing legal action or editing the patron's record. The ability to more finely control how a name displays would be advantageous to us for this purpose. Hope this helps! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org