blacklight 7.10.0 → 7.11.1
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/.rubocop.yml +56 -7
- data/.rubocop_todo.yml +113 -98
- data/.travis.yml +0 -2
- data/Gemfile +0 -7
- data/README.md +1 -0
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +1 -2
- data/app/components/blacklight/document/bookmark_component.html.erb +16 -0
- data/app/components/blacklight/document/bookmark_component.rb +19 -0
- data/app/components/blacklight/document/citation_component.html.erb +9 -0
- data/app/components/blacklight/document/citation_component.rb +24 -0
- data/app/components/blacklight/document/more_like_this_component.html.erb +12 -0
- data/app/components/blacklight/document/more_like_this_component.rb +21 -0
- data/app/components/blacklight/document_component.html.erb +29 -0
- data/app/components/blacklight/document_component.rb +121 -0
- data/app/components/blacklight/document_metadata_component.html.erb +5 -0
- data/app/components/blacklight/document_metadata_component.rb +21 -0
- data/app/components/blacklight/facet_item_component.rb +6 -6
- data/app/components/blacklight/metadata_field_component.html.erb +8 -0
- data/app/components/blacklight/metadata_field_component.rb +31 -0
- data/app/components/blacklight/metadata_field_layout_component.html.erb +2 -0
- data/app/components/blacklight/metadata_field_layout_component.rb +16 -0
- data/app/components/blacklight/response/facet_group_component.html.erb +25 -0
- data/app/components/blacklight/response/facet_group_component.rb +19 -0
- data/app/components/blacklight/response/pagination_component.html.erb +3 -0
- data/app/components/blacklight/response/pagination_component.rb +17 -0
- data/app/components/blacklight/response/sort_component.html.erb +6 -0
- data/app/components/blacklight/response/sort_component.rb +16 -0
- data/app/components/blacklight/response/spellcheck_component.html.erb +7 -0
- data/app/components/blacklight/response/spellcheck_component.rb +20 -0
- data/app/components/blacklight/search_bar_component.html.erb +29 -0
- data/app/components/blacklight/search_bar_component.rb +45 -0
- data/app/components/blacklight/search_context_component.html.erb +10 -0
- data/app/components/blacklight/search_context_component.rb +30 -0
- data/app/components/blacklight/system/dropdown_component.html.erb +12 -0
- data/app/components/blacklight/system/dropdown_component.rb +42 -0
- data/app/components/blacklight/system/modal_component.html.erb +25 -0
- data/app/components/blacklight/system/modal_component.rb +9 -0
- data/app/controllers/concerns/blacklight/catalog.rb +5 -4
- data/app/controllers/concerns/blacklight/default_component_configuration.rb +2 -2
- data/app/controllers/concerns/blacklight/searchable.rb +11 -0
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +14 -3
- data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -0
- data/app/helpers/blacklight/component_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/configuration_helper_behavior.rb +6 -0
- data/app/helpers/blacklight/facets_helper_behavior.rb +1 -1
- data/app/helpers/blacklight/icon_helper_behavior.rb +2 -2
- data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +7 -10
- data/app/helpers/blacklight/url_helper_behavior.rb +3 -3
- data/app/javascript/blacklight/search_context.js +0 -1
- data/app/models/blacklight/icon.rb +1 -0
- data/app/models/concerns/blacklight/document.rb +1 -0
- data/app/models/record_mailer.rb +1 -1
- data/app/presenters/blacklight/document_presenter.rb +7 -1
- data/app/presenters/blacklight/field_presenter.rb +1 -0
- data/app/presenters/blacklight/rendering/microdata.rb +1 -1
- data/app/services/blacklight/field_retriever.rb +1 -0
- data/app/services/blacklight/search_service.rb +1 -0
- data/app/views/catalog/_bookmark_control.html.erb +1 -36
- data/app/views/catalog/_citation.html.erb +4 -25
- data/app/views/catalog/_did_you_mean.html.erb +1 -5
- data/app/views/catalog/_document.atom.builder +3 -3
- data/app/views/catalog/_document.html.erb +5 -5
- data/app/views/catalog/_facet_group.html.erb +5 -19
- data/app/views/catalog/_index.html.erb +1 -10
- data/app/views/catalog/_paginate_compact.html.erb +6 -6
- data/app/views/catalog/_per_page_widget.html.erb +9 -12
- data/app/views/catalog/_previous_next_doc.html.erb +1 -12
- data/app/views/catalog/_results_pagination.html.erb +1 -3
- data/app/views/catalog/_search_form.html.erb +6 -27
- data/app/views/catalog/_show.html.erb +6 -8
- data/app/views/catalog/_show_main_content.html.erb +19 -13
- data/app/views/catalog/_show_sidebar.html.erb +1 -11
- data/app/views/catalog/_sort_widget.html.erb +5 -12
- data/app/views/catalog/email.html.erb +7 -7
- data/app/views/catalog/email_success.html.erb +5 -12
- data/app/views/catalog/facet.html.erb +14 -17
- data/app/views/catalog/index.atom.builder +0 -1
- data/app/views/catalog/sms.html.erb +7 -7
- data/app/views/catalog/sms_success.html.erb +5 -12
- data/blacklight.gemspec +3 -2
- data/config/i18n-tasks.yml +3 -0
- data/config/locales/blacklight.ar.yml +2 -0
- data/config/locales/blacklight.de.yml +2 -0
- data/config/locales/blacklight.en.yml +2 -0
- data/config/locales/blacklight.es.yml +4 -2
- data/config/locales/blacklight.fr.yml +2 -0
- data/config/locales/blacklight.hu.yml +2 -0
- data/config/locales/blacklight.it.yml +2 -0
- data/config/locales/blacklight.nl.yml +2 -0
- data/config/locales/blacklight.pt-BR.yml +2 -0
- data/config/locales/blacklight.sq.yml +2 -0
- data/config/locales/blacklight.zh.yml +2 -0
- data/lib/blacklight.rb +10 -0
- data/lib/blacklight/configuration.rb +8 -3
- data/lib/blacklight/configuration/fields.rb +5 -7
- data/lib/blacklight/engine.rb +1 -1
- data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -0
- data/lib/blacklight/search_state.rb +21 -7
- data/lib/blacklight/solr/response.rb +1 -0
- data/lib/blacklight/solr/response/facets.rb +9 -8
- data/lib/generators/blacklight/models_generator.rb +2 -0
- data/lib/generators/blacklight/templates/config/blacklight.yml +1 -0
- data/lib/railties/blacklight.rake +18 -13
- data/package.json +1 -1
- data/spec/components/blacklight/constraint_layout_component_spec.rb +1 -0
- data/spec/components/blacklight/document_component_spec.rb +129 -0
- data/spec/components/blacklight/document_metadata_component_spec.rb +0 -0
- data/spec/components/blacklight/metadata_field_component_spec.rb +41 -0
- data/spec/controllers/blacklight/search_fields_spec.rb +2 -2
- data/spec/controllers/catalog_controller_spec.rb +20 -0
- data/spec/features/search_context_spec.rb +12 -2
- data/spec/features/search_filters_spec.rb +4 -0
- data/spec/features/search_results_spec.rb +1 -0
- data/spec/features/sitelinks_search_box.rb +1 -0
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +3 -0
- data/spec/helpers/blacklight/render_partials_helper_behavior_spec.rb +1 -0
- data/spec/helpers/blacklight/search_history_constraints_helper_behavior_spec.rb +2 -0
- data/spec/helpers/blacklight/url_helper_behavior_spec.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +14 -1
- data/spec/helpers/catalog_helper_spec.rb +1 -4
- data/spec/lib/blacklight/search_state_spec.rb +32 -0
- data/spec/models/blacklight/configuration_spec.rb +5 -0
- data/spec/models/blacklight/document/cache_key_spec.rb +1 -0
- data/spec/models/blacklight/document/email_spec.rb +2 -0
- data/spec/models/blacklight/document/sms_spec.rb +2 -0
- data/spec/models/blacklight/facet_paginator_spec.rb +3 -0
- data/spec/models/blacklight/icon_spec.rb +6 -0
- data/spec/models/blacklight/solr/document_spec.rb +10 -0
- data/spec/models/blacklight/solr/response/facets_spec.rb +1 -1
- data/spec/models/blacklight/solr/response/group_response_spec.rb +2 -0
- data/spec/models/blacklight/solr/search_builder_spec.rb +10 -0
- data/spec/models/record_mailer_spec.rb +9 -0
- data/spec/models/search_spec.rb +1 -0
- data/spec/presenters/blacklight/show_presenter_spec.rb +8 -0
- data/spec/routing/catalog_routing_spec.rb +4 -0
- data/spec/services/blacklight/search_service_spec.rb +7 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/views/catalog/_document.html.erb_spec.rb +13 -11
- data/spec/views/catalog/_facet_group.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_facet_index_navigation.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_previous_next_doc.html.erb_spec.rb +4 -0
- data/spec/views/catalog/index.atom.builder_spec.rb +40 -3
- data/spec/views/catalog/show.html.erb_spec.rb +14 -0
- data/tasks/blacklight.rake +7 -7
- metadata +56 -6
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<% end -%>
|
|
8
|
-
</dl>
|
|
1
|
+
<%= render(
|
|
2
|
+
Blacklight::DocumentMetadataComponent.new(
|
|
3
|
+
fields: show_presenter(document).field_presenters,
|
|
4
|
+
show: true
|
|
5
|
+
)
|
|
6
|
+
) %>
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
<%= render 'previous_next_doc' if @search_context %>
|
|
1
|
+
<%= render 'previous_next_doc' if @search_context && search_session['document_id'] == @document.id %>
|
|
2
2
|
|
|
3
3
|
<% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => application_name).html_safe %>
|
|
4
4
|
<% content_for(:head) { render_link_rel_alternates } %>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
<%= render (blacklight_config.show.document_component || Blacklight::DocumentComponent).new(document: @document, component: :div, title_component: :h1, show: true) do |component| %>
|
|
7
|
+
<% component.with(:footer) do %>
|
|
8
|
+
<% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
|
|
9
|
+
<!--
|
|
10
|
+
// COinS, for Zotero among others.
|
|
11
|
+
// This document_partial_name(@document) business is not quite right,
|
|
12
|
+
// but has been there for a while.
|
|
13
|
+
-->
|
|
14
|
+
<span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_partial_name(@document)) %>"></span>
|
|
15
|
+
<% end %>
|
|
16
|
+
<% end %>
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
<%# Use :body for complete backwards compatibility (overriding the component body markup),
|
|
19
|
+
but if the app explicitly opted-in to components, make the partials data available as :partials to ease migrations pain %>
|
|
20
|
+
<% component.with(blacklight_config.show.document_component.blank? && blacklight_config.view_config(:show).partials.any? ? :body : :partials) do %>
|
|
21
|
+
<div id="doc_<%= @document.id.to_s.parameterize %>">
|
|
22
|
+
<%= render_document_partials @document, blacklight_config.view_config(:show).partials, component: component %>
|
|
23
|
+
</div>
|
|
24
|
+
<% end %>
|
|
19
25
|
<% end %>
|
|
@@ -1,12 +1,2 @@
|
|
|
1
1
|
<%= render 'show_tools' %>
|
|
2
|
-
|
|
3
|
-
<% unless document.more_like_this.empty? %>
|
|
4
|
-
<div class="card">
|
|
5
|
-
<div class="card-header">More Like This</div>
|
|
6
|
-
<div class="card-body">
|
|
7
|
-
<%= render collection: document.more_like_this,
|
|
8
|
-
partial: 'show_more_like_this',
|
|
9
|
-
as: :document %>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
<% end %>
|
|
2
|
+
<%= render(Blacklight::Document::MoreLikeThisComponent.new(document: document)) %>
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
<% if show_sort_and_per_page?
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<div class="dropdown-menu" role="menu">
|
|
8
|
-
<%- active_sort_fields.each do |sort_key, field_config| %>
|
|
9
|
-
<%= link_to(sort_field_label(sort_key), url_for(search_state.params_for_search(sort: sort_key)), class: 'dropdown-item', role: 'menuitem') %>
|
|
10
|
-
<%- end -%>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
1
|
+
<% if show_sort_and_per_page? %>
|
|
2
|
+
<%= render(Blacklight::Response::SortComponent.new(
|
|
3
|
+
choices: active_sort_fields.map { |key, config| [sort_field_label(config.key), key] },
|
|
4
|
+
search_state: search_state,
|
|
5
|
+
selected: current_sort_field&.key)) %>
|
|
13
6
|
<% end %>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<%= render Blacklight::System::ModalComponent.new do |component| %>
|
|
2
|
+
<% component.with(:title, t('blacklight.email.form.title')) %>
|
|
3
|
+
|
|
4
|
+
<% component.with(:body) do %>
|
|
5
|
+
<%= render 'email_form' %>
|
|
6
|
+
<% end %>
|
|
7
|
+
<% end %>
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<h1><%= t('blacklight.email.form.title') %></h1>
|
|
4
|
-
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
|
5
|
-
<span aria-hidden="true">×</span>
|
|
6
|
-
</button>
|
|
7
|
-
</div>
|
|
1
|
+
<%= render Blacklight::System::ModalComponent.new do |component| %>
|
|
2
|
+
<% component.with(:title, t('blacklight.email.form.title')) %>
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
4
|
+
<%= render partial: '/shared/flash_msg' %>
|
|
5
|
+
<span data-blacklight-modal="close"></span>
|
|
6
|
+
<% end %>
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<%= render Blacklight::System::ModalComponent.new do |component| %>
|
|
2
|
+
<% component.with(:prefix) do %>
|
|
3
|
+
<div class="facet-pagination top row justify-content-between">
|
|
4
|
+
<%= render :partial=>'facet_pagination' %>
|
|
5
|
+
</div>
|
|
6
|
+
<% end %>
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
<h1 class="modal-title"><%= facet_field_label(@facet.key) %></h1>
|
|
7
|
-
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
|
8
|
-
<span aria-hidden="true">×</span>
|
|
9
|
-
</button>
|
|
10
|
-
</div>
|
|
8
|
+
<% component.with(:title, facet_field_label(@facet.key)) %>
|
|
11
9
|
|
|
12
|
-
<div class="modal-body">
|
|
13
10
|
<%= render partial: 'facet_index_navigation' if @facet.index_range && @display_facet.index? %>
|
|
14
11
|
|
|
15
12
|
<div class="facet-extended-list">
|
|
16
|
-
|
|
13
|
+
<%= render_facet_limit(@display_facet, layout: false) %>
|
|
17
14
|
</div>
|
|
18
|
-
</div>
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
<% component.with(:footer) do %>
|
|
17
|
+
<div class="facet-pagination bottom row justify-content-between">
|
|
18
|
+
<%= render :partial=>'facet_pagination' %>
|
|
19
|
+
</div>
|
|
20
|
+
<% end %>
|
|
21
|
+
<% end %>
|
|
@@ -6,7 +6,6 @@ xml.instruct!(:xml, encoding: "UTF-8")
|
|
|
6
6
|
|
|
7
7
|
xml.feed("xmlns" => "http://www.w3.org/2005/Atom",
|
|
8
8
|
"xmlns:opensearch" => "http://a9.com/-/spec/opensearch/1.1/") do
|
|
9
|
-
|
|
10
9
|
xml.title t('blacklight.search.page_title.title', constraints: render_search_to_page_title(params), application_name: application_name)
|
|
11
10
|
# an author is required, so we'll just use the app name
|
|
12
11
|
xml.author { xml.name application_name }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<%= render Blacklight::System::ModalComponent.new do |component| %>
|
|
2
|
+
<% component.with(:title, t('blacklight.sms.form.title')) %>
|
|
3
|
+
|
|
4
|
+
<% component.with(:body) do %>
|
|
5
|
+
<%= render 'sms_form' %>
|
|
6
|
+
<% end %>
|
|
7
|
+
<% end %>
|
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<h1 class="modal-title"><%= t('blacklight.sms.form.title') %></h1>
|
|
4
|
-
<button type="button" class="blacklight-modal-close close" data-dismiss="modal" aria-label="<%= t('blacklight.modal.close') %>">
|
|
5
|
-
<span aria-hidden="true">×</span>
|
|
6
|
-
</button>
|
|
7
|
-
</div>
|
|
1
|
+
<%= render Blacklight::System::ModalComponent.new do |component| %>
|
|
2
|
+
<% component.with(:title, t('blacklight.sms.form.title')) %>
|
|
8
3
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
4
|
+
<%= render partial: '/shared/flash_msg' %>
|
|
5
|
+
<span data-blacklight-modal="close"></span>
|
|
6
|
+
<% end %>
|
data/blacklight.gemspec
CHANGED
|
@@ -42,7 +42,8 @@ Gem::Specification.new do |s|
|
|
|
42
42
|
s.add_development_dependency 'engine_cart', '~> 2.1'
|
|
43
43
|
s.add_development_dependency "equivalent-xml"
|
|
44
44
|
s.add_development_dependency "simplecov"
|
|
45
|
-
s.add_development_dependency "rubocop", '~> 0.
|
|
46
|
-
s.add_development_dependency "rubocop-
|
|
45
|
+
s.add_development_dependency "rubocop", '~> 0.85'
|
|
46
|
+
s.add_development_dependency "rubocop-rails", '~> 2.6'
|
|
47
|
+
s.add_development_dependency "rubocop-rspec", '~> 1.43'
|
|
47
48
|
s.add_development_dependency "i18n-tasks"
|
|
48
49
|
end
|
data/config/i18n-tasks.yml
CHANGED
|
@@ -169,8 +169,8 @@ es:
|
|
|
169
169
|
pagination:
|
|
170
170
|
title: 'Resultados de navegación'
|
|
171
171
|
pagination_info:
|
|
172
|
-
no_items_found: 'No %{entry_name}
|
|
173
|
-
single_item_found: '<strong>1</strong> %{entry_name}
|
|
172
|
+
no_items_found: 'No %{entry_name} encontrada'
|
|
173
|
+
single_item_found: '<strong>1</strong> %{entry_name} encontrada'
|
|
174
174
|
pages:
|
|
175
175
|
one: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> de <strong>%{total_num}</strong>'
|
|
176
176
|
other: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> de <strong>%{total_num}</strong>'
|
|
@@ -197,6 +197,8 @@ es:
|
|
|
197
197
|
pivot:
|
|
198
198
|
show: Abierto
|
|
199
199
|
hide: Cerrar
|
|
200
|
+
group:
|
|
201
|
+
toggle: 'más »'
|
|
200
202
|
group:
|
|
201
203
|
more: 'más »'
|
|
202
204
|
filters:
|
data/lib/blacklight.rb
CHANGED
|
@@ -70,6 +70,16 @@ module Blacklight
|
|
|
70
70
|
Blacklight::RuntimeRegistry.connection_config = value
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
+
def defaults_version
|
|
74
|
+
@defaults_version ||= blacklight_yml['load_defaults'] ||
|
|
75
|
+
# this config parameter was introduced in Blacklight 7.11, so to be safe,
|
|
76
|
+
# we pin any 7.x app to the 7.10 behavior
|
|
77
|
+
(Blacklight::VERSION.starts_with?('7') && '7.10.0') ||
|
|
78
|
+
Blacklight::VERSION
|
|
79
|
+
|
|
80
|
+
@defaults_version == 'latest' ? Blacklight::VERSION : @defaults_version
|
|
81
|
+
end
|
|
82
|
+
|
|
73
83
|
def self.blacklight_yml
|
|
74
84
|
require 'erb'
|
|
75
85
|
require 'yaml'
|
|
@@ -65,6 +65,9 @@ module Blacklight
|
|
|
65
65
|
index: ViewConfig::Index.new(
|
|
66
66
|
# document presenter class used by helpers and views
|
|
67
67
|
document_presenter_class: nil,
|
|
68
|
+
# component class used to render a document; defaults to Blacklight::DocumentComponent,
|
|
69
|
+
# but can be set explicitly to avoid any legacy behavior
|
|
70
|
+
document_component: nil,
|
|
68
71
|
# solr field to use to render a document title
|
|
69
72
|
title_field: nil,
|
|
70
73
|
# solr field to use to render format-specific partials
|
|
@@ -82,6 +85,7 @@ module Blacklight
|
|
|
82
85
|
show: ViewConfig::Show.new(
|
|
83
86
|
# document presenter class used by helpers and views
|
|
84
87
|
document_presenter_class: nil,
|
|
88
|
+
document_component: nil,
|
|
85
89
|
display_type_field: 'format',
|
|
86
90
|
# Default route parameters for 'show' requests.
|
|
87
91
|
# Set this to a hash with additional arguments to merge into the route,
|
|
@@ -96,7 +100,8 @@ module Blacklight
|
|
|
96
100
|
list: {},
|
|
97
101
|
atom: {
|
|
98
102
|
if: false, # by default, atom should not show up as an alternative view
|
|
99
|
-
partials: [:document]
|
|
103
|
+
partials: [:document],
|
|
104
|
+
summary_partials: [:index]
|
|
100
105
|
},
|
|
101
106
|
rss: {
|
|
102
107
|
if: false, # by default, rss should not show up as an alternative view
|
|
@@ -306,7 +311,7 @@ module Blacklight
|
|
|
306
311
|
end
|
|
307
312
|
|
|
308
313
|
# YARD will include inline disabling as docs, cannot do multiline inside @!macro. AND this must be separate from doc block.
|
|
309
|
-
# rubocop:disable
|
|
314
|
+
# rubocop:disable Layout/LineLength
|
|
310
315
|
|
|
311
316
|
# Add a partial to the tools when rendering a document.
|
|
312
317
|
# @!macro partial_if_unless
|
|
@@ -319,7 +324,7 @@ module Blacklight
|
|
|
319
324
|
add_action(show.document_actions, name, opts)
|
|
320
325
|
klass && ActionBuilder.new(klass, name, opts).build
|
|
321
326
|
end
|
|
322
|
-
# rubocop:enable
|
|
327
|
+
# rubocop:enable Layout/LineLength
|
|
323
328
|
|
|
324
329
|
# Add a tool for the search result list itself
|
|
325
330
|
# @!macro partial_if_unless
|
|
@@ -148,13 +148,11 @@ module Blacklight
|
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
@table[:reflected_fields] ||= Rails.cache.fetch("blacklight_configuration/admin/reflected_fields", expires_in: 1.hour) do
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
false
|
|
157
|
-
end
|
|
151
|
+
repository = repository_class.new(self)
|
|
152
|
+
repository.reflect_fields
|
|
153
|
+
rescue => e
|
|
154
|
+
Blacklight.logger.warn "Error retrieving field metadata: #{e}"
|
|
155
|
+
false
|
|
158
156
|
end
|
|
159
157
|
|
|
160
158
|
@table[:reflected_fields] || {}
|
data/lib/blacklight/engine.rb
CHANGED
|
@@ -8,7 +8,7 @@ module Blacklight
|
|
|
8
8
|
# BlacklightHelper is needed by all helpers, so we inject it
|
|
9
9
|
# into action view base here.
|
|
10
10
|
initializer 'blacklight.helpers' do
|
|
11
|
-
ActionView::Base.
|
|
11
|
+
ActionView::Base.include BlacklightHelper
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# This makes our rake tasks visible.
|