blacklight 8.0.0.beta3 → 8.0.0.beta5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +3 -1
- data/VERSION +1 -1
- data/app/assets/javascripts/blacklight/blacklight.esm.js +5 -5
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +5 -5
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_bootstrap_overrides.scss +1 -1
- data/app/components/blacklight/document_component.rb +26 -19
- data/app/components/blacklight/document_metadata_component.html.erb +4 -2
- data/app/components/blacklight/document_metadata_component.rb +8 -2
- data/app/components/blacklight/metadata_field_layout_component.rb +7 -4
- data/app/components/blacklight/metadata_field_plain_text_layout_component.rb +17 -0
- data/app/components/blacklight/response/sort_component.rb +1 -1
- data/app/components/blacklight/response/spellcheck_component.rb +1 -1
- data/app/components/blacklight/response/view_type_button_component.rb +1 -1
- data/app/components/blacklight/response/view_type_component.rb +1 -1
- data/app/components/blacklight/search_context/server_applied_params_component.html.erb +4 -0
- data/app/components/blacklight/search_context/server_applied_params_component.rb +13 -0
- data/app/components/blacklight/{search_context_component.html.erb → search_context/server_item_pagination_component.html.erb} +0 -0
- data/app/components/blacklight/search_context/server_item_pagination_component.rb +71 -0
- data/app/components/blacklight/system/dropdown_component.rb +1 -1
- data/app/components/blacklight/system/flash_message_component.rb +1 -1
- data/app/components/blacklight/system/modal_component.rb +1 -1
- data/app/controllers/concerns/blacklight/bookmarks.rb +1 -1
- data/app/controllers/concerns/blacklight/search_context.rb +46 -6
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +0 -96
- data/app/helpers/blacklight/catalog_helper_behavior.rb +27 -54
- data/app/helpers/blacklight/component_helper_behavior.rb +0 -11
- data/app/helpers/blacklight/document_helper_behavior.rb +76 -0
- data/app/helpers/blacklight/layout_helper_behavior.rb +59 -0
- data/app/helpers/blacklight/url_helper_behavior.rb +11 -3
- data/app/javascript/blacklight/modal.js +5 -5
- data/app/models/record_mailer.rb +19 -15
- data/app/presenters/blacklight/document_presenter.rb +13 -11
- data/app/presenters/blacklight/index_presenter.rb +1 -1
- data/app/presenters/blacklight/rendering/abstract_step.rb +4 -0
- data/app/presenters/blacklight/rendering/join.rb +7 -1
- data/app/presenters/blacklight/rendering/link_to_facet.rb +1 -1
- data/app/presenters/blacklight/rendering/microdata.rb +1 -1
- data/app/services/blacklight/search_service.rb +2 -1
- data/app/views/catalog/_document.atom.builder +1 -1
- data/app/views/catalog/_document.html.erb +2 -7
- data/app/views/catalog/_document_list.html.erb +2 -1
- data/app/views/catalog/_show_main_content.html.erb +3 -9
- data/app/views/catalog/index.html.erb +3 -0
- data/app/views/catalog/show.html.erb +1 -6
- data/app/views/layouts/blacklight/base.html.erb +0 -1
- data/app/views/record_mailer/email_record.text.erb +4 -3
- data/app/views/record_mailer/sms_record.text.erb +4 -4
- data/config/locales/blacklight.ar.yml +0 -6
- data/config/locales/blacklight.ca.yml +0 -6
- data/config/locales/blacklight.de.yml +0 -6
- data/config/locales/blacklight.en.yml +0 -6
- data/config/locales/blacklight.es.yml +0 -6
- data/config/locales/blacklight.fr.yml +0 -6
- data/config/locales/blacklight.hu.yml +0 -6
- data/config/locales/blacklight.it.yml +0 -6
- data/config/locales/blacklight.nl.yml +0 -6
- data/config/locales/blacklight.pt-BR.yml +0 -6
- data/config/locales/blacklight.sq.yml +0 -6
- data/config/locales/blacklight.zh.yml +0 -6
- data/lib/blacklight/configuration/session_tracking_config.rb +45 -0
- data/lib/blacklight/configuration.rb +8 -4
- data/lib/blacklight/routes/searchable.rb +1 -0
- data/lib/generators/blacklight/assets/importmap_generator.rb +0 -6
- data/lib/generators/blacklight/templates/solr_document.rb +0 -6
- data/package.json +1 -1
- data/spec/components/blacklight/document_component_spec.rb +9 -4
- data/spec/components/blacklight/search_context/server_applied_params_component_spec.rb +29 -0
- data/spec/components/blacklight/{search_context_component_spec.rb → search_context/server_item_pagination_component_spec.rb} +15 -4
- data/spec/controllers/bookmarks_controller_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +17 -5
- data/spec/features/component_template_override_spec.rb +8 -0
- data/spec/features/modal_spec.rb +12 -0
- data/spec/helpers/blacklight/url_helper_behavior_spec.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +0 -56
- data/spec/helpers/catalog_helper_spec.rb +56 -0
- data/spec/lib/blacklight/configuration/session_tracking_config_spec.rb +38 -0
- data/spec/models/record_mailer_spec.rb +36 -23
- data/spec/presenters/blacklight/document_presenter_spec.rb +1 -0
- data/spec/presenters/blacklight/field_presenter_spec.rb +2 -2
- data/spec/presenters/blacklight/index_presenter_spec.rb +1 -0
- data/spec/presenters/blacklight/show_presenter_spec.rb +1 -0
- data/spec/presenters/pipeline_spec.rb +13 -2
- data/spec/routing/catalog_routing_spec.rb +4 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +8 -0
- data/spec/views/catalog/_document.html.erb_spec.rb +1 -1
- data/spec/views/catalog/_document_list.html.erb_spec.rb +7 -2
- metadata +19 -12
- data/app/components/blacklight/search_context_component.rb +0 -68
- data/app/models/concerns/blacklight/document/email.rb +0 -27
- data/app/models/concerns/blacklight/document/sms.rb +0 -25
- data/spec/models/blacklight/document/email_spec.rb +0 -57
- data/spec/models/blacklight/document/sms_spec.rb +0 -58
data/app/models/record_mailer.rb
CHANGED
@@ -2,27 +2,21 @@
|
|
2
2
|
|
3
3
|
# Only works for documents with a #to_marc right now.
|
4
4
|
class RecordMailer < ApplicationMailer
|
5
|
-
|
6
|
-
|
7
|
-
title_field = details[:config].email.title_field
|
8
|
-
if title_field
|
9
|
-
[documents.first[title_field]].flatten.first
|
10
|
-
else
|
11
|
-
documents.first.to_semantic_values[:title]
|
12
|
-
end
|
13
|
-
rescue
|
14
|
-
I18n.t('blacklight.email.text.default_title')
|
15
|
-
end
|
16
|
-
|
17
|
-
subject = I18n.t('blacklight.email.text.subject',
|
18
|
-
count: documents.length,
|
19
|
-
title: Array(title).first)
|
5
|
+
helper CatalogHelper
|
6
|
+
helper_method :blacklight_config, :blacklight_configuration_context
|
20
7
|
|
8
|
+
def email_record(documents, details, url_gen_params)
|
21
9
|
@documents = documents
|
22
10
|
@message = details[:message]
|
23
11
|
@config = details[:config]
|
24
12
|
@url_gen_params = url_gen_params
|
25
13
|
|
14
|
+
title = view_context.document_presenter(documents.first).html_title || I18n.t('blacklight.email.text.default_title')
|
15
|
+
|
16
|
+
subject = I18n.t('blacklight.email.text.subject',
|
17
|
+
count: documents.length,
|
18
|
+
title: Array(title).first)
|
19
|
+
|
26
20
|
mail(to: details[:to], subject: subject)
|
27
21
|
end
|
28
22
|
|
@@ -33,4 +27,14 @@ class RecordMailer < ApplicationMailer
|
|
33
27
|
|
34
28
|
mail(to: details[:to], subject: "") # rubocop:disable Rails/I18nLocaleTexts
|
35
29
|
end
|
30
|
+
|
31
|
+
def blacklight_config
|
32
|
+
@config || Blacklight.default_configuration
|
33
|
+
end
|
34
|
+
|
35
|
+
##
|
36
|
+
# Context in which to evaluate blacklight configuration conditionals
|
37
|
+
def blacklight_configuration_context
|
38
|
+
@blacklight_configuration_context ||= Blacklight::Configuration::Context.new(self)
|
39
|
+
end
|
36
40
|
end
|
@@ -11,18 +11,20 @@ module Blacklight
|
|
11
11
|
# @param [SolrDocument] document
|
12
12
|
# @param [ActionView::Base] view_context scope for linking and generating urls
|
13
13
|
# @param [Blacklight::Configuration] configuration
|
14
|
-
def initialize(document, view_context, configuration = view_context.blacklight_config)
|
14
|
+
def initialize(document, view_context, configuration = view_context.blacklight_config, view_config: nil, field_presenter_options: {})
|
15
15
|
@document = document
|
16
16
|
@view_context = view_context
|
17
17
|
@configuration = configuration
|
18
|
+
@view_config = view_config
|
19
|
+
@field_presenter_options = field_presenter_options
|
18
20
|
end
|
19
21
|
|
20
22
|
# @return [Hash<String,Configuration::Field>] all the fields for this index view that should be rendered
|
21
|
-
def fields_to_render
|
22
|
-
return to_enum(:fields_to_render) unless block_given?
|
23
|
+
def fields_to_render(document_fields = fields, **kwargs)
|
24
|
+
return to_enum(:fields_to_render, document_fields, **kwargs) unless block_given?
|
23
25
|
|
24
|
-
|
25
|
-
field_presenter = field_presenter(field_config)
|
26
|
+
document_fields.each do |name, field_config|
|
27
|
+
field_presenter = field_presenter(field_config, kwargs)
|
26
28
|
|
27
29
|
next unless field_presenter.render_field? && field_presenter.any?
|
28
30
|
|
@@ -30,10 +32,10 @@ module Blacklight
|
|
30
32
|
end
|
31
33
|
end
|
32
34
|
|
33
|
-
def field_presenters
|
34
|
-
return to_enum(:field_presenters) unless block_given?
|
35
|
+
def field_presenters(document_fields = fields, **kwargs)
|
36
|
+
return to_enum(:field_presenters, document_fields, **kwargs) unless block_given?
|
35
37
|
|
36
|
-
fields_to_render.each { |_, _, config| yield config }
|
38
|
+
fields_to_render(document_fields, **kwargs).each { |_, _, config| yield config }
|
37
39
|
end
|
38
40
|
|
39
41
|
##
|
@@ -116,11 +118,11 @@ module Blacklight
|
|
116
118
|
end
|
117
119
|
|
118
120
|
def view_config
|
119
|
-
show_view_config
|
121
|
+
@view_config ||= show_view_config
|
120
122
|
end
|
121
123
|
|
122
124
|
def show_view_config
|
123
|
-
configuration.view_config(:show)
|
125
|
+
configuration.view_config(:show, action_name: view_context.action_name)
|
124
126
|
end
|
125
127
|
|
126
128
|
def inspect
|
@@ -150,7 +152,7 @@ module Blacklight
|
|
150
152
|
end
|
151
153
|
|
152
154
|
def field_presenter_options
|
153
|
-
{}
|
155
|
+
@field_presenter_options ||= {}
|
154
156
|
end
|
155
157
|
end
|
156
158
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Blacklight
|
4
4
|
class IndexPresenter < DocumentPresenter
|
5
5
|
def view_config
|
6
|
-
configuration.view_config(view_context.document_index_view_type)
|
6
|
+
@view_config ||= configuration.view_config(view_context.document_index_view_type, action_name: view_context.action_name)
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
@@ -5,7 +5,13 @@ module Blacklight
|
|
5
5
|
class Join < AbstractStep
|
6
6
|
def render
|
7
7
|
options = config.separator_options || {}
|
8
|
-
|
8
|
+
if values.one? || values.none?
|
9
|
+
next_step(values.first)
|
10
|
+
elsif !html?
|
11
|
+
next_step(values.to_sentence(options))
|
12
|
+
else
|
13
|
+
next_step(values.map { |x| x.html_safe? ? x : html_escape(x) }.to_sentence(options).html_safe)
|
14
|
+
end
|
9
15
|
end
|
10
16
|
|
11
17
|
private
|
@@ -5,7 +5,7 @@ module Blacklight
|
|
5
5
|
class Microdata < AbstractStep
|
6
6
|
include ActionView::Helpers::TagHelper
|
7
7
|
def render
|
8
|
-
return next_step(values) unless config.itemprop
|
8
|
+
return next_step(values) unless config.itemprop && html?
|
9
9
|
|
10
10
|
next_step(values.map { |x| itemprop(x, config.itemprop) })
|
11
11
|
end
|
@@ -44,7 +44,8 @@ module Blacklight
|
|
44
44
|
|
45
45
|
# retrieve a document, given the doc id
|
46
46
|
# @param [Array{#to_s},#to_s] id
|
47
|
-
# @return [Blacklight::SolrDocument] the solr
|
47
|
+
# @return [Blacklight::SolrDocument] the solr document (or array of
|
48
|
+
# documents if an array of ids was given)
|
48
49
|
def fetch(id = nil, extra_controller_params = {})
|
49
50
|
if id.is_a? Array
|
50
51
|
fetch_many(id, extra_controller_params)
|
@@ -21,7 +21,7 @@ xml.entry do
|
|
21
21
|
with_format(:html) do
|
22
22
|
xml.summary "type" => "html" do
|
23
23
|
document_component = blacklight_config.view_config(:atom).summary_component
|
24
|
-
xml.text! render document_component.new(
|
24
|
+
xml.text! render document_component.new(document_component.collection_parameter => document_presenter(document), component: :div, show: true)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
@@ -1,9 +1,4 @@
|
|
1
1
|
<% # container for a single doc -%>
|
2
2
|
<% view_config = local_assigns[:view_config] || blacklight_config.view_config(document_index_view_type) %>
|
3
|
-
|
4
|
-
|
5
|
-
<% component.with_partial do %>
|
6
|
-
<%= render_document_partial document, partial, component: component, document_counter: document_counter %>
|
7
|
-
<% end %>
|
8
|
-
<% end %>
|
9
|
-
<% end %>
|
3
|
+
<% document_component = blacklight_config.view_config(:show).document_component -%>
|
4
|
+
<%= render document_component.new(document_component.collection_parameter => document_presenter(document), counter: document_counter_with_offset(document_counter), partials: view_config&.partials) %>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<% # container for all documents in index list view -%>
|
2
2
|
<% view_config = local_assigns[:view_config] || blacklight_config&.view_config(document_index_view_type) %>
|
3
3
|
<div id="documents" class="documents-<%= view_config&.key || document_index_view_type %>">
|
4
|
-
|
4
|
+
<% document_presenters = documents.map { |doc| document_presenter(doc) } -%>
|
5
|
+
<%= render view_config.document_component.with_collection(document_presenters, partials: view_config.partials, counter_offset: @response&.start || 0) %>
|
5
6
|
</div>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<%= render
|
2
|
-
|
1
|
+
<%= render blacklight_config.track_search_session.item_pagination_component.new(search_context: @search_context, search_session: search_session, current_document: @document) if blacklight_config.track_search_session.item_pagination_component %>
|
3
2
|
<% @page_title = t('blacklight.search.show.title', document_title: document_presenter(@document).html_title, application_name: application_name).html_safe %>
|
4
3
|
<% content_for(:head) { render_link_rel_alternates } %>
|
5
4
|
|
6
|
-
|
5
|
+
<% document_component = blacklight_config.view_config(:show).document_component -%>
|
6
|
+
<%= render (document_component).new(document_component.collection_parameter => document_presenter(@document), component: :div, show: true, partials: blacklight_config.view_config(:show).partials) do |component| %>
|
7
7
|
<% component.with_title(as: 'h1', classes: '', link_to_document: false, actions: false) %>
|
8
8
|
<% component.with_footer do %>
|
9
9
|
<% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
|
@@ -11,10 +11,4 @@
|
|
11
11
|
<span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_presenter(@document).display_type) %>"></span>
|
12
12
|
<% end %>
|
13
13
|
<% end %>
|
14
|
-
|
15
|
-
<% blacklight_config.view_config(:show).partials.each do |partial| %>
|
16
|
-
<% component.with_partial do %>
|
17
|
-
<%= render_document_partial @document, partial, component: component %>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
14
|
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% content_for(:head) do %>
|
2
|
+
<meta name="blacklight-search-storage" content="<%= blacklight_config.track_search_session.storage %>">
|
3
|
+
<% end %>
|
1
4
|
<% content_for(:sidebar) do %>
|
2
5
|
<% conf = blacklight_config.view_config(document_index_view_type) %>
|
3
6
|
<%= render conf.sidebar_component.new(blacklight_config: blacklight_config,
|
@@ -1,9 +1,4 @@
|
|
1
|
-
|
2
|
-
<div id="appliedParams" class="clearfix constraints-container">
|
3
|
-
<%= render 'start_over' %>
|
4
|
-
<%= link_back_to_catalog class: 'btn btn-outline-secondary' %>
|
5
|
-
</div>
|
6
|
-
<% end %>
|
1
|
+
<%= render blacklight_config.track_search_session.applied_params_component.new if blacklight_config.track_search_session.applied_params_component %>
|
7
2
|
|
8
3
|
<%= render 'show_main_content' %>
|
9
4
|
|
@@ -15,7 +15,6 @@
|
|
15
15
|
<%= opensearch_description_tag application_name, opensearch_catalog_url(format: 'xml') %>
|
16
16
|
<%= favicon_link_tag %>
|
17
17
|
<%= stylesheet_link_tag "application", media: "all", "data-turbo-track": "reload" %>
|
18
|
-
<%= stylesheet_link_tag "https://ga.jspm.io/npm:dialog-polyfill@0.5.6/dist/dialog-polyfill.css" %>
|
19
18
|
<% if defined? Importmap %>
|
20
19
|
<%= javascript_importmap_tags %>
|
21
20
|
<% elsif defined? Propshaft %>
|
@@ -1,6 +1,7 @@
|
|
1
|
+
<%= t('blacklight.email.text.message', message: @message) %>
|
2
|
+
|
1
3
|
<% @documents.each do |document| %>
|
2
|
-
<%= document.
|
3
|
-
<%= t('blacklight.email.text.url', :url =>polymorphic_url(document, @url_gen_params)) %>
|
4
|
+
<%= render Blacklight::DocumentMetadataComponent.new(fields: document_presenter(document).field_presenters(blacklight_config.email_fields), tag: nil, field_layout: Blacklight::MetadataFieldPlainTextLayoutComponent, field_presenter_options: { format: 'text' }) %>
|
4
5
|
|
6
|
+
<%= t('blacklight.email.text.url', url: polymorphic_url(document, @url_gen_params)) %>
|
5
7
|
<% end %>
|
6
|
-
<%= t('blacklight.email.text.message', :message => @message) %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% @documents.each do |document| %>
|
2
|
-
<%= document.
|
3
|
-
<%= t('blacklight.sms.text.url', :
|
4
|
-
<% end %>
|
1
|
+
<% @documents.each do |document| %>
|
2
|
+
<%= render Blacklight::DocumentMetadataComponent.new(fields: document_presenter(document).field_presenters(blacklight_config.sms_fields), tag: nil, field_layout: Blacklight::MetadataFieldPlainTextLayoutComponent, field_presenter_options: { format: 'text' }) %>
|
3
|
+
<%= t('blacklight.sms.text.url', url: polymorphic_url(document, @url_gen_params)) %>
|
4
|
+
<% end %>
|
@@ -101,10 +101,6 @@ ar:
|
|
101
101
|
submit: 'إرسال'
|
102
102
|
text:
|
103
103
|
default_title: 'لا يوجد'
|
104
|
-
title: 'العنوان: %{value}'
|
105
|
-
author: 'المؤلف: %{value}'
|
106
|
-
format: 'الصيغة: %{value}'
|
107
|
-
language: 'اللغة: %{value}'
|
108
104
|
subject:
|
109
105
|
zero: 'لا يوجد سجل للمادة'
|
110
106
|
one: 'سجل المادة: %{title}'
|
@@ -130,8 +126,6 @@ ar:
|
|
130
126
|
carrier_prompt: 'يرجى تحديد شركة الاتصالات'
|
131
127
|
submit: 'إرسال'
|
132
128
|
text:
|
133
|
-
title: '%{value}'
|
134
|
-
author: ' بواسطة %{value}'
|
135
129
|
url: 'الرابط: %{url}'
|
136
130
|
success: "تم الإرسال كرسالة نصية قصيرة"
|
137
131
|
errors:
|
@@ -96,10 +96,6 @@ ca:
|
|
96
96
|
submit: 'Enviar-ho'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Títol: %{value}'
|
100
|
-
author: 'Autor: %{value}'
|
101
|
-
format: 'Format: %{value}'
|
102
|
-
language: 'Llengua: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Registre: %{title}'
|
105
101
|
other: 'Registres'
|
@@ -120,8 +116,6 @@ ca:
|
|
120
116
|
carrier_prompt: 'Heu de seleccionar un operador'
|
121
117
|
submit: 'Enviar'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' de %{value}'
|
125
119
|
url: 'URL: %{url}'
|
126
120
|
success: "SMS enviat"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ de:
|
|
96
96
|
submit: 'Senden'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Titel: %{value}'
|
100
|
-
author: 'Autor: %{value}'
|
101
|
-
format: 'Format: %{value}'
|
102
|
-
language: 'Sprache: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Artikeldatensatz: %{title}'
|
105
101
|
other: 'Artikeldatensätze'
|
@@ -120,8 +116,6 @@ de:
|
|
120
116
|
carrier_prompt: 'Bitte wählen Sie Ihren Netzbetreiber aus'
|
121
117
|
submit: 'Schicken'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' von %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS verschickt"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ en:
|
|
96
96
|
submit: 'Send'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Title: %{value}'
|
100
|
-
author: 'Author: %{value}'
|
101
|
-
format: 'Format: %{value}'
|
102
|
-
language: 'Language: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Item Record: %{title}'
|
105
101
|
other: 'Item records'
|
@@ -120,8 +116,6 @@ en:
|
|
120
116
|
carrier_prompt: 'Please select your carrier'
|
121
117
|
submit: 'Send'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' by %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS Sent"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ es:
|
|
96
96
|
submit: 'Enviar'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Titulo: %{value}'
|
100
|
-
author: 'Autor: %{value}'
|
101
|
-
format: 'Formato: %{value}'
|
102
|
-
language: 'Idioma: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Ficha artículo: %{title}'
|
105
101
|
other: 'Ficha artículos'
|
@@ -120,8 +116,6 @@ es:
|
|
120
116
|
carrier_prompt: 'Por favor, seleccione su compañía telefónica'
|
121
117
|
submit: 'Enviar'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: 'por %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS enviado"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ fr:
|
|
96
96
|
submit: 'Envoyer'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Titre : %{value}'
|
100
|
-
author: 'Auteur : %{value}'
|
101
|
-
format: 'Format : %{value}'
|
102
|
-
language: 'Langue : %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Une référence : %{title}'
|
105
101
|
other: 'Des références bibliographiques'
|
@@ -121,8 +117,6 @@ fr:
|
|
121
117
|
carrier_prompt: 'Veuillez choisir votre opérateur'
|
122
118
|
submit: 'Envoyer'
|
123
119
|
text:
|
124
|
-
title: '%{value}'
|
125
|
-
author: ' by %{value}'
|
126
120
|
url: 'Lien : %{url}'
|
127
121
|
|
128
122
|
success: "SMS envoyé"
|
@@ -96,10 +96,6 @@ hu:
|
|
96
96
|
submit: 'Küldés'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Cím: %{value}'
|
100
|
-
author: 'Szerző: %{value}'
|
101
|
-
format: 'Formátum: %{value}'
|
102
|
-
language: 'Nyelv: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Adatrekord: %{title}'
|
105
101
|
other: 'Adatrekordok'
|
@@ -120,8 +116,6 @@ hu:
|
|
120
116
|
carrier_prompt: 'Kérjük válassza ki a szolgáltatót'
|
121
117
|
submit: 'Küldés'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' írta %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS elküldve"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ it:
|
|
96
96
|
submit: 'Invia'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Titolo: %{value}'
|
100
|
-
author: 'Autore: %{value}'
|
101
|
-
format: 'Formato: %{value}'
|
102
|
-
language: 'Lingua: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Numero di scheda: %{title}'
|
105
101
|
other: 'Numeri di scheda'
|
@@ -120,8 +116,6 @@ it:
|
|
120
116
|
carrier_prompt: "Indicare l'operatore"
|
121
117
|
submit: 'Inviare'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' da %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS inviato"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ nl:
|
|
96
96
|
submit: 'Verzenden'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Titel: %{value}'
|
100
|
-
author: 'Auteur: %{value}'
|
101
|
-
format: 'Formaat: %{value}'
|
102
|
-
language: 'Taal: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Item Record: %{title}'
|
105
101
|
other: 'Item records'
|
@@ -120,8 +116,6 @@ nl:
|
|
120
116
|
carrier_prompt: 'Gelieve uw carrier op te geven.'
|
121
117
|
submit: 'Verzenden'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' door %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS Verzonden"
|
127
121
|
errors:
|
@@ -97,10 +97,6 @@ pt-BR:
|
|
97
97
|
submit: 'Enviar'
|
98
98
|
text:
|
99
99
|
default_title: 'N/A'
|
100
|
-
title: 'Título: %{value}'
|
101
|
-
author: 'Autor: %{value}'
|
102
|
-
format: 'Formato: %{value}'
|
103
|
-
language: 'Idioma: %{value}'
|
104
100
|
subject:
|
105
101
|
one: 'Item: %{title}'
|
106
102
|
other: 'Itens'
|
@@ -121,8 +117,6 @@ pt-BR:
|
|
121
117
|
carrier_prompt: 'Selecione a Operadora'
|
122
118
|
submit: 'Enviar'
|
123
119
|
text:
|
124
|
-
title: '%{value}'
|
125
|
-
author: ' por %{value}'
|
126
120
|
url: 'Link: %{url}'
|
127
121
|
success: 'SMS Enviado'
|
128
122
|
errors:
|
@@ -96,10 +96,6 @@ sq:
|
|
96
96
|
submit: 'Dërgo'
|
97
97
|
text:
|
98
98
|
default_title: 'N/A'
|
99
|
-
title: 'Titulli: %{value}'
|
100
|
-
author: 'Autori: %{value}'
|
101
|
-
format: 'Formati: %{value}'
|
102
|
-
language: 'Gjuha: %{value}'
|
103
99
|
subject:
|
104
100
|
one: 'Item Record: %{title}'
|
105
101
|
other: 'Item records'
|
@@ -120,8 +116,6 @@ sq:
|
|
120
116
|
carrier_prompt: 'Ju lutemi zgjedheni operatorin'
|
121
117
|
submit: 'Dërgo'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' nga %{value}'
|
125
119
|
url: 'Link: %{url}'
|
126
120
|
success: "SMS-i u dëgua"
|
127
121
|
errors:
|
@@ -96,10 +96,6 @@ zh:
|
|
96
96
|
submit: '发送'
|
97
97
|
text:
|
98
98
|
default_title: '无'
|
99
|
-
title: '标题: %{value}'
|
100
|
-
author: '作者: %{value}'
|
101
|
-
format: '格式: %{value}'
|
102
|
-
language: '语言: %{value}'
|
103
99
|
subject:
|
104
100
|
one: '记录: %{title}'
|
105
101
|
other: '记录'
|
@@ -120,8 +116,6 @@ zh:
|
|
120
116
|
carrier_prompt: '请选择运营商'
|
121
117
|
submit: '发送'
|
122
118
|
text:
|
123
|
-
title: '%{value}'
|
124
|
-
author: ' 来自 %{value}'
|
125
119
|
url: '链接: %{url}'
|
126
120
|
success: "已发送短信"
|
127
121
|
errors:
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Blacklight::Configuration
|
4
|
+
class SessionTrackingConfig < Blacklight::OpenStructWithHashAccess
|
5
|
+
# @!attribute storage
|
6
|
+
# @return [String, FalseClass] 'server': use server-side tracking; 'client': delegate search tracking and prev/next navigation to client
|
7
|
+
# @!attribute applied_params_component
|
8
|
+
# @return [Class] component class used to render a facet group
|
9
|
+
# @!attribute item_pagination_component
|
10
|
+
# @return [Class] component class used to render the constraints
|
11
|
+
|
12
|
+
def initialize(property_hash = {})
|
13
|
+
super({ storage: 'server' }.merge(property_hash))
|
14
|
+
end
|
15
|
+
|
16
|
+
def applied_params_component
|
17
|
+
super || default_applied_params_component(storage)
|
18
|
+
end
|
19
|
+
|
20
|
+
def item_pagination_component
|
21
|
+
super || default_item_pagination_component(storage)
|
22
|
+
end
|
23
|
+
|
24
|
+
def url_helper
|
25
|
+
super || default_url_helper(storage)
|
26
|
+
end
|
27
|
+
|
28
|
+
def default_applied_params_component(storage)
|
29
|
+
return Blacklight::SearchContext::ServerAppliedParamsComponent if storage == 'server'
|
30
|
+
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def default_item_pagination_component(storage)
|
35
|
+
return Blacklight::SearchContext::ServerItemPaginationComponent if storage == 'server'
|
36
|
+
|
37
|
+
nil
|
38
|
+
end
|
39
|
+
|
40
|
+
# extension point for alternative storage types
|
41
|
+
def default_url_helper(_storage)
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -20,6 +20,7 @@ module Blacklight
|
|
20
20
|
autoload :DisplayField
|
21
21
|
autoload :IndexField
|
22
22
|
autoload :ShowField
|
23
|
+
autoload :SessionTrackingConfig
|
23
24
|
end
|
24
25
|
|
25
26
|
class_attribute :default_values, default: {}
|
@@ -200,7 +201,9 @@ module Blacklight
|
|
200
201
|
ViewConfig,
|
201
202
|
default: { top_level_config: :index },
|
202
203
|
show: { top_level_config: :show },
|
203
|
-
citation: { parent_config: :show }
|
204
|
+
citation: { parent_config: :show },
|
205
|
+
email_record: { top_level_config: :email },
|
206
|
+
sms_record: { top_level_config: :sms }
|
204
207
|
)
|
205
208
|
|
206
209
|
# @!attribute sms
|
@@ -279,9 +282,10 @@ module Blacklight
|
|
279
282
|
property :raw_endpoint, default: OpenStructWithHashAccess.new(enabled: false)
|
280
283
|
|
281
284
|
# @!attribute track_search_session
|
282
|
-
#
|
283
|
-
# @
|
284
|
-
|
285
|
+
# { storage: false } value: do no tracking
|
286
|
+
# @since v8.0.0
|
287
|
+
# @return [Blacklight::Configuration::SessionTrackingConfig]
|
288
|
+
property :track_search_session, default: Blacklight::Configuration::SessionTrackingConfig.new
|
285
289
|
|
286
290
|
# @!attribute advanced_search
|
287
291
|
# @since v7.15.0
|
@@ -10,6 +10,7 @@ module Blacklight
|
|
10
10
|
def call(mapper, _options = {})
|
11
11
|
mapper.match '/', action: 'index', as: 'search', via: [:get, :post]
|
12
12
|
mapper.get '/advanced', action: 'advanced_search', as: 'advanced_search'
|
13
|
+
mapper.get '/page_links', action: 'page_links', as: 'page_links'
|
13
14
|
|
14
15
|
mapper.post ":id/track", action: 'track', as: 'track'
|
15
16
|
mapper.get ":id/raw", action: 'raw', as: 'raw', defaults: { format: 'json' }
|
@@ -17,7 +17,6 @@ module Blacklight
|
|
17
17
|
pin "@popperjs/core", to: "https://ga.jspm.io/npm:@popperjs/core@2.11.6/dist/umd/popper.min.js"
|
18
18
|
pin "bootstrap", to: "https://ga.jspm.io/npm:bootstrap@#{(defined?(Bootstrap) && Bootstrap::VERSION) || '5.2.2'}/dist/js/bootstrap.js"
|
19
19
|
pin "blacklight", to: "blacklight/blacklight.js"
|
20
|
-
pin "dialog-polyfill", to: "https://ga.jspm.io/npm:dialog-polyfill@0.5.6/dist/dialog-polyfill.js"
|
21
20
|
CONTENT
|
22
21
|
end
|
23
22
|
end
|
@@ -27,11 +26,6 @@ module Blacklight
|
|
27
26
|
<<~CONTENT
|
28
27
|
import bootstrap from "bootstrap"
|
29
28
|
import "blacklight"
|
30
|
-
import dialogPolyfill from "dialog-polyfill"
|
31
|
-
Blacklight.onLoad(() => {
|
32
|
-
const dialog = document.querySelector('dialog')
|
33
|
-
dialogPolyfill.registerDialog(dialog)
|
34
|
-
})
|
35
29
|
CONTENT
|
36
30
|
end
|
37
31
|
end
|