@@ -, +, @@
---
installer/data/mysql/sysprefs.sql | 3 +-
installer/data/mysql/updatedatabase.pl | 8 ++
.../en/includes/member-alt-address-style-de.inc | 111 +++++++++++++++++
.../en/includes/member-alt-contact-style-de.inc | 112 ++++++++++++++++++
.../en/includes/member-main-address-style-de.inc | 124 ++++++++++++++++++++
.../en/modules/admin/preferences/i18n_l10n.pref | 7 +
.../prog/en/modules/members/memberentrygen.tt | 18 +++-
7 files changed, 379 insertions(+), 4 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc
--- a/installer/data/mysql/sysprefs.sql
+++ a/installer/data/mysql/sysprefs.sql
@@ -474,5 +474,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'),
('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'),
('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'),
-('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo')
+('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo'),
+('addressformat','us','','Choose format to display postal addresses', 'Choice')
;
--- a/installer/data/mysql/updatedatabase.pl
+++ a/installer/data/mysql/updatedatabase.pl
@@ -9977,6 +9977,14 @@ if ( CheckVersion($DBversion) ) {
print "Upgrade to $DBversion done (Bug 9580: Cover image from Coce, a remote image URL cache)\n";
SetVersion($DBversion);
}
+$DBversion = "XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(q|
+ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('addressformat','us','Choose format to display postal addresses',NULL,'Choice')
+ |);
+ print "Upgrade to $DBversion done (Bug 4041: Address Format as a I18N/L10N system preference\n";
+ SetVersion ($DBversion);
+}
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-address-style-de.inc
@@ -0,0 +1,111 @@
+
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-alt-contact-style-de.inc
@@ -0,0 +1,112 @@
+
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-main-address-style-de.inc
@@ -0,0 +1,124 @@
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref
@@ -45,3 +45,10 @@ I18N/L10N:
class: long
- "for lists of browsable letters. This should be a space separated list of uppercase letters."
- "
Hint: Changing collation in the database for the 'surname' column of the 'borrowers' table is helpful to make browsing by last name work in members-home.pl when using an alphabet outside of A-Z"
+ -
+ - Format postal addresses using
+ - pref: addressformat
+ default: us
+ choices:
+ us: US style
+ de: German style
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
@@ -470,7 +470,11 @@
[% END %]
[% UNLESS noaddress && noaddress2 && nocity && nostate && nozipcode && nocountry %]
-[% INCLUDE 'member-main-address-style-us.inc' %]
+ [% IF Koha.Preference( 'addressformat' ) %]
+ [% INCLUDE "member-main-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
+ [% ELSE %]
+ [% INCLUDE 'member-main-address-style-us.inc' %]
+ [% END %]
[% END # nostreet && nocity etc group%]
[% UNLESS nophone && nophonepro && nomobile && noemail && noemailpro && nofax %]
@@ -559,12 +563,20 @@
[% IF ( step_6 ) %]
[% UNLESS noB_address && noB_address2 && noB_city && noB_zipcode && noB_state && noB_country &&nocontactnote && noB_phone && noB_email %]
-[% INCLUDE 'member-alt-address-style-us.inc' %]
+ [% IF Koha.Preference( 'addressformat' ) %]
+ [% INCLUDE "member-alt-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
+ [% ELSE %]
+ [% INCLUDE 'member-alt-address-style-us.inc' %]
+ [% END %]
[% END # UNLESS noB_address && noB_city && noB_state && noB_phone && noB_email %]
[% END %]
[% IF ( step_2 ) %]
[% UNLESS noaltcontactsurname && noaltcontactfirstname && noaltcontactaddress1 && noaltcontactaddress2 && noaltcontactaddress3 && noaltcontactstate && noaltcontactzipcode && noaltcontactcountry && noaltcontactphone %]
-[% INCLUDE 'member-alt-contact-style-us.inc' %]
+ [% IF Koha.Preference( 'addressformat' ) %]
+ [% INCLUDE "member-alt-contact-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
+ [% ELSE %]
+ [% INCLUDE 'member-alt-contact-style-us.inc' %]
+ [% END %]
[% END # UNLESS noaltcontactsurname && noaltcontactfirstname etc %]
[% END %]
--