Lines 2-122
Link Here
|
2 |
<div class="gradient"> |
2 |
<div class="gradient"> |
3 |
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Resident Search Box --> |
3 |
<h1 id="logo"><a href="/cgi-bin/koha/mainpage.pl">[% LibraryName %]</a></h1><!-- Begin Patrons Resident Search Box --> |
4 |
<div id="header_search"> |
4 |
<div id="header_search"> |
5 |
<div id="patron_search" class="residentsearch"> |
5 |
<div id="patron_search" class="residentsearch"> |
6 |
<p class="tip">Enter patron card number or partial name:</p> |
6 |
<p class="tip">Enter patron card number or partial name:</p> |
7 |
<form action="/cgi-bin/koha/members/member.pl" method="post"> |
7 |
<form action="/cgi-bin/koha/members/member.pl" method="post"> |
8 |
<input id="searchmember" data-toggle="tooltip" size="25" class="focus" name="searchmember" type="text" value="[% searchmember %]"/> |
8 |
<input id="searchmember" data-toggle="tooltip" size="25" class="focus" name="searchmember" type="text" value="[% searchmember %]"/> |
9 |
<input type="hidden" name="quicksearch" value="1" /> |
9 |
<input type="hidden" name="quicksearch" value="1" /> |
10 |
<span class="filteraction" id="filteraction_off"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[-]</a></span> |
10 |
<span class="filteraction" id="filteraction_off"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[-]</a></span> |
11 |
<span class="filteraction" id="filteraction_on"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[+]</a></span> |
11 |
<span class="filteraction" id="filteraction_on"> <a href="#" onclick="$('#filters').toggle();$('.filteraction').toggle();">[+]</a></span> |
12 |
|
12 |
|
13 |
<label for="searchfieldstype">Search fields:</label> |
13 |
<input value="Search" class="submit" type="submit" /> |
14 |
<select name="searchfieldstype" id="searchfieldstype"> |
|
|
15 |
[% IF searchfieldstype == "standard" %] |
16 |
<option selected="selected" value='standard'>Standard</option> |
17 |
[% ELSE %] |
18 |
<option value='standard'>Standard</option> |
19 |
[% END %] |
20 |
[% IF searchfieldstype == "email" %] |
21 |
<option selected="selected" value='email'>Email</option> |
22 |
[% ELSE %] |
23 |
<option value='email'>Email</option> |
24 |
[% END %] |
25 |
[% IF searchfieldstype == "borrowernumber" %] |
26 |
<option selected="selected" value='borrowernumber'>Borrower number</option> |
27 |
[% ELSE %] |
28 |
<option value='borrowernumber'>Borrower number</option> |
29 |
[% END %] |
30 |
[% IF searchfieldstype == "phone" %] |
31 |
<option selected="selected" value='phone'>Phone number</option> |
32 |
[% ELSE %] |
33 |
<option value='phone'>Phone number</option> |
34 |
[% END %] |
35 |
[% IF searchfieldstype == "address" %] |
36 |
<option selected="selected" value='address'>Street Address</option> |
37 |
[% ELSE %] |
38 |
<option value='address'>Street Address</option> |
39 |
[% END %] |
40 |
[% IF searchfieldstype == "dateofbirth" %] |
41 |
<option selected="selected" value='dateofbirth'>Date of birth</option> |
42 |
[% ELSE %] |
43 |
<option value='dateofbirth'>Date of birth</option> |
44 |
[% END %] |
45 |
[% IF searchfieldstype == "sort1" %] |
46 |
<option selected="selected" value='sort1'>Sort field 1</option> |
47 |
[% ELSE %] |
48 |
<option value='sort1'>Sort field 1</option> |
49 |
[% END %] |
50 |
[% IF searchfieldstype == "sort2" %] |
51 |
<option selected="selected" value='sort2'>Sort field 2</option> |
52 |
[% ELSE %] |
53 |
<option value='sort2'>Sort field 2</option> |
54 |
[% END %] |
55 |
</select> |
56 |
|
14 |
|
57 |
<script type="text/javascript"> |
15 |
<div id="filters"> |
58 |
[% SET dateformat = Koha.Preference('dateformat') %] |
16 |
<p><label for="searchfieldstype">Search fields:</label> |
59 |
$("#searchfieldstype").change(function() { |
17 |
<select name="searchfieldstype" id="searchfieldstype"> |
60 |
if ( $(this).val() == 'dateofbirth' ) { |
18 |
[% IF searchfieldstype == "standard" %] |
61 |
[% IF dateformat == 'us' %] |
19 |
<option selected="selected" value='standard'>Standard</option> |
62 |
var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'"); |
20 |
[% ELSE %] |
63 |
[% ELSIF dateformat == 'iso' %] |
21 |
<option value='standard'>Standard</option> |
64 |
var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'"); |
22 |
[% END %] |
65 |
[% ELSIF dateformat == 'metric' %] |
23 |
[% IF searchfieldstype == "email" %] |
66 |
var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'"); |
24 |
<option selected="selected" value='email'>Email</option> |
67 |
[% END %] |
25 |
[% ELSE %] |
68 |
$('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show'); |
26 |
<option value='email'>Email</option> |
69 |
} else { |
27 |
[% END %] |
70 |
$('#searchmember').tooltip('destroy'); |
28 |
[% IF searchfieldstype == "borrowernumber" %] |
71 |
} |
29 |
<option selected="selected" value='borrowernumber'>Borrower number</option> |
72 |
}); |
30 |
[% ELSE %] |
|
|
31 |
<option value='borrowernumber'>Borrower number</option> |
32 |
[% END %] |
33 |
[% IF searchfieldstype == "phone" %] |
34 |
<option selected="selected" value='phone'>Phone number</option> |
35 |
[% ELSE %] |
36 |
<option value='phone'>Phone number</option> |
37 |
[% END %] |
38 |
[% IF searchfieldstype == "address" %] |
39 |
<option selected="selected" value='address'>Street Address</option> |
40 |
[% ELSE %] |
41 |
<option value='address'>Street Address</option> |
42 |
[% END %] |
43 |
[% IF searchfieldstype == "dateofbirth" %] |
44 |
<option selected="selected" value='dateofbirth'>Date of birth</option> |
45 |
[% ELSE %] |
46 |
<option value='dateofbirth'>Date of birth</option> |
47 |
[% END %] |
48 |
[% IF searchfieldstype == "sort1" %] |
49 |
<option selected="selected" value='sort1'>Sort field 1</option> |
50 |
[% ELSE %] |
51 |
<option value='sort1'>Sort field 1</option> |
52 |
[% END %] |
53 |
[% IF searchfieldstype == "sort2" %] |
54 |
<option selected="selected" value='sort2'>Sort field 2</option> |
55 |
[% ELSE %] |
56 |
<option value='sort2'>Sort field 2</option> |
57 |
[% END %] |
58 |
</select> |
59 |
</p> |
73 |
|
60 |
|
74 |
</script> |
61 |
<p> |
|
|
62 |
<label for="searchtype">Search type:</label> |
63 |
<select name="searchtype" id="searchtype"> |
64 |
[% IF searchtype != 'start_with' %] |
65 |
<option value='start_with'>Starts with</option> |
66 |
<option selected="selected" value='contain'>Contains</option> |
67 |
[% ELSE %] |
68 |
<option selected="selected" value='start_with'>Starts with</option> |
69 |
<option value='contain'>Contains</option> |
70 |
[% END %] |
71 |
</select> |
72 |
</p> |
75 |
|
73 |
|
76 |
<label for="searchtype">Search type:</label> |
|
|
77 |
<select name="searchtype" id="searchtype"> |
78 |
[% IF searchtype != 'start_with' %] |
79 |
<option value='start_with'>Starts with</option> |
80 |
<option selected="selected" value='contain'>Contains</option> |
81 |
[% ELSE %] |
82 |
<option selected="selected" value='start_with'>Starts with</option> |
83 |
<option value='contain'>Contains</option> |
84 |
[% END %] |
85 |
</select> |
86 |
|
74 |
|
87 |
<input value="Search" class="submit" type="submit" /> |
75 |
[% IF ( branchloop ) %] |
88 |
[% IF ( branchloop ) %] |
76 |
<p> <label for="branchcode">Library: </label> |
89 |
<p id="filters"> <label for="branchcode">Library: </label> |
77 |
<select name="branchcode" id="branchcode"> |
90 |
<select name="branchcode" id="branchcode"> |
78 |
[% IF branchloop.size != 1 %] |
91 |
[% IF branchloop.size != 1 %] |
79 |
<option value="">Any</option> |
92 |
<option value="">Any</option> |
80 |
[% END %] |
|
|
81 |
[% FOREACH branchloo IN branchloop %] |
82 |
[% IF ( branchloo.selected ) %] |
83 |
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %] |
84 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] |
85 |
[% END %]</select> |
93 |
[% END %] |
86 |
[% END %] |
94 |
[% FOREACH branchloo IN branchloop %] |
87 |
[% IF ( categories ) %] |
95 |
[% IF ( branchloo.selected ) %] |
88 |
<p> |
96 |
<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %] |
89 |
<label for="categorycode">Category: </label><select name="categorycode" id="categorycode"> |
97 |
<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %] |
90 |
<option value="">Any</option>[% FOREACH categorie IN categories %] |
98 |
[% END %]</select> |
91 |
[% IF ( categorie.selected ) %] |
99 |
<label for="categorycode">Category: </label><select name="categorycode" id="categorycode"> |
92 |
<option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %] |
100 |
<option value="">Any</option>[% FOREACH categorie IN categories %] |
93 |
<option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %] |
101 |
[% IF ( categorie.selected ) %] |
94 |
[% END %]</select> |
102 |
<option value="[% categorie.categorycode %]" selected="selected">[% categorie.description |html_entity %]</option>[% ELSE %] |
95 |
</p> |
103 |
<option value="[% categorie.categorycode %]">[% categorie.description |html_entity %]</option>[% END %] |
96 |
[% END %] |
104 |
[% END %]</select> |
97 |
</div> |
105 |
</p> |
98 |
</form> |
106 |
[% END %] |
99 |
</div> |
107 |
</form> |
|
|
108 |
</div> |
109 |
|
110 |
[% INCLUDE 'patron-search-box.inc' %] |
100 |
[% INCLUDE 'patron-search-box.inc' %] |
111 |
|
101 |
|
112 |
[% IF ( CAN_user_catalogue ) %] |
102 |
[% IF ( CAN_user_catalogue ) %] |
113 |
<div id="catalog_search" class="residentsearch"> |
103 |
<div id="catalog_search" class="residentsearch"> |
114 |
<p class="tip">Enter search keywords:</p> |
104 |
<p class="tip">Enter search keywords:</p> |
115 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block"> |
105 |
<form action="/cgi-bin/koha/catalogue/search.pl" method="get" id="cat-search-block"> |
116 |
<input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" /> |
106 |
<input type="text" name="q" id="search-form" size="40" value="" title="Enter the terms you wish to search for." class="form-text" /> |
117 |
<input type="submit" name="op" id="opac-submit" value="Submit" class="submit" /> |
107 |
<input type="submit" name="op" id="opac-submit" value="Submit" class="submit" /> |
118 |
</form> |
108 |
</form> |
119 |
</div>[% END %] |
109 |
</div>[% END %] |
120 |
[% IF ( CAN_user_circulate ) %] |
110 |
[% IF ( CAN_user_circulate ) %] |
121 |
<div id="checkin_search" class="residentsearch"> |
111 |
<div id="checkin_search" class="residentsearch"> |
122 |
<p class="tip">Scan a barcode to check in:</p> |
112 |
<p class="tip">Scan a barcode to check in:</p> |
Lines 126-137
Link Here
|
126 |
</form> |
116 |
</form> |
127 |
</div> |
117 |
</div> |
128 |
[% END %] |
118 |
[% END %] |
129 |
<ul> |
119 |
<ul> |
130 |
<li><a href="#patron_search">Search patrons</a></li> |
120 |
<li><a href="#patron_search">Search patrons</a></li> |
131 |
[% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %] |
121 |
[% IF ( CAN_user_circulate ) %]<li><a href="#circ_search">Check out</a></li>[% END %] |
132 |
[% IF ( CAN_user_circulate ) %]<li><a href="#checkin_search">Check in</a></li>[% END %] |
122 |
[% IF ( CAN_user_circulate ) %]<li><a href="#checkin_search">Check in</a></li>[% END %] |
133 |
[% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %] |
123 |
[% IF ( CAN_user_catalogue ) %]<li><a href="#catalog_search">Search the catalog</a></li>[% END %] |
134 |
</ul> |
124 |
</ul> |
135 |
</div><!-- /header_search --> |
125 |
</div><!-- /header_search --> |
136 |
</div><!-- /gradient --> |
126 |
</div><!-- /gradient --> |
137 |
<script type="text/javascript">//<![CDATA[ |
127 |
<script type="text/javascript">//<![CDATA[ |
Lines 139-144
$(document).ready(function() {
Link Here
|
139 |
[% IF ( advsearch ) %]$("#filteraction_on").toggle(); |
129 |
[% IF ( advsearch ) %]$("#filteraction_on").toggle(); |
140 |
[% ELSE %]$("#filters").toggle(); |
130 |
[% ELSE %]$("#filters").toggle(); |
141 |
$("#filteraction_off").toggle();[% END %] |
131 |
$("#filteraction_off").toggle();[% END %] |
|
|
132 |
[% SET dateformat = Koha.Preference('dateformat') %] |
133 |
$("#searchfieldstype").change(function() { |
134 |
if ( $(this).val() == 'dateofbirth' ) { |
135 |
[% IF dateformat == 'us' %] |
136 |
var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'MM/DD/YYYY'"); |
137 |
[% ELSIF dateformat == 'iso' %] |
138 |
var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'YYYY-MM-DD'"); |
139 |
[% ELSIF dateformat == 'metric' %] |
140 |
var MSG_DATE_FORMAT = _("Dates of birth should be entered in the format 'DD/MM/YYYY'"); |
141 |
[% END %] |
142 |
$('#searchmember').attr("title",MSG_DATE_FORMAT).tooltip('show'); |
143 |
} else { |
144 |
$('#searchmember').tooltip('destroy'); |
145 |
} |
146 |
}); |
142 |
}); |
147 |
}); |
143 |
//]]> |
148 |
//]]> |
144 |
</script> |
149 |
</script> |
145 |
- |
|
|