blacklight 8.11.0 → 9.0.0.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.env +3 -3
- data/.github/matrix.json +11 -42
- data/.github/pull_request_template.md +7 -0
- data/.github/workflows/main.yml +0 -2
- data/.github/workflows/release_7_x_scheduled.yml +39 -0
- data/.github/workflows/release_8_x_scheduled.yml +39 -0
- data/.github/workflows/test.yml +0 -5
- data/.rubocop.yml +71 -3
- data/.rubocop_todo.yml +43 -76
- data/.solr_wrapper.yml +2 -0
- data/README.md +30 -8
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +452 -0
- data/app/assets/javascripts/blacklight/blacklight.esm.js +6 -76
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +6 -76
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_balanced_list.scss +1 -4
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +1 -3
- data/app/assets/stylesheets/blacklight/_bookmark.scss +44 -41
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +0 -25
- data/app/assets/stylesheets/blacklight/_constraints.scss +15 -24
- data/app/assets/stylesheets/blacklight/_controls.scss +2 -18
- data/app/assets/stylesheets/blacklight/_facets.scss +17 -84
- data/app/assets/stylesheets/blacklight/_group.scss +2 -5
- data/app/assets/stylesheets/blacklight/_header.scss +8 -11
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -8
- data/app/assets/stylesheets/blacklight/_modal.scss +1 -1
- data/app/assets/stylesheets/blacklight/_pagination.scss +0 -4
- data/app/assets/stylesheets/blacklight/_search_form.scss +0 -1
- data/app/assets/stylesheets/blacklight/_search_history.scss +0 -8
- data/app/assets/stylesheets/blacklight/_search_results.scss +1 -15
- data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +9 -14
- data/app/assets/stylesheets/blacklight/build.scss +4 -0
- data/app/components/blacklight/advanced_search_form_component.rb +3 -3
- data/app/components/blacklight/constraint_component.rb +1 -1
- data/app/components/blacklight/constraint_layout_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.html.erb +2 -2
- data/app/components/blacklight/constraints_component.rb +3 -3
- data/app/components/blacklight/document/bookmark_component.html.erb +3 -3
- data/app/components/blacklight/document/bookmark_component.rb +2 -2
- data/app/components/blacklight/document/group_component.html.erb +1 -1
- data/app/components/blacklight/document/more_like_this_component.rb +2 -2
- data/app/components/blacklight/document/page_header_component.rb +1 -1
- data/app/components/blacklight/document/sidebar_component.rb +5 -5
- data/app/components/blacklight/document/thumbnail_component.html.erb +3 -7
- data/app/components/blacklight/document/thumbnail_component.rb +7 -6
- data/app/components/blacklight/document_component.rb +12 -16
- data/app/components/blacklight/document_title_component.rb +5 -11
- data/app/components/blacklight/facet_field_checkboxes_component.rb +2 -20
- data/app/components/blacklight/facet_field_component.rb +2 -17
- data/app/components/blacklight/facet_field_filter_component.rb +2 -21
- data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +4 -25
- data/app/components/blacklight/facet_field_list_component.rb +2 -50
- data/app/components/blacklight/facet_field_no_layout_component.rb +2 -10
- data/app/components/blacklight/facet_item_component.rb +2 -74
- data/app/components/blacklight/facet_item_pivot_component.rb +3 -3
- data/app/components/blacklight/facets/checkboxes_component.rb +26 -0
- data/app/components/blacklight/facets/count_component.rb +23 -0
- data/app/components/blacklight/{facet_field_component.html.erb → facets/field_component.html.erb} +4 -4
- data/app/components/blacklight/facets/field_component.rb +23 -0
- data/app/components/blacklight/facets/filters_component.html.erb +4 -0
- data/app/components/blacklight/facets/filters_component.rb +27 -0
- data/app/components/blacklight/{facet_field_inclusive_constraint_component.html.erb → facets/inclusive_constraint_component.html.erb} +1 -1
- data/app/components/blacklight/facets/inclusive_constraint_component.rb +31 -0
- data/app/components/blacklight/{facet_field_filter_component.html.erb → facets/index_navigation_component.html.erb} +1 -1
- data/app/components/blacklight/facets/index_navigation_component.rb +32 -0
- data/app/components/blacklight/facets/item_component.rb +73 -0
- data/app/components/blacklight/facets/list_component.html.erb +11 -0
- data/app/components/blacklight/facets/list_component.rb +38 -0
- data/app/components/blacklight/facets/no_layout_component.rb +16 -0
- data/app/components/blacklight/facets/selected_value_component.rb +29 -0
- data/app/components/blacklight/facets/suggest_component.html.erb +12 -0
- data/app/components/blacklight/facets/suggest_component.rb +22 -0
- data/app/components/blacklight/metadata_field_plain_text_layout_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +3 -18
- data/app/components/blacklight/response/facet_group_component.rb +11 -23
- data/app/components/blacklight/response/facet_toggle_button_component.html.erb +16 -0
- data/app/components/blacklight/response/facet_toggle_button_component.rb +14 -0
- data/app/components/blacklight/response/pagination_component.html.erb +1 -1
- data/app/components/blacklight/response/pagination_component.rb +2 -1
- data/app/components/blacklight/response/sort_component.rb +1 -0
- data/app/components/blacklight/response/view_type_button_component.html.erb +1 -1
- data/app/components/blacklight/response/view_type_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.html.erb +1 -1
- data/app/components/blacklight/search/per_page_component.rb +1 -0
- data/app/components/blacklight/search/sidebar_component.html.erb +1 -1
- data/app/components/blacklight/search/sidebar_component.rb +1 -1
- data/app/components/blacklight/search_bar_component.html.erb +3 -3
- data/app/components/blacklight/search_bar_component.rb +2 -2
- data/app/components/blacklight/search_button_component.rb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.html.erb +2 -2
- data/app/components/blacklight/search_context/server_applied_params_component.rb +9 -0
- data/app/components/blacklight/skip_link_component.html.erb +1 -1
- data/app/components/blacklight/skip_link_component.rb +2 -1
- data/app/components/blacklight/top_navbar_component.html.erb +2 -2
- data/app/controllers/concerns/blacklight/bookmarks.rb +3 -3
- data/app/controllers/concerns/blacklight/catalog.rb +9 -23
- data/app/controllers/concerns/blacklight/controller.rb +1 -1
- data/app/controllers/concerns/blacklight/facetable.rb +34 -0
- data/app/controllers/concerns/blacklight/search_context.rb +0 -12
- data/app/controllers/concerns/blacklight/searchable.rb +1 -1
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -6
- data/app/helpers/blacklight/catalog_helper_behavior.rb +0 -10
- data/app/helpers/blacklight/configuration_helper_behavior.rb +2 -14
- data/app/helpers/blacklight/document_helper_behavior.rb +3 -27
- data/app/helpers/blacklight/facets_helper_behavior.rb +9 -0
- data/app/helpers/blacklight/icon_helper_behavior.rb +3 -11
- data/app/helpers/blacklight/layout_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/render_partials_helper_behavior.rb +0 -14
- data/app/helpers/blacklight/url_helper_behavior.rb +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/bookmark_toggle.js +1 -1
- data/app/javascript/{blacklight → blacklight-frontend}/checkbox_submit.js +3 -0
- data/app/javascript/{blacklight → blacklight-frontend}/core.js +2 -10
- data/app/javascript/{blacklight → blacklight-frontend}/facet_suggest.js +1 -3
- data/app/javascript/blacklight-frontend/index.js +16 -0
- data/app/javascript/{blacklight → blacklight-frontend}/modal.js +1 -5
- data/app/models/concerns/blacklight/document.rb +0 -11
- data/app/models/concerns/blacklight/user.rb +1 -1
- data/app/models/facet_search_builder.rb +5 -0
- data/app/presenters/blacklight/facet_field_presenter.rb +3 -3
- data/app/presenters/blacklight/rendering/helper_method.rb +4 -4
- data/app/presenters/blacklight/rendering/join.rb +2 -2
- data/app/services/blacklight/facet_search_service.rb +44 -0
- data/app/services/blacklight/field_retriever.rb +1 -1
- data/app/services/blacklight/search_params_yaml_coder.rb +0 -2
- data/app/services/blacklight/search_service.rb +6 -6
- data/app/values/blacklight/types.rb +2 -2
- data/app/views/bookmarks/_clear_bookmarks_widget.html.erb +0 -2
- data/app/views/bookmarks/index.html.erb +1 -1
- data/app/views/catalog/_facet_pivot.html.erb +1 -1
- data/app/views/catalog/_home_text.html.erb +2 -2
- data/app/views/catalog/_results_pagination.html.erb +2 -5
- data/app/views/catalog/_search_results.html.erb +3 -3
- data/app/views/catalog/_search_results_header.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_sort_widget.html.erb +1 -0
- data/app/views/catalog/facet.html.erb +4 -6
- data/app/views/catalog/show.html.erb +2 -3
- data/app/views/kaminari/blacklight/_paginator.html.erb +1 -2
- data/app/views/layouts/blacklight/base.html.erb +3 -7
- data/app/views/search_history/index.html.erb +0 -2
- data/blacklight.gemspec +4 -4
- data/config/importmap.rb +1 -1
- data/config/locales/blacklight.ar.yml +2 -2
- data/config/locales/blacklight.ca.yml +124 -124
- data/config/locales/blacklight.de.yml +2 -2
- data/config/locales/blacklight.en.yml +14 -14
- data/config/locales/blacklight.es.yml +2 -2
- data/config/locales/blacklight.fr.yml +2 -2
- data/config/locales/blacklight.hu.yml +2 -2
- data/config/locales/blacklight.it.yml +1 -1
- data/config/locales/blacklight.nl.yml +2 -2
- data/config/locales/blacklight.pt-BR.yml +1 -1
- data/config/locales/blacklight.sq.yml +2 -2
- data/config/locales/blacklight.zh.yml +2 -2
- data/lib/blacklight/abstract_repository.rb +2 -2
- data/lib/blacklight/abstract_search_builder.rb +154 -0
- data/lib/blacklight/configuration/context.rb +3 -3
- data/lib/blacklight/configuration/display_field.rb +1 -1
- data/lib/blacklight/configuration/facet_field.rb +6 -6
- data/lib/blacklight/configuration/field.rb +4 -4
- data/lib/blacklight/configuration/fields.rb +3 -4
- data/lib/blacklight/configuration/search_field.rb +1 -1
- data/lib/blacklight/configuration/view_config.rb +2 -4
- data/lib/blacklight/configuration.rb +11 -18
- data/lib/blacklight/engine.rb +0 -6
- data/lib/blacklight/facet_search_builder.rb +18 -0
- data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
- data/lib/blacklight/open_struct_with_hash_access.rb +5 -5
- data/lib/blacklight/search_builder.rb +1 -159
- data/lib/blacklight/search_state/filter_field.rb +2 -2
- data/lib/blacklight/search_state/pivot_filter_field.rb +4 -4
- data/lib/blacklight/solr/abstract_filter_query_builder.rb +77 -0
- data/lib/blacklight/solr/default_filter_query_builder.rb +20 -0
- data/lib/blacklight/solr/facet_search_builder_behavior.rb +62 -0
- data/lib/blacklight/solr/repository.rb +8 -9
- data/lib/blacklight/solr/request.rb +1 -7
- data/lib/blacklight/solr/response/facets.rb +2 -2
- data/lib/blacklight/solr/response/group_response.rb +2 -2
- data/lib/blacklight/solr/response/params.rb +0 -4
- data/lib/blacklight/solr/response.rb +5 -1
- data/lib/blacklight/solr/search_builder_behavior.rb +17 -132
- data/lib/blacklight.rb +2 -2
- data/lib/generators/blacklight/assets/importmap_generator.rb +6 -24
- data/lib/generators/blacklight/assets/propshaft_generator.rb +1 -1
- data/lib/generators/blacklight/assets_generator.rb +3 -3
- data/lib/generators/blacklight/controller_generator.rb +3 -3
- data/lib/generators/blacklight/search_builder_generator.rb +1 -1
- data/lib/generators/blacklight/templates/.solr_wrapper.yml +2 -0
- data/lib/generators/blacklight/templates/catalog_controller.rb +3 -1
- data/lib/generators/blacklight/templates/solr/conf/solrconfig.xml +0 -4
- data/lib/generators/blacklight/user_generator.rb +9 -10
- data/package.json +15 -5
- data/rollup.config.js +1 -1
- data/spec/components/blacklight/advanced_search_form_component_spec.rb +18 -22
- data/spec/components/blacklight/constraint_layout_component_spec.rb +8 -8
- data/spec/components/blacklight/constraints_component_spec.rb +11 -11
- data/spec/components/blacklight/document/action_component_spec.rb +21 -17
- data/spec/components/blacklight/document/group_component_spec.rb +10 -15
- data/spec/components/blacklight/document/page_header_component_spec.rb +35 -28
- data/spec/components/blacklight/document/sidebar_component_spec.rb +9 -30
- data/spec/components/blacklight/document_component_spec.rb +98 -65
- data/spec/components/blacklight/facet_component_spec.rb +12 -8
- data/spec/components/blacklight/facet_item_pivot_component_spec.rb +12 -12
- data/spec/components/blacklight/{facet_field_checkboxes_component_spec.rb → facets/checkboxes_component_spec.rb} +14 -14
- data/spec/components/blacklight/facets/filters_component_spec.rb +36 -0
- data/spec/components/blacklight/facets/index_navigation_component_spec.rb +40 -0
- data/spec/components/blacklight/{facet_item_component_spec.rb → facets/item_component_spec.rb} +10 -10
- data/spec/components/blacklight/{facet_field_list_component_spec.rb → facets/list_component_spec.rb} +24 -24
- data/spec/components/blacklight/facets/suggest_component_spec.rb +68 -0
- data/spec/components/blacklight/header_component_spec.rb +2 -4
- data/spec/components/blacklight/hidden_search_state_component_spec.rb +7 -7
- data/spec/components/blacklight/metadata_field_component_spec.rb +17 -15
- data/spec/components/blacklight/response/facet_group_component_spec.rb +37 -0
- data/spec/components/blacklight/response/pagination_component_spec.rb +1 -1
- data/spec/components/blacklight/response/spellcheck_component_spec.rb +1 -1
- data/spec/components/blacklight/search_bar_component_spec.rb +5 -5
- data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +2 -2
- data/spec/components/blacklight/search_context/server_item_pagination_component_spec.rb +3 -5
- data/spec/components/blacklight/skip_link_component_spec.rb +8 -11
- data/spec/components/blacklight/start_over_button_component_spec.rb +4 -4
- data/spec/components/blacklight/system/flash_message_component_spec.rb +7 -11
- data/spec/controllers/catalog_controller_spec.rb +11 -19
- data/spec/features/axe_spec.rb +6 -11
- data/spec/features/bookmarks_spec.rb +48 -11
- data/spec/features/facets_spec.rb +58 -63
- data/spec/features/search_context_spec.rb +1 -2
- data/spec/features/search_filters_spec.rb +6 -6
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +0 -9
- data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +10 -0
- data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -1
- data/spec/lib/blacklight/configuration/facet_field_spec.rb +2 -2
- data/spec/models/blacklight/configuration_spec.rb +32 -28
- data/spec/models/blacklight/facet_search_builder_spec.rb +19 -0
- data/spec/models/blacklight/search_builder_spec.rb +1 -11
- data/spec/models/blacklight/solr/default_filter_query_builder_spec.rb +72 -0
- data/spec/models/blacklight/solr/document_spec.rb +0 -4
- data/spec/models/blacklight/solr/facet_search_builder_behavior_spec.rb +929 -0
- data/spec/models/blacklight/solr/repository_spec.rb +31 -29
- data/spec/models/blacklight/solr/request_spec.rb +7 -0
- data/spec/models/blacklight/solr/response/facets_spec.rb +86 -40
- data/spec/models/blacklight/solr/response/group_response_spec.rb +8 -5
- data/spec/models/blacklight/solr/response/group_spec.rb +9 -5
- data/spec/models/blacklight/solr/response_spec.rb +96 -64
- data/spec/models/blacklight/solr/search_builder_behavior_spec.rb +2 -227
- data/spec/models/solr_document_spec.rb +5 -1
- data/spec/services/blacklight/search_service_spec.rb +5 -26
- data/spec/spec_helper.rb +0 -1
- data/spec/support/view_component_test_helpers.rb +0 -18
- data/spec/views/catalog/facet.html.erb_spec.rb +10 -11
- data/spec/views/catalog/index.atom.builder_spec.rb +6 -3
- data/spec/views/catalog/index.html.erb_spec.rb +8 -3
- data/spec/views/catalog/show.html.erb_spec.rb +1 -0
- data/tasks/blacklight.rake +8 -5
- metadata +76 -81
- data/app/assets/stylesheets/blacklight/_autocomplete.scss +0 -25
- data/app/assets/stylesheets/blacklight/_mixins.scss +0 -20
- data/app/components/blacklight/facet_field_list_component.html.erb +0 -19
- data/app/components/blacklight/icons/legacy_icon_component.rb +0 -30
- data/app/components/blacklight/search/facet_suggest_input.html.erb +0 -12
- data/app/components/blacklight/search/facet_suggest_input.rb +0 -20
- data/app/javascript/blacklight/index.js +0 -18
- data/app/javascript/blacklight/modalForm.js +0 -60
- data/app/views/catalog/_constraints.html.erb +0 -1
- data/app/views/catalog/_facet_index_navigation.html.erb +0 -1
- data/app/views/catalog/_facet_layout.html.erb +0 -8
- data/app/views/catalog/_facet_pagination.html.erb +0 -1
- data/app/views/catalog/_facets.html.erb +0 -5
- data/app/views/catalog/_search_form.html.erb +0 -7
- data/app/views/catalog/_search_header.html.erb +0 -1
- data/app/views/catalog/_show_sidebar.html.erb +0 -3
- data/app/views/catalog/_show_tools.html.erb +0 -2
- data/app/views/catalog/_start_over.html.erb +0 -1
- data/app/views/shared/_header_navbar.html.erb +0 -1
- data/lib/generators/blacklight/assets/sprockets_generator.rb +0 -68
- data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
- data/spec/components/blacklight/search/facet_suggest_input_spec.rb +0 -57
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +0 -43
- data/spec/views/catalog/_facet_layout.html.erb_spec.rb +0 -41
- data/spec/views/catalog/_search_header.erb_spec.rb +0 -14
- data/spec/views/catalog/_show_sidebar.erb_spec.rb +0 -24
- data/spec/views/catalog/_show_tools.html.erb_spec.rb +0 -37
- /data/app/components/blacklight/{facet_field_checkboxes_component.html.erb → facets/checkboxes_component.html.erb} +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/button_focus.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/debounce.js +0 -0
- /data/app/javascript/{blacklight → blacklight-frontend}/search_context.js +0 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# The Facetable module can be included onto classes that need to initialize a FacetSearchService.
|
4
|
+
# There are two dependencies you must provide on the including class. Typically these
|
5
|
+
# would be provided by Blacklight::Controller
|
6
|
+
# 1. search_state
|
7
|
+
# 2. blacklight_config
|
8
|
+
#
|
9
|
+
# Additionally, the including class may override the facet_search_service_context method to provide
|
10
|
+
# further context to the SearchService. For example you could override this to provide the
|
11
|
+
# currently signed in user.
|
12
|
+
module Blacklight::Facetable
|
13
|
+
extend ActiveSupport::Concern
|
14
|
+
|
15
|
+
included do
|
16
|
+
# Which class to use for the search service. You can subclass SearchService if you
|
17
|
+
# want to override any of the methods (e.g. SearchService#fetch)
|
18
|
+
class_attribute :facet_search_service_class
|
19
|
+
self.facet_search_service_class = Blacklight::FacetSearchService
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [Blacklight::FacetSearchService]
|
23
|
+
def facet_search_service
|
24
|
+
facet_search_service_class.new(config: blacklight_config, search_state: search_state, user_params: search_state.to_h, **facet_search_service_context)
|
25
|
+
end
|
26
|
+
|
27
|
+
# Override this method on the class that includes Blacklight::Facetable to provide more context to the search service if necessary.
|
28
|
+
# For example, if your search builder needs to be aware of the current user, override this method to return a hash including the current user.
|
29
|
+
# Then the search builder could use some property about the current user to construct a constraint on the search.
|
30
|
+
# @return [Hash] a hash of context information to pass through to the search service
|
31
|
+
def facet_search_service_context
|
32
|
+
search_service_context
|
33
|
+
end
|
34
|
+
end
|
@@ -133,21 +133,9 @@ module Blacklight::SearchContext
|
|
133
133
|
|
134
134
|
# A list of query parameters that should not be persisted for a search
|
135
135
|
def nonpersisted_search_session_params
|
136
|
-
unless method(:blacklisted_search_session_params).source_location.first.end_with?('deprecation/method_wrappers.rb')
|
137
|
-
# The blacklisted_search_session_params was overridden, so call it.
|
138
|
-
Blacklight.deprecation.warn(self, "blacklisted_search_session_params was overriden in your app, " \
|
139
|
-
"but that method should be renamed to `nonpersisted_search_session_params'. " \
|
140
|
-
"The original behavior will be removed in the next major release.")
|
141
|
-
return blacklisted_search_session_params
|
142
|
-
end
|
143
136
|
[:commit, :counter, :total, :search_id, :page, :per_page]
|
144
137
|
end
|
145
138
|
|
146
|
-
def blacklisted_search_session_params
|
147
|
-
nonpersisted_search_session_params
|
148
|
-
end
|
149
|
-
Blacklight.deprecation.deprecate_methods(self, blacklisted_search_session_params: 'use nonpersisted_search_session_params instead')
|
150
|
-
|
151
139
|
# calls setup_previous_document then setup_next_document.
|
152
140
|
# used in the show action for single view pagination.
|
153
141
|
def setup_next_and_previous_documents
|
@@ -21,7 +21,7 @@ module Blacklight::Searchable
|
|
21
21
|
|
22
22
|
# @return [Blacklight::SearchService]
|
23
23
|
def search_service
|
24
|
-
search_service_class.new(config: blacklight_config, search_state: search_state,
|
24
|
+
search_service_class.new(config: blacklight_config, search_state: search_state, **search_service_context)
|
25
25
|
end
|
26
26
|
|
27
27
|
# Override this method on the class that includes Blacklight::Searchable to provide more context to the search service if necessary.
|
@@ -41,10 +41,4 @@ module Blacklight::BlacklightHelperBehavior
|
|
41
41
|
def self.blacklight_gem_path
|
42
42
|
@blacklight_gem_path ||= Gem.loaded_specs["blacklight"].full_gem_path
|
43
43
|
end
|
44
|
-
|
45
|
-
def partial_from_blacklight?(partial)
|
46
|
-
path = lookup_context.find_all(partial, lookup_context.prefixes + [""], true).first&.identifier
|
47
|
-
|
48
|
-
path.nil? ? false : path.starts_with?(Blacklight::BlacklightHelperBehavior.blacklight_gem_path)
|
49
|
-
end
|
50
44
|
end
|
@@ -102,16 +102,6 @@ module Blacklight::CatalogHelperBehavior
|
|
102
102
|
(blacklight_config.sort_fields.values.find { |f| f.sort == @response.sort } if @response && @response.sort.present?) || blacklight_config.sort_fields[params[:sort]] || default_sort_field
|
103
103
|
end
|
104
104
|
|
105
|
-
##
|
106
|
-
# Look up the current per page value, or the default if none if set
|
107
|
-
#
|
108
|
-
# @deprecated
|
109
|
-
# @return [Integer]
|
110
|
-
def current_per_page
|
111
|
-
(@response.rows if @response && @response.rows > 0) || params.fetch(:per_page, blacklight_config.default_per_page).to_i
|
112
|
-
end
|
113
|
-
Blacklight.deprecation.deprecate_methods(self, current_per_page: 'has moved to Blacklight::Search::PerPageComponent')
|
114
|
-
|
115
105
|
##
|
116
106
|
# Should we display the sort and per page widget?
|
117
107
|
#
|
@@ -91,24 +91,12 @@ module Blacklight::ConfigurationHelperBehavior
|
|
91
91
|
(active_sort_fields.find { |_k, config| config.respond_to?(:default) && config.default } || active_sort_fields.first)&.last
|
92
92
|
end
|
93
93
|
|
94
|
-
##
|
95
|
-
# @deprecated
|
96
|
-
# The available options for results per page, in the style of #options_for_select
|
97
|
-
def per_page_options_for_select
|
98
|
-
return [] if blacklight_config.per_page.blank?
|
99
|
-
|
100
|
-
blacklight_config.per_page.map do |count|
|
101
|
-
[t(:'blacklight.search.per_page.label', count: count).html_safe, count]
|
102
|
-
end
|
103
|
-
end
|
104
|
-
Blacklight.deprecation.deprecate_methods(self, per_page_options_for_select: 'has moved to Blacklight::Search::PerPageComponent')
|
105
|
-
|
106
94
|
##
|
107
95
|
# Determine whether to render a field by evaluating :if and :unless conditions
|
108
96
|
#
|
109
97
|
# @param [Blacklight::Solr::Configuration::Field] field_config
|
110
98
|
# @return [Boolean]
|
111
|
-
def should_render_field?(field_config, *
|
112
|
-
blacklight_configuration_context.evaluate_if_unless_configuration
|
99
|
+
def should_render_field?(field_config, *)
|
100
|
+
blacklight_configuration_context.evaluate_if_unless_configuration(field_config, *)
|
113
101
|
end
|
114
102
|
end
|
@@ -24,32 +24,6 @@ module Blacklight::DocumentHelperBehavior
|
|
24
24
|
'blacklight-'
|
25
25
|
end
|
26
26
|
|
27
|
-
##
|
28
|
-
# Render the sidebar partial for a document
|
29
|
-
# This is used as an integration point by downstream apps to add to the
|
30
|
-
# default sidebar.
|
31
|
-
# See: https://github.com/geoblacklight/geoblacklight/blob/7d3c31c7af3362879b97e2c1351a2496c728c59c/app/helpers/blacklight_helper.rb#L7
|
32
|
-
#
|
33
|
-
# @param [SolrDocument] document
|
34
|
-
# @deprecated
|
35
|
-
# @return [String]
|
36
|
-
def render_document_sidebar_partial(document)
|
37
|
-
unless @render_document_sidebar_partials_deprecation_warning_shown
|
38
|
-
partials = lookup_context.find_all('show_sidebar', lookup_context.prefixes, true, [], {})
|
39
|
-
unless partials.first.identifier.starts_with? Blacklight.root
|
40
|
-
Blacklight.deprecation.warn('The partial catalog/_show_sidebar.html.erb will not be rendered by #render_document_sidebar_partial in Blacklight 9.0.' \
|
41
|
-
'Configure blacklight_config.show.sidebar_component instead (default Blacklight::Search::SidebarComponent).')
|
42
|
-
@render_document_sidebar_partials_deprecation_warning_shown = true
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
render 'show_sidebar', document: document
|
47
|
-
end
|
48
|
-
|
49
|
-
Blacklight.deprecation.deprecate_methods(self,
|
50
|
-
render_document_sidebar_partial: 'has been replaced by calling the sidebar component (Blacklight::Search::SidebarComponent) directly. ' \
|
51
|
-
'Set sidebar_component in the view config.')
|
52
|
-
|
53
27
|
##
|
54
28
|
# return the Bookmarks on a set of documents (all bookmarks on the page)
|
55
29
|
# @private
|
@@ -64,10 +38,12 @@ module Blacklight::DocumentHelperBehavior
|
|
64
38
|
|
65
39
|
##
|
66
40
|
# Check if the document is in the user's bookmarks
|
41
|
+
# Note: we do string comparison of the classes, because hot reloading in the development environment may cause each to have
|
42
|
+
# separate versions of the class loaded (see document.class.object_id and Bookmark#document_type.object_id)
|
67
43
|
# @param [Blacklight::Document] document
|
68
44
|
# @return [Boolean]
|
69
45
|
def bookmarked? document
|
70
|
-
current_bookmarks.any? { |x| x.document_id == document.id && x.document_type == document.class }
|
46
|
+
current_bookmarks.any? { |x| x.document_id == document.id && x.document_type.to_s == document.class.to_s }
|
71
47
|
end
|
72
48
|
|
73
49
|
##
|
@@ -7,6 +7,15 @@ module Blacklight::FacetsHelperBehavior
|
|
7
7
|
facet_config.presenter.new(facet_config, display_facet, self)
|
8
8
|
end
|
9
9
|
|
10
|
+
def search_facet_path(options = {})
|
11
|
+
opts = search_state
|
12
|
+
.to_h
|
13
|
+
.merge(action: "facet", only_path: true)
|
14
|
+
.merge(options)
|
15
|
+
.except(:page)
|
16
|
+
url_for opts
|
17
|
+
end
|
18
|
+
|
10
19
|
private
|
11
20
|
|
12
21
|
def facet_value_for_facet_item item
|
@@ -4,18 +4,10 @@
|
|
4
4
|
# Module to help generate icon helpers for SVG images
|
5
5
|
module Blacklight::IconHelperBehavior
|
6
6
|
##
|
7
|
-
# Returns the raw SVG (String) for a Blacklight Icon
|
8
|
-
# app/assets/images/blacklight/*.svg. Caches them so we don't have to look up
|
9
|
-
# the svg everytime.
|
7
|
+
# Returns the raw SVG (String) for a Blacklight Icon
|
10
8
|
# @param [String, Symbol] icon_name
|
11
9
|
# @return [String]
|
12
|
-
def blacklight_icon(icon_name, **
|
13
|
-
render "Blacklight::Icons::#{icon_name.to_s.camelize}Component".constantize.new(**
|
14
|
-
rescue NameError
|
15
|
-
Blacklight.deprecation.warn(
|
16
|
-
"Falling back on the LegacyIconComponent with \"#{icon_name}\" is deprecated. Instead create the component `Blacklight::Icons::#{icon_name.to_s.camelize}Component` for this icon."
|
17
|
-
)
|
18
|
-
|
19
|
-
render Blacklight::Icons::LegacyIconComponent.new(name: icon_name, **kwargs)
|
10
|
+
def blacklight_icon(icon_name, **)
|
11
|
+
render "Blacklight::Icons::#{icon_name.to_s.camelize}Component".constantize.new(**)
|
20
12
|
end
|
21
13
|
end
|
@@ -55,8 +55,8 @@ module Blacklight
|
|
55
55
|
#
|
56
56
|
# @param [Hash] options
|
57
57
|
# @return [String]
|
58
|
-
def render_nav_actions(options = {}, &
|
59
|
-
render_filtered_partials(blacklight_config.navbar.partials, options, &
|
58
|
+
def render_nav_actions(options = {}, &)
|
59
|
+
render_filtered_partials(blacklight_config.navbar.partials, options, &)
|
60
60
|
end
|
61
61
|
|
62
62
|
##
|
@@ -11,20 +11,6 @@ module Blacklight::RenderPartialsHelperBehavior
|
|
11
11
|
render_document_index_with_view(document_index_view_type, documents, locals)
|
12
12
|
end
|
13
13
|
|
14
|
-
##
|
15
|
-
# Return the list of partials for a given solr document
|
16
|
-
# @param [SolrDocument] doc solr document to render partials for
|
17
|
-
# @param [Array<String>] partials list of partials to render
|
18
|
-
# @param [Hash] locals local variables to pass to the render call
|
19
|
-
# @return [String]
|
20
|
-
def render_document_partials(doc, partials = [], locals = {})
|
21
|
-
safe_join(partials.map do |action_name|
|
22
|
-
render_document_partial(doc, action_name, locals)
|
23
|
-
end, "\n")
|
24
|
-
end
|
25
|
-
Blacklight.deprecation.deprecate_methods(self, render_document_partials: 'Replace this call with: "document_component = blacklight_config.view_config(:atom).summary_component
|
26
|
-
render document_component.new(presenter: document_presenter(document), component: :div, show: true)"')
|
27
|
-
|
28
14
|
##
|
29
15
|
# Return the list of xml for a given solr document. Doesn't safely escape for HTML.
|
30
16
|
# @param [SolrDocument] doc solr document to render partials for
|
@@ -114,6 +114,6 @@ module Blacklight::UrlHelperBehavior
|
|
114
114
|
# Use in e.g. the search history display, where we want something more like text instead of the normal constraints
|
115
115
|
def link_to_previous_search(params)
|
116
116
|
search_state = controller.search_state_class.new(params, blacklight_config, self)
|
117
|
-
link_to(render(Blacklight::ConstraintsComponent.for_search_history(search_state: search_state)), search_action_path(params))
|
117
|
+
link_to(render(Blacklight::ConstraintsComponent.for_search_history(search_state: search_state, classes: 'clearfix constraints-container mb-0')), search_action_path(params))
|
118
118
|
end
|
119
119
|
end
|
@@ -36,6 +36,9 @@ export default class CheckboxSubmit {
|
|
36
36
|
}).then((json) => {
|
37
37
|
this.labelTarget.removeAttribute('disabled')
|
38
38
|
this.checkboxTarget.removeAttribute('disabled')
|
39
|
+
// For accessibility return keyboard focus
|
40
|
+
// back to the checkbox after form submission
|
41
|
+
this.checkboxTarget.focus()
|
39
42
|
this.updateStateFor(!this.checked)
|
40
43
|
this.bookmarksCounter().forEach(counter => {
|
41
44
|
counter.innerHTML = json.bookmarks.count;
|
@@ -15,14 +15,6 @@ const Core = function() {
|
|
15
15
|
const listeners = [];
|
16
16
|
if (typeof Turbo !== 'undefined') {
|
17
17
|
listeners.push('turbo:load', 'turbo:frame-load');
|
18
|
-
} else if (typeof Turbolinks !== 'undefined' && Turbolinks.supported) {
|
19
|
-
// Turbolinks 5
|
20
|
-
if (Turbolinks.BrowserAdapter) {
|
21
|
-
listeners.push('turbolinks:load');
|
22
|
-
} else {
|
23
|
-
// Turbolinks < 5
|
24
|
-
listeners.push('page:load', 'DOMContentLoaded');
|
25
|
-
}
|
26
18
|
} else {
|
27
19
|
listeners.push('DOMContentLoaded');
|
28
20
|
}
|
@@ -32,8 +24,8 @@ const Core = function() {
|
|
32
24
|
};
|
33
25
|
}();
|
34
26
|
|
35
|
-
//
|
36
|
-
// If app isn't using
|
27
|
+
// turbo triggers turbo:load events on page transition
|
28
|
+
// If app isn't using turbo, this event will never be triggered, no prob.
|
37
29
|
Core.listeners().forEach(function(listener) {
|
38
30
|
document.addEventListener(listener, function() {
|
39
31
|
Core.activate()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import debounce from "blacklight/debounce";
|
1
|
+
import debounce from "blacklight-frontend/debounce";
|
2
2
|
|
3
3
|
const FacetSuggest = async (e) => {
|
4
4
|
if (e.target.matches('.facet-suggest')) {
|
@@ -25,8 +25,6 @@ const FacetSuggest = async (e) => {
|
|
25
25
|
const blob = await response.blob()
|
26
26
|
const text = await blob.text()
|
27
27
|
|
28
|
-
const facetArea = document.querySelector('.facet-extended-list');
|
29
|
-
|
30
28
|
if (text && facetArea) {
|
31
29
|
facetArea.innerHTML = text
|
32
30
|
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import BookmarkToggle from 'blacklight-frontend/bookmark_toggle'
|
2
|
+
import ButtonFocus from 'blacklight-frontend/button_focus'
|
3
|
+
import FacetSuggest from 'blacklight-frontend/facet_suggest'
|
4
|
+
import Modal from 'blacklight-frontend/modal'
|
5
|
+
import SearchContext from 'blacklight-frontend/search_context'
|
6
|
+
import Core from 'blacklight-frontend/core'
|
7
|
+
|
8
|
+
export default {
|
9
|
+
BookmarkToggle,
|
10
|
+
ButtonFocus,
|
11
|
+
FacetSuggest,
|
12
|
+
Modal,
|
13
|
+
SearchContext,
|
14
|
+
Core,
|
15
|
+
onLoad: Core.onLoad
|
16
|
+
}
|
@@ -56,9 +56,6 @@
|
|
56
56
|
const Modal = (() => {
|
57
57
|
const modal = {}
|
58
58
|
|
59
|
-
// bootstrap class that will stop body scrolling when modal is open
|
60
|
-
const bootstrapBodyClassOpen = "modal-open";
|
61
|
-
|
62
59
|
// a Bootstrap modal div that should be already on the page hidden
|
63
60
|
modal.modalSelector = '#blacklight-modal';
|
64
61
|
|
@@ -113,7 +110,7 @@ const Modal = (() => {
|
|
113
110
|
}
|
114
111
|
elements.forEach((el) => frag.appendChild(el))
|
115
112
|
modal.activateScripts(frag)
|
116
|
-
|
113
|
+
|
117
114
|
modal.target().querySelector('.modal-content').replaceChildren(frag)
|
118
115
|
|
119
116
|
// send custom event with the modal dialog div as the target
|
@@ -122,7 +119,6 @@ const Modal = (() => {
|
|
122
119
|
|
123
120
|
// if they did preventDefault, don't show the dialog
|
124
121
|
if (e.defaultPrevented) return;
|
125
|
-
|
126
122
|
modal.show();
|
127
123
|
};
|
128
124
|
|
@@ -31,17 +31,6 @@ module Blacklight::Document
|
|
31
31
|
class_attribute :inspector_fields, default: [:_source]
|
32
32
|
end
|
33
33
|
|
34
|
-
Email = Module.new do
|
35
|
-
def self.included(mod)
|
36
|
-
Blacklight.deprecation.warn("Blacklight::Document::Email is deprecated and will be removed (included in #{mod}).")
|
37
|
-
end
|
38
|
-
end
|
39
|
-
Sms = Module.new do
|
40
|
-
def self.included(mod)
|
41
|
-
Blacklight.deprecation.warn("Blacklight::Document::Sms is deprecated and will be removed (included in #{mod}).")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
34
|
attr_reader :response, :_source
|
46
35
|
alias_method :solr_response, :response
|
47
36
|
|
@@ -5,7 +5,7 @@ module Blacklight::User
|
|
5
5
|
# SEE ALSO: The lib/blacklight/generator/user_generator.rb class for where this
|
6
6
|
# is generated into the hosting application.
|
7
7
|
included do
|
8
|
-
class_attribute :string_display_key
|
8
|
+
class_attribute :string_display_key, default: :email
|
9
9
|
|
10
10
|
has_many :bookmarks, dependent: :destroy, as: :user
|
11
11
|
has_many :searches, dependent: :destroy, as: :user
|
@@ -4,7 +4,7 @@ module Blacklight
|
|
4
4
|
class FacetFieldPresenter
|
5
5
|
attr_reader :facet_field, :display_facet, :view_context, :search_state
|
6
6
|
|
7
|
-
delegate :key, to: :facet_field
|
7
|
+
delegate :key, :suggest, to: :facet_field
|
8
8
|
delegate :field_name, to: :display_facet
|
9
9
|
|
10
10
|
def initialize(facet_field, display_facet, view_context, search_state = view_context.search_state)
|
@@ -50,8 +50,8 @@ module Blacklight
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# Appease rubocop rules by implementing #each_value
|
53
|
-
def each_value(&
|
54
|
-
values.each(&
|
53
|
+
def each_value(&)
|
54
|
+
values.each(&)
|
55
55
|
end
|
56
56
|
|
57
57
|
def paginator
|
@@ -15,10 +15,10 @@ module Blacklight
|
|
15
15
|
|
16
16
|
def render_helper
|
17
17
|
context.send(config.helper_method,
|
18
|
-
**options
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
**options, document: document,
|
19
|
+
field: config.field,
|
20
|
+
config: config,
|
21
|
+
value: values)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# FacetSearchService returns a facet list from the repository. This is for drawing the "more facets" modal
|
4
|
+
module Blacklight
|
5
|
+
class FacetSearchService
|
6
|
+
def initialize(config:, search_state:, search_builder_class: config.facet_search_builder_class, **context)
|
7
|
+
@blacklight_config = config
|
8
|
+
@search_state = search_state
|
9
|
+
@user_params = @search_state.params
|
10
|
+
@search_builder_class = search_builder_class
|
11
|
+
@context = context
|
12
|
+
end
|
13
|
+
|
14
|
+
# The blacklight_config + controller are accessed by the search_builder
|
15
|
+
attr_reader :blacklight_config, :context
|
16
|
+
|
17
|
+
def search_builder
|
18
|
+
search_builder_class.new(self)
|
19
|
+
end
|
20
|
+
|
21
|
+
def search_state_class
|
22
|
+
@search_state.class
|
23
|
+
end
|
24
|
+
|
25
|
+
##
|
26
|
+
# Get the solr response when retrieving only a single facet field
|
27
|
+
# @return [Blacklight::Solr::Response] the solr response
|
28
|
+
def facet_field_response(facet_field, extra_controller_params = {})
|
29
|
+
query = search_builder.with(search_state).facet(facet_field)
|
30
|
+
repository.search(params: query.merge(extra_controller_params))
|
31
|
+
end
|
32
|
+
|
33
|
+
def facet_suggest_response(facet_field, facet_suggestion_query, extra_controller_params = {})
|
34
|
+
query = search_builder.with(search_state).facet(facet_field).facet_suggestion_query(facet_suggestion_query)
|
35
|
+
repository.search(params: query.merge(extra_controller_params))
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
attr_reader :search_builder_class, :search_state
|
41
|
+
|
42
|
+
delegate :repository, to: :blacklight_config
|
43
|
+
end
|
44
|
+
end
|
@@ -41,7 +41,7 @@ module Blacklight
|
|
41
41
|
|
42
42
|
def retrieve_simple
|
43
43
|
# regular document field
|
44
|
-
if field_config.default
|
44
|
+
if field_config.default.is_a?(Proc)
|
45
45
|
document.fetch(field_config.field, &field_config.default)
|
46
46
|
else
|
47
47
|
document.fetch(field_config.field, field_config.default)
|
@@ -21,7 +21,6 @@ module Blacklight
|
|
21
21
|
params.with_indifferent_access
|
22
22
|
end
|
23
23
|
|
24
|
-
# rubocop:disable Security/YAMLLoad
|
25
24
|
if YAML.respond_to?(:unsafe_load)
|
26
25
|
def self.yaml_load(payload)
|
27
26
|
if ActiveRecord.try(:use_yaml_unsafe_load) || ActiveRecord::Base.try(:use_yaml_unsafe_load)
|
@@ -43,6 +42,5 @@ module Blacklight
|
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
46
|
-
# rubocop:enable Security/YAMLLoad
|
47
45
|
end
|
48
46
|
end
|
@@ -3,9 +3,9 @@
|
|
3
3
|
# SearchService returns search results from the repository
|
4
4
|
module Blacklight
|
5
5
|
class SearchService
|
6
|
-
def initialize(config:, search_state
|
6
|
+
def initialize(config:, search_state:, search_builder_class: config.search_builder_class, **context)
|
7
7
|
@blacklight_config = config
|
8
|
-
@search_state = search_state
|
8
|
+
@search_state = search_state
|
9
9
|
@user_params = @search_state.params
|
10
10
|
@search_builder_class = search_builder_class
|
11
11
|
@context = context
|
@@ -31,7 +31,7 @@ module Blacklight
|
|
31
31
|
builder.rows = search_state.per_page
|
32
32
|
|
33
33
|
builder = yield(builder) if block_given?
|
34
|
-
response = repository.search(builder)
|
34
|
+
response = repository.search(params: builder)
|
35
35
|
|
36
36
|
if response.grouped? && grouped_key_for_results
|
37
37
|
response.group(grouped_key_for_results)
|
@@ -59,12 +59,12 @@ module Blacklight
|
|
59
59
|
# @return [Blacklight::Solr::Response] the solr response
|
60
60
|
def facet_field_response(facet_field, extra_controller_params = {})
|
61
61
|
query = search_builder.with(search_state).facet(facet_field)
|
62
|
-
repository.search(query.merge(extra_controller_params))
|
62
|
+
repository.search(params: query.merge(extra_controller_params))
|
63
63
|
end
|
64
64
|
|
65
65
|
def facet_suggest_response(facet_field, facet_suggestion_query, extra_controller_params = {})
|
66
66
|
query = search_builder.with(search_state).facet(facet_field).facet_suggestion_query(facet_suggestion_query)
|
67
|
-
repository.search(query.merge(extra_controller_params))
|
67
|
+
repository.search(params: query.merge(extra_controller_params))
|
68
68
|
end
|
69
69
|
|
70
70
|
# Get the previous and next document from a search result
|
@@ -73,7 +73,7 @@ module Blacklight
|
|
73
73
|
p = previous_and_next_document_params(index)
|
74
74
|
new_state = request_params.is_a?(Blacklight::SearchState) ? request_params : Blacklight::SearchState.new(request_params, blacklight_config)
|
75
75
|
query = search_builder.with(new_state).start(p.delete(:start)).rows(p.delete(:rows)).merge(extra_controller_params).merge(p)
|
76
|
-
response = repository.search(query)
|
76
|
+
response = repository.search(params: query)
|
77
77
|
document_list = response.documents
|
78
78
|
|
79
79
|
# only get the previous doc if there is one
|
@@ -1,7 +1,5 @@
|
|
1
1
|
<%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path,
|
2
|
-
method: :delete, # for rails-UJS
|
3
2
|
data: {
|
4
|
-
confirm: t('blacklight.bookmarks.clear.action_confirm'), # for rails-UJS
|
5
3
|
turbo_method: :delete,
|
6
4
|
turbo_confirm: t('blacklight.bookmarks.clear.action_confirm')
|
7
5
|
},
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<% else %>
|
14
14
|
<%= render 'sort_and_per_page' %>
|
15
15
|
<%= render partial: 'tools', locals: { document_list: @response.documents } %>
|
16
|
-
<h2 class='section-heading
|
16
|
+
<h2 class='section-heading visually-hidden'><%= t('blacklight.bookmarks.list_title') %></h2>
|
17
17
|
<%= render_document_index @response.documents %>
|
18
18
|
<%= render 'results_pagination' %>
|
19
19
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div class="
|
2
|
-
<h1 class="
|
1
|
+
<div class="text-center p-5 mb-4 bg-light rounded-3">
|
2
|
+
<h1 class="fw-bold"><%= t('blacklight.welcome') %></h1>
|
3
3
|
|
4
4
|
<p class="lead">Blacklight is a multi-institutional open-source collaboration building a better discovery platform framework.</p>
|
5
5
|
|
@@ -1,7 +1,4 @@
|
|
1
1
|
<% if show_pagination? and @response.total_pages > 1 %>
|
2
|
-
|
3
|
-
|
4
|
-
<%= render Blacklight::Response::PaginationComponent.new(response: @response) %>
|
5
|
-
</div>
|
6
|
-
</div>
|
2
|
+
<%= render Blacklight::Response::PaginationComponent.new(response: @response,
|
3
|
+
classes: 'paginate-section mt-2') %>
|
7
4
|
<% end %>
|
@@ -13,12 +13,12 @@
|
|
13
13
|
|
14
14
|
<% content_for(:container_header) do -%>
|
15
15
|
<%= render 'search_results_header' %>
|
16
|
-
<%= render
|
16
|
+
<%= render blacklight_config.view_config(document_index_view_type).constraints_component.new(search_state: search_state) %>
|
17
17
|
<% end %>
|
18
18
|
|
19
|
-
<%= render
|
19
|
+
<%= render blacklight_config.view_config(document_index_view_type).search_header_component.new %>
|
20
20
|
|
21
|
-
<h2 class="
|
21
|
+
<h2 class="visually-hidden"><%= t('blacklight.search.search_results') %></h2>
|
22
22
|
|
23
23
|
<%- if @response.empty? %>
|
24
24
|
<%= render "zero_results" %>
|
@@ -1 +1 @@
|
|
1
|
-
<h1 class="
|
1
|
+
<h1 class="visually-hidden top-content-title"><%= t('blacklight.search.header') %></h1>
|