From 012a1544f0edef248144a2ec99eafef1f8c88496 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 14 Apr 2021 11:35:17 +0000 Subject: [PATCH] Bug 27830: (follow-up) Merge DE and FR address formats Library addresses don't include the use of "Street Type" and "Street Number." DE and FR address formats differ only in the position of street type and number in the address sequence. This patch merges DE and FR address markup and uses the unified block if the address format system preference ISN'T "us". Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 953088f8167c545318fe63d41912eda657cde705) Signed-off-by: Fridolin Somers --- .../en/includes/display-library-address.inc | 61 +++++-------------- 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc index 4b0e39e638..5d129115c1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/display-library-address.inc @@ -3,10 +3,10 @@ [%~ BLOCK 'display-library-address' ~%] [%~ SET line_break = "
" ~%] [%~ IF no_line_break %][% SET line_break = " " %][% END ~%] - [%~ IF Koha.Preference( 'AddressFormat' ) ~%] - [%~ PROCESS "display-library-address-${ Koha.Preference( 'AddressFormat' ) }" ~%] - [%~ ELSE ~%] + [%~ IF Koha.Preference( 'AddressFormat' ) == "us" ~%] [%~ PROCESS 'display-library-address-us' ~%] + [%~ ELSE ~%] + [%~ PROCESS 'display-library-address-de-fr' ~%] [%~ END ~%] [%~ END ~%] @@ -33,17 +33,11 @@ [%~ END ~%] [%~ IF ( library.branchcity ) ~%]
- - [%~ library.branchcity |html ~%] - - [%~ IF ( library.branchstate ) %] - - , [% library.branchstate |html ~%] - - [%~ END ~%] + [%~ library.branchcity |html ~%] + [%~ IF ( library.branchstate ) %], [% library.branchstate |html ~%][%~ END ~%] [%~ IF ( library.branchzip ) %] - [%~ " " _ library.branchzip |html ~%] + [%~ library.branchzip |html ~%] [%~ END ~%] [%~ IF ( library.branchcountry ) %] @@ -55,18 +49,20 @@ [%~ END ~%] [%~ END ~%] -[%~ BLOCK 'display-library-address-de' ~%] +[%~ BLOCK 'display-library-address-de-fr' ~%] [%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%] [%~ IF ( library.branchaddress1 ) ~%] -
+ [%~ library.branchaddress1 | html ~%] -
+
+ [% line_break | $raw %] [%~ END ~%] [%~ IF ( library.branchaddress2 ) ~%] -
+ [%~ library.branchaddress2 | html ~%] -
+ + [% line_break | $raw %] [%~ END ~%] [%~ IF ( library.branchaddress3 ) ~%] @@ -76,38 +72,9 @@ [%~ END ~%] [%~ END ~%] - [%~ IF ( library.branchcity ) ~%] -
- [%~ IF ( library.branchzip ) ~%][%~ library.branchzip | html %] [% END ~%][%~ library.branchcity | html ~%][%~ IF ( library.branchstate ) ~%][% line_break | $raw %][%~ library.branchstate | html ~%][%~ END ~%] - [%~ IF ( library.branchcountry ) ~%][% line_break | $raw %][%~ library.branchcountry | html ~%][%~ END ~%] -
- [%~ END ~%] -[%~ END ~%] - -[%~ BLOCK 'display-library-address-fr' ~%] - [%~ IF ( library.branchaddress1 or library.branchaddress2 ) ~%] - [%~ IF ( library.branchaddress1 ) ~%] - - [%~ library.branchaddress1 | html ~%] - - [% line_break | $raw %] - [%~ END ~%] - [%~ IF ( library.branchaddress2 ) ~%] - - [%~ library.branchaddress2 | html ~%] - - [% line_break | $raw %] - [%~ END ~%] - [%~ IF ( library.branchaddress3 ) ~%] - - [%~ library.branchaddress3 | html ~%] - - [% line_break | $raw %] - [%~ END ~%] - [%~ END ~%] [%~ IF ( library.branchcity ) ~%] - [%~ IF ( library.branchzip ) ~%][%~ library.branchzip | html %] [% END ~%][%~ library.branchcity | html ~%][%~ IF ( library.branchstate ) ~%][% line_break | $raw %][%~ library.branchstate | html ~%][%~ END ~%] + [%~ IF ( library.branchzip ) ~%][%~ library.branchzip | html %] [% END ~%][%~ library.branchcity | html ~%][%~ IF ( library.branchstate ) ~%][% line_break | $raw %][%~ library.branchstate | html ~%][%~ END ~%] [%~ IF ( library.branchcountry ) ~%][% line_break | $raw %][%~ library.branchcountry | html ~%][%~ END ~%] [%~ END ~%] -- 2.39.5