-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding search type dropdown to front page
- Loading branch information
LBCC Library
committed
Apr 7, 2017
1 parent
359b833
commit 3c3e58c
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<% unless search_fields.empty? %> | ||
<span class="<%= class_name %>"> | ||
<label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label> | ||
<%= select_tag(:search_field, options_for_select(search_fields, h(params[:search_field])), :title => t('blacklight.search.form.search_field.title'), :class=>"search_field") %> | ||
<%= select_tag(:search_field, options_for_select(search_fields, h(params[:search_field])), :title => t('blacklight.search.form.search_field.title'), :class=>select_class_name) %> | ||
<span class="sr-only"><%= t('blacklight.search.form.search_field.post_label') %></span> | ||
</span> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<%= form_tag search_action_url, :method => :get, :class => 'search-query-form form-inline clearfix navbar-form hidden-xs' do %> | ||
<%= render_hash_as_hidden_fields(params_for_search().except(:q, :search_field, :qt, :page, :utf8)) %> | ||
|
||
<div class="input-group"> | ||
<%= render partial: 'search_field_dropdown', locals: {class_name: 'input-group-addon', select_class_name: 'search_field'} %> | ||
<label for="q" class="sr-only"><%= t('blacklight.search.form.q') %></label> | ||
<%= text_field_tag :q, params[:q], :placeholder => t('blacklight.search.form.q'), :class => "search_q q form-control", :id => "q", :autofocus => should_autofocus_on_search_box? %> | ||
|
||
<span class="input-group-btn"> | ||
<button type="submit" class="btn btn-success search-btn" id="search"> | ||
<span class="submit-search-text"><%=t('blacklight.search.form.submit')%></span> | ||
<span class="glyphicon glyphicon-search"></span> | ||
</button> | ||
</span> | ||
</div> | ||
<% end %> |