Bug 30952: Staff interface redesign (header)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / authorities-search.inc
1 <!-- Begin Authorities Resident Search Box -->
2
3 [% BLOCK orderby %]
4     <div>
5         <label class="control-label">
6             Order by
7
8             <select name="orderby" class="form-control">
9                 [% IF ( orderby == 'HeadingAsc' ) %]
10                 <option value="HeadingAsc" selected="selected">Heading A-Z</option>
11                 [% ELSE %]
12                 <option value="HeadingAsc">Heading A-Z</option>
13                 [% END %]
14                 [% IF ( orderby == 'HeadingDsc' ) %]
15                 <option value="HeadingDsc" selected="selected">Heading Z-A</option>
16                 [% ELSE %]
17                 <option value="HeadingDsc">Heading Z-A</option>
18                 [% END %]
19                 [% IF ( orderby == '' && op ) %]
20                 <option value="" selected="selected">None</option>
21                 [% ELSE %]
22                 <option value="">None</option>
23                 [% END %]
24             </select>
25         </label>
26     </div>
27 [% END %]
28
29 [% BLOCK operator %]
30     <div>
31         <label class="control-label">
32             Operator
33
34             <select name="operator" class="form-control">
35                 [% IF ( operator == 'contains' ) %]
36                 <option value="contains" selected="selected">contains</option>
37                 [% ELSE %]
38                 <option value="contains">contains</option>
39                 [% END %]
40                 [% IF ( operator == 'start' ) %]
41                 <option value="start" selected="selected">starts with</option>
42                 [% ELSE %]
43                 <option value="start">starts with</option>
44                 [% END %]
45                 [% IF ( operator == 'exact' ) %]
46                 <option value="exact" selected="selected">is exactly</option>
47                 [% ELSE %]
48                 <option value="exact">is exactly</option>
49                 [% END %]
50             </select>
51         </label>
52     </div>
53 [% END %]
54
55 [% BLOCK authtype %]
56     <select name="authtypecode" class="form-control">
57     [% IF (marcflavour == 'UNIMARC' ) %]<option value="">All authority types</option>[% END %]
58     [% FOREACH authority_type IN authority_types %]
59         [% IF authority_type.authtypecode == authtypecode %]
60         <option value="[% authority_type.authtypecode | html %]" selected="selected">[% authority_type.authtypetext | html %]</option>
61         [% ELSE %]
62         <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
63         [% END %]
64     [% END %]
65     </select>
66 [% END %]
67
68 <div id="header_search" class="navbar-form navbar-left">
69     <div id="mainmain_heading" class="residentsearch">
70         <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
71             <input type="hidden" name="op" value="do_search" />
72             <input type="hidden" name="type" value="intranet" />
73             <input type="hidden" name="marclist" value="mainmainentry" />
74             <input type="hidden" name="and_or" value="and" />
75             <input type="hidden" name="excluding" value="" />
76
77             <span class="form-title">
78                 <label class="control-label">Main heading ($a)</label>
79             </span>
80
81             <span class="form-content">
82                 [% INCLUDE authtype %]
83                 <input id="value_mainentry" class="form-control" type="text" name="value" value="[% value | html %]" placeholder="Search main heading ($a only)" />
84                 <button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
85             </span>
86
87             <button type="submit"><i class="fa fa-arrow-right"></i></button>
88
89             <span class="form-extra-content">
90                 [% INCLUDE operator %]
91                 [% INCLUDE orderby %]
92             </span>
93         </form>
94     </div>
95
96     <div id="main_heading" class="residentsearch">
97         <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
98             <input type="hidden" name="marclist" value="mainentry" />
99             <input type="hidden" name="and_or" value="and" />
100             <input type="hidden" name="excluding" value="" />
101             <input type="hidden" name="op" value="do_search" />
102             <input type="hidden" name="type" value="intranet" />
103
104             <span class="form-title">
105                 <label class="control-label">Main heading</label>
106             </span>
107
108             <span class="form-content">
109                 [% INCLUDE authtype %]
110                 <input id="value_mainheading" class="form-control" type="text" name="value" value="[% value | html %]" placeholder="Search main heading" />
111                 <button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
112             </span>
113
114             <button type="submit"><i class="fa fa-arrow-right"></i></button>
115
116             <span class="form-extra-content">
117                 [% INCLUDE operator %]
118                 [% INCLUDE orderby %]
119             </span>
120         </form>
121     </div>
122
123     <div id="matchheading_search" class="residentsearch">
124         <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
125             <input type="hidden" name="op" value="do_search" />
126             <input type="hidden" name="type" value="intranet" />
127             <input type="hidden" name="marclist" value="match" />
128
129             <span class="form-title">
130                 <label class="control-label">All headings</label>
131             </span>
132
133             <span class="form-content">
134                 [% INCLUDE authtype %]
135                 <input id="value_matchheading" class="form-control" type="text" name="value" value="[% value | html %]" placeholder="Search any heading" />
136                 <button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
137             </span>
138
139             <button type="submit"><i class="fa fa-arrow-right"></i></button>
140
141             <span class="form-extra-content">
142                 [% INCLUDE operator %]
143                 [% INCLUDE orderby %]
144             </span>
145         </form>
146     </div>
147
148     <div id="entire_record" class="residentsearch">
149         <form action="/cgi-bin/koha/authorities/authorities-home.pl" method="get">
150             <input type="hidden" name="op" value="do_search" />
151             <input type="hidden" name="type" value="intranet" />
152             <input type="hidden" name="marclist" value="all" />
153             <input type="hidden" name="and_or" value="and" />
154             <input type="hidden" name="excluding" value="" />
155
156             <span class="form-title">
157                 <label class="control-label">Entire record</label>
158             </span>
159
160             <span class="form-content">
161                 [% INCLUDE authtype %]
162                 <input id="value_anywhere" class="form-control" type="text" name="value" value="[% value | html %]" placeholder="Search any authority field" />
163                 <button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
164             </span>
165
166             <button type="submit"><i class="fa fa-arrow-right"></i></button>
167
168             <span class="form-extra-content">
169                 [% INCLUDE operator %]
170                 [% INCLUDE orderby %]
171             </span>
172         </form>
173     </div>
174
175     <ul>
176         <li><a title="Search main heading ($a only)" href="#mainmain_heading"><i style="font-weight:bold">$a</i></a></li>
177         <li><a title="Search main heading" href="#main_heading"><i class="fa fa-header"></i></a></li>
178         <li><a title="Search all headings" href="#matchheading_search"><i class="fa fa-align-center"></i></a></li>
179         <li><a title="Search entire record" href="#entire_record"><i class="fa fa-folder-open-o"></i></a></li>
180     </ul>
181 </div><!-- /header_search -->
182 <!-- End Authorities Resident Search Box -->