-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make tomselect advanced search multi-select facets consistently style…
…d with the text input fields
- Loading branch information
Showing
3 changed files
with
21 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0.4 | ||
3.0.5 |
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
33 changes: 17 additions & 16 deletions
33
app/components/trln_argon/multi_select_facet_component.html.erb
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,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> |