Skip to content
Browse files

Merge branch 'Bug3478' into ptfs-master

Conflicts:

	koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
	koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl
	members/member.pl
  • Loading branch information...
2 parents 094b898 + 954dd50 commit c07a1c73678750380377843d67e5fe7d26d8543e J. David Bavousett committed Apr 28, 2010
View
15 C4/Members.pm
@@ -148,8 +148,8 @@ $category_type is used to get a specified type of user.
(mainly adults when creating a child.)
C<$searchstring> is a space-separated list of search terms. Each term
-must match the beginning a borrower's surname, first name, or other
-name.
+must match the beginning a borrower's surname, first name, other
+name, or initials.
C<$filter> is assumed to be a list of elements to filter results on
@@ -198,7 +198,7 @@ sub SearchMember {
$query.=" ORDER BY $orderby";
@bind = ("$searchstring%","$searchstring");
}
- else # advanced search looking in surname, firstname and othernames
+ else # advanced search looking in surname, firstname, othernames, and initials
{
@data = split( ' ', $searchstring );
$count = @data;
@@ -210,27 +210,30 @@ sub SearchMember {
}
$query.="((surname LIKE ? OR (surname LIKE ? AND surname REGEXP ?)
OR firstname LIKE ? OR (firstname LIKE ? AND firstname REGEXP ?)
- OR othernames LIKE ? OR (othernames LIKE ? AND othernames REGEXP ?))
+ OR othernames LIKE ? OR (othernames LIKE ? AND othernames REGEXP ?)
+ OR initials LIKE ? OR (initials LIKE ? AND initials REGEXP ?))
" .
($category_type?" AND category_type = ".$dbh->quote($category_type):"");
my $regex = '[[:punct:][:space:]]'.$data[0];
@bind = (
"$data[0]%", "%$data[0]%", $regex,
"$data[0]%", "%$data[0]%", $regex,
+ "$data[0]%", "%$data[0]%", $regex,
"$data[0]%", "%$data[0]%", $regex
);
for ( my $i = 1 ; $i < $count ; $i++ ) {
$query = $query . " AND (" . " surname LIKE ? OR (surname LIKE ? AND surname REGEXP ?)
OR firstname LIKE ? OR (firstname LIKE ? AND firstname REGEXP ?)
- OR othernames LIKE ? OR (othernames LIKE ? AND othernames REGEXP ?))";
+ OR othernames LIKE ? OR (othernames LIKE ? AND othernames REGEXP ?)
+ OR initials LIKE ? OR (initials LIKE ? AND initials REGEXP ?))";
$regex = '[[:punct:][:space:]]'.$data[$i];
push( @bind,
"$data[$i]%", "%$data[$i]%", $regex,
"$data[$i]%", "%$data[$i]%", $regex,
+ "$data[$i]%", "%$data[$i]%", $regex,
"$data[$i]%", "%$data[$i]%", $regex
);
-
# FIXME - .= <<EOT;
}
$query = $query . ") OR cardnumber LIKE ? ";
View
3 admin/systempreferences.pl
@@ -215,7 +215,8 @@ =head1 systempreferences.pl
$tabsysprefs{'SMSSendDriver'} = 'Patrons';
$tabsysprefs{HidePatronName} = "Patrons";
$tabsysprefs{'PatronDisplayReturn'} = 'Patrons';
-
+$tabsysprefs{DisplayInitials} = "Patrons";
+$tabsysprefs{DisplayOthernames} = "Patrons";
# I18N/L10N
$tabsysprefs{dateformat} = "I18N/L10N";
View
14 circ/circulation.pl
@@ -573,15 +573,22 @@
my @values;
my %labels;
my $CGIselectborrower;
+$template->param( showinitials => C4::Context->preference('DisplayInitials') );
if ($borrowerslist) {
foreach (
sort {(lc $a->{'surname'} cmp lc $b->{'surname'} || lc $a->{'firstname'} cmp lc $b->{'firstname'})
} @$borrowerslist
)
{
push @values, $_->{'borrowernumber'};
- $labels{ $_->{'borrowernumber'} } =
+ if (C4::Context->preference('DisplayInitials')) {
+ $labels{ $_->{'borrowernumber'} } =
+"$_->{'surname'}, $_->{'firstname'} $_->{'initials'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
+ }
+ else {
+ $labels{ $_->{'borrowernumber'} } =
"$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ... $_->{'address'} ";
+ }
}
$CGIselectborrower = CGI::scrolling_list(
-name => 'borrowernumber',
@@ -734,6 +741,7 @@
printername => $printer,
firstname => $borrower->{'firstname'},
surname => $borrower->{'surname'},
+ initials => $borrower->{'initials'},
dateexpiry => format_date($newexpiry),
expiry => format_date($borrower->{'dateexpiry'}),
categorycode => $borrower->{'categorycode'},
@@ -799,6 +807,10 @@
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
AllowDueDateInPast => C4::Context->preference('AllowDueDateInPast'),
);
+
+# Pass off whether to display initials or not
+$template->param( showinitials => C4::Context->preference('DisplayInitials') );
+
output_html_with_http_headers $query, $cookie, $template->output;
View
12 circ/ysearch.pl
@@ -41,7 +41,7 @@ =head1 ysearch.pl
}
my $dbh = C4::Context->dbh;
-my $sql = qq(SELECT surname, firstname, cardnumber, address, city, zipcode, country
+my $sql = qq(SELECT surname, firstname, initials, cardnumber, address, city, zipcode
FROM borrowers
WHERE surname LIKE ?
OR firstname LIKE ?
@@ -51,11 +51,21 @@ =head1 ysearch.pl
$sth->execute("$query%", "$query%", "$query%");
while ( my $rec = $sth->fetchrow_hashref ) {
+ if (C4::Context->preference('DisplayInitials')) {
+ print $rec->{surname} . ", " . $rec->{firstname} . " " . $rec->{initials} . "\t" .
+ $rec->{cardnumber} . "\t" .
+ $rec->{address} . "\t" .
+ $rec->{city} . "\t" .
+ $rec->{zip} .
+ "\n";
+ }
+ else {
print $rec->{surname} . ", " . $rec->{firstname} . "\t" .
$rec->{cardnumber} . "\t" .
$rec->{address} . "\t" .
$rec->{city} . "\t" .
$rec->{zip} . "\t" .
$rec->{country} .
"\n";
+ }
}
View
6 koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
@@ -1,15 +1,15 @@
<!-- TMPL_IF NAME="borrowernumber" -->
-<div class="patroninfo"><h5><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h5>
+<div class="patroninfo"><h5><!-- TMPL_VAR name="firstname" --> <!-- TMPL_IF NAME="showinitials" --><!-- TMPL_VAR NAME="initials" --><!-- /TMPL_IF --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h5>
<!--[if IE 6]>
<style type="tex/css">img { width: expression(this.width > 140 ? 140: true);
}</style>
<![endif]-->
<ul>
<!-- TMPL_IF NAME="patronimages" -->
<!-- TMPL_IF NAME="picture" -->
-<li><img src="/cgi-bin/koha/members/patronimage.pl?crdnum=<!-- TMPL_VAR NAME="cardnumber" -->" id="patronimage" alt="<!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
+<li><img src="/cgi-bin/koha/members/patronimage.pl?crdnum=<!-- TMPL_VAR NAME="cardnumber" -->" id="patronimage" alt="<!-- TMPL_VAR name="firstname" --> <!-- TMPL_IF NAME="showinitials" --><!-- TMPL_VAR NAME="initials" --><!-- /TMPL_IF --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)" border="0" style="max-width : 140px; margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC; width:auto !important; width:130px;" /></li>
<!-- TMPL_ELSE -->
-<li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="<!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
+<li><img src="/intranet-tmpl/prog/img/patron-blank.png" alt="<!-- TMPL_VAR name="firstname" --> <!-- TMPL_IF NAME="showinitials" --><!-- TMPL_VAR NAME="initials" --><!-- /TMPL_IF --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)" border="0" style="margin: .3em 0 .3em .3em; padding: .2em; border: 1px solid #CCCCCC;" /></li>
<!-- /TMPL_IF -->
<!-- /TMPL_IF -->
<li><!-- TMPL_IF NAME="address"-->
View
6 koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl
@@ -1,7 +1,7 @@
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
<title>Koha &rsaquo; Circulation
<!-- TMPL_IF NAME="borrowernumber" -->
-&rsaquo; Checking out to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->
+&rsaquo; Checking out to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" --><!-- TMPL_IF NAME="showinitials" --> <!-- TMPL_VAR NAME="initials" --><!-- /TMPL_IF -->
(<!-- TMPL_VAR NAME="cardnumber" -->)
<!-- /TMPL_IF --></title>
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
@@ -179,7 +179,7 @@ function refocus(calendar) {
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="circ-search.inc" -->
-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;<!-- TMPL_IF NAME="borrowernumber" --> <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --><!-- TMPL_ELSE --> <strong>Checkouts</strong><!-- /TMPL_IF --></div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo;<!-- TMPL_IF NAME="borrowernumber" --> <a href="/cgi-bin/koha/circ/circulation.pl">Checkouts</a> &rsaquo; <!-- TMPL_VAR name="firstname" --> <!-- TMPL_IF NAME="showinitials" --><!-- TMPL_VAR NAME="initials" --><!-- /TMPL_IF --> <!-- TMPL_VAR name="surname" --><!-- TMPL_ELSE --> <strong>Checkouts</strong><!-- /TMPL_IF --></div>
<!-- TMPL_IF NAME="CGIselectborrower" -->
@@ -488,7 +488,7 @@ No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span>
<input type=button value="Clear Screen" onClick="window.location = '/cgi-bin/koha/circ/circulation.pl'">
<!-- /TMPL_IF -->
- <label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
+ <label for="barcode">Checking out to <!-- TMPL_VAR name="firstname" --> <!-- TMPL_IF NAME="showinitials" --><!-- TMPL_VAR NAME="initials" --><!-- /TMPL_IF --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) </label>
<!-- TMPL_IF NAME="PreviousCardnumber" --><div><span class="circ-hlt">Warning: Scanned Old Card</span></div><!-- /TMPL_IF -->
<div class="hint">Enter item barcode:</div>
View
8 koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl
@@ -148,11 +148,9 @@ function CheckCheckAll(fmobj) {
<!-- /TMPL_UNLESS -->
<!-- /TMPL_IF -->
<td><input type="checkbox" id="bor<!-- TMPL_VAR NAME="borrowernumber" -->" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" title="Click to add to Borrower Cart" /></td>
- <td>
- <!-- TMPL_VAR NAME="cardnumber" -->
- <!-- TMPL_IF NAME="PreviousCardnumber" --><p class="overdue">Warning: Found With Previous Cardnumber</p><!-- /TMPL_IF -->
- </td>
- <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> <br /> <!-- TMPL_VAR NAME="address" --><!-- TMPL_IF NAME="address2" --><br /><!-- TMPL_VAR NAME="address2" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="city" --><br /><!-- TMPL_VAR NAME=city --><!-- /TMPL_IF --><!-- TMPL_IF NAME="zipcode" --> <!-- TMPL_VAR NAME="zipcode" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="country" -->, <!-- TMPL_VAR NAME="country" --><!-- /TMPL_IF --></td>
+ <td><!-- TMPL_VAR NAME="cardnumber" -->
+ <!-- TMPL_IF NAME="PreviousCardnumber" --><p class="overdue">Warning: Found With Previous Cardnumber</p><!-- /TMPL_IF --></td>
+ <td style="white-space: nowrap;"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_IF NAME="showinitials" --> <!-- TMPL_VAR NAME="initials" --> <!-- /TMPL_IF --> </a> <br /> <!-- TMPL_VAR NAME="address" --><!-- TMPL_IF NAME="address2" --><br /><!-- TMPL_VAR NAME="address2" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="city" --><br /><!-- TMPL_VAR NAME=city --><!-- /TMPL_IF --><!-- TMPL_IF NAME="zipcode" --> <!-- TMPL_VAR NAME="zipcode" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="country" -->, <!-- TMPL_VAR NAME="country" --><!-- /TMPL_IF --></td>
<td><!-- TMPL_VAR NAME="category_description" --> (<!-- TMPL_VAR name="category_type" -->)</td>
<td><!-- TMPL_VAR NAME="branchcode" --></td>
<td><!-- TMPL_VAR NAME="dateexpiry" --></td>
View
23 koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl
@@ -201,6 +201,16 @@
<!-- TMPL_IF NAME="mandatoryfirstname" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
<li>
+ <!-- TMPL_IF NAME="mandatoryinitials" -->
+ <label for="initials" class="required">
+ <!-- TMPL_ELSE -->
+ <label for="initials">
+ <!-- /TMPL_IF-->
+ Middle Initial(s): </label>
+ <input type="text" id="initials" name="initials" size="20" value="<!-- TMPL_VAR NAME="initials" -->" />
+ <!-- TMPL_IF NAME="mandatoryinitials" --><span class="required">Required</span><!-- /TMPL_IF -->
+ </li>
+ <li>
<!-- TMPL_IF NAME="mandatorydateofbirth" -->
<label for="dateofbirth" class="required">
<!-- TMPL_ELSE -->
@@ -227,26 +237,17 @@
<!-- TMPL_IF NAME="mandatorydateofbirth" --><span class="required">Required</span><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="ERROR_dateofbirth" --><span class="required">(Error)</span><!-- /TMPL_IF -->
</li>
- <li>
- <!-- TMPL_IF NAME="mandatoryinitials" -->
- <label for="initials" class="required">
- <!-- TMPL_ELSE -->
- <label for="initials">
- <!-- /TMPL_IF-->
- Initials: </label>
- <input type="text" id="initials" name="initials" size="20" value="<!-- TMPL_VAR NAME="initials" -->" />
- <!-- TMPL_IF NAME="mandatoryinitials" --><span class="required">Required</span><!-- /TMPL_IF -->
- </li>
<!-- /TMPL_UNLESS -->
<li>
<!-- TMPL_IF NAME="mandatoryothernames" -->
<label for="othernames" class="required">
<!-- TMPL_ELSE -->
<label for="othernames">
<!-- /TMPL_IF-->
+ <!-- TMPL_IF NAME="showothernames" -->
Other name: </label>
<input type="text" id="othernames" name="othernames" size="20" value="<!-- TMPL_VAR NAME="othernames" -->" />
-<!-- TMPL_IF NAME="mandatoryothernames" --><span class="required">Required</span><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="mandatoryothernames" --><span class="required">Required</span><!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="I" --><input type="hidden" name="sex" value="N" /><!-- /TMPL_IF -->
</li>
<!--TMPL_UNLESS Name="I"-->
View
14 koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
@@ -99,11 +99,7 @@ if (nodename =="barcodes[]"){
<!-- TMPL_INCLUDE NAME="header.inc" -->
<!-- TMPL_INCLUDE NAME="patron-search.inc" -->
-<div id="breadcrumbs">
- <a href="/cgi-bin/koha/mainpage.pl">Home</a>
-&rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
-&rsaquo; <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF -->
-</div>
+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; <!-- TMPL_IF NAME="unknowuser" -->Patron does not exist<!-- TMPL_ELSE -->Patron Details for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_IF NAME="showinitials" --> <!-- TMPL_VAR NAME="initials" --> <!-- /TMPL_IF --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --> </div>
<div id="doc3" class="yui-t1">
@@ -156,11 +152,11 @@ if (nodename =="barcodes[]"){
<!-- /TMPL_IF -->
<h3><!-- TMPL_UNLESS NAME="I" -->
- <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- /TMPL_UNLESS --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h3>
+ <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- /TMPL_UNLESS --> <!-- TMPL_IF NAME="showinitials" --> <!-- TMPL_VAR NAME="initials" --> <!-- /TMPL_IF --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h3>
<div class="yui-u first">
<div id="patron-information" style="padding : .5em;">
- <!-- TMPL_UNLESS NAME="I" --><!-- TMPL_IF NAME="othernames" -->&ldquo;<!-- TMPL_VAR NAME="othernames" -->&rdquo;<!-- /TMPL_IF -->
+ <!-- TMPL_UNLESS NAME="I" --><!-- TMPL_IF NAME="showothernames" --><!-- TMPL_IF NAME="othernames" -->&ldquo;<!-- TMPL_VAR NAME="othernames" -->&rdquo;<!-- /TMPL_IF --><!-- /TMPL_IF -->
<p class="address"><!-- TMPL_VAR NAME="streetnumber" -->
<!--TMPL_IF NAME="roaddetails"-->
@@ -192,7 +188,9 @@ if (nodename =="barcodes[]"){
<!-- TMPL_IF Name="email" --><li><span class="label">Email (home):</span><a href="mailto:<!-- TMPL_VAR NAME="email" -->"><!-- TMPL_VAR NAME="email" --></a></li><!-- /TMPL_IF -->
<!-- TMPL_IF Name="emailpro" --><li><span class="label">Email (work): </span><a href="mailto:<!-- TMPL_VAR NAME="emailpro" -->"><!-- TMPL_VAR NAME="emailpro" --></a></li><!--/TMPL_IF-->
<!-- /TMPL_UNLESS -->
- <li><span class="label">Initials: </span><!-- TMPL_VAR NAME="initials" --></li>
+ <!-- TMPL_IF NAME="showinitials" -->
+ <li><span class="label">Middle Initial(s): </span><!-- TMPL_VAR NAME="initials" --></li>
+ <!-- /TMPL_IF -->
<li><span class="label">Date of birth:</span><!-- TMPL_VAR NAME="dateofbirth" --></li>
<li><span class="label">Sex:</span><!-- TMPL_VAR NAME="sex" --></li><!-- /TMPL_UNLESS -->
<!-- TMPL_IF NAME="printethnicityline" -->
View
2 members/member.pl
@@ -119,6 +119,7 @@
PreviousCardnumber => $results->[$i]{'PreviousCardnumber'},
surname => $results->[$i]{'surname'},
firstname => $results->[$i]{'firstname'},
+ initials => $results->[$i]{'initials'},
categorycode => $results->[$i]{'categorycode'},
category_type => $results->[$i]{'category_type'},
category_description => $results->[$i]{'description'},
@@ -175,5 +176,6 @@
if ( $input->param('sqlsearch') ) {
$template->param( member => $search_sql );
}
+$template->param("showinitials" => C4::Context->preference('DisplayInitials'));
output_html_with_http_headers $input, $cookie, $template->output;
View
2 members/memberentry.pl
@@ -104,6 +104,8 @@ BEGIN
}
$template->param("add"=>1) if ($op eq 'add');
$template->param("checked" => 1) if (defined($nodouble) && $nodouble eq 1);
+$template->param("showinitials" => C4::Context->preference('DisplayInitials'));
+$template->param("showothernames" => C4::Context->preference('DisplayOthernames'));
($borrower_data = GetMember($borrowernumber,'borrowernumber')) if ($op eq 'modify' or $op eq 'save');
my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'};
my $category_type = $input->param('category_type');
View
3 members/moremember.pl
@@ -446,4 +446,7 @@ BEGIN
quickslip => $quickslip,
);
+$template->param("showinitials" => C4::Context->preference('DisplayInitials'));
+$template->param("showothernames" => C4::Context->preference('DisplayOthernames'));
+
output_html_with_http_headers $input, $cookie, $template->output;
View
22 reserve/request.pl
@@ -185,12 +185,22 @@ =head1 request.pl
{
push @values, $borrower->{cardnumber};
- $labels{ $borrower->{cardnumber} } = sprintf(
- '%s, %s ... (%s - %s) ... %s',
- $borrower->{surname}, $borrower->{firstname},
- $borrower->{cardnumber}, $borrower->{categorycode},
- $borrower->{address},
- );
+ if (C4::Context->preference('DisplayInitials')) {
+ $labels{ $borrower->{cardnumber} } = sprintf(
+ '%s, %s %s ... (%s - %s) ... %s',
+ $borrower->{surname}, $borrower->{firstname},
+ $borrower->{initials}, $borrower->{cardnumber},
+ $borrower->{categorycode}, $borrower->{address},
+ );
+ }
+ else {
+ $labels{ $borrower->{cardnumber} } = sprintf(
+ '%s, %s ... (%s - %s) ... %s',
+ $borrower->{surname}, $borrower->{firstname},
+ $borrower->{cardnumber}, $borrower->{categorycode},
+ $borrower->{address},
+ );
+ }
}
$CGIselectborrower = CGI::scrolling_list(

0 comments on commit c07a1c7

Please sign in to comment.
Something went wrong with that request. Please try again.