@@ -, +, @@
using the system preference
- Apply patch on top of 1st and 2nd patch
- Select 'German style' in system preference 'addressformat' in I18N/L10N
- Verify that the address information displays properly in the left column of all patron's pages.
- Verify that the address displays properly in the main area of moremember.pl as well (Note: In right column, Alternate address /contact are not yet touched))
- Switch system preference to US style, repeat checks
---
circ/circulation.pl | 31 ++------
.../intranet-tmpl/prog/en/includes/circ-menu.inc | 54 +++++++-------
.../intranet-tmpl/prog/en/includes/circ-menu.tt | 76 ++++++++++----------
.../includes/member-display-address-style-de.inc | 12 ++++
.../includes/member-display-address-style-us.inc | 12 ++++
.../prog/en/modules/members/boraccount.tt | 1 +
.../prog/en/modules/members/mancredit.tt | 1 +
.../prog/en/modules/members/maninvoice.tt | 1 +
.../prog/en/modules/members/moremember.tt | 14 ++--
.../prog/en/modules/members/notices.tt | 1 +
.../intranet-tmpl/prog/en/modules/members/pay.tt | 4 +-
.../prog/en/modules/members/paycollect.tt | 3 +-
.../en/modules/members/purchase-suggestions.tt | 1 +
.../prog/en/modules/members/routing-lists.tt | 1 +
.../prog/en/modules/members/statistics.tt | 1 +
.../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 1 +
members/boraccount.pl | 29 ++------
members/mancredit.pl | 50 +++++--------
members/maninvoice.pl | 53 +++++---------
members/moremember.pl | 10 +--
members/notices.pl | 20 +++---
members/pay.pl | 8 ++-
members/paycollect.pl | 7 +-
members/purchase-suggestions.pl | 3 +-
members/readingrec.pl | 24 +------
members/routing-lists.pl | 26 +------
members/statistics.pl | 11 ++-
tools/viewlog.pl | 24 +------
28 files changed, 188 insertions(+), 291 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-de.inc
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-us.inc
--- a/circ/circulation.pl
+++ a/circ/circulation.pl
@@ -527,12 +527,6 @@ if($lib_messages_loop){ $template->param(flagged => 1 ); }
my $bor_messages_loop = GetMessages( $borrowernumber, 'B', $branch );
if($bor_messages_loop){ $template->param(flagged => 1 ); }
-# Computes full borrower address
-my @fulladdress;
-push @fulladdress, $borrower->{'streetnumber'} if ( $borrower->{'streetnumber'} );
-push @fulladdress, C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{'streettype'} ) if ( $borrower->{'streettype'} );
-push @fulladdress, $borrower->{'address'} if ( $borrower->{'address'} );
-
my $fast_cataloging = 0;
if (defined getframeworkinfo('FA')) {
$fast_cataloging = 1
@@ -551,6 +545,10 @@ my $relatives_issues_count =
Koha::Database->new()->schema()->resultset('Issue')
->count( { borrowernumber => \@relatives } );
+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} );
+
+$template->param(%$borrower);
+
$template->param(
lib_messages_loop => $lib_messages_loop,
bor_messages_loop => $bor_messages_loop,
@@ -562,28 +560,9 @@ $template->param(
branchname => GetBranchName($borrower->{'branchcode'}),
printer => $printer,
printername => $printer,
- firstname => $borrower->{'firstname'},
- surname => $borrower->{'surname'},
- showname => $borrower->{'showname'},
- category_type => $borrower->{'category_type'},
was_renewed => $query->param('was_renewed') ? 1 : 0,
expiry => format_date($borrower->{'dateexpiry'}),
- categorycode => $borrower->{'categorycode'},
- categoryname => $borrower->{description},
- address => join(' ', @fulladdress),
- address2 => $borrower->{'address2'},
- email => $borrower->{'email'},
- emailpro => $borrower->{'emailpro'},
- borrowernotes => $borrower->{'borrowernotes'},
- city => $borrower->{'city'},
- state => $borrower->{'state'},
- zipcode => $borrower->{'zipcode'},
- country => $borrower->{'country'},
- phone => $borrower->{'phone'},
- mobile => $borrower->{'mobile'},
- phonepro => $borrower->{'phonepro'},
- cardnumber => $borrower->{'cardnumber'},
- othernames => $borrower->{'othernames'},
+ roadtype => $roadtype,
amountold => $amountold,
barcode => $barcode,
stickyduedate => $stickyduedate,
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
@@ -5,30 +5,20 @@
}
-[% IF ( patronimages ) %]
-[% IF ( picture ) %]
-
-[% ELSE %]
-
-[% END %]
-[% END %]
- [% IF ( address or address2 ) %]
- [% IF ( address ) %]
-
[% address %]
- [% END %]
- [% IF ( address2 ) %]
-
[% address2 %]
+ [% IF ( patronimages ) %]
+ [% IF ( picture ) %]
+
+ [% ELSE %]
+
[% END %]
- [% ELSE %]
-
No address stored.
[% END %]
-
[% IF ( city ) %]
- [% city %][% IF ( state ) %], [% state %][% END %]
- [% zipcode %][% IF ( country ) %], [% country %][% END %]
+ [% IF Koha.Preference( 'addressformat' ) %]
+ [% INCLUDE "member-display-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
[% ELSE %]
- No city stored.
- [% END %]
-
[% IF ( phone ) %]
+ [% INCLUDE 'member-display-address-style-us.inc' %]
+ [% END %]
+
+ [% IF ( phone ) %]
[% phone %]
[% ELSE %]
[% IF ( mobile ) %]
@@ -36,20 +26,30 @@
[% ELSE %]
[% IF ( phonepro ) %]
[% phonepro %]
- [% ELSE %]
- No phone stored.
[% END %]
- [% END %]
- [% END %]
[% END %]
[% END %]
+
+ [% UNLESS ( address or address2 ) %]
+
No address stored.
+ [% END %]
+ [% UNLESS ( city ) %]
+
No city stored.
+ [% END %]
+ [% UNLESS ( phone or mobile or phonepro) %]
+
No phone stored.
+ [% END %]
+ [% UNLESS ( email or emailpro) %]
+
No email stored.
+ [% END %]
+
+
+
[% IF ( ExtendedPatronAttributes ) %][% FOREACH extendedattribute IN borrower.extendedattributes %]
[% IF ( extendedattribute.display_checkout ) %]
[% IF ( extendedattribute.value ) %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-de.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-de.inc
@@ -0,0 +1,12 @@
+[% IF ( address or address2 ) %]
+ [% IF ( address ) %]
+
[% address %][%if (roadtype) %] [% roadtype %][% end %][% if (streetnumber) %] [% streetnumber %][% end %]
+ [% END %]
+ [% IF ( address2 ) %]
+
[% address2 %]
+ [% END %]
+[% END %]
+[% IF ( city ) %]
+ [%IF (zipcode ) %][% zipcode %] [% END %][% city %][% IF ( state ) %][% state %][% END %]
+ [% IF ( country ) %] [% country %][% END %]
+[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-us.inc
+++ a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-us.inc
@@ -0,0 +1,12 @@
+[% IF ( address or address2 ) %]
+ [% IF ( address ) %]
+
[% if (streetnumber) %][% streetnumber %][% end %] [% address %][%if (roadtype) %] [% roadtype %][% end %]
+ [% END %]
+ [% IF ( address2 ) %]
+
[% address2 %]
+ [% END %]
+[% END %]
+[% IF ( city ) %]
+ [% city %][% IF ( state ) %], [% state %][% END %]
+ [% zipcode %][% IF ( country ) %], [% country %][% END %]
+[% END %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
@@ -1,3 +1,4 @@
+[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt
@@ -1,3 +1,4 @@
+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Patrons › Create manual credit
[% INCLUDE 'doc-head-close.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
@@ -1,3 +1,4 @@
+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Patrons › Create manual invoice
[% INCLUDE 'doc-head-close.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -185,13 +185,13 @@ function validate1(date) {
[% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %]
-
- [% address %]
- [% IF ( address2 ) %][% address2 %] [% END %]
- [% IF ( city ) %][% city %][% END %]
- [% IF ( state ) %][% state %][% END %]
- [% IF ( zipcode ) %][% zipcode %] [% END %]
- [% IF ( country ) %][% country %][% END %]
+
+ [% IF Koha.Preference( 'addressformat' ) %]
+ [% INCLUDE "member-display-address-style-${ Koha.Preference( 'addressformat' ) }.inc" %]
+ [% ELSE %]
+ [% INCLUDE 'member-display-address-style-us.inc' %]
+ [% END %]
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
@@ -1,3 +1,4 @@
+[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
Sent notices for [% INCLUDE 'patron-title.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt
@@ -1,3 +1,4 @@
+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Patrons › Pay Fines for [% borrower.firstname %] [% borrower.surname %]
[% INCLUDE 'doc-head-close.inc' %]
@@ -170,9 +171,8 @@ function enableCheckboxActions(){
-
-[% INCLUDE 'circ-menu.tt' %]
+[% INCLUDE 'circ-menu.inc' %]
[% INCLUDE 'intranet-bottom.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt
@@ -1,3 +1,4 @@
+[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
Koha › Patrons › Collect fine payment for [% borrower.firstname %] [% borrower.surname %]
[% INCLUDE 'doc-head-close.inc' %]
@@ -226,7 +227,7 @@ function moneyFormat(textObj) {
-[% INCLUDE 'circ-menu.tt' %]
+[% INCLUDE 'circ-menu.inc' %]