From c6adb5b220f396d36d4b35053a6a2e6939c28d92 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 --- .../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 +- 5 files changed, 192 insertions(+), 381 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-main-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc deleted file mode 100644 index 818d7c6317..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 a79df88123..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 0db6e834dd..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..7ccc3757fa --- /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 1243a2d036..6382231056 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 %] @@ -561,11 +562,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.20.1