Bugzilla – Attachment 56356 Details for
Bug 5670
Housebound Readers Module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 5670: [QA Followup] Fix `div.patroninfo`.
Bug-5670-QA-Followup-Fix-divpatroninfo.patch (text/plain), 3.92 KB, created by
Claire Gravely
on 2016-10-13 11:46:29 UTC
(
hide
)
Description:
Bug 5670: [QA Followup] Fix `div.patroninfo`.
Filename:
MIME Type:
Creator:
Claire Gravely
Created:
2016-10-13 11:46:29 UTC
Size:
3.92 KB
patch
obsolete
>From eebc0159d9fda38e5cd707724dd079848d7ff5b9 Mon Sep 17 00:00:00 2001 >From: Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com> >Date: Wed, 21 Sep 2016 17:17:25 +0200 >Subject: [PATCH] Bug 5670: [QA Followup] Fix `div.patroninfo`. > >* members/housebound.pl: Provide full patron hash keys, extended patron > attributes & picture to template. >* koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt: > Refactor to use new information. > >Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> >--- > .../prog/en/modules/members/housebound.tt | 11 +---------- > members/housebound.pl | 21 ++++++++++++++++++--- > 2 files changed, 19 insertions(+), 13 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt >index f0a60f9..01e2872 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt >@@ -1,15 +1,6 @@ > [% USE Koha %] > [% USE KohaDates %] > [% USE AuthorisedValues %] >-[% borrowernumber = patron.borrowernumber %] >-[% branchname = branch.branchname %] >-[% categoryname = category.description %] >-[% categorycode = category.categorycode %] >-[% category_type = category.category_type %] >-[% firstname = patron.firstname %] >-[% surname = patron.surname %] >-[% othernames = patron.othernames %] >-[% invert_name = 0 %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Housebound › Details for [% INCLUDE 'patron-title.inc' %]</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -37,7 +28,7 @@ > <div class="yui-g"> > > <!-- Title --> >- <h3>Housebound details for [% patron.title %] [% patron.firstname %] [% patron.surname %] ([% patron.cardnumber %])</h3> >+ <h3>Housebound details for [% INCLUDE 'patron-title.inc' %]</h3> > <div class="first"> > > [% FOR m IN messages %] >diff --git a/members/housebound.pl b/members/housebound.pl >index fe26d82..77974e4 100755 >--- a/members/housebound.pl >+++ b/members/housebound.pl >@@ -27,6 +27,8 @@ > use Modern::Perl; > use CGI; > use C4::Auth; >+use C4::Context; >+use C4::Members::Attributes qw(GetBorrowerAttributes); > use C4::Output; > use DateTime; > use Koha::DateUtils; >@@ -56,14 +58,15 @@ my $visit_id = $input->param('visit_id') // q{}; > # Get patron > my $patron = eval { > my $borrowernumber = $input->param('borrowernumber') // q{}; >- return Koha::Patrons->new->find($borrowernumber); >+ return Koha::Patrons->find($borrowernumber); > }; > push @messages, { type => 'error', code => 'error_on_patron_load' } > if ( $@ or !$patron ); > > # Get supporting cast >-my ( $branch, $category, $houseboundprofile, $visit ); >+my ( $branch, $category, $houseboundprofile, $visit, $patron_image ); > if ( $patron ) { >+ $patron_image = Koha::Patron::Images->find($patron->borrowernumber); > $branch = Koha::Libraries->new->find($patron->branchcode); > $category = Koha::Patron::Categories->new->find($patron->categorycode); > $houseboundprofile = $patron->housebound_profile; >@@ -156,8 +159,20 @@ if ( $method eq 'updateconfirm' and $houseboundprofile ) { > # We don't have any profile information, so we must display a creation form. > $method = 'update_or_create' if ( !$houseboundprofile ); > >+# Ensure template has all patron details. >+$template->param(%{$patron->unblessed}) if ( $patron ); >+ >+# Load extended patron attributes if necessary (taken from members/files.pl). >+if ( C4::Context->preference('ExtendedPatronAttributes') and $patron ) { >+ my $attributes = GetBorrowerAttributes($patron->borrowernumber); >+ $template->param( >+ ExtendedPatronAttributes => 1, >+ extendedattributes => $attributes >+ ); >+} >+ > $template->param( >- patron => $patron, >+ picture => $patron_image, > housebound_profile => $houseboundprofile, > visit => $houseboundvisit, > branch => $branch, >-- >2.1.4
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 5670
:
3038
|
22162
|
22163
|
22164
|
22165
|
26816
|
27288
|
50930
|
51377
|
51875
|
54384
|
54385
|
55326
|
55334
|
55335
|
55336
|
55734
|
55735
|
55736
|
55737
|
55738
|
55739
|
55865
|
55866
|
55867
|
55890
|
55891
|
56298
|
56299
|
56300
|
56301
|
56302
|
56308
|
56337
|
56341
|
56346
|
56347
|
56348
|
56349
|
56350
|
56351
|
56352
|
56353
|
56354
|
56355
|
56356
|
56357
|
56358
|
56359
|
56360
|
56361
|
56362
|
56363
|
56364
|
56365
|
56366
|
56367
|
56368
|
56369
|
56580
|
56581
|
56582
|
56583
|
56584
|
56585
|
56586
|
56587
|
56588
|
56589
|
56590
|
56591
|
56592
|
56593
|
56594
|
56595
|
56596
|
56597
|
56598
|
56599
|
56600
|
56601
|
56602
|
56603
|
56604
|
56605
|
56606