Skip to content

Commit

Permalink
Blacklight 8: Deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Genia Kazymova committed Aug 6, 2024
1 parent 6bc5b9b commit 0e48080
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.1
2.4.2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
of parameters after 'edit search' is used, as chosen is doing
its own thing -->
<noscript>
<%= render_hash_as_hidden_fields(@params) %>
<%= render Blacklight::HiddenSearchStateComponent.new(params: @params) %>
</noscript>
<div class="input-criteria">

Expand Down
14 changes: 7 additions & 7 deletions app/components/trln_argon/search_bar_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<%= form_tag @url, method: @method, class: @classes.join(' '), role: 'search', 'aria-label' => scoped_t('submit') do %>
<%= render_hash_as_hidden_fields(@params) %>
<% if @search_fields.length > 1 %>
<%= render Blacklight::HiddenSearchStateComponent.new(params: @params) %>
<% if search_fields.length > 1 %>
<label for="search_field" class="sr-only visually-hidden"><%= scoped_t('search_field.label') %></label>
<% end %>
<div class="form-group mast-search">
<div class="input-group">
<%= prepend %>
<% if @search_fields.length > 1 %>
<% if search_fields.length > 1 %>
<%= select_tag(:search_field,
options_for_select(@search_fields, h(@search_field)),
options_for_select(search_fields, h(@search_field)),
#title: scoped_t('search_field.title'),
id: "#{@prefix}search_field",
class: "custom-select form-select search-field") %>
<% elsif @search_fields.length == 1 %>
<%= hidden_field_tag :search_field, @search_fields.first.last %>
<% elsif search_fields.length == 1 %>
<%= hidden_field_tag :search_field, search_fields.first.last %>
<% end %>

<label for="<%= @prefix %><%= @query_param %>" class="sr-only visually-hidden"><%= scoped_t('search.label') %></label>
<%= text_field_tag @query_param, @q, placeholder: scoped_t('search.placeholder'), class: "search-q q form-control rounded-#{@search_fields.length > 1 ? '0' : 'left'}", id: "#{@prefix}q", autocomplete: autocomplete_path.present? ? "off" : "", autofocus: @autofocus, data: { autocomplete_enabled: autocomplete_path.present?, autocomplete_path: autocomplete_path } %>
<%= text_field_tag @query_param, @q, placeholder: scoped_t('search.placeholder'), class: "search-q q form-control rounded-#{search_fields.length > 1 ? '0' : 'left'}", id: "#{@prefix}q", autocomplete: autocomplete_path.present? ? "off" : "", autofocus: @autofocus, data: { autocomplete_enabled: autocomplete_path.present?, autocomplete_path: autocomplete_path } %>

<span class="input-group-append">
<%= append %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/catalog/_search_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
url: search_action_url,
advanced_search_url: search_action_url(action: 'advanced_search'),
params: search_state.params_for_search.except(:qt),
search_fields: Deprecation.silence(Blacklight::ConfigurationHelperBehavior) { search_fields },
autocomplete_path: search_action_path(action: :suggest))) %>
presenter: presenter,
autocomplete_path: suggest_index_catalog_path)) %>
2 changes: 1 addition & 1 deletion app/views/catalog/_search_results.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<%- if @response.empty? %>
<%= render "zero_results" %>
<%- elsif render_grouped_response? %>
<%= Deprecation.silence(Blacklight::RenderPartialsHelperBehavior) { render_grouped_document_index } %>
<%= render 'catalog/group' %>
<%- else %>
<%= render_document_index @response.documents %>
<%- end %>
Expand Down
3 changes: 1 addition & 2 deletions app/views/shared/_header_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
url: search_action_url,
advanced_search_url: search_action_url(action: 'advanced_search'),
params: search_state.params_for_search.except(:qt),
search_fields: Deprecation.silence(Blacklight::ConfigurationHelperBehavior) { search_fields },
autocomplete_path: search_action_path(action: :suggest)
autocomplete_path: suggest_index_catalog_path
)
%>
</div>
Expand Down

0 comments on commit 0e48080

Please sign in to comment.