Bugzilla – Attachment 166988 Details for
Bug 36912
Add more spans/classes to member-display-address-style.inc for additional styling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36912: Add more spans/classes to member-display-address-style.inc
Bug-36912-Add-more-spansclasses-to-member-display-.patch (text/plain), 6.99 KB, created by
Lucas Gass (lukeg)
on 2024-05-21 20:41:37 UTC
(
hide
)
Description:
Bug 36912: Add more spans/classes to member-display-address-style.inc
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-05-21 20:41:37 UTC
Size:
6.99 KB
patch
obsolete
>From 4e2f7cb0dde14c79fcab053eda43cc3d3b54d35d Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 21 May 2024 20:37:04 +0000 >Subject: [PATCH] Bug 36912: Add more spans/classes to > member-display-address-style.inc > >To test: >1. APPLY PATCH >2. Make an AV for ROADTYPE >3. Find a patron record and make sure the entire 'Main address' portin is filled out. ( street number, street type, address, address 2, ZIP, City, State, and Country ) >4. For easier testing you can add this test CSS to IntranetUSerCSS: > >.patronaddress1 { > .streetnumber { > color: blue; > } > .address1 { > color: green; > } > .roadtype { > color: pink; > } >} > >.patronaddress2 { > color: lightgreen; >} > >.patroncity { > .city { > color: orange; > } > .state { > color: brown; > } > .zipcode { > color: limegreen; > } > .comma { > color: teal; > } > .country { > color: red; > } >} > >5. Go to the patron's record and look aty the brief info. you should see classes for everything in the address block. If you added the CSS from above everything should be colored differently. >6. Find the system pref 'AddressFormat' and test everything in US style, French style, and German style. >--- > .../includes/member-display-address-style.inc | 22 +++++++++---------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc >index 83fa575bd1..d493db9b68 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style.inc >@@ -17,7 +17,7 @@ > [%~ IF patron.streettype ~%] > [%~ SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', patron.streettype) ~%] > [%~ END ~%] >- <li class="patronaddress1">[%~ if (patron.streetnumber) | html ~%][%~ patron.streetnumber |html ~%][%~ end | html %] [% patron.address | html %] [% IF roadtype_desc ~%][%~ roadtype_desc |html %] [% END ~%][%~ end | html ~%]</li> >+ <li class="patronaddress1">[%~ if (patron.streetnumber) | html ~%]<span class="streetnumber">[%~ patron.streetnumber |html ~%]</span>[%~ end | html %] <span class="address1">[% patron.address | html %]</span> [% IF roadtype_desc ~%]<span class="roadtype">[%~ roadtype_desc |html %]</span> [% END ~%][%~ end | html ~%]</li> > [%~ END ~%] > [%~ IF ( patron.address2 ) ~%] > <li class="patronaddress2">[%~ patron.address2 |html ~%]</li> >@@ -25,8 +25,8 @@ > [%~ END ~%] > [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%] > <li class="patroncity"> >- [%~ patron.city |html ~%][%~ IF ( patron.state ) %][%~ IF ( patron.city ) ~%], [% END ~%][% patron.state |html ~%][%~ END ~%] >- [%~ IF ( patron.zipcode ) %][%~ " " _ patron.zipcode |html ~%][% END %][%~ IF ( patron.country ) %][%~ IF ( patron.zipcode || patron.state || patron.city ) ~%], [% END ~%][% patron.country |html ~%][%~ END ~%] >+ <span class="city">[%~ patron.city |html ~%]</span>[%~ IF ( patron.state ) %][%~ IF ( patron.city ) ~%], [% END ~%]<span class="state">[% patron.state |html ~%]</span>[%~ END ~%] >+ [%~ IF ( patron.zipcode ) %]<span class="zipcode">[%~ " " _ patron.zipcode |html ~%]</span>[% END %][%~ IF ( patron.country ) %][%~ IF ( patron.zipcode || patron.state || patron.city ) ~%]<span class="comma">,</span> [% END ~%]<span class="country">[% patron.country |html ~%]</span>[%~ END ~%] > </li> > [%~ END ~%] > [%~ END ~%] >@@ -38,7 +38,7 @@ > [%~ IF patron.streettype ~%] > [%~ SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', patron.streettype) ~%] > [%~ END ~%] >- <li class="patronaddress1">[%~ patron.address | html ~%][%~IF roadtype_desc %] [% roadtype_desc | html ~%][%~ END ~%][%~ IF patron.streetnumber %] [% patron.streetnumber | html ~%][%~ END ~%]</li> >+ <li class="patronaddress1"><span class="address1">[%~ patron.address | html ~%]</span>[%~IF roadtype_desc %] <span class="roadtype">[% roadtype_desc | html ~%]</span>[%~ END ~%][%~ IF patron.streetnumber %] <span class="streetnumber">[% patron.streetnumber | html ~%]</span>[%~ END ~%]</li> > [%~ END ~%] > [%~ IF ( patron.address2 ) ~%] > <li class="patronaddress2">[%~ patron.address2 | html ~%]</li> >@@ -46,8 +46,8 @@ > [%~ END ~%] > [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%] > <li class="patroncity"> >- [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%][% line_break | $raw %][%~ patron.state | html ~%][%~ END ~%] >- [%~ IF ( patron.country ) ~%][% line_break | $raw %][%~ patron.country | html ~%][%~ END ~%] >+ [%~ IF ( patron.zipcode ) ~%]<span class="zipcode">[%~ patron.zipcode | html %]</span> [% END ~%]<span class="city">[%~ patron.city | html ~%]</span>[%~ IF ( patron.state ) ~%][% line_break | $raw %]<span class="state">[%~ patron.state | html ~%]</span>[%~ END ~%] >+ [%~ IF ( patron.country ) ~%][% line_break | $raw %]<span class="country">[%~ patron.country | html ~%]</psan>[%~ END ~%] > </li> > [%~ END ~%] > [%~ END ~%] >@@ -59,9 +59,9 @@ > [%~ IF patron.streettype ~%] > [%~ SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', patron.streettype) ~%] > [%~ END ~%] >- <li class="patronaddress1">[%~ IF patron.streetnumber ~%][%~ patron.streetnumber | html %] [% END ~%] >- [%~IF roadtype_desc ~%][%~ roadtype_desc | html %] [% END ~%] >- [%~ patron.address | html ~%] >+ <li class="patronaddress1">[%~ IF patron.streetnumber ~%]<span class="streetnumber">[%~ patron.streetnumber | html %]</span> [% END ~%] >+ [%~IF roadtype_desc ~%]<span class="roadtype">[%~ roadtype_desc | html %]</span> [% END ~%] >+ <span class="address1">[%~ patron.address | html ~%]</span> > </li> > [%~ END ~%] > [%~ IF ( patron.address2 ) ~%] >@@ -70,8 +70,8 @@ > [%~ END ~%] > [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%] > <li class="patroncity"> >- [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%][% line_break | $raw %][%~ patron.state | html ~%][%~ END ~%] >- [%~ IF ( patron.country ) ~%][% line_break | $raw %][%~ patron.country | html ~%][%~ END ~%] >+ [%~ IF ( patron.zipcode ) ~%]<span class="zipcode">[%~ patron.zipcode | html %]</span> [% END ~%]<span class="city">[%~ patron.city | html ~%]</span>[%~ IF ( patron.state ) ~%][% line_break | $raw %]<span class="state">[%~ patron.state | html ~%]</span>[%~ END ~%] >+ [%~ IF ( patron.country ) ~%][% line_break | $raw %]<span class="country">[%~ patron.country | html ~%]</span>[%~ END ~%] > </li> > [%~ END ~%] > [%~ END ~%] >-- >2.39.2
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 36912
:
166988
|
167098