Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 1 | <header> |
Nils Diewald | eb25f5f | 2015-05-08 00:44:42 +0000 | [diff] [blame] | 2 | <%= link_to 'index', class => 'logo', begin %><h1><span><%= title() // loc('korap_desc') %></span></h1><% end %> |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 3 | <div class="button top"> |
Akron | e5ef4e0 | 2017-04-19 17:07:52 +0200 | [diff] [blame] | 4 | |
| 5 | % if (stash('user')) { |
| 6 | %# TODO: CSRF protection |
| 7 | <a href="<%= url_for 'logout' %>" |
| 8 | class="logout" |
| 9 | title="<%= loc 'logout' %>: <%= stash('user') %>"><span><%= loc 'logout' %></span></a> |
| 10 | % }; |
| 11 | |
Nils Diewald | 1940214 | 2015-04-30 15:44:52 +0000 | [diff] [blame] | 12 | </div> |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 13 | <form autocomplete="off" action="<%= url_for 'index' %>" id="searchform"> |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 14 | <div id="searchbar"> |
Akron | 056901d | 2016-06-20 17:42:35 +0200 | [diff] [blame] | 15 | %= search_field 'q', id => 'q-field', autofocus => 'autofocus', placeholder => loc('searchplaceholder'), spellcheck => 'false', autocomplete => 'corpus-query', autocorrect => 'off', autocapitalize => 'off' |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 16 | <button type="submit" title="<%= loc 'go' %>"><span><%= loc 'go' %></span></button> |
| 17 | </div> |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 18 | |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 19 | <!-- Search in the following virtual collection --> |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 20 | <div id="vc-view"></div> |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 21 | <%= loc 'in' %> |
Akron | 179c8ac | 2015-06-30 19:30:50 +0200 | [diff] [blame] | 22 | %# TODO: Create 'align' parameter |
Akron | 7716f01 | 2015-07-01 20:38:32 +0200 | [diff] [blame] | 23 | %= hidden_field 'collection-name' => param('collection-name'), id => 'collection-name' |
Akron | c1457bf | 2015-06-11 19:24:00 +0200 | [diff] [blame] | 24 | %= text_field 'collection', id => 'collection' |
Akron | 9cc3eaf | 2015-06-10 22:15:52 +0200 | [diff] [blame] | 25 | |
Nils Diewald | fccfbcb | 2015-04-29 20:48:19 +0000 | [diff] [blame] | 26 | <%= loc 'with' %> |
| 27 | <span class="select"> |
Akron | 7716f01 | 2015-07-01 20:38:32 +0200 | [diff] [blame] | 28 | %= select_field 'ql', [[loc('QL_poliqarp') => 'poliqarp'], [loc('QL_cosmas2') => 'cosmas2'], [loc('QL_annis') => 'annis'], [loc('QL_cql') => 'cql']], id => 'ql-field' |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 29 | </span> |
| 30 | <div class="button right"> |
| 31 | % param(cutoff => 1) unless param 'q'; |
| 32 | %= check_box cutoff => 1, id => 'q-cutoff-field', class => 'checkbox' |
Akron | 229bd41 | 2015-05-28 19:01:19 +0200 | [diff] [blame] | 33 | <label for="q-cutoff-field" title="<%= loc('glimpse_desc') %>"><span></span><%= loc('glimpse') %></label> |
Akron | 6a535d4 | 2015-08-26 20:16:58 +0200 | [diff] [blame] | 34 | <%= link_to 'doc_start', title => loc('tutorial'), class => "tutorial", id => "view-tutorial", tabindex => '-1', begin %><span><%= loc 'tutorial' %></span><% end %> |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 35 | </div> |
Akron | 1120a58 | 2017-10-17 12:29:16 +0200 | [diff] [blame^] | 36 | <div class="clear"></div> |
Nils Diewald | ab4d3ca | 2015-04-17 01:48:43 +0000 | [diff] [blame] | 37 | </form> |
| 38 | </header> |