Lines 29-51
Link Here
|
29 |
[%# - search_type: select 'contains' or 'starts with' %] |
29 |
[%# - search_type: select 'contains' or 'starts with' %] |
30 |
[%- searchtype = searchtype || Koha.Preference('DefaultPatronSearchMethod') -%] |
30 |
[%- searchtype = searchtype || Koha.Preference('DefaultPatronSearchMethod') -%] |
31 |
[% BLOCK patron_search_filters %] |
31 |
[% BLOCK patron_search_filters %] |
32 |
<form method="get" class="patron_search_form"> |
32 |
<aside> |
33 |
<fieldset class="brief"> |
33 |
<form method="get" class="patron_search_form"> |
34 |
<h3>Search for patron</h3> |
34 |
<fieldset class="brief"> |
35 |
<ol> |
35 |
<h3>Search for patron</h3> |
36 |
<li> |
36 |
<ol> |
37 |
<label> |
37 |
<li> |
38 |
Search: |
38 |
<label>Search:</label> |
39 |
<input type="text" class="search_patron_filter" value="[% search_filter | html %]" class="focus" /> |
39 |
<input type="text" class="search_patron_filter" value="[% search_filter | html %]" class="focus" /> |
40 |
</label> |
40 |
</li> |
41 |
</li> |
41 |
|
42 |
|
42 |
[% FOR f IN filters %] |
43 |
[% FOR f IN filters %] |
43 |
[% SWITCH f %] |
44 |
[% SWITCH f %] |
44 |
[% CASE 'branch' %] |
45 |
[% CASE 'branch' %] |
45 |
<li> |
46 |
<li> |
46 |
<label>Library:</label> |
47 |
<label> |
|
|
48 |
Library: |
49 |
<select class="branchcode_filter"> |
47 |
<select class="branchcode_filter"> |
50 |
[% SET libraries = Branches.all( only_from_group => 1 ) %] |
48 |
[% SET libraries = Branches.all( only_from_group => 1 ) %] |
51 |
[% IF libraries.size != 1 %] |
49 |
[% IF libraries.size != 1 %] |
Lines 55-96
Link Here
|
55 |
<option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> |
53 |
<option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> |
56 |
[% END %] |
54 |
[% END %] |
57 |
</select> |
55 |
</select> |
58 |
</label> |
56 |
</li> |
59 |
</li> |
57 |
[% CASE 'category' %] |
60 |
[% CASE 'category' %] |
58 |
<li> |
61 |
<li> |
59 |
<label>Category:</label> |
62 |
<label> |
|
|
63 |
Category: |
64 |
<select class="categorycode_filter"> |
60 |
<select class="categorycode_filter"> |
65 |
<option value="">Any</option> |
61 |
<option value="">Any</option> |
66 |
[% FOREACH category IN Categories.limited.unblessed %] |
62 |
[% FOREACH category IN Categories.limited.unblessed %] |
67 |
<option value="[% category.categorycode | html %]">[% category.description | html %]</option> |
63 |
<option value="[% category.categorycode | html %]">[% category.description | html %]</option> |
68 |
[% END %] |
64 |
[% END %] |
69 |
</select> |
65 |
</select> |
70 |
</label> |
66 |
</li> |
71 |
</li> |
67 |
[% CASE 'sort1' %] |
72 |
[% CASE 'sort1' %] |
68 |
<li> |
73 |
<li> |
69 |
<label>Sort 1:</label> |
74 |
<label> |
|
|
75 |
Sort 1: |
76 |
[% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort1_filter", category="Bsort1", empty=1, size = 20 %] |
70 |
[% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort1_filter", category="Bsort1", empty=1, size = 20 %] |
77 |
</label> |
71 |
</li> |
78 |
</li> |
72 |
[% CASE 'sort2' %] |
79 |
[% CASE 'sort2' %] |
73 |
<li> |
80 |
<li> |
74 |
<label>Sort 2:</label> |
81 |
<label> |
75 |
[% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort2_filter", category="Bsort2", empty=1, size = 20 %] |
82 |
Sort 2: |
76 |
</li> |
83 |
[% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort2_filter", category="Bsort2", empty=1, size = 20 %] |
77 |
[% CASE 'search_field' %] |
84 |
</label> |
78 |
<li> |
85 |
</li> |
79 |
[% INCLUDE patron_fields_dropdown %] |
86 |
[% CASE 'search_field' %] |
80 |
</li> |
87 |
<li> |
81 |
[% CASE 'search_type' %] |
88 |
[% INCLUDE patron_fields_dropdown %] |
82 |
<li> |
89 |
</li> |
83 |
<label>Search type:</label> |
90 |
[% CASE 'search_type' %] |
|
|
91 |
<li> |
92 |
<label> |
93 |
Search type: |
94 |
<select name="searchtype" class="searchtype_filter"> |
84 |
<select name="searchtype" class="searchtype_filter"> |
95 |
[% IF searchtype == "starts_with" %] |
85 |
[% IF searchtype == "starts_with" %] |
96 |
<option value='starts_with' selected="selected">Starts with</option> |
86 |
<option value='starts_with' selected="selected">Starts with</option> |
Lines 100-116
Link Here
|
100 |
<option value="contains" selected="selected">Contains</option> |
90 |
<option value="contains" selected="selected">Contains</option> |
101 |
[% END %] |
91 |
[% END %] |
102 |
</select> |
92 |
</select> |
103 |
</label> |
93 |
</li> |
104 |
</li> |
94 |
[% END %] |
105 |
[% END %] |
95 |
[% END %] |
106 |
[% END %] |
96 |
</ol> |
107 |
</ol> |
97 |
<fieldset class="action"> |
108 |
<fieldset class="action"> |
98 |
<input type="submit" class="btn btn-primary" value="Search" /> |
109 |
<input type="submit" class="btn btn-primary" value="Search" /> |
99 |
<input type="button" value="Clear" class="btn btn-default clear_search" /> |
110 |
<input type="button" value="Clear" class="btn btn-default clear_search" /> |
100 |
</fieldset> |
111 |
</fieldset> |
101 |
</fieldset> |
112 |
</fieldset> |
102 |
</form> |
113 |
</form> |
103 |
</aside> |
114 |
[% END %] |
104 |
[% END %] |
115 |
|
105 |
|
116 |
[%# Display the table with: %] |
106 |
[%# Display the table with: %] |
Lines 924-930
Link Here
|
924 |
|
914 |
|
925 |
[% search_results_block_id = patron_search_modal_id _ '_searchresults' %] |
915 |
[% search_results_block_id = patron_search_modal_id _ '_searchresults' %] |
926 |
|
916 |
|
927 |
<div id="[% patron_search_modal_id | html %]" class="modal modal-full" tabindex="-1" role="dialog" aria-labelledby="patronSearchLabel" aria-hidden="true" data-backdrop=""> |
917 |
<div id="[% patron_search_modal_id | html %]" class="modal modal-full patron_search_modal" tabindex="-1" role="dialog" aria-labelledby="patronSearchLabel" aria-hidden="true" data-backdrop=""> |
928 |
<div class="modal-dialog" role="document"> |
918 |
<div class="modal-dialog" role="document"> |
929 |
<div class="modal-content"> |
919 |
<div class="modal-content"> |
930 |
<div class="modal-header"> |
920 |
<div class="modal-header"> |
Lines 934-940
Link Here
|
934 |
<div class="modal-body"> |
924 |
<div class="modal-body"> |
935 |
[% PROCESS patron_search_filters filters => ['branch','category','sort1','sort2'] %] |
925 |
[% PROCESS patron_search_filters filters => ['branch','category','sort1','sort2'] %] |
936 |
|
926 |
|
937 |
<div id="[% search_results_block_id | html %]"> <!-- FIXME removed style from #searchresults, is that bad? --> |
927 |
<div id="[% search_results_block_id | html %]" class="search_results_block"> <!-- FIXME removed style from #searchresults, is that bad? --> |
938 |
[% IF columns.grep('checkbox').size %] |
928 |
[% IF columns.grep('checkbox').size %] |
939 |
<div class="searchheader fh-fixedHeader" style="display:none;"> |
929 |
<div class="searchheader fh-fixedHeader" style="display:none;"> |
940 |
<div> |
930 |
<div> |
941 |
- |
|
|