Skip to content

Commit

Permalink
Make tomselect advanced search multi-select facets consistently style…
Browse files Browse the repository at this point in the history
…d with the text input fields
  • Loading branch information
seanaery committed Feb 19, 2025
1 parent 1b3c0c0 commit f14d6d4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.4
3.0.5
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@
<h2 class="limit-criteria-heading h3"><%= t('blacklight.advanced_search.form.limit_criteria_heading_html')%></h2>

<div id="advanced_search_facets" class="limit_input row">
<div class="advanced-facet-limits col-md-9 offset-md-3">
<% search_filter_controls.each do |control| %>
<%= control %>
<% end %>
</div>
<% search_filter_controls.each do |control| %>
<%= control %>
<% end %>
</div>
</div>
<% end %>
Expand Down
33 changes: 17 additions & 16 deletions app/components/trln_argon/multi_select_facet_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<%= render(@layout.new(facet_field: @facet_field)) do |component| %>
<% component.with_label do %>
<%= @facet_field.label %>
<% end %>
<% component.with_body do %>
<div class="facet-multi-select p-2">
<select <%= tag.attributes(select_attributes.merge(placeholder: t('blacklight_advanced_search.form.placeholder'))) %>>
<% presenters.each do |presenter| %>
<option <%= tag.attributes(option_attributes(presenter: presenter)) %>>
<%= "#{presenter.label} (#{number_with_delimiter(presenter.hits)})" %>
</option>
<% end %>
</select>
</div>
<% end %>
<% end %>
<div class="row mb-4">
<label class="col-12 col-md-3 col-form-label fw-bold" id="<%= @facet_field.key %>_label" for="<%= @facet_field.key %>_select">
<%= @facet_field.label %>
</label>
<div class="col-12 col-md-9">
<div class="facet-multi-select">
<select id="<%= @facet_field.key %>_select" aria-labelledby="<%= @facet_field.key %>_label"
<%= tag.attributes(select_attributes.merge(placeholder: t('blacklight_advanced_search.form.placeholder'))) %>>
<% presenters.each do |presenter| %>
<option <%= tag.attributes(option_attributes(presenter: presenter)) %>>
<%= "#{presenter.label} (#{number_with_delimiter(presenter.hits)})" %>
</option>
<% end %>
</select>
</div>
</div>
</div>

0 comments on commit f14d6d4

Please sign in to comment.