From 6dd3737ed4d48711b1b1828a6a3a712e76862874 Mon Sep 17 00:00:00 2001 From: Huda Khan Date: Tue, 4 Feb 2025 16:10:41 -0700 Subject: [PATCH] using latest blacklight release to override facet button colors --- Gemfile.lock | 25 +++++++++++-------- .../facet_field_pagination_component.html.erb | 19 -------------- .../facet_field_pagination_component.rb | 5 ---- app/views/catalog/_facet_pagination.html.erb | 2 +- 4 files changed, 15 insertions(+), 36 deletions(-) delete mode 100644 app/components/facet_field_pagination_component.html.erb delete mode 100644 app/components/facet_field_pagination_component.rb diff --git a/Gemfile.lock b/Gemfile.lock index 22a10c992..84bbc53c5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://gems.contribsys.com/ specs: - sidekiq-pro (7.3.5) + sidekiq-pro (7.3.6) sidekiq (>= 7.3.7, < 8) GEM @@ -351,15 +351,15 @@ GEM grpc (~> 1.66) geo_coord (0.2.0) github-markup (5.0.1) - gli (2.22.1) + gli (2.22.2) ostruct globalid (1.2.1) activesupport (>= 6.1) - google-analytics-data (0.6.1) + google-analytics-data (0.7.0) google-analytics-data-v1beta (>= 0.11, < 2.a) google-cloud-core (~> 1.6) - google-analytics-data-v1beta (0.15.0) - gapic-common (>= 0.24.0, < 2.a) + google-analytics-data-v1beta (0.16.0) + gapic-common (>= 0.25.0, < 2.a) google-cloud-errors (~> 1.0) google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) @@ -480,7 +480,7 @@ GEM activerecord kaminari-core (= 1.2.2) kaminari-core (1.2.2) - language_server-protocol (3.17.0.3) + language_server-protocol (3.17.0.4) latex-decode (0.4.0) launchy (3.1.0) addressable (~> 2.8) @@ -539,6 +539,7 @@ GEM multi_xml (0.7.1) bigdecimal (~> 3.1) multipart-post (2.4.1) + mutex_m (0.3.0) mysql2 (0.5.6) namae (1.2.0) racc (~> 1.7) @@ -558,7 +559,7 @@ GEM net-smtp (0.5.0) net-protocol net-ssh (7.3.0) - newrelic_rpm (9.16.1) + newrelic_rpm (9.17.0) nio4r (2.7.4) nokogiri (1.18.2) mini_portile2 (~> 2.8.2) @@ -595,7 +596,7 @@ GEM stringio time uri - openseadragon (1.0.16) + openseadragon (1.0.17) rails (> 6.1.0) orm_adapter (0.5.0) os (1.1.4) @@ -616,7 +617,7 @@ GEM date stringio public_suffix (6.0.1) - puma (6.5.0) + puma (6.6.0) nio4r (~> 2.0) purl_fetcher-client (0.5.0) dor-rights-auth @@ -745,7 +746,7 @@ GEM rubocop-ast (>= 1.36.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.37.0) + rubocop-ast (1.38.0) parser (>= 3.3.1.0) rubocop-capybara (2.21.0) rubocop (~> 1.41) @@ -857,14 +858,16 @@ GEM tophat (2.3.1) actionpack (>= 3.0.0) trailblazer-option (0.1.2) - traject (3.8.2) + traject (3.8.3) concurrent-ruby (>= 0.8.0) + csv dot-properties (>= 0.1.1) hashie (>= 3.1, < 6) http (>= 3.0, < 6) httpclient (~> 2.5) marc (~> 1.0) marc-fastxmlwriter (~> 1.0) + mutex_m nokogiri (~> 1.9) slop (~> 4.0) yell diff --git a/app/components/facet_field_pagination_component.html.erb b/app/components/facet_field_pagination_component.html.erb deleted file mode 100644 index 1f7ba644d..000000000 --- a/app/components/facet_field_pagination_component.html.erb +++ /dev/null @@ -1,19 +0,0 @@ - - -
- <% if @facet_field.paginator.sort == 'index' -%> - <%= t('blacklight.search.facets.sort.index') %> - <%= helpers.link_to(t('blacklight.search.facets.sort.count'), sort_facet_url('count'), class: "sort_change numeric btn btn-outline-primary", data: { blacklight_modal: "preserve" }) %> - <% elsif @facet_field.paginator.sort == 'count' -%> - <%= helpers.link_to(t('blacklight.search.facets.sort.index'), sort_facet_url('index'), class: "sort_change az btn btn-outline-primary", data: { blacklight_modal: "preserve" }) %> - <%= t('blacklight.search.facets.sort.count') %> - <% end -%> -
diff --git a/app/components/facet_field_pagination_component.rb b/app/components/facet_field_pagination_component.rb deleted file mode 100644 index 7f3c486c0..000000000 --- a/app/components/facet_field_pagination_component.rb +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -# Override the default Blacklight styling for pagination buttons -class FacetFieldPaginationComponent < Blacklight::FacetFieldPaginationComponent -end diff --git a/app/views/catalog/_facet_pagination.html.erb b/app/views/catalog/_facet_pagination.html.erb index 3297cfe26..2f993da40 100644 --- a/app/views/catalog/_facet_pagination.html.erb +++ b/app/views/catalog/_facet_pagination.html.erb @@ -1 +1 @@ -<%= render(FacetFieldPaginationComponent.new(facet_field: facet_field_presenter(@facet, @display_facet))) %> \ No newline at end of file +<%= render(Blacklight::FacetFieldPaginationComponent.new(facet_field: facet_field_presenter(@facet, @display_facet), button_classes: %w[btn btn-outline-primary])) %> \ No newline at end of file