[Patches] [PATCH] Bug 6303: Display Organisation and Parent Organisation names when viewing a borrower of type organisation
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Tue Nov 22 08:45:13 NZDT 2011
From: Srdjan Jankovic <srdjan at catalyst.net.nz>
Date: Thu, 17 Nov 2011 12:45:47 +1300
Subject: [PATCH] Bug 6303: Display Organisation and Parent Organisation names when viewing a borrower of type organisation
Content-Type: text/plain; charset="utf-8"
Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Works as advertised, doesn't affect display for non-organisational patrons.
Note: Display change in OPAC only affects the summary tab.
It would be a little bit more consistent to make the name show the
same on all tabs in OPAC patron account.
Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
I repeated Katrin's signoff here (with permission). The patch only changed for some minor rebasing and cosmetic QA requests. Passed QA now.
---
C4/Members.pm | 22 ++++++++++---------
circ/circulation.pl | 7 ++++-
.../intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +-
.../prog/en/includes/patron-title.inc | 6 +++++
.../prog/en/modules/circ/circulation.tt | 21 ++++++++++---------
.../prog/en/modules/members/boraccount.tt | 4 +-
.../prog/en/modules/members/member.tt | 4 ++-
.../prog/en/modules/members/moremember.tt | 10 +++++++-
.../prog/en/modules/members/notices.tt | 6 ++--
.../prog/en/modules/members/readingrec.tt | 4 +-
.../intranet-tmpl/prog/en/modules/tools/viewlog.tt | 17 +++++++++++---
.../opac-tmpl/prog/en/includes/patron-title.inc | 5 ++++
koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt | 7 ++++-
.../opac-tmpl/prog/en/modules/opac-userupdate.tt | 7 ++++-
members/boraccount.pl | 3 +-
members/moremember.pl | 6 ++--
members/readingrec.pl | 1 +
opac/opac-user.pl | 2 +
tools/viewlog.pl | 3 ++
19 files changed, 92 insertions(+), 45 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
create mode 100644 koha-tmpl/opac-tmpl/prog/en/includes/patron-title.inc
diff --git a/C4/Members.pm b/C4/Members.pm
index 56718f0..4f5a299 100644
--- a/C4/Members.pm
+++ b/C4/Members.pm
@@ -313,11 +313,11 @@ sub GetMemberDetails {
my $query;
my $sth;
if ($borrowernumber) {
- $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE borrowernumber=?");
+ $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE borrowernumber=?");
$sth->execute($borrowernumber);
}
elsif ($cardnumber) {
- $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?");
+ $sth = $dbh->prepare("SELECT borrowers.*,category_type,categories.description,reservefee,enrolmentperiod FROM borrowers LEFT JOIN categories ON borrowers.categorycode=categories.categorycode WHERE cardnumber=?");
$sth->execute($cardnumber);
}
else {
@@ -340,14 +340,16 @@ sub GetMemberDetails {
$borrower->{'flags'} = $flags;
$borrower->{'authflags'} = $accessflagshash;
- # find out how long the membership lasts
- $sth =
- $dbh->prepare(
- "select enrolmentperiod from categories where categorycode = ?");
- $sth->execute( $borrower->{'categorycode'} );
- my $enrolment = $sth->fetchrow;
- $borrower->{'enrolmentperiod'} = $enrolment;
-
+ # For the purposes of making templates easier, we'll define a
+ # 'showname' which is the alternate form the user's first name if
+ # 'other name' is defined.
+ if ($borrower->{category_type} eq 'I') {
+ $borrower->{'showname'} = $borrower->{'othernames'};
+ $borrower->{'showname'} .= " $borrower->{'firstname'}" if $borrower->{'firstname'};
+ } else {
+ $borrower->{'showname'} = $borrower->{'firstname'};
+ }
+
return ($borrower); #, $flags, $accessflagshash);
}
diff --git a/circ/circulation.pl b/circ/circulation.pl
index efb87da..378956e 100755
--- a/circ/circulation.pl
+++ b/circ/circulation.pl
@@ -629,9 +629,9 @@ my (undef, $roadttype_hashref) = &GetRoadTypes();
my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'};
my $fast_cataloging = 0;
- if (defined getframeworkinfo('FA')) {
+if (defined getframeworkinfo('FA')) {
$fast_cataloging = 1
- }
+}
if (C4::Context->preference('ExtendedPatronAttributes')) {
my $attributes = GetBorrowerAttributes($borrowernumber);
@@ -654,6 +654,8 @@ $template->param(
printername => $printer,
firstname => $borrower->{'firstname'},
surname => $borrower->{'surname'},
+ showname => $borrower->{'showname'},
+ category_type => $borrower->{'category_type'},
dateexpiry => format_date($newexpiry),
expiry => format_date($borrower->{'dateexpiry'}),
categorycode => $borrower->{'categorycode'},
@@ -669,6 +671,7 @@ $template->param(
country => $borrower->{'country'},
phone => $borrower->{'phone'} || $borrower->{'mobile'},
cardnumber => $borrower->{'cardnumber'},
+ othernames => $borrower->{'othernames'},
amountold => $amountold,
barcode => $barcode,
stickyduedate => $stickyduedate,
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 67300d5..6556562 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
@@ -1,5 +1,5 @@
[% IF ( borrowernumber ) %]
-<div class="patroninfo"><h5>[% firstname %] [% surname %] ([% cardnumber %])</h5>
+<div class="patroninfo"><h5>[% INCLUDE 'patron-title.inc' %]</h5>
<!--[if IE 6]>
<style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
}</style>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
new file mode 100644
index 0000000..d07a449
--- /dev/null
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-title.inc
@@ -0,0 +1,6 @@
+[% IF category_type == 'I' %]
+ [% surname %] [% IF othernames %] ([% othernames %]) [% END %]
+[% ELSE %]
+ [% firstname %] [% surname %]
+[% END %]
+([% cardnumber %])
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
index 061f376..f98ff1d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
@@ -1,9 +1,5 @@
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Circulation
-[% IF ( borrowernumber ) %]
-› Checking out to [% surname %], [% firstname %]
-([% cardnumber %])
-[% END %]</title>
+<title>Koha › Circulation [% IF ( borrowernumber ) %] › Checking out to [% INCLUDE 'patron-title.inc' %] [% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
[% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
@@ -166,9 +162,13 @@ function refocus(calendar) {
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›[% IF ( borrowernumber ) %] <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> › [% firstname %] [% surname %][% ELSE %] <strong>Checkouts</strong>[% END %]</div>
-
-
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> ›
+[% IF ( borrowernumber ) %]
+ <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> › [% INCLUDE 'patron-title.inc' %]
+[% ELSE %]
+ <strong>Checkouts</strong>
+[% END %]
+</div>
[% IF ( CGIselectborrower ) %]
<div id="doc" class="yui-t7">
@@ -456,7 +456,8 @@ No patron matched <span class="ex">[% message %]</span>
<span id="clearscreen"><a href="/cgi-bin/koha/circ/circulation.pl" title="Clear screen">x</a></span>
[% END %]
- <label for="barcode">Checking out to [% firstname %] [% surname %] ([% cardnumber %]) </label>
+ <label for="barcode">Checking out to [% INCLUDE 'patron-title.inc' %]</label>
+
<div class="hint">Enter item barcode:</div>
[% IF ( NEEDSCONFIRMATION ) %]
@@ -523,7 +524,7 @@ No patron matched <span class="ex">[% message %]</span>
[% IF ( flagged ) %]
[% IF ( noissues ) %]
- <h4>Checking out to [% firstname %] [% surname %] ([% cardnumber %])</h4>
+ <h4>Checking out to [% INCLUDE 'patron-title.inc' %]</h4>
<div id="circmessages" class="circmessage warning">
[% ELSE %]
<div id="circmessages" class="circmessage attention">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
index c5941fd..4e053e2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt
@@ -1,12 +1,12 @@
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Patrons › Account for [% firstname %] [% surname %]</title>
+<title>Koha › Patrons › Account for [% INCLUDE 'patron-title.inc' %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Account for [% firstname %] [% surname %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Account for [% INCLUDE 'patron-title.inc' %]</div>
<div id="doc3" class="yui-t2">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
index 85b1d3e..4bff548 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
@@ -60,7 +60,9 @@
[% END %]
[% END %]
<td>[% resultsloo.cardnumber %]</td>
- <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">[% resultsloo.surname %], [% resultsloo.firstname %]</a> <br /> [% resultsloo.address %][% IF ( resultsloo.address2 ) %]<br />[% resultsloo.address2 %][% END %][% IF ( resultsloo.city ) %]<br />[% resultsloo.city %][% IF ( resultsloo.state ) %],[% END %][% END %][% IF ( resultsloo.state ) %] [% resultsloo.state %][% END %] [% IF ( resultsloo.zipcode ) %] [% resultsloo.zipcode %][% END %][% IF ( resultsloo.country ) %], [% resultsloo.country %][% END %]</td>
+ <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">
+ [% INCLUDE 'patron-title.inc' category_type = resultsloo.category_type firstname = resultsloo.firstname surname = resultsloo.surname othernames = resultsloo.othernames cardnumber = resultsloo.cardnumber %]</a> <br />
+ [% resultsloo.address %][% IF ( resultsloo.address2 ) %]<br />[% resultsloo.address2 %][% END %][% IF ( resultsloo.city ) %]<br />[% resultsloo.city %][% IF ( resultsloo.state ) %],[% END %][% END %][% IF ( resultsloo.state ) %] [% resultsloo.state %][% END %] [% IF ( resultsloo.zipcode ) %] [% resultsloo.zipcode %][% END %][% IF ( resultsloo.country ) %], [% resultsloo.country %][% END %]</td>
<td>[% resultsloo.category_description %] ([% resultsloo.category_type %])</td>
<td>[% resultsloo.branchcode %]</td>
<td>[% resultsloo.dateexpiry %]</td>
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 49a56cf..cce4cd9 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -1,5 +1,11 @@
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Patrons › [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Patron Details for [% firstname %] [% surname %] ([% cardnumber %])[% END %]</title>
+<title>Koha › Patrons ›
+[% IF ( unknowuser ) %]
+ Patron does not exist
+[% ELSE %]
+ Patron Details for [% INCLUDE 'patron-title.inc' %]
+[% END %]
+</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
@@ -119,7 +125,7 @@ function validate1(date) {
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
› <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
-› [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Patron Details for [% firstname %] [% surname %] ([% cardnumber %])[% END %]
+› [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Patron Details for [% INCLUDE 'patron-title.inc' %][% END %]
</div>
<div id="doc3" class="yui-t1">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
index 4a6753e..5b49c48 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt
@@ -1,5 +1,5 @@
[% INCLUDE 'doc-head-open.inc' %]
-<title>Sent notices for [% firstname %] [% surname %]</title>
+<title>Sent notices for [% INCLUDE 'patron-title.inc' %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript" language="javascript">
@@ -29,14 +29,14 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Sent notices for [% firstname %] [% surname %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Sent notices for [% INCLUDE 'patron-title.inc' %]</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% INCLUDE 'circ-toolbar.inc' %]
-<h1>Sent notices for [% firstname %] [% surname %]</h1>
+<h1>Sent notices for [% INCLUDE 'patron-title.inc' %]</h1>
<table id="noticestable">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
index 7469096..f1554f0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
@@ -1,5 +1,5 @@
[% INCLUDE 'doc-head-open.inc' %]
-<title>Circulation History for [% firstname %] [% surname %]</title>
+<title>Circulation History for [% INCLUDE 'patron-title.inc' %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.pager.js"></script>
@@ -22,7 +22,7 @@
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Circulation History for [% firstname %] [% surname %]</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Circulation History for [% INCLUDE 'patron-title.inc' %]</div>
<div id="doc3" class="yui-t2">
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
index f20569d..b2ab90f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
@@ -133,7 +133,7 @@
<input type="submit" value="Submit" />
<input type="hidden" name="do_it" value="1" />
</fieldset>
- </form>
+ </form>
[% END %]
[% IF ( do_it ) %]
[% IF ( total ) %]
@@ -148,6 +148,7 @@
<th>Info</th>
</tr>
[% FOREACH loopro IN looprow %]
+ [% UNLESS ( loop.odd ) %]<tr class="highlight">[% ELSE %]<tr>[% END %]
<tr>
<td>[% loopro.timestamp %]</td>
<td>
@@ -164,7 +165,11 @@
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
[% ELSE %]
[% IF ( module == 'CIRCULATION' ) %]
- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details."> member [% loopro.object %] </a>
+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopro.object %]" title="Display member details.">
+ [% IF ( loopro.object ) %]
+ member [% loopro.object %]
+ [% END %]
+ </a>
[% ELSE %]
[% IF ( module == 'CATALOGUING' ) %]
[% IF ( info == 'item' ) %]
@@ -176,7 +181,11 @@
[% IF ( module == 'SERIAL' ) %]
<a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% loopro.object %]"> [% loopro.object %] </a>
[% ELSE %]
- [% loopro.object %]
+ [% IF ( module == 'AUTHORITIES' ) %]
+ <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% loopro.object %]" title="Display detail for this authority">auth [% loopro.object %]</a>
+ [% ELSE %]
+ [% loopro.object %]
+ [% END %]
[% END %]
[% END %]
[% END %]
@@ -199,7 +208,7 @@
for <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% object %]">Bibliographic Record [% object %]</a>
[% END %]
[% IF ( MEMBERS ) %]
- for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% firstname %] [% surname %] ([% cardnumber %])</a>
+ for <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% object %]">[% INCLUDE 'patron-title.inc' %]</a>
[% END %]
.
</div>
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/patron-title.inc b/koha-tmpl/opac-tmpl/prog/en/includes/patron-title.inc
new file mode 100644
index 0000000..265125d
--- /dev/null
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/patron-title.inc
@@ -0,0 +1,5 @@
+[% IF category_type == 'I' %]
+ [% surname %] [% IF othernames %] ([% othernames %]) [% END %]
+[% ELSE %]
+ [% firstname %] [% surname %]
+[% END %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
index f460b40..daa5636 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tt
@@ -1,7 +1,7 @@
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Library Home for
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
- [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]
+ [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]
[% END %]
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.metadata.min.js"></script>
@@ -75,7 +75,10 @@ $.tablesorter.addParser({
</div>
[% END %]
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
- <h2>Hello, [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %] <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not [% BORROWER_INF.title %] [% BORROWER_INF.firstname %] [% BORROWER_INF.surname %])</span></h2>
+ <h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]
+ <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not
+ [% BORROWER_INF.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %])
+ </span></h2>
[% IF ( patronupdate ) %]<div class="dialog message"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt
index 58f4d2d..4508fbd 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tt
@@ -1,4 +1,7 @@
-[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %][% ELSE %]Koha Online[% END %] Catalog › Updating Details for [% FOREACH BORROWER_INF IN BORROWER_INFO %][% BORROWER_INF.firstname %] [% BORROWER_INF.surname %][% END %]
+[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %][% ELSE %]Koha Online[% END %] Catalog › Updating Details for
+[% FOREACH BORROWER_INF IN BORROWER_INFO %]
+ [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]
+[% END %]
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="opac-userupdate">
@@ -11,7 +14,7 @@
<div id="userupdatecontainer" class="container">
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
-<h3><a href="/cgi-bin/koha/opac-user.pl">[% BORROWER_INF.firstname %] [% BORROWER_INF.surname %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Your Personal Details</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' ifirstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]'s account</a> <img src="[% themelang %]../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Your Personal Details</h3>
[% IF ( OPACPatronDetails ) %]
<form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
diff --git a/members/boraccount.pl b/members/boraccount.pl
index e16405b..2805f27 100755
--- a/members/boraccount.pl
+++ b/members/boraccount.pl
@@ -107,11 +107,12 @@ $template->param(
finesview => 1,
firstname => $data->{'firstname'},
surname => $data->{'surname'},
+ othernames => $data->{'othernames'},
borrowernumber => $borrowernumber,
cardnumber => $data->{'cardnumber'},
categorycode => $data->{'categorycode'},
category_type => $data->{'category_type'},
- categoryname => $data->{'description'},
+ categoryname => $data->{'description'},
address => $data->{'address'},
address2 => $data->{'address2'},
city => $data->{'city'},
diff --git a/members/moremember.pl b/members/moremember.pl
index 9115dd1..f264377 100755
--- a/members/moremember.pl
+++ b/members/moremember.pl
@@ -132,9 +132,6 @@ my $category_type = $data->{'category_type'};
### $category_type
-# in template <TMPL_IF name="I"> => instutitional (A for Adult& C for children)
-$template->param( $data->{'categorycode'} => 1 );
-
$debug and printf STDERR "dates (enrolled,expiry,birthdate) raw: (%s, %s, %s)\n", map {$data->{$_}} qw(dateenrolled dateexpiry dateofbirth);
foreach (qw(dateenrolled dateexpiry dateofbirth)) {
my $userdate = $data->{$_};
@@ -443,6 +440,8 @@ if (C4::Context->preference('EnhancedMessagingPreferences')) {
$template->param(SMSnumber => defined $data->{'smsalertnumber'} ? $data->{'smsalertnumber'} : $data->{'mobile'});
}
+# in template <TMPL_IF name="I"> => instutitional (A for Adult, C for children)
+$template->param( $data->{'categorycode'} => 1 );
$template->param(
detailview => 1,
AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"),
@@ -450,6 +449,7 @@ $template->param(
CANDELETEUSER => $candeleteuser,
roaddetails => $roaddetails,
borrowernumber => $borrowernumber,
+ othernames => $data->{'othernames'},
categoryname => $data->{'description'},
reregistration => $reregistration,
branch => $branch,
diff --git a/members/readingrec.pl b/members/readingrec.pl
index 8c0cd6f..b4fb8a7 100755
--- a/members/readingrec.pl
+++ b/members/readingrec.pl
@@ -111,6 +111,7 @@ $template->param(
title => $data->{'title'},
initials => $data->{'initials'},
surname => $data->{'surname'},
+ othernames => $data->{'othernames'},
borrowernumber => $borrowernumber,
limit => $limit,
firstname => $data->{'firstname'},
diff --git a/opac/opac-user.pl b/opac/opac-user.pl
index 03c9e81..ca18288 100755
--- a/opac/opac-user.pl
+++ b/opac/opac-user.pl
@@ -124,6 +124,8 @@ $template->param( BORROWER_INFO => \@bordat,
borrowernumber => $borrowernumber,
patron_flagged => $borr->{flagged},
OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
+ surname => $borr->{surname},
+ showname => $borr->{showname},
);
#get issued items ....
diff --git a/tools/viewlog.pl b/tools/viewlog.pl
index 5c43098..d42503e 100755
--- a/tools/viewlog.pl
+++ b/tools/viewlog.pl
@@ -74,14 +74,17 @@ if ($src eq 'circ') { # if we were called from circulation, use the circulatio
my $data = GetMember('borrowernumber'=>$borrowernumber);
my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'});
$template->param( picture => 1 ) if $picture;
+
$template->param( menu => 1,
title => $data->{'title'},
initials => $data->{'initials'},
surname => $data->{'surname'},
+ othernames => $data->{'othernames'},
borrowernumber => $borrowernumber,
firstname => $data->{'firstname'},
cardnumber => $data->{'cardnumber'},
categorycode => $data->{'categorycode'},
+ category_type => $data->{'category_type'},
categoryname => $data->{'description'},
address => $data->{'address'},
address2 => $data->{'address2'},
--
1.6.0.6
More information about the Patches
mailing list