-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Search form is searching correct fields - Needs more testing - Booleans are not actually hooked up correctly - not sure if this is possible within json syntax - Locally there are some failing tests when I turn the feature on for everything, mostly in browse specs - don't know if this is related to local solr config change
- Loading branch information
Showing
4 changed files
with
86 additions
and
8 deletions.
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<div class="advanced-search-field"> | ||
<div class="search-field"> | ||
<label for="clause_0_field" class="sr-only">Options for advanced search</label> | ||
<%= select_tag( | ||
'clause[0][field]', | ||
options_for_select( | ||
advanced_key_value, | ||
guided_field(:clause_0_field, 'all_fields') | ||
), | ||
class: "search_field") %> | ||
<div name="row1"> | ||
<label for='clause_0_query' class='sr-only'>Advanced search terms</label> | ||
<%= text_field_tag( | ||
"clause[0][query]", | ||
label_tag_default_for(:clause_0_query), | ||
class: 'form-control', | ||
autocorrect: "off", | ||
autocapitalize: "off", | ||
autocomplete: "off", | ||
spellcheck: "false") %> | ||
</div> | ||
</div> | ||
<div class="search-operators" role="radiogroup" aria-label="Search operators"> | ||
<label><%= radio_button_tag("op2", "AND", guided_radio(:op2, "AND")) %> AND</label> | ||
<label><%= radio_button_tag("op2", "OR", guided_radio(:op2, "OR")) %> OR</label> | ||
<label><%= radio_button_tag("op2", "NOT", guided_radio(:op2, "NOT")) %> NOT</label> | ||
</div> | ||
<div class="search-field"> | ||
<label for="clause_1_field" class="sr-only">Options for advanced search - second parameter</label> | ||
<%= select_tag( | ||
'clause[1][field]', | ||
options_for_select( | ||
advanced_key_value, | ||
guided_field(:clause_1_field, 'author') | ||
), | ||
class: "search_field") %> | ||
<div name="row2"> | ||
<label for='clause_1_query' class='sr-only'>Advanced search terms - second parameter</label> | ||
<%= text_field_tag( | ||
"clause[1][query]", | ||
label_tag_default_for(:clause_1_query), | ||
class: 'form-control', | ||
autocorrect: "off", | ||
autocapitalize: "off", | ||
autocomplete: "off", | ||
spellcheck: "false") %> | ||
</div> | ||
</div> | ||
<div class="search-operators" role="radiogroup" aria-label="Search operators"> | ||
<label><%= radio_button_tag("op3", "AND", guided_radio(:op3, "AND")) %> AND</label> | ||
<label><%= radio_button_tag("op3", "OR", guided_radio(:op3, "OR")) %> OR</label> | ||
<label><%= radio_button_tag("op3", "NOT", guided_radio(:op3, "NOT")) %> NOT</label> | ||
</div> | ||
<div class="search-field"> | ||
<label for="clause_2_field" class="sr-only">Options for advanced search - third parameter</label> | ||
<%= select_tag( | ||
'clause[2][field]', | ||
options_for_select( | ||
advanced_key_value, | ||
guided_field(:clause_2_field, 'title') | ||
), | ||
class: "search_field") %> | ||
<div name="row3"> | ||
<label for='clause_2_query' class='sr-only'>Advanced search terms - third parameter</label> | ||
<%= text_field_tag( | ||
"clause[2][query]", | ||
label_tag_default_for(:clause_2_query), | ||
:class => 'form-control', | ||
autocorrect: "off", | ||
autocapitalize: "off", | ||
spellcheck: "false") %> | ||
</div> | ||
</div> | ||
</div> |
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