Bugzilla – Attachment 101557 Details for
Bug 24710
patron-title.inc should have seperate span classes for firstname, othername, surname
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24710: patron-title.inc should have seperate span classes for names
Bug-24710-patron-titleinc-should-have-seperate-spa.patch (text/plain), 4.99 KB, created by
PTFS Europe Sandboxes
on 2020-03-24 12:49:44 UTC
(
hide
)
Description:
Bug 24710: patron-title.inc should have seperate span classes for names
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2020-03-24 12:49:44 UTC
Size:
4.99 KB
patch
obsolete
>From 97651cec35e29288e8839a4930138773c001c1c9 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 3 Mar 2020 21:18:37 +0000 >Subject: [PATCH] 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> >--- > .../prog/en/includes/patron-title.inc | 43 ++++++++++++++++++++-- > .../bootstrap/en/includes/patron-title.inc | 4 +- > 2 files changed, 42 insertions(+), 5 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 d5dcd7d0f0..2884a2a54f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc >@@ -40,6 +40,43 @@ > [% data.title = data.title | html %] > [%- SET data.title = span_start _ data.title _ span_end _ ' ' -%] > [%- END -%] >+ >+[%- IF data.surname %] >+ [%- IF no_html %] >+ [%- span_start = '' %] >+ [%- span_end = '' %] >+ [%- ELSE %] >+ [%- span_start = '<span class="patron-surname">' %] >+ [%- span_end = '</span>' %] >+ [%- END %] >+ [% data.surname = data.surname | html %] >+ [%- SET data.surname = span_start _ data.surname _ span_end _ ' ' -%] >+[%- END -%] >+ >+[%- IF data.firstname %] >+ [%- IF no_html %] >+ [%- span_start = '' %] >+ [%- span_end = '' %] >+ [%- ELSE %] >+ [%- span_start = '<span class="patron-firstname">' %] >+ [%- span_end = '</span>' %] >+ [%- END %] >+ [% data.firstname = data.firstname | html %] >+ [%- SET data.firstname = span_start _ data.firstname _ span_end _ ' ' -%] >+[%- END -%] >+ >+[%- IF data.othernames %] >+ [%- IF no_html %] >+ [%- span_start = '' %] >+ [%- span_end = '' %] >+ [%- ELSE %] >+ [%- span_start = '<span class="patron-othernames">' %] >+ [%- span_end = '</span>' %] >+ [%- END %] >+ [% data.othernames = data.othernames | html %] >+ [%- SET data.othernames = span_start _ data.othernames _ span_end _ ' ' -%] >+[%- END -%] >+ > [%- SET display_patron_name = 1 -%] > [%- SET display_cardnumber = 1 -%] > [%- IF hide_patron_infos_if_needed %] [%# Should only be set if patron is set -%] >@@ -58,11 +95,11 @@ > [%- END -%] > [%- IF display_patron_name -%] > [%- IF data.category_type == 'I' -%] >- [%- data.surname | html %] [% IF data.othernames %] ([% data.othernames | html %])[% END -%] >+ [%- data.surname | $raw %] [% IF data.othernames %] ([% data.othernames | $raw %])[% 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 | $raw %], [% data.firstname | $raw %] [% IF data.othernames %] ([% data.othernames | $raw %]) [% END -%] > [%- ELSE -%] >- [% data.title | $raw %][%- data.firstname | html %] [% IF data.othernames %] ([% data.othernames | html %]) [% END %] [% data.surname | html -%] >+ [% data.title | $raw %][%- data.firstname | $raw %] [% IF data.othernames %] ([% data.othernames | $raw %]) [% END %] [% data.surname | $raw -%] > [%- END -%] > [%- IF display_cardnumber AND data.cardnumber %] ([% data.cardnumber | html %])[% END -%] > [%- ELSIF display_cardnumber -%] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc >index d77961d713..147aaea4f1 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/patron-title.inc >@@ -1,8 +1,8 @@ > [%- IF patron.category.category_type == 'I' -%] >- [% patron.surname | html %][% IF patron.othernames %] ([% patron.othernames | html %]) [%- END -%] >+ <span class="patron-surname">[% patron.surname | html %]</span>[% IF patron.othernames %] <span class="patron-othernames">([% patron.othernames | html %])</span> [%- END -%] > [%- ELSE -%] > [%- IF patron.title -%] > <span class="patron-title">[% patron.title | html %]</span> > [%- END -%] >- [% patron.firstname | html %] [% patron.surname | html %] >+ <span class="patron-firstname">[% patron.firstname | html %]</span> <span class="patron-surname">[% patron.surname | html %]</span> > [%- END -%] >-- >2.11.0
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 24710
:
99428
|
99451
|
99472
|
99683
|
100078
| 101557