Skip to content

Commit

Permalink
Set primary colors for group toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Dec 12, 2024
1 parent 4710f07 commit 7c8593b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/components/dropdown_component.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

# Displays drop down for search controls. Overriding to use btn-outline-primary
class DropdownComponent < Blacklight::System::DropdownComponent
def before_render
# this is overriding the default button classes set in Blacklight
# (we want to use btn-outline-primary for EarthWorks instead of btn-outline-secondary)
with_button(label: button_label, classes: %w[btn btn-outline-primary dropdown-toggle])
with_button(label: button_label, classes: %w(btn btn-outline-primary dropdown-toggle))
super
end
end
4 changes: 2 additions & 2 deletions app/views/search_across/_group_toggle.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% unless @response.documents.blank? %>
<div class="btn-group search-group" role="group" aria-label="Basic example">
<%= link_to 'All results', url_for(search_without_group), class: "btn btn-sm btn-secondary #{'active' unless params[:group]}" %>
<%= link_to 'Grouped by exhibit', url_for(search_with_group), class: "btn btn-sm btn-secondary #{'active' if params[:group]}" %>
<%= link_to 'All results', url_for(search_without_group), class: "btn btn-sm btn-primary #{'active' unless params[:group]}" %>
<%= link_to 'Grouped by exhibit', url_for(search_with_group), class: "btn btn-sm btn-primary #{'active' if params[:group]}" %>
</div>
<% end %>

0 comments on commit 7c8593b

Please sign in to comment.