Bugzilla – Attachment 29699 Details for
Bug 12542
Tabs inconsistency in different circ-menu.inc uses
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12542 - Tabs inconsistency in different circ-menu.inc uses
Bug-12542---Tabs-inconsistency-in-different-circ-m.patch (text/plain), 28.38 KB, created by
Owen Leonard
on 2014-07-15 14:54:19 UTC
(
hide
)
Description:
Bug 12542 - Tabs inconsistency in different circ-menu.inc uses
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2014-07-15 14:54:19 UTC
Size:
28.38 KB
patch
obsolete
>From 24629d140219f8e93045cdc60e408dd1cfc95289 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 14 Jul 2014 14:29:20 -0400 >Subject: [PATCH] Bug 12542 - Tabs inconsistency in different circ-menu.inc > uses >Content-Type: text/plain; charset="utf-8" > >Differences between circ-menu.tt and circ-menu.inc always crop up when a >new menu item is added--usually only to circ-menu.inc as happened with >Bug 9261. > >Other sidebar differences are present due to differences in the patron >data passed by various patron-related script to their templates. This >patch also irons out some of these inconsistencies. > >To test, apply the patch and check out to a patron whose record has more >than just basic data: othername, country, patron attributes, street >number, road types, etc. View the following pages and compare the patron >data and visible tabs to confirm that they match: > >circ/circulation.pl?borrowernumber=X >members/boraccount.pl?borrowernumber=X >members/files.pl?borrowernumber=X >members/mancredit.pl?borrowernumber=X >members/maninvoice.pl?borrowernumber=X >members/member-flags.pl?member=X >members/member-password.pl?member=X >members/moremember.pl?borrowernumber=X >members/notices.pl?borrowernumber=X >members/pay.pl?borrowernumber=X >members/paycollect.pl?borrowernumber=X >members/purchase-suggestions.pl?borrowernumber=X >members/readingrec.pl?borrowernumber=X >members/routing-lists.pl?borrowernumber=X >members/statistics.pl?borrowernumber=X >tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&src=circ&object=X > >The only difference I've found which is not fixed by this patch is the >display of extended patron attributes in the sidebar of moremember.pl. >This is a piecemeal fix for a problem which really deserves a >centralized solution, but at least it gets us back to consistency for >the moment. >--- > circ/circulation.pl | 4 +++- > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 4 ++-- > .../intranet-tmpl/prog/en/includes/circ-menu.tt | 5 +++-- > .../prog/en/modules/members/mancredit.tt | 2 +- > .../prog/en/modules/members/maninvoice.tt | 2 +- > .../prog/en/modules/members/moremember.tt | 3 +-- > members/boraccount.pl | 9 ++++++++- > members/files.pl | 7 ++++++- > members/mancredit.pl | 12 ++++++++++-- > members/maninvoice.pl | 11 ++++++++++- > members/member-flags.pl | 10 +++++++++- > members/member-password.pl | 9 ++++++++- > members/moremember.pl | 4 ++++ > members/notices.pl | 5 +++++ > members/pay.pl | 4 ++++ > members/paycollect.pl | 12 ++++++++++++ > members/purchase-suggestions.pl | 15 +++++++++++++++ > members/readingrec.pl | 10 +++++++++- > members/routing-lists.pl | 17 ++++++++++++++++- > members/statistics.pl | 5 +++++ > tools/viewlog.pl | 20 ++++++++++++++++++-- > 21 files changed, 150 insertions(+), 20 deletions(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 81737ee..4c0010c 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -534,7 +534,9 @@ $template->param( > state => $borrower->{'state'}, > zipcode => $borrower->{'zipcode'}, > country => $borrower->{'country'}, >- phone => $borrower->{'phone'} || $borrower->{'mobile'}, >+ phone => $borrower->{'phone'}, >+ mobile => $borrower->{'mobile'}, >+ phonepro => $borrower->{'phonepro'}, > cardnumber => $borrower->{'cardnumber'}, > othernames => $borrower->{'othernames'}, > amountold => $amountold, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 7505d06..2fe0a68 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -20,7 +20,7 @@ > <li class="patronaddress2">[% address2 %]</li> > [% END %] > [% ELSE %] >- <li><span class="empty" id="noadressstored">No address stored.</span></li> >+ <li><span class="empty" id="noaddressstored">No address stored.</span></li> > [% END %] > <li class="patroncity">[% IF ( city ) %] > [% city %][% IF ( state ) %], [% state %][% END %] >@@ -83,7 +83,7 @@ > [% IF EnableBorrowerFiles %] > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrowernumber %]">Files</a></li> > [% END %] >- [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase<br/>suggestions</a></li> >+ [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrowernumber %]">Purchase suggestions</a></li> > </ul></div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >index e98f846..aead23b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.tt >@@ -1,7 +1,7 @@ > [%# duplicates circ-menu.inc but assumes all borrower attributes are in a borrower variable rather than > in the global namespace %] > [% IF borrower %] >-<div class="patroninfo"><h5>[% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])</h5> >+<div class="patroninfo"><h5>[% borrower.firstname %] [% IF borrower.othernames %] ([% borrower.othernames %]) [% END %] [% borrower.surname %] ([% borrower.cardnumber %])</h5> > <!--[if IE 6]> > <style type="tex/css">img { width: expression(this.width > 140 ? 140: true); > }</style> >@@ -76,12 +76,13 @@ in the global namespace %] > [% IF ( intranetreadinghistory ) %][% IF ( readingrecordview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/readingrec.pl?borrowernumber=[% borrower.borrowernumber %]">Circulation history</a></li>[% END %] > [% IF ( CAN_user_parameters ) %][% IF ( logview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/tools/viewlog.pl?do_it=1&modules=MEMBERS&modules=circulation&object=[% borrower.borrowernumber %]&src=circ">Modification log</a></li>[% END %] > [% IF ( EnhancedMessagingPreferences ) %] >- [% END %] > [% IF ( sentnotices ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/notices.pl?borrowernumber=[% borrower.borrowernumber %]">Notices</a></li> >+ [% END %] > [% IF ( statisticsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/statistics.pl?borrowernumber=[% borrower.borrowernumber %]">Statistics</a></li> > [% IF EnableBorrowerFiles %] > [% IF ( borrower_files ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/files.pl?borrowernumber=[% borrower.borrowernumber %]">Files</a></li> > [% END %] >+ [% IF ( suggestionsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=[% borrower.borrowernumber %]">Purchase<br/>suggestions</a></li> > </ul></div> > [% END %] > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt >index 5ecc5e2..13500ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt >@@ -1,5 +1,5 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Borrowers › Create manual credit</title> >+<title>Koha › Patrons › Create manual credit</title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >index adaf96a..445fffe 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt >@@ -1,5 +1,5 @@ > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Borrowers › Create manual invoice</title> >+<title>Koha › Patrons › Create manual invoice</title> > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript"> > //<![CDATA[ >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 d6b95f8..74c89c9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -176,8 +176,7 @@ function validate1(date) { > > [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames %]”[% END %] > >-<p class="address">[% streetnumber %] >- [% IF roadtype %][% roadtype %][% END %] >+<p class="address"> > [% address %]<br /> > [% IF ( address2 ) %][% address2 %]<br />[% END %] > [% IF ( city ) %][% city %][% END %] >diff --git a/members/boraccount.pl b/members/boraccount.pl >index 518aa3c..d4f01d9 100755 >--- a/members/boraccount.pl >+++ b/members/boraccount.pl >@@ -103,6 +103,10 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > ); > } > >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); >+my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > $template->param( > finesview => 1, > firstname => $data->{'firstname'}, >@@ -113,14 +117,17 @@ $template->param( > categorycode => $data->{'categorycode'}, > category_type => $data->{'category_type'}, > categoryname => $data->{'description'}, >- address => $data->{'address'}, >+ address => $address, > address2 => $data->{'address2'}, > city => $data->{'city'}, > state => $data->{'state'}, > zipcode => $data->{'zipcode'}, > country => $data->{'country'}, > phone => $data->{'phone'}, >+ phonepro => $data->{'phonepro'}, >+ mobile => $data->{'mobile'}, > email => $data->{'email'}, >+ emailpro => $data->{'emailpro'}, > branchcode => $data->{'branchcode'}, > branchname => GetBranchName($data->{'branchcode'}), > total => sprintf("%.2f",$total), >diff --git a/members/files.pl b/members/files.pl >index dc08751..dd8bb3c 100755 >--- a/members/files.pl >+++ b/members/files.pl >@@ -118,11 +118,16 @@ else { > my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); > $template->param( picture => 1 ) if $picture; > >+ # Computes full borrower address >+ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); >+ my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > $template->param( > files => Koha::Borrower::Files->new( borrowernumber => $borrowernumber ) > ->GetFilesInfo(), > >- errors => \%errors >+ errors => \%errors, >+ address => $address, > ); > output_html_with_http_headers $cgi, $cookie, $template->output; > } >diff --git a/members/mancredit.pl b/members/mancredit.pl >index ccb739e..d483b96 100755 >--- a/members/mancredit.pl >+++ b/members/mancredit.pl >@@ -87,24 +87,32 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > extendedattributes => $attributes > ); > } >- >+ >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); >+my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > $template->param( > finesview => 1, > borrowernumber => $borrowernumber, > firstname => $data->{'firstname'}, > surname => $data->{'surname'}, >+ othernames => $data->{'othernames'}, > cardnumber => $data->{'cardnumber'}, > categorycode => $data->{'categorycode'}, > category_type => $data->{'category_type'}, > categoryname => $data->{'description'}, >- address => $data->{'address'}, >+ address => $address, > address2 => $data->{'address2'}, > city => $data->{'city'}, > state => $data->{'state'}, > zipcode => $data->{'zipcode'}, > country => $data->{'country'}, > phone => $data->{'phone'}, >+ phonepro => $data->{'phonepro'}, >+ mobile => $data->{'mobile'}, > email => $data->{'email'}, >+ emailpro => $data->{'emailpro'}, > branchcode => $data->{'branchcode'}, > branchname => GetBranchName($data->{'branchcode'}), > is_child => ($data->{'category_type'} eq 'C'), >diff --git a/members/maninvoice.pl b/members/maninvoice.pl >index cfd3878..f17541e 100755 >--- a/members/maninvoice.pl >+++ b/members/maninvoice.pl >@@ -115,23 +115,32 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > extendedattributes => $attributes > ); > } >+ >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); >+my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > $template->param( > finesview => 1, > borrowernumber => $borrowernumber, > firstname => $data->{'firstname'}, > surname => $data->{'surname'}, >+ othernames => $data->{'othernames'}, > cardnumber => $data->{'cardnumber'}, > categorycode => $data->{'categorycode'}, > category_type => $data->{'category_type'}, > categoryname => $data->{'description'}, >- address => $data->{'address'}, >+ address => $address, > address2 => $data->{'address2'}, > city => $data->{'city'}, > state => $data->{'state'}, > zipcode => $data->{'zipcode'}, > country => $data->{'country'}, > phone => $data->{'phone'}, >+ phonepro => $data->{'phonepro'}, >+ mobile => $data->{'mobile'}, > email => $data->{'email'}, >+ emailpro => $data->{'emailpro'}, > branchcode => $data->{'branchcode'}, > branchname => GetBranchName($data->{'branchcode'}), > is_child => ($data->{'category_type'} eq 'C'), >diff --git a/members/member-flags.pl b/members/member-flags.pl >index 7b08108..1d19abc 100755 >--- a/members/member-flags.pl >+++ b/members/member-flags.pl >@@ -171,22 +171,30 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > ); > } > >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $bor->{streettype} ); >+my $address = $bor->{'streetnumber'} . " $roadtype " . $bor->{'address'}; >+ > $template->param( > borrowernumber => $bor->{'borrowernumber'}, > cardnumber => $bor->{'cardnumber'}, > surname => $bor->{'surname'}, > firstname => $bor->{'firstname'}, >+ othernames => $bor->{'othernames'}, > categorycode => $bor->{'categorycode'}, > category_type => $bor->{'category_type'}, > categoryname => $bor->{'description'}, >- address => $bor->{'address'}, >+ address => $address, > address2 => $bor->{'address2'}, > city => $bor->{'city'}, > state => $bor->{'state'}, > zipcode => $bor->{'zipcode'}, > country => $bor->{'country'}, > phone => $bor->{'phone'}, >+ phonepro => $bor->{'phonepro'}, >+ mobile => $bor->{'mobile'}, > email => $bor->{'email'}, >+ emailpro => $bor->{'emailpro'}, > branchcode => $bor->{'branchcode'}, > branchname => GetBranchName($bor->{'branchcode'}), > loop => \@loop, >diff --git a/members/member-password.pl b/members/member-password.pl >index ac25da5..5fab567 100755 >--- a/members/member-password.pl >+++ b/members/member-password.pl >@@ -100,6 +100,10 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > ); > } > >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $bor->{streettype} ); >+my $address = $bor->{'streetnumber'} . " $roadtype " . $bor->{'address'}; >+ > $template->param( othernames => $bor->{'othernames'}, > surname => $bor->{'surname'}, > firstname => $bor->{'firstname'}, >@@ -108,14 +112,17 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > categorycode => $bor->{'categorycode'}, > category_type => $bor->{'category_type'}, > categoryname => $bor->{'description'}, >- address => $bor->{'address'}, >+ address => $address, > address2 => $bor->{'address2'}, > city => $bor->{'city'}, > state => $bor->{'state'}, > zipcode => $bor->{'zipcode'}, > country => $bor->{'country'}, > phone => $bor->{'phone'}, >+ phonepro => $bor->{'phonepro'}, >+ mobile => $bor->{'mobile'}, > email => $bor->{'email'}, >+ emailpro => $bor->{'emailpro'}, > branchcode => $bor->{'branchcode'}, > branchname => GetBranchName($bor->{'branchcode'}), > userid => $bor->{'userid'}, >diff --git a/members/moremember.pl b/members/moremember.pl >index 72e97b1..c0782d1 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -338,6 +338,9 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) { > $template->param(TalkingTechItivaPhone => C4::Context->preference("TalkingTechItivaPhoneNotification")); > } > >+# Computes full borrower address >+my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > # in template <TMPL_IF name="I"> => instutitional (A for Adult, C for children) > $template->param( $data->{'categorycode'} => 1 ); > $template->param( >@@ -367,6 +370,7 @@ $template->param( > PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, > relatives_issues_count => $relatives_issues_count, > relatives_borrowernumbers => \@relatives, >+ address => $address > ); > > output_html_with_http_headers $input, $cookie, $template->output; >diff --git a/members/notices.pl b/members/notices.pl >index aca4514..7559f04 100755 >--- a/members/notices.pl >+++ b/members/notices.pl >@@ -62,12 +62,17 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > ); > } > >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{'streettype'} ); >+my $address = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'}; >+ > $template->param( > QUEUED_MESSAGES => $queued_messages, > borrowernumber => $borrowernumber, > sentnotices => 1, > branchname => GetBranchName($borrower->{'branchcode'}), > categoryname => $borrower->{'description'}, >+ address => $address, > activeBorrowerRelationship => (C4::Context->preference('borrowerRelationship') ne ''), > RoutingSerials => C4::Context->preference('RoutingSerials'), > ); >diff --git a/members/pay.pl b/members/pay.pl >index 14607b0..9fd1468 100755 >--- a/members/pay.pl >+++ b/members/pay.pl >@@ -227,6 +227,10 @@ sub borrower_add_additional_fields { > $b_ref->{has_picture} = 1; > } > >+ # Computes full borrower address >+ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} ); >+ $b_ref->{address} = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'}; >+ > if (C4::Context->preference('ExtendedPatronAttributes')) { > $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); > $template->param( >diff --git a/members/paycollect.pl b/members/paycollect.pl >index 2e88efc..702372c 100755 >--- a/members/paycollect.pl >+++ b/members/paycollect.pl >@@ -25,6 +25,7 @@ use C4::Auth; > use C4::Output; > use CGI; > use C4::Members; >+use C4::Members::Attributes qw(GetBorrowerAttributes); > use C4::Accounts; > use C4::Koha; > use C4::Branch; >@@ -175,6 +176,17 @@ sub borrower_add_additional_fields { > $b_ref->{has_picture} = 1; > } > >+ if (C4::Context->preference('ExtendedPatronAttributes')) { >+ $b_ref->{extendedattributes} = GetBorrowerAttributes($borrowernumber); >+ $template->param( >+ ExtendedPatronAttributes => 1, >+ ); >+ } >+ >+ # Computes full borrower address >+ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} ); >+ $b_ref->{address} = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'}; >+ > $b_ref->{branchname} = GetBranchName( $b_ref->{branchcode} ); > return; > } >diff --git a/members/purchase-suggestions.pl b/members/purchase-suggestions.pl >index e19da5b..d7d7ab0 100755 >--- a/members/purchase-suggestions.pl >+++ b/members/purchase-suggestions.pl >@@ -25,6 +25,7 @@ use C4::Context; > use C4::Output; > use C4::Branch; > use C4::Members; >+use C4::Members::Attributes qw(GetBorrowerAttributes); > use C4::Suggestions; > > my $input = new CGI; >@@ -50,8 +51,22 @@ $template->param( > suggestionsview => 1, > categoryname => $borrower->{'description'}, > branchname => GetBranchName( $borrower->{'branchcode'} ), >+ RoutingSerials => C4::Context->preference('RoutingSerials'), > ); > >+if (C4::Context->preference('ExtendedPatronAttributes')) { >+ my $attributes = GetBorrowerAttributes($borrowernumber); >+ $template->param( >+ ExtendedPatronAttributes => 1, >+ extendedattributes => $attributes >+ ); >+} >+ >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} ); >+my $address = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'}; >+$template->param( address => $address ); >+ > my ($picture, $dberror) = GetPatronImage($borrowernumber); > $template->param( picture => 1 ) if $picture; > >diff --git a/members/readingrec.pl b/members/readingrec.pl >index 2cb9437..3f44be4 100755 >--- a/members/readingrec.pl >+++ b/members/readingrec.pl >@@ -122,6 +122,11 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > ); > } > >+ >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); >+my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > $template->param( > readingrecordview => 1, > title => $data->{title}, >@@ -134,14 +139,17 @@ $template->param( > categorycode => $data->{categorycode}, > category_type => $data->{category_type}, > categoryname => $data->{description}, >- address => $data->{address}, >+ address => $address, > address2 => $data->{address2}, > city => $data->{city}, > state => $data->{state}, > zipcode => $data->{zipcode}, > country => $data->{country}, > phone => $data->{phone}, >+ phonepro => $data->{phonepro}, >+ mobile => $data->{mobile}, > email => $data->{email}, >+ emailpro => $data->{emailpro}, > branchcode => $data->{branchcode}, > is_child => ( $data->{category_type} eq 'C' ), > branchname => $branches->{ $data->{branchcode} }->{branchname}, >diff --git a/members/routing-lists.pl b/members/routing-lists.pl >index 6331d07..ae6bf1c 100755 >--- a/members/routing-lists.pl >+++ b/members/routing-lists.pl >@@ -24,6 +24,7 @@ use C4::Output; > use C4::Auth qw/:DEFAULT get_session/; > use C4::Branch; # GetBranches > use C4::Members; >+use C4::Members::Attributes qw(GetBorrowerAttributes); > use C4::Context; > use C4::Serials; > use CGI::Session; >@@ -111,23 +112,37 @@ $template->param( > borrowernumber => $borrowernumber, > branch => $branch, > branchname => GetBranchName($borrower->{'branchcode'}), >+ title => $borrower->{'title'}, >+ initials => $borrower->{'initials'}, > firstname => $borrower->{'firstname'}, > surname => $borrower->{'surname'}, >+ othernames => $borrower->{'othernames'}, > categorycode => $borrower->{'categorycode'}, > categoryname => $borrower->{description}, > address => $address, > address2 => $borrower->{'address2'}, >+ phone => $borrower->{'phone'}, >+ phonepro => $borrower->{'phonepro'}, >+ mobile => $borrower->{'mobile'}, > email => $borrower->{'email'}, > emailpro => $borrower->{'emailpro'}, > borrowernotes => $borrower->{'borrowernotes'}, > city => $borrower->{'city'}, >+ state => $borrower->{'state'}, > zipcode => $borrower->{'zipcode'}, > country => $borrower->{'country'}, >- phone => $borrower->{'phone'} || $borrower->{'mobile'}, > cardnumber => $borrower->{'cardnumber'}, > RoutingSerials => C4::Context->preference('RoutingSerials'), > ); > >+if (C4::Context->preference('ExtendedPatronAttributes')) { >+ my $attributes = GetBorrowerAttributes($borrowernumber); >+ $template->param( >+ ExtendedPatronAttributes => 1, >+ extendedattributes => $attributes >+ ); >+} >+ > my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'}); > $template->param( picture => 1 ) if $picture; > >diff --git a/members/statistics.pl b/members/statistics.pl >index 0914364..b5d0f04 100755 >--- a/members/statistics.pl >+++ b/members/statistics.pl >@@ -94,9 +94,14 @@ if (C4::Context->preference('ExtendedPatronAttributes')) { > my ($picture, $dberror) = GetPatronImage($borrower->{'borrowernumber'}); > $template->param( picture => 1 ) if $picture; > >+# Computes full borrower address >+my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $borrower->{streettype} ); >+my $address = $borrower->{'streetnumber'} . " $roadtype " . $borrower->{'address'}; >+ > $template->param( > statisticsview => 1, > datas => $datas, >+ address => $address, > column_names => \@statistic_column_names, > length_keys => scalar( @statistic_column_names), > count_total_issues => $count_total_issues, >diff --git a/tools/viewlog.pl b/tools/viewlog.pl >index 1fbd6be..e04a6b6 100755 >--- a/tools/viewlog.pl >+++ b/tools/viewlog.pl >@@ -70,11 +70,24 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > > if ($src eq 'circ') { # if we were called from circulation, use the circulation menu and get data to populate it -fbcit > use C4::Members; >+ use C4::Members::Attributes qw(GetBorrowerAttributes); > my $borrowernumber = $object; > my $data = GetMember('borrowernumber'=>$borrowernumber); > my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); > $template->param( picture => 1 ) if $picture; >- >+ >+ if (C4::Context->preference('ExtendedPatronAttributes')) { >+ my $attributes = GetBorrowerAttributes($data->{'borrowernumber'}); >+ $template->param( >+ ExtendedPatronAttributes => 1, >+ extendedattributes => $attributes >+ ); >+ } >+ >+ # Computes full borrower address >+ my $roadtype = C4::Koha::GetAuthorisedValueByCode( 'ROADTYPE', $data->{streettype} ); >+ my $address = $data->{'streetnumber'} . " $roadtype " . $data->{'address'}; >+ > $template->param( menu => 1, > title => $data->{'title'}, > initials => $data->{'initials'}, >@@ -86,14 +99,17 @@ if ($src eq 'circ') { # if we were called from circulation, use the circulatio > categorycode => $data->{'categorycode'}, > category_type => $data->{'category_type'}, > categoryname => $data->{'description'}, >- address => $data->{'address'}, >+ address => $address, > address2 => $data->{'address2'}, > city => $data->{'city'}, > state => $data->{'state'}, > zipcode => $data->{'zipcode'}, >+ country => $data->{'country'}, > phone => $data->{'phone'}, > phonepro => $data->{'phonepro'}, >+ mobile => $data->{'mobile'}, > email => $data->{'email'}, >+ emailpro => $data->{'emailpro'}, > branchcode => $data->{'branchcode'}, > branchname => GetBranchName($data->{'branchcode'}), > RoutingSerials => C4::Context->preference('RoutingSerials'), >-- >1.7.9.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12542
:
29699
|
29700
|
29826