Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt
Ketan Kulkarni 8fbf21da1c Bug 10318: Show primary email in patron search results
This patch makes the patron's primary email address be displayed (as
a mailto link) on the patron search results page.

Signed-off-by: Melissa Lefebvre <melissa@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, template only change.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-13 21:33:09 +00:00

237 lines
12 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons [% IF ( searching ) %]&rsaquo; Search results[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$('#add_to_patron_list_submit').attr('disabled', 'disabled');
$('#new_patron_list').hide();
$('#add_to_patron_list').change(function() {
var value = $('#add_to_patron_list').val();
if ( value == 'new' ) {
$('#new_patron_list').val('')
$('#new_patron_list').show();
$('#new_patron_list').focus();
} else if ( value ) {
$('#new_patron_list').hide();
$('#add_to_patron_list_submit').removeAttr('disabled');
} else {
$('#new_patron_list').hide();
$('#add_to_patron_list_submit').attr('disabled', 'disabled');
}
});
$('#new_patron_list').on('input', function() {
if ( $('#new_patron_list').val() ) {
$('#add_to_patron_list_submit').removeAttr('disabled');
} else {
$('#add_to_patron_list_submit').attr('disabled', 'disabled');
}
});
});
function CheckForm() {
if ( $('#add_to_patron_list').val() == 'new' ) {
if ( $('#new_patron_list').val() ) {
var exists = false;
$("#add_to_patron_list option").each(function() {
if ( $(this).text() == $('#new_patron_list').val() ) {
exists = true;
return false;
}
});
if ( exists ) {
alert( _("You already have a list with that name!") );
return false;
}
} else {
alert( _("You must give your new patron list a name!") );
return false;
}
}
if ( $('#add_to_patron_list_which').val() == 'all' ) {
return confirm( _("Are you sure you want to add the entire set of patron results to this list ( including results on other pages )?") );
} else {
if ( $("#add-patrons-to-list-form input:checkbox:checked").length == 0 ) {
alert( _("You have not selected any patrons to add to a list!") );
return false;
}
}
return true;
}
//]]>
</script>
</head>
<body id="pat_member" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( searching ) %]<a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo; Search results[% ELSE %]Patrons[% END %]</div>
<div id="doc2" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<div class="yui-g">
[% IF patron_list %]
<div class="dialog alert">
Added [% patrons_added_to_list.size %] patrons to <a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% patron_list.patron_list_id %]">[% patron_list.name %]</a>.
</div>
[% END %]
[% INCLUDE 'patron-toolbar.inc' %]
[% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
[% IF ( no_branches ) %]<p>There are <strong>no libraries defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/branches.pl">add a library</a>.[% ELSE %]An administrator must define at least one library.[% END %]</p>[% END %]
[% IF ( no_categories ) %]<p>There are <strong>no patron categories defined</strong>. [% IF ( CAN_user_parameters ) %]Please <a href="/cgi-bin/koha/admin/categorie.pl">add a patron category</a>.[% ELSE %]An administrator must define at least one patron category.[% END %]</p>[% END %]</div>
[% END %]
<div class="browse">
Browse by last name:
[% FOREACH letter IN alphabet.split(' ') %]
<a href="/cgi-bin/koha/members/member.pl?quicksearch=1&amp;surname=[% letter %]">[% letter %]</a>
[% END %]
</div>
[% IF ( CAN_user_borrowers && pending_borrower_modifications ) %]
<div class="pending-info" id="patron_updates_pending">
<a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
<span class="holdcount"><a href="/cgi-bin/koha/members/members-update.pl">[% pending_borrower_modifications %]</a></span>
</div>
[% END %]
[% IF ( resultsloop ) %]
[% IF (CAN_user_tools_manage_patron_lists) %]
<form id="add-patrons-to-list-form" method="post" action="member.pl" onsubmit="return CheckForm()">
[% END %]
<div id="searchheader">
<h3>Results [% from %] to [% to %] of [% numresults %] found for [% IF ( member ) %]'<span class="ex">[% member %]</span>'[% END %][% IF ( surname ) %]'<span class="ex">[% surname %]</span>'[% END %]</h3>
[% IF (CAN_user_tools_manage_patron_lists) %]
<div>
<a href="javascript:void(0)" onclick="$('.selection').prop('checked', true)">Select all</a>
|
<a href="javascript:void(0)" onclick="$('.selection').prop('checked', false)">Clear all</a>
|
<span>
<label for="add_to_patron_list_which">Add:</label>
<select id="add_to_patron_list_which" name="add_to_patron_list_which">
<option value="selected">Selected patrons</option>
<option value="all">All resultant patrons</option>
</select>
<label for="add_to_patron_list">to:</label>
<select id="add_to_patron_list" name="add_to_patron_list">
<option value=""></option>
[% IF patron_lists %]
<optgroup label="Patron lists:">
[% FOREACH pl IN patron_lists %]
<option value="[% pl.patron_list_id %]">[% pl.name %]</option>
[% END %]
</optgroup>
[% END %]
<option value="new">[ New list ]</option>
</select>
<input type="text" id="new_patron_list" name="new_patron_list" id="new_patron_list" />
[% FOREACH key IN search_parameters.keys %]
<input type="hidden" name="[% key %]" value="[% search_parameters.$key %]" />
[% END %]
<input id="add_to_patron_list_submit" type="submit" class="submit" value="Save">
</span>
</div>
[% END %]
</div>
<div class="searchresults">
<table id="memberresultst">
<thead>
<tr>
[% IF (CAN_user_tools_manage_patron_lists) %]
<th>&nbsp</th>
[% END %]
<th>Card</th>
<th>Name</th>
<th>Cat</th>
<th>Library</th>
<th>Expires on</th>
<th>OD/Checkouts</th>
<th>Fines</th>
<th>Circ note</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
[% FOREACH resultsloo IN resultsloop %]
[% IF ( resultsloo.overdue ) %]
<tr class="problem">
[% ELSE %]
[% UNLESS ( loop.odd ) %]
<tr class="highlight">
[% ELSE %]
<tr>
[% END %]
[% END %]
[% IF (CAN_user_tools_manage_patron_lists) %]
<td><input type="checkbox" class="selection" name="borrowernumber" value="[% resultsloo.borrowernumber %]" /></td>
[% END %]
<td>[% resultsloo.cardnumber %]</td>
<td style="white-space: nowrap;">
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">
[% INCLUDE 'patron-title.inc' borrowernumber = resultsloo.borrowernumber category_type = resultsloo.category_type firstname = resultsloo.firstname surname = resultsloo.surname othernames = resultsloo.othernames cardnumber = resultsloo.cardnumber invert_name = 1%]
</a> <br />
[% IF ( resultsloo.streetnumber ) %][% resultsloo.streetnumber %] [% END %][% 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 %]
[% IF (resultsloo.email ) %]<br/>Email: <a href="mailto:[% resultsloo.email %]">[% resultsloo.email %]</a>[% END %]
</td>
<td>[% resultsloo.category_description %] ([% resultsloo.category_type %])</td>
<td>[% resultsloo.branchname %]</td>
<td>[% resultsloo.dateexpiry %]</td>
<td>[% IF ( resultsloo.overdues ) %]<span class="overdue"><strong>[% resultsloo.overdues %]</strong></span>[% ELSE %][% resultsloo.overdues %][% END %]/[% resultsloo.issues %]</td>
<td>[% IF ( resultsloo.fines < 0 ) %]<span class="credit">[% resultsloo.fines %]</span> [% ELSIF resultsloo.fines > 0 %] <span class="debit"><strong>[% resultsloo.fines %]</strong></span> [% ELSE %] [% resultsloo.fines %] [% END %]</td>
<td>[% resultsloo.borrowernotes %]</td>
<td>[% IF ( resultsloo.category_type ) %]
<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% resultsloo.borrowernumber %]&amp;category_type=[% resultsloo.category_type %]">Edit</a>
[% ELSE %] <!-- try with categorycode if no category_type -->
[% IF ( resultsloo.categorycode ) %]
<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% resultsloo.borrowernumber %]&amp;categorycode=[% resultsloo.categorycode %]">Edit</a>
[% ELSE %] <!-- if no categorycode, set category_type to A by default -->
<a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;destination=circ&amp;borrowernumber=[% resultsloo.borrowernumber %]&amp;category_type=A">Edit</a>
[% END %]
[% END %]</td>
</tr>
[% END %]
</tbody>
</table>
<div class="pages">[% IF ( multipage ) %][% paginationbar %][% END %]</div>
</div>
[% IF (CAN_user_tools_manage_patron_lists) %]
</form>
[% END %]
[% ELSE %]
[% IF ( searching ) %]
<div class="dialog alert">No results found</div>
[% END %]
[% END %]
</div>
</div>
<div class="yui-g">
[% INCLUDE 'members-menu.inc' %]
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]