From 4e2f7cb0dde14c79fcab053eda43cc3d3b54d35d Mon Sep 17 00:00:00 2001 From: Lucas Gass 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 ~%] -
  • [%~ if (patron.streetnumber) | html ~%][%~ patron.streetnumber |html ~%][%~ end | html %] [% patron.address | html %] [% IF roadtype_desc ~%][%~ roadtype_desc |html %] [% END ~%][%~ end | html ~%]
  • +
  • [%~ if (patron.streetnumber) | html ~%][%~ patron.streetnumber |html ~%][%~ end | html %] [% patron.address | html %] [% IF roadtype_desc ~%][%~ roadtype_desc |html %] [% END ~%][%~ end | html ~%]
  • [%~ END ~%] [%~ IF ( patron.address2 ) ~%]
  • [%~ patron.address2 |html ~%]
  • @@ -25,8 +25,8 @@ [%~ END ~%] [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%]
  • - [%~ 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 ~%] + [%~ 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 ~%]
  • [%~ END ~%] [%~ END ~%] @@ -38,7 +38,7 @@ [%~ IF patron.streettype ~%] [%~ SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', patron.streettype) ~%] [%~ END ~%] -
  • [%~ patron.address | html ~%][%~IF roadtype_desc %] [% roadtype_desc | html ~%][%~ END ~%][%~ IF patron.streetnumber %] [% patron.streetnumber | html ~%][%~ END ~%]
  • +
  • [%~ patron.address | html ~%][%~IF roadtype_desc %] [% roadtype_desc | html ~%][%~ END ~%][%~ IF patron.streetnumber %] [% patron.streetnumber | html ~%][%~ END ~%]
  • [%~ END ~%] [%~ IF ( patron.address2 ) ~%]
  • [%~ patron.address2 | html ~%]
  • @@ -46,8 +46,8 @@ [%~ END ~%] [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%]
  • - [%~ 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 ) ~%][%~ 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 ~%]
  • [%~ END ~%] [%~ END ~%] @@ -59,9 +59,9 @@ [%~ IF patron.streettype ~%] [%~ SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', patron.streettype) ~%] [%~ END ~%] -
  • [%~ IF patron.streetnumber ~%][%~ patron.streetnumber | html %] [% END ~%] - [%~IF roadtype_desc ~%][%~ roadtype_desc | html %] [% END ~%] - [%~ patron.address | html ~%] +
  • [%~ IF patron.streetnumber ~%][%~ patron.streetnumber | html %] [% END ~%] + [%~IF roadtype_desc ~%][%~ roadtype_desc | html %] [% END ~%] + [%~ patron.address | html ~%]
  • [%~ END ~%] [%~ IF ( patron.address2 ) ~%] @@ -70,8 +70,8 @@ [%~ END ~%] [%~ IF ( patron.city || patron.zipcode || patron.state || patron.country ) ~%]
  • - [%~ 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 ) ~%][%~ 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 ~%]
  • [%~ END ~%] [%~ END ~%] -- 2.39.2