Bug 2780 - Capitalize strings consistently (patron cards)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / patroncards / members-search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Patrons [% IF ( searching ) %]&rsaquo; Search results[% END %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4         <style type="text/css">
5                 #custom-doc { width:47.23em;*width:46.04em;min-width:600px; margin:auto; text-align:left; }
6         </style>
7 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
8 <script type="text/javascript">
9 //<![CDATA[
10 $(document).ready(function(){
11     $("#CheckAll").click(function(){
12                 $(".checkboxed").checkCheckboxes();
13                 return false;
14     });
15     $("#CheckNone").click(function(){
16         $(".checkboxed").unCheckCheckboxes();
17         return false;
18     });
19 });
20 function add_item(borrowernum,batch_id,type_id){
21  var getstr='';
22  if (borrowernum == 'checked') {
23     itms= new Array;
24     if(document.resultform.borrowernumber.length > 0) {
25         for (var i=0; i < document.resultform.borrowernumber.length; i++) {
26             if (document.resultform.borrowernumber[i].checked) {
27                 itms.push("borrower_number=" +  document.resultform.borrowernumber[i].value);
28             }
29         }
30         getstr = itms.join("&");
31     } else {
32         getstr = "borrower_number="+document.resultform.borrowernumber.value;
33     }
34   } else {
35                 getstr = "borrower_number="+borrowernum;
36     }
37         var myurl = "edit-batch.pl?op=add&batch_id="+batch_id+"&"+getstr;
38         window.opener.location.href = myurl;
39 }
40 //]]>
41 </script>
42 </head>
43 <body id="pcard_members-search" class="tools pcard">
44
45 <div id="custom-doc" class="yui-t7">
46   <div id="bd">
47         <div class="yui-g">
48 <h3>Patron Search</h3>
49
50 <div class="browse">
51     Browse by last name:
52     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=a&amp;batch_id=[% batch_id %]">A</a>
53     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=b&amp;batch_id=[% batch_id %]">B</a>
54     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=c&amp;batch_id=[% batch_id %]">C</a>
55     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=d&amp;batch_id=[% batch_id %]">D</a>
56     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=e&amp;batch_id=[% batch_id %]">E</a>
57     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=f&amp;batch_id=[% batch_id %]">F</a>
58     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=g&amp;batch_id=[% batch_id %]">G</a>
59     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=h&amp;batch_id=[% batch_id %]">H</a>
60     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=i&amp;batch_id=[% batch_id %]">I</a>
61     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=j&amp;batch_id=[% batch_id %]">J</a>
62     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=k&amp;batch_id=[% batch_id %]">K</a>
63     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=l&amp;batch_id=[% batch_id %]">L</a>
64     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=m&amp;batch_id=[% batch_id %]">M</a>
65     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=n&amp;batch_id=[% batch_id %]">N</a>
66     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=o&amp;batch_id=[% batch_id %]">O</a>
67     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=p&amp;batch_id=[% batch_id %]">P</a>
68     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=q&amp;batch_id=[% batch_id %]">Q</a>
69     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=r&amp;batch_id=[% batch_id %]">R</a>
70     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=s&amp;batch_id=[% batch_id %]">S</a>
71     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=t&amp;batch_id=[% batch_id %]">T</a>
72     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=u&amp;batch_id=[% batch_id %]">U</a>
73     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=v&amp;batch_id=[% batch_id %]">V</a>
74     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=w&amp;batch_id=[% batch_id %]">W</a>
75     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=x&amp;batch_id=[% batch_id %]">X</a>
76     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=y&amp;batch_id=[% batch_id %]">Y</a>
77     <a href="/cgi-bin/koha/patroncards/members-search.pl?member=z&amp;batch_id=[% batch_id %]">Z</a>
78 </div>
79
80 <form method="get" action="/cgi-bin/koha/patroncards/members-search.pl"><p>
81 <input type="hidden" name="batch_id" value="[% batch_id %]" />
82 <input type="hidden" name="type" value="[% type %]" />
83 <label for="member">Name</label>
84 <input id="member" name="member" />
85 <label for="category">Category code</label>
86 <input id="category" name="category" />
87 <input type="submit" value="Search" /></p>
88 </form>
89
90 [% IF ( resultsloop ) %]
91 <div id="searchheader"> <h3>Results [% from %] to [% to %] of [% numresults %] found for [% IF ( member ) %]name: '<span class="ex">[% member %][% ELSIF ( category_type ) %]category code: '<span class="ex">[% category_type %][% END %]</span>'</h3></div>
92 [% IF ( paginationbar ) %]<div id="pagination_top" class="pages">[% paginationbar %]</div>[% END %]
93 <form name="resultform" action="/cgi-bin/koha/patroncards/members-search.pl" method="get" class="checkboxed"><div style="float: right; margin-top: .5em;"><input type="submit" class="icon addchecked" value="Add checked" onclick="add_item('checked',[% batch_id %]); return false" /> <input type="button" class="close" value="Done" /></div>
94 <div style="line-height: 2em; margin-left: .7em;"><a id="CheckAll" href="/cgi-bin/koha/patroncards/members-search.pl">Select All</a><a id="CheckNone" href="/cgi-bin/koha/patroncards/members-search.pl">Clear All</a></div>
95 <div class="searchresults">
96
97     <table style="float: left; margin: .5em 0;">
98     <tr>
99     <th><label style="font-weight:bold;">Select</label></th>
100     <th><a href="members-search.pl?member=[% member %]&amp;category=[% category_type %]&amp;batch_id=[% batch_id %]&amp;orderby=cardnumber">Card</a></th>
101     <th><a href="members-search.pl?member=[% member %]&amp;category=[% category_type %]&amp;batch_id=[% batch_id %]&amp;orderby=surname">Name</a></th>
102     <th><a href="members-search.pl?member=[% member %]&amp;category=[% category_type %]&amp;batch_id=[% batch_id %]&amp;orderby=borrowers.categorycode">Category</a></th>
103     <th><a href="members-search.pl?member=[% member %]&amp;category=[% category_type %]&amp;batch_id=[% batch_id %]&amp;orderby=branchcode">Library</a></th>
104     <th>Expires on</th>
105     <th>Notes</th>
106     <th></th>
107     </tr>
108     [% FOREACH resultsloo IN resultsloop %]
109     [% UNLESS ( loop.odd ) %]
110     <tr class="highlight">
111     [% ELSE %]
112     <tr>
113     [% END %]
114     <td> <input type="checkbox" name="borrowernumber" id="patron[% resultsloo.borrowernumber %]" value="[% resultsloo.borrowernumber %]" />     </td>
115     <td>[% resultsloo.cardnumber %]</td>
116     <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 %][% END %]</td>
117     <td>[% resultsloo.category_description %] ([% resultsloo.categorycode %])</td>
118     <td>[% resultsloo.branchcode %]</td>
119     <td>[% resultsloo.dateexpiry %]</td>
120     <td>[% resultsloo.borrowernotes %]</td>
121     <td><a onclick="add_item('[% resultsloo.borrowernumber %]',[% batch_id %]); return false" href="/cgi-bin/koha/patroncards/edit-batch.pl?borrower_number=[% resultsloo.borrowernumber %]&amp;batch_id=[% batch_id %]&amp;op=add">Add</a></td>
122     </tr>
123     [% END %]
124     </table>
125         </div>
126 </form>
127
128 [% ELSE %]
129 [% IF ( searching ) %]
130 No results found
131 [% END %]
132 [% END %]
133
134 </div>
135 </div>
136 [% INCLUDE 'popup-bottom.inc' %]