1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Patrons [% IF ( searching ) %]› Search results[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript">
7 $(document).ready(function() {
8 $('#add_to_patron_list_submit').attr('disabled', 'disabled');
9 $('#new_patron_list').hide();
11 $('#add_to_patron_list').change(function() {
12 var value = $('#add_to_patron_list').val();
13 if ( value == 'new' ) {
14 $('#new_patron_list').val('')
15 $('#new_patron_list').show();
16 $('#new_patron_list').focus();
18 $('#new_patron_list').hide();
19 $('#add_to_patron_list_submit').removeAttr('disabled');
21 $('#new_patron_list').hide();
22 $('#add_to_patron_list_submit').attr('disabled', 'disabled');
27 $('#new_patron_list').on('input', function() {
28 if ( $('#new_patron_list').val() ) {
29 $('#add_to_patron_list_submit').removeAttr('disabled');
31 $('#add_to_patron_list_submit').attr('disabled', 'disabled');
36 function CheckForm() {
37 if ( $('#add_to_patron_list').val() == 'new' ) {
38 if ( $('#new_patron_list').val() ) {
40 $("#add_to_patron_list option").each(function() {
41 if ( $(this).text() == $('#new_patron_list').val() ) {
48 alert( _("You already have a list with that name!") );
52 alert( _("You must give your new patron list a name!") );
57 if ( $('#add_to_patron_list_which').val() == 'all' ) {
58 return confirm( _("Are you sure you want to add the entire set of patron results to this list ( including results on other pages )?") );
60 if ( $("#add-patrons-to-list-form input:checkbox:checked").length == 0 ) {
61 alert( _("You have not selected any patrons to add to a list!") );
72 <body id="pat_member" class="pat">
73 [% INCLUDE 'header.inc' %]
74 [% INCLUDE 'patron-search.inc' %]
76 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › [% IF ( searching ) %]<a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Search results[% ELSE %]Patrons[% END %]</div>
78 <div id="doc2" class="yui-t7">
86 <div class="dialog alert">
87 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>.
91 [% INCLUDE 'patron-toolbar.inc' %]
93 [% IF ( no_add ) %]<div class="dialog alert"><h3>Cannot add patron</h3>
94 [% 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 %]
95 [% 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>
100 [% FOREACH letter IN alphabet.split(' ') %]
101 <a href="/cgi-bin/koha/members/member.pl?quicksearch=1&surname=[% letter %]">[% letter %]</a>
105 [% IF ( CAN_user_borrowers && pending_borrower_modifications ) %]
106 <div class="pending-info" id="patron_updates_pending">
107 <a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
108 <span class="holdcount"><a href="/cgi-bin/koha/members/members-update.pl">[% pending_borrower_modifications %]</a></span>
112 [% IF ( resultsloop ) %]
113 [% IF (CAN_user_tools_manage_patron_lists) %]
114 <form id="add-patrons-to-list-form" method="post" action="member.pl" onsubmit="return CheckForm()">
116 <div id="searchheader">
117 <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>
119 [% IF (CAN_user_tools_manage_patron_lists) %]
121 <a href="javascript:void(0)" onclick="$('.selection').prop('checked', true)">Select all</a>
123 <a href="javascript:void(0)" onclick="$('.selection').prop('checked', false)">Clear all</a>
126 <label for="add_to_patron_list_which">Add:</label>
127 <select id="add_to_patron_list_which" name="add_to_patron_list_which">
128 <option value="selected">Selected patrons</option>
129 <option value="all">All resultant patrons</option>
132 <label for="add_to_patron_list">to:</label>
133 <select id="add_to_patron_list" name="add_to_patron_list">
134 <option value=""></option>
135 [% IF patron_lists %]
136 <optgroup label="Patron lists:">
137 [% FOREACH pl IN patron_lists %]
138 <option value="[% pl.patron_list_id %]">[% pl.name %]</option>
143 <option value="new">[ New list ]</option>
146 <input type="text" id="new_patron_list" name="new_patron_list" id="new_patron_list" />
148 [% FOREACH key IN search_parameters.keys %]
149 <input type="hidden" name="[% key %]" value="[% search_parameters.$key %]" />
152 <input id="add_to_patron_list_submit" type="submit" class="submit" value="Save">
157 <div class="searchresults">
159 <table id="memberresultst">
162 [% IF (CAN_user_tools_manage_patron_lists) %]
170 <th>OD/Checkouts</th>
177 [% FOREACH resultsloo IN resultsloop %]
178 [% IF ( resultsloo.overdue ) %]
181 [% UNLESS ( loop.odd ) %]
182 <tr class="highlight">
187 [% IF (CAN_user_tools_manage_patron_lists) %]
188 <td><input type="checkbox" class="selection" name="borrowernumber" value="[% resultsloo.borrowernumber %]" /></td>
190 <td>[% resultsloo.cardnumber %]</td>
191 <td style="white-space: nowrap;">
192 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% resultsloo.borrowernumber %]">
193 [% 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%]
195 [% 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 %]
196 [% IF (resultsloo.email ) %]<br/>Email: <a href="mailto:[% resultsloo.email %]">[% resultsloo.email %]</a>[% END %]
198 <td>[% resultsloo.category_description %] ([% resultsloo.category_type %])</td>
199 <td>[% resultsloo.branchname %]</td>
200 <td>[% resultsloo.dateexpiry %]</td>
201 <td>[% IF ( resultsloo.overdues ) %]<span class="overdue"><strong>[% resultsloo.overdues %]</strong></span>[% ELSE %][% resultsloo.overdues %][% END %]/[% resultsloo.issues %]</td>
202 <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>
203 <td>[% resultsloo.borrowernotes %]</td>
204 <td>[% IF ( resultsloo.category_type ) %]
205 <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% resultsloo.borrowernumber %]&category_type=[% resultsloo.category_type %]">Edit</a>
206 [% ELSE %] <!-- try with categorycode if no category_type -->
207 [% IF ( resultsloo.categorycode ) %]
208 <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% resultsloo.borrowernumber %]&categorycode=[% resultsloo.categorycode %]">Edit</a>
209 [% ELSE %] <!-- if no categorycode, set category_type to A by default -->
210 <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&destination=circ&borrowernumber=[% resultsloo.borrowernumber %]&category_type=A">Edit</a>
217 <div class="pages">[% IF ( multipage ) %][% paginationbar %][% END %]</div>
219 [% IF (CAN_user_tools_manage_patron_lists) %]
223 [% IF ( searching ) %]
224 <div class="dialog alert">No results found</div>
232 [% INCLUDE 'members-menu.inc' %]
237 [% INCLUDE 'intranet-bottom.inc' %]