[Koha-patches] [PATCH][RESEND] Bug 5172 - prefer 'other name' over 'first name' if available.

Robin Sheat robin at catalyst.net.nz
Tue Dec 14 00:17:17 CET 2010


In all the places that the user is referred to by name in the OPAC, the
'other name' field is now used instead of the first name, if an 'other
name' has been defined.
---
 C4/Members.pm                                      |    5 +++++
 koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc  |    2 +-
 .../opac-tmpl/prog/en/modules/opac-account.tmpl    |    6 +++---
 .../opac-tmpl/prog/en/modules/opac-messaging.tmpl  |    4 ++--
 .../opac-tmpl/prog/en/modules/opac-passwd.tmpl     |    4 ++--
 .../prog/en/modules/opac-readingrecord.tmpl        |    4 ++--
 .../opac-tmpl/prog/en/modules/opac-reserve.tmpl    |    4 ++--
 .../opac-tmpl/prog/en/modules/opac-sendbasket.tmpl |    2 +-
 .../opac-tmpl/prog/en/modules/opac-sendshelf.tmpl  |    2 +-
 koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl |    4 ++--
 .../prog/en/modules/opac-userdetails.tmpl          |    9 ++++++---
 .../opac-tmpl/prog/en/modules/opac-userupdate.tmpl |    4 ++--
 opac/opac-passwd.pl                                |   10 ++++++----
 opac/opac-sendbasket.pl                            |    1 +
 opac/opac-sendshelf.pl                             |    1 +
 15 files changed, 37 insertions(+), 25 deletions(-)

diff --git a/C4/Members.pm b/C4/Members.pm
index 00716cd..9dece92 100644
--- a/C4/Members.pm
+++ b/C4/Members.pm
@@ -367,6 +367,11 @@ sub GetMemberDetails {
     $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.
+    $borrower->{'showname'} = $borrower->{'othernames'} || $borrower->{'firstname'};
+
     return ($borrower);    #, $flags, $accessflagshash);
 }
 
diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
index 236f296..1f1a007 100644
--- a/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
+++ b/koha-tmpl/opac-tmpl/prog/en/includes/masthead.inc
@@ -4,7 +4,7 @@
 <!-- TMPL_UNLESS NAME="loggedinusername" -->
                <li><a href="/cgi-bin/koha/opac-user.pl">Log in to Your Account</a></li><!-- /TMPL_UNLESS -->
             <!-- TMPL_IF NAME="loggedinusername" -->
-                <li><span class="members">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></a></span></li>
+                <li><span class="members">Welcome, <a href="/cgi-bin/koha/opac-user.pl"><span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></a></span></li>
 
             <!-- /TMPL_IF -->
             <!-- TMPL_IF NAME="ShowOpacRecentSearchLink" -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tmpl
index 0b7f220..eb2a20e 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-account.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Account for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
+<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Account for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 </head>
 <body id="opac-account">
@@ -11,7 +11,7 @@
 		<div class="container">
 <!--CONTENT-->
     <!-- TMPL_LOOP NAME="BORROWER_INFO" -->
-        <h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Fines and Charges</h3>
+        <h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Fines and Charges</h3>
     <!-- /TMPL_LOOP -->
 
     <!-- TMPL_IF NAME="ACCOUNT_LINES" -->
@@ -59,4 +59,4 @@
 </div>
 </div>
 </div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
