From dd6f6b649d05f3557e104674d6fa7099fd5f3be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Tue, 14 Jun 2016 10:57:52 +0200 Subject: [PATCH] Bug 10760: Alternate Address: Display street number and street type This patch displays alternate streetnumber and street type on patron's detail page. To test: - Apply patch - Verify that the alternate address information displays follwing the setting in syspref AddressFormat and contains street type and street number (as appropriate) --- .../includes/member-display-alt-address-style-de.inc | 16 ++++++++++++++++ .../includes/member-display-alt-address-style-us.inc | 16 ++++++++++++++++ .../prog/en/modules/members/moremember.tt | 14 ++++++++------ 3 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-de.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-us.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-de.inc new file mode 100644 index 0000000..fc36c94 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-de.inc @@ -0,0 +1,16 @@ +[% IF ( B_address or B_address2 ) %] + [% IF ( B_address ) %] + [% SET roadtype_desc = '' %] + [% IF B_streettype %] + [% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', B_streettype) %] + [% END %] +
  • [% B_address %][%IF roadtype_desc %] [% roadtype_desc %][% END %][% IF B_streetnumber %] [% B_streetnumber %][% END %]
  • + [% END %] + [% IF ( B_address2 ) %] +
  • [% B_address2 %]
  • + [% END %] +[% END %] +[% IF ( B_city ) %]
  • + [%IF ( B_zipcode ) %][% B_zipcode %] [% END %][% B_city %][% IF ( B_state ) %]
    [% B_state %][% END %] + [% IF ( B_country ) %]
    [% B_country %][% END %]
  • +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-us.inc new file mode 100644 index 0000000..69d2f2b --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-alt-address-style-us.inc @@ -0,0 +1,16 @@ +[% IF ( B_address or B_address2 ) %] + [% IF ( B_address ) %] + [% SET roadtype_desc = '' %] + [% IF B_streettype %] + [% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', B_streettype) %] + [% END %] +
  • [% if (B_streetnumber) %][% B_streetnumber %][% end %] [% IF roadtype_desc %][% roadtype_desc %] [% END %][% B_address %][% end %]
  • + [% END %] + [% IF ( B_address2 ) %] +
  • [% B_address2 %]
  • + [% END %] +[% END %] +[% IF ( B_city ) %]
  • + [% B_city %][% IF ( B_state ) %], [% B_state %][% END %] + [% B_zipcode %][% IF ( B_country ) %], [% B_country %][% END %]
  • +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 80a80a9..88bae39 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -412,12 +412,14 @@ function validate1(date) { [% UNLESS ( I ) %]

    Alternate address

    -
    1. Address: [% B_address %]
    2. -
    3. Address 2: [% B_address2 %]
    4. -
    5. City: [% B_city %]
    6. - [% IF ( B_state ) %]
    7. State: [% B_state %]
    8. [% END %] -
    9. ZIP/Postal code: [% B_zipcode %]
    10. - [% IF ( B_country ) %]
    11. Country: [% B_country %]
    12. [% END %] + + [% IF Koha.Preference( 'AddressFormat' ) %] + [% INCLUDE "member-display-alt-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] + [% ELSE %] + [% INCLUDE 'member-display-alt-address-style-us.inc' %] + [% END %] + +
        [% IF ( B_phone ) %]
      1. Phone: [% B_phone %]
      2. [% END %] [% IF ( B_email ) %][% END %] [% IF ( contactnote ) %]
      3. Contact note: [% contactnote %]
      4. [% END %] -- 1.7.10.4