From 03795b65d59d1e0bed9e6860e0309643b3bb13a6 Mon Sep 17 00:00:00 2001 From: =?utf8?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) Signed-off-by: Owen Leonard Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall --- .../member-display-alt-address-style-de.inc | 16 ++++++++++++++++ .../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 0000000000..fc36c94c27 --- /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 0000000000..69d2f2bb29 --- /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 ed900b1697..710cb16247 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -430,12 +430,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 %] -- 2.39.5