From 8ff029dbc96208e1bd5c154bd29f9ba39164dec0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 6 Apr 2020 14:42:40 +0200 Subject: [PATCH] Bug 25070: Centralize member-main-address-style Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart (cherry picked from commit 4a4d3ef0d8a759a485cc5f16e363bfb1f1177ab3) Signed-off-by: Lucas Gass --- .../en/includes/member-alt-address-style.inc | 2 +- .../includes/member-main-address-style-de.inc | 125 ------------ .../includes/member-main-address-style-fr.inc | 126 ------------ .../includes/member-main-address-style-us.inc | 125 ------------ .../en/includes/member-main-address-style.inc | 190 ++++++++++++++++++ .../prog/en/modules/members/memberentrygen.tt | 7 +- 6 files changed, 193 insertions(+), 382 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc index d50c8a8de3..62630bee6e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style.inc @@ -102,7 +102,7 @@ - + [% IF ( mandatoryB_streetnumber ) %]Required[% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc deleted file mode 100644 index 0d0f25cf0b..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc +++ /dev/null @@ -1,125 +0,0 @@ -
- Main address
    -[% UNLESS nostreettype %] - [% IF roadtypes %] -
  1. - [% IF ( mandatorystreettype ) %] -
  2. - [% END %] - [% END %] - [% UNLESS noaddress %] -
  3. - [% IF ( mandatoryaddress ) %] -
  4. - [% END %] - [% UNLESS nostreetnumber %] -
  5. - [% IF ( mandatorystreetnumber ) %] -
  6. - [% END %] - [% UNLESS noaddress2 %] -
  7. - [% IF ( mandatoryaddress2 ) %] -
  8. - [% END %] - [% UNLESS nozipcode %] -
  9. - [% IF ( mandatoryzipcode ) %] -
  10. - [% END %] - [% UNLESS nocity %] -
  11. - [% IF ( mandatorycity ) %] -
  12. - [% END %] - [% UNLESS nostate %] -
  13. - [% IF ( mandatorystate ) %] -
  14. - [% END %] - [% UNLESS nocountry %] -
  15. - [% IF ( mandatorycountry ) %] -
  16. - [% END %] -
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc deleted file mode 100644 index 0bf679ea12..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-fr.inc +++ /dev/null @@ -1,126 +0,0 @@ -
- Main address
    -[% UNLESS nostreettype %] - [% UNLESS nostreetnumber %] -
  1. - [% IF ( mandatorystreetnumber ) %] -
  2. - [% END %] - - [% IF roadtypes %] -
  3. - [% IF ( mandatorystreettype ) %] -
  4. - [% END %] -[% END %] -[% UNLESS noaddress %] -
  5. - [% IF ( mandatoryaddress ) %] -
  6. -[% END %] -[% UNLESS noaddress2 %] -
  7. - [% IF ( mandatoryaddress2 ) %] -
  8. -[% END %] -[% UNLESS nozipcode %] -
  9. - [% IF ( mandatoryzipcode ) %] -
  10. -[% END %] -[% UNLESS nocity %] -
  11. - [% IF ( mandatorycity ) %] -
  12. -[% END %] -[% UNLESS nostate %] -
  13. - [% IF ( mandatorystate ) %] -
  14. -[% END %] -[% UNLESS nocountry %] -
  15. - [% IF ( mandatorycountry ) %] -
  16. -[% END %] -
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc deleted file mode 100644 index bb6002cf1b..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-us.inc +++ /dev/null @@ -1,125 +0,0 @@ -
- Main address
    - [% UNLESS nostreetnumber %] -
  1. - [% IF ( mandatorystreetnumber ) %] -
  2. - [% END %] - [% UNLESS nostreettype %] - [% IF roadtypes %] -
  3. - [% IF ( mandatorystreettype ) %] -
  4. - [% END %] - [% END %] - [% UNLESS noaddress %] -
  5. - [% IF ( mandatoryaddress ) %] -
  6. - [% END %] - [% UNLESS noaddress2 %] -
  7. - [% IF ( mandatoryaddress2 ) %] -
  8. - [% END %] - [% UNLESS nocity %] -
  9. - [% IF ( mandatorycity ) %] -
  10. - [% END %] - [% UNLESS nostate %] -
  11. - [% IF ( mandatorystate ) %] -
  12. - [% END %] - [% UNLESS nozipcode %] -
  13. - [% IF ( mandatoryzipcode ) %] -
  14. - [% END %] - [% UNLESS nocountry %] -
  15. - [% IF ( mandatorycountry ) %] -
  16. - [% END %] -
-
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc new file mode 100644 index 0000000000..9ce3354353 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style.inc @@ -0,0 +1,190 @@ +[% USE Koha %] +[% BLOCK 'main-address-style' %] +
+ Main address +
    + [% IF Koha.Preference( 'AddressFormat' ) %] + [% PROCESS "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }" %] + [% ELSE %] + [% PROCESS 'member-main-address-style-us' %] + [% END %] +
+
+[% END %] + +[% BLOCK 'member-main-address-style-us' %] + [% PROCESS 'address-style_streetnumber' %] + [% PROCESS 'address-style_roadtypes' %] + [% PROCESS 'address-style_address' %] + [% PROCESS 'address-style_address2' %] + [% PROCESS 'address-style_city' %] + [% PROCESS 'address-style_state' %] + [% PROCESS 'address-style_zipcode' %] + [% PROCESS 'address-style_country' %] +[% END %] + +[% BLOCK 'member-main-address-style-de' %] + [% PROCESS 'address-style_roadtypes' %] + [% PROCESS 'address-style_address' %] + [% PROCESS 'address-style_streetnumber' %] + [% PROCESS 'address-style_address2' %] + [% PROCESS 'address-style_zipcode' %] + [% PROCESS 'address-style_city' %] + [% PROCESS 'address-style_state' %] + [% PROCESS 'address-style_country' %] +[% END %] + +[% BLOCK 'member-main-address-style-fr' %] + [% PROCESS 'address-style_streetnumber' %] + [% PROCESS 'address-style_roadtypes' %] + [% PROCESS 'address-style_address' %] + [% PROCESS 'address-style_address2' %] + [% PROCESS 'address-style_zipcode' %] + [% PROCESS 'address-style_city' %] + [% PROCESS 'address-style_state' %] + [% PROCESS 'address-style_country' %] +[% END %] + +[% BLOCK 'address-style_roadtypes' %] + [% IF roadtypes %] +
  • + [% IF ( mandatorystreetype ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_address' %] + [% UNLESS noaddress %] +
  • + [% IF ( mandatoryaddress ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_streetnumber' %] + [% UNLESS nostreetnumber %] +
  • + [% IF ( mandatorystreetnumber ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_address2' %] + [% UNLESS noaddress2 %] +
  • + [% IF ( mandatoryaddress2 ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_zipcode' %] + [% UNLESS nozipcode %] +
  • + [% IF ( mandatoryzipcode ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_city' %] + [% UNLESS nocity %] +
  • + [% IF ( mandatorycity ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_state' %] + [% UNLESS nostate %] +
  • + [% IF ( mandatorystate ) %] +
  • + [% END %] +[% END %] + +[% BLOCK 'address-style_country' %] + [% UNLESS nocountry %] +
  • + [% IF ( mandatorycountry ) %] +
  • + [% END %] +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 5fd8cfc6e8..25c32db057 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -5,6 +5,7 @@ [% USE Koha %] [% USE KohaDates %] [% USE Branches %] +[% PROCESS 'member-main-address-style.inc' %] [% PROCESS 'member-alt-address-style.inc' %] [% PROCESS 'member-alt-contact-style.inc' %] [% SET footerjs = 1 %] @@ -572,11 +573,7 @@ legend:hover { [% END # /IF show_guarantor || guarantor %] [% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %] - [% IF Koha.Preference( 'AddressFormat' ) %] - [% INCLUDE "member-main-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] - [% ELSE %] - [% INCLUDE 'member-main-address-style-us.inc' %] - [% END %] + [% PROCESS 'main-address-style' %] [% END # /UNLESS nostreet && nocity etc group%] [% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %] -- 2.39.5