Bugzilla – Attachment 30609 Details for
Bug 12718
Show extended patron attributes in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12718 - Show extended patron attributes in the OPAC
Bug-12718---Show-extended-patron-attributes-in-the.patch (text/plain), 3.09 KB, created by
Chris Cormack
on 2014-08-08 02:55:54 UTC
(
hide
)
Description:
Bug 12718 - Show extended patron attributes in the OPAC
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2014-08-08 02:55:54 UTC
Size:
3.09 KB
patch
obsolete
>From e2825f0e1ec9265b6d0e4e71d54ed14d793f320c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 7 Aug 2014 14:18:50 -0400 >Subject: [PATCH] Bug 12718 - Show extended patron attributes in the OPAC > >At some point the patron details page in the OPAC lost the display of >patron attributes. This patch returns the attributes to the update page. > >To test, log in to the OPAC as a patron who has data in one or more >extended patron attributes. View the "your personal details" page >(opac-memberentry.pl): > >- Confirm that the information displays correctly. >- Test with OPACPatronDetails both on and off. >- Test with patron who has no data in extended patron attributes. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 18 ++++++++++++++++++ > opac/opac-memberentry.pl | 9 +++++++++ > 2 files changed, 27 insertions(+) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >index 2d0b2e4..ad35bc0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt >@@ -740,6 +740,24 @@ > </fieldset> > [% END %] > >+ [% IF ( borrower.ExtendedPatronAttributes ) %] >+ <fieldset class="rows"> >+ <legend>Additional information</legend> >+ <ol> >+ [% FOREACH patron_attribute IN borrower.patron_attributes %] >+ <li> >+ <label>[% patron_attribute.description %]:</label> >+ [% IF ( patron_attribute.value_description ) %] >+ [% patron_attribute.value_description %] >+ [% ELSE %] >+ [% patron_attribute.value |html_line_break %] >+ [% END %] >+ </li> >+ [% END %] >+ </ol> >+ </fieldset> >+ [% END %] >+ > [% IF action == 'edit' %] > [% IF OPACPatronDetails %] > <fieldset class="action"> >diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl >index ba9eca4..8ca517b 100755 >--- a/opac/opac-memberentry.pl >+++ b/opac/opac-memberentry.pl >@@ -197,6 +197,15 @@ elsif ( $action eq 'update' ) { > } > elsif ( $action eq 'edit' ) { #Display logged in borrower's data > my $borrower = GetMember( borrowernumber => $borrowernumber ); >+ >+ if (C4::Context->preference('ExtendedPatronAttributes')) { >+ my $attributes = C4::Members::Attributes::GetBorrowerAttributes($borrowernumber, 'opac'); >+ if (scalar(@$attributes) > 0) { >+ $borrower->{ExtendedPatronAttributes} = 1; >+ $borrower->{patron_attributes} = $attributes; >+ } >+ } >+ > $template->param( > borrower => $borrower, ); > >-- >2.0.1
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 12718
:
30593
|
30609
|
30668