From a33c5c1d0b3b8b540f20a51cce3dfee6c483ccbc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Apr 2020 16:25:34 +0200 Subject: [PATCH] Bug 22087: Add a no_line_break parameter to prevent new lines Signed-off-by: Katrin Fischer --- .../prog/en/includes/member-display-address-style.inc | 10 ++++++---- .../prog/en/modules/members/tables/members_results.tt | 2 +- 2 files changed, 7 insertions(+), 5 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 d2ef74ac2f..0592fc25ae 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 @@ -1,5 +1,7 @@ [%~ USE Koha ~%] [%~ BLOCK 'display-address-style' ~%] + [%~ SET line_break = "
" ~%] + [%~ IF no_line_break %][% SET line_break = " " %][% END ~%] [%~ IF Koha.Preference( 'AddressFormat' ) ~%] [%~ PROCESS "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }" ~%] [%~ ELSE ~%] @@ -43,8 +45,8 @@ [%~ END ~%] [%~ IF ( patron.city ) ~%]
  • - [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%]
    [%~ patron.state | html ~%][%~ END ~%] - [%~ IF ( patron.country ) ~%]
    [%~ patron.country | html ~%][%~ END ~%] + [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%][% line_break %][%~ patron.state | html ~%][%~ END ~%] + [%~ IF ( patron.country ) ~%][% line_break %][%~ patron.country | html ~%][%~ END ~%]
  • [%~ END ~%] [%~ END ~%] @@ -67,8 +69,8 @@ [%~ END ~%] [%~ IF ( patron.city ) ~%]
  • - [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%]
    [%~ patron.state | html ~%][%~ END ~%] - [%~ IF ( patron.country ) ~%]
    [%~ patron.country | html ~%][%~ END ~%] + [%~ IF ( patron.zipcode ) ~%][%~ patron.zipcode | html %] [% END ~%][%~ patron.city | html ~%][%~ IF ( patron.state ) ~%][% line_break %][%~ patron.state | html ~%][%~ END ~%] + [%~ IF ( patron.country ) ~%][% line_break %][%~ patron.country | html ~%][%~ END ~%]
  • [%~ END ~%] [%~ END ~%] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt index 95e8db7fba..36ac273022 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt @@ -18,7 +18,7 @@ "dt_cardnumber": "[% data.cardnumber | html | $To %]", "dt_name": - "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]
      [%~ PROCESS 'display-address-style' patron=data| $To ~%]
    [% IF data.email %]
    Email: [% data.email | html | $To %][% END %]", + "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]
      [%~ PROCESS 'display-address-style' patron=data no_line_break=1 | $To ~%]
    [% IF data.email %]
    Email: [% data.email | html | $To %][% END %]", "dt_dateofbirth": "[% INCLUDE 'patron-age.inc' patron = data %]", "dt_category": -- 2.11.0