\ No newline at end of file
+<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
index 0e0543c..3800d10 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Updating Details for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
+<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Updating Details for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript">//<![CDATA[
 	$(document).ready(function(){
@@ -25,7 +25,7 @@
 	<div class="yui-b">
 
 <!-- TMPL_LOOP name="BORROWER_INFO" -->
-<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Messaging Settings</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Messaging Settings</h3>
 <!-- /TMPL_LOOP -->
 
 <form action="/cgi-bin/koha/opac-messaging.pl" method="get" name="opacmessaging">
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tmpl
index c50cf5c..b7360e6 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-passwd.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Account for <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" -->
+<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Account for <!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 </head>
 <body id="opac-passwd">
@@ -9,7 +9,7 @@
 	<div id="yui-main">
 	<div class="yui-b"><div class="yui-g">
 	<div class="container">
-	<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->l../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Change your Password </h3>
+	<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->l../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Change your Password </h3>
 
     <!-- TMPL_IF NAME= "Error_messages" -->
 <div class="dialog error">        <h3>There was a problem with your submission</h3>
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
index 0b53ebd..5344dcb 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog &rsaquo;  Account for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
+<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog &rsaquo;  Account for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
 <script type="text/javascript">
@@ -22,7 +22,7 @@ $(document).ready(function(){
 	<div class="yui-b"><div class="yui-g">
 <div class="container">
 <!--CONTENT-->
-<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Checkout History</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Checkout History</h3>
 
 <!-- TMPL_UNLESS NAME="count" -->
 You have never borrowed anything from this library.
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
index 52ff4cd..2237e68 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog &rsaquo;  Placing hold <!-- TMPL_VAR NAME="title" escape="html" --> for <!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP -->
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" --><!-- TMPL_VAR NAME="LibraryNameTitle" DEFAULT="Koha Online" --> Catalog &rsaquo;  Placing hold <!-- TMPL_VAR NAME="title" escape="html" --> for <!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <!-- TMPL_INCLUDE NAME="calendar.inc" -->
 <script type="text/javascript">
@@ -220,7 +220,7 @@
           <!-- TMPL_UNLESS NAME="message" -->
               <h3>Confirm holds for:
                 <!-- TMPL_LOOP NAME="USER_INFO" -->
-                  <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)
+                  <!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)
                 <!-- /TMPL_LOOP -->
               </h3>
 
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl
index 57f62ee..0945639 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl
@@ -5,7 +5,7 @@ Your Cart
 <HEADER>
 Hi,
 
-<!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> sent you a cart from our online catalog.
+<!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" --> sent you a cart from our online catalog.
 
 Please note that the attached file is a MARC bibliographic records file
 which can be imported into a Personal Bibliographic Software like EndNote,
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl
index 1c367a0..bd0fa3a 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-sendshelf.tmpl
@@ -5,7 +5,7 @@ Your List : <!-- TMPL_VAR NAME="shelfname" -->
 <HEADER>
 Hi,
 
-<!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->, sent you from our online catalog, the virtual shelf called :  <!-- TMPL_VAR NAME="shelfname" -->.
+<!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->, sent you from our online catalog, the virtual shelf called :  <!-- TMPL_VAR NAME="shelfname" -->.
 
 Please note that the attached file is a MARC bibliographic records file
 which can be imported into a Personal Bibliographic Software like EndNote,
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
index 001d947..1c81bff 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl
@@ -1,7 +1,7 @@
 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
 <!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo; Library Home for
 <!-- TMPL_LOOP name="BORROWER_INFO" -->
-    <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" -->
+    <!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" -->
 <!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
@@ -93,7 +93,7 @@ $.tablesorter.addParser({
 	       </div>
 	<!-- /TMPL_IF -->
     <!-- TMPL_LOOP NAME="BORROWER_INFO" -->
-        <h2>Hello, <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->)</span></h2>
+        <h2>Hello, <!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" --> <span class="hint">(<a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here</a> if you're not <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->)</span></h2>
         
 		<!-- TMPL_IF NAME="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><!-- /TMPL_IF -->
 		
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tmpl
index 174b8bd..ec88242 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userdetails.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Personal Details for <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" -->
+<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Personal Details for <!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 </head>
 <body>
@@ -9,10 +9,13 @@
 	<div id="yui-main">
 	<div class="yui-b"><div class="yui-g">
 
-<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Personal Details</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Personal Details</h3>
 
 <table>
 <tr><th scope="row">Name:</th><td> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></td></tr>
+<!-- TMPL_IF name="othernames" -->
+<tr><th scope="row">Other Name:</th><td> <!-- TMPL_VAR NAME="othernames" --> </td></tr>
+<!-- /TMPL_IF -->
 <tr><th scope="row">
 Card Number:</th><td><!-- TMPL_VAR NAME="cardnumber" --></td></tr>
 </table>
@@ -84,4 +87,4 @@ Card Number:</th><td><!-- TMPL_VAR NAME="cardnumber" --></td></tr>
 </div>
 </div>
 </div>
-<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
\ No newline at end of file
+<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl
index 24c3068..a325218 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-userupdate.tmpl
@@ -1,4 +1,4 @@
-<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Updating Details for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
+<!-- TMPL_INCLUDE name="doc-head-open.inc" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_IF NAME="LibraryNameTitle" --><!-- TMPL_VAR NAME="LibraryNameTitle" --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --><!-- TMPL_ELSE -->Koha Online<!-- /TMPL_IF --> Catalog &rsaquo;  Updating Details for <!-- TMPL_LOOP name="BORROWER_INFO" --><!-- TMPL_VAR name="showname" --> <!-- TMPL_VAR name="surname" --><!-- /TMPL_LOOP -->
 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
 </head>
 <body id="opac-userupdate">
@@ -11,7 +11,7 @@
 
 <div class="container">
 <!-- TMPL_LOOP name="BORROWER_INFO" -->
-<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Personal Details</h3>
+<h3><a href="/cgi-bin/koha/opac-user.pl"><!-- TMPL_VAR NAME="showname" --> <!-- TMPL_VAR NAME="surname" -->'s account</a> <img src="<!-- TMPL_VAR NAME="themelang" -->../../images/caret.gif" width="16" height="16" alt="&gt;" border="0" /> Your Personal Details</h3>
 
 <!-- TMPL_IF NAME="OPACPatronDetails" -->
 <form action="/cgi-bin/koha/opac-userupdate.pl" method="get">
diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl
index ca502ab..cc518d5 100755
--- a/opac/opac-passwd.pl
+++ b/opac/opac-passwd.pl
@@ -97,10 +97,12 @@ else {
 	}
 }
 
-$template->param(firstname => $borr->{'firstname'},
-							surname => $borr->{'surname'},
-							minpasslen => $minpasslen,
-							passwdview => 1,
+$template->param(
+    firstname => $borr->{'firstname'},
+    surname => $borr->{'surname'},
+    showname => $borr->{'showname'},
+    minpasslen => $minpasslen,
+    passwdview => 1,
 );
 
 output_html_with_http_headers $query, $cookie, $template->output;
diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index 76400a5..90b1f12 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -110,6 +110,7 @@ if ( $email_add ) {
         comment        => $comment,
         firstname      => $user->{firstname},
         surname        => $user->{surname},
+        showname       => $user->{showname},
     );
 
     # Getting template result
diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl
index b535616..b9aa468 100755
--- a/opac/opac-sendshelf.pl
+++ b/opac/opac-sendshelf.pl
@@ -107,6 +107,7 @@ if ( $email ) {
         shelfname      => $shelf[1],
         firstname      => $user->{firstname},
         surname        => $user->{surname},
+        showname       => $user->{showname},
     );
 
     # Getting template result
-- 
1.7.1



More information about the Koha-patches mailing list