blacklight 9.0.0.beta2 → 9.0.0.beta3
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 +11 -1
- data/VERSION +1 -1
- data/app/assets/builds/blacklight.css +0 -5
- data/app/assets/javascripts/blacklight/blacklight.esm.js +12 -4
- data/app/assets/javascripts/blacklight/blacklight.esm.js.map +1 -1
- data/app/assets/javascripts/blacklight/blacklight.js +12 -4
- data/app/assets/javascripts/blacklight/blacklight.js.map +1 -1
- data/app/assets/stylesheets/blacklight/_blacklight_base.scss +0 -1
- data/app/components/blacklight/constraint_layout_component.html.erb +1 -6
- data/app/components/blacklight/constraint_layout_component.rb +9 -0
- data/app/components/blacklight/document/bookmark_component.html.erb +2 -2
- data/app/components/blacklight/document_component.html.erb +3 -3
- data/app/components/blacklight/document_component.rb +2 -2
- data/app/components/blacklight/document_title_component.rb +3 -0
- data/app/components/blacklight/facet_field_checkboxes_component.rb +6 -2
- data/app/components/blacklight/facet_field_component.rb +6 -2
- data/app/components/blacklight/facet_field_filter_component.rb +6 -2
- data/app/components/blacklight/facet_field_inclusive_constraint_component.rb +6 -4
- data/app/components/blacklight/facet_field_list_component.rb +6 -2
- data/app/components/blacklight/facet_field_no_layout_component.rb +6 -2
- data/app/components/blacklight/facet_item_component.rb +6 -2
- data/app/components/blacklight/facets/filters_component.html.erb +2 -2
- data/app/components/blacklight/facets/filters_component.rb +14 -2
- data/app/components/blacklight/facets/list_component.html.erb +1 -1
- data/app/components/blacklight/facets/list_component.rb +2 -0
- data/app/components/blacklight/icons/remove_component.rb +2 -2
- data/app/components/blacklight/response/facet_group_component.html.erb +2 -2
- data/app/components/blacklight/response/facet_group_component.rb +6 -2
- data/app/components/blacklight/system/flash_message_component.html.erb +1 -1
- data/app/components/blacklight/system/flash_message_component.rb +0 -9
- data/app/components/blacklight/system/modal_component.html.erb +1 -2
- data/app/controllers/concerns/blacklight/catalog.rb +6 -2
- data/app/helpers/blacklight/catalog_helper_behavior.rb +1 -1
- data/app/javascript/blacklight-frontend/bookmark_toggle.js +7 -2
- data/app/javascript/blacklight-frontend/checkbox_submit.js +5 -1
- data/app/javascript/blacklight-frontend/modal.js +1 -2
- data/app/presenters/blacklight/json_presenter.rb +7 -1
- data/app/views/catalog/facet.html.erb +1 -1
- data/config/locales/blacklight.ar.yml +12 -11
- data/config/locales/blacklight.ca.yml +1 -0
- data/config/locales/blacklight.de.yml +13 -12
- data/config/locales/blacklight.en.yml +1 -0
- data/config/locales/blacklight.es.yml +11 -10
- data/config/locales/blacklight.fr.yml +12 -11
- data/config/locales/blacklight.hu.yml +13 -12
- data/config/locales/blacklight.it.yml +13 -12
- data/config/locales/blacklight.nl.yml +12 -11
- data/config/locales/blacklight.pt-BR.yml +13 -12
- data/config/locales/blacklight.sq.yml +12 -11
- data/config/locales/blacklight.zh.yml +9 -8
- data/lib/blacklight/configuration.rb +7 -1
- data/lib/blacklight/solr/repository.rb +4 -1
- data/lib/blacklight.rb +5 -3
- data/lib/generators/blacklight/templates/catalog_controller.rb +2 -2
- data/package.json +1 -1
- data/spec/features/modal_spec.rb +1 -1
- data/spec/models/blacklight/configuration_spec.rb +20 -0
- data/spec/presenters/blacklight/json_presenter_spec.rb +17 -0
- metadata +3 -4
- data/app/assets/stylesheets/blacklight/_icons.scss +0 -4
@@ -32,25 +32,25 @@ hu:
|
|
32
32
|
apa: APA
|
33
33
|
chicago: Chicago
|
34
34
|
mla: MLA
|
35
|
-
did_you_mean:
|
35
|
+
did_you_mean: "Arra gondolt, hogy: %{options}?"
|
36
36
|
email:
|
37
37
|
errors:
|
38
38
|
to:
|
39
39
|
blank: Kérjük az üzenet elküldéséhez adja meg a címzettet
|
40
40
|
invalid: Kérjük érvényes email címet adjon meg
|
41
41
|
form:
|
42
|
-
message:
|
42
|
+
message: "Üzenet:"
|
43
43
|
submit: Küldés
|
44
44
|
title: Email küldése
|
45
|
-
to:
|
45
|
+
to: "Email:"
|
46
46
|
success: Email elküldve
|
47
47
|
text:
|
48
48
|
default_title: N/A
|
49
|
-
message:
|
49
|
+
message: "Üzenet: %{message}"
|
50
50
|
subject:
|
51
|
-
one:
|
51
|
+
one: "Adatrekord: %{title}"
|
52
52
|
other: Adatrekordok
|
53
|
-
url:
|
53
|
+
url: "URL: %{url}"
|
54
54
|
entry_name:
|
55
55
|
default: bejegyzés
|
56
56
|
grouped:
|
@@ -106,9 +106,9 @@ hu:
|
|
106
106
|
filters:
|
107
107
|
label: "%{label}:"
|
108
108
|
remove:
|
109
|
-
label_value:
|
109
|
+
label_value: "Feltétel eltávolítása %{label}: %{value}"
|
110
110
|
value: Feltételek eltávolítása %{value}
|
111
|
-
title:
|
111
|
+
title: "Ön ezt kereste:"
|
112
112
|
form:
|
113
113
|
search:
|
114
114
|
label: keresés
|
@@ -127,6 +127,7 @@ hu:
|
|
127
127
|
constraint: "%{label}: %{value}"
|
128
128
|
many_constraint_values: "%{values} kiválasztva"
|
129
129
|
title: "%{constraints} - %{application_name} Keresés eredményei"
|
130
|
+
joiner: " / "
|
130
131
|
pagination:
|
131
132
|
title: Eredmény navigáció
|
132
133
|
pagination_info:
|
@@ -155,11 +156,11 @@ hu:
|
|
155
156
|
start_over: Újrakezdés
|
156
157
|
view:
|
157
158
|
list: Lista
|
158
|
-
view_title:
|
159
|
+
view_title: "Eredmények megtekintése mint: "
|
159
160
|
zero_results:
|
160
161
|
modify_search: Próbálja módosítani keresését
|
161
162
|
search_everything: Próbálja meg a keresést az összes mezőben
|
162
|
-
search_fields:
|
163
|
+
search_fields: "Ön a következő mező alapján keresett: %{search_fields}"
|
163
164
|
title: Az Ön keresése nem hozott eredményt
|
164
165
|
use_fewer_keywords: Kezdetben használjon kevesebb kulcsszavat, majd finomítsa keresését a bal oldali szűrőlinkekkel.
|
165
166
|
search_history:
|
@@ -192,10 +193,10 @@ hu:
|
|
192
193
|
carrier_prompt: Kérjük válassza ki a szolgáltatót
|
193
194
|
submit: Küldés
|
194
195
|
title: Küldés SMS-ben
|
195
|
-
to:
|
196
|
+
to: "Telefonszám:"
|
196
197
|
success: SMS elküldve
|
197
198
|
text:
|
198
|
-
url:
|
199
|
+
url: "Link: %{url}"
|
199
200
|
tools:
|
200
201
|
citation: Hivatkozás
|
201
202
|
clear: Eltávolítás
|
@@ -32,25 +32,25 @@ it:
|
|
32
32
|
apa: APA
|
33
33
|
chicago: Chicago
|
34
34
|
mla: MLA
|
35
|
-
did_you_mean:
|
35
|
+
did_you_mean: "Intendevi digitare: %{options}?"
|
36
36
|
email:
|
37
37
|
errors:
|
38
38
|
to:
|
39
39
|
blank: Inserisci un destinatario per inviare il messaggio
|
40
40
|
invalid: L'indirizzo e-mail inserito non è valido
|
41
41
|
form:
|
42
|
-
message:
|
42
|
+
message: "Messaggio:"
|
43
43
|
submit: Invia
|
44
44
|
title: Invia per e-mail
|
45
|
-
to:
|
45
|
+
to: "E-mail:"
|
46
46
|
success: Messaggio inviato
|
47
47
|
text:
|
48
48
|
default_title: N/A
|
49
|
-
message:
|
49
|
+
message: "Messaggio: %{message}"
|
50
50
|
subject:
|
51
|
-
one:
|
51
|
+
one: "Numero di scheda: %{title}"
|
52
52
|
other: Numeri di scheda
|
53
|
-
url:
|
53
|
+
url: "URL: %{url}"
|
54
54
|
entry_name:
|
55
55
|
default:
|
56
56
|
one: termine di ricerca
|
@@ -92,7 +92,7 @@ it:
|
|
92
92
|
close: Nascondi sfaccettature
|
93
93
|
open: Mostra sfaccettature
|
94
94
|
missing:
|
95
|
-
|
95
|
+
- Mancante
|
96
96
|
more_html: altri <span class="sr-only visually-hidden">%{field_name}</span> »
|
97
97
|
pivot:
|
98
98
|
hide: Chiudi
|
@@ -109,9 +109,9 @@ it:
|
|
109
109
|
filters:
|
110
110
|
label: "%{label}:"
|
111
111
|
remove:
|
112
|
-
label_value:
|
112
|
+
label_value: "Cancella il filtro %{label}: %{value}"
|
113
113
|
value: Cancella il filtro %{value}
|
114
|
-
title:
|
114
|
+
title: "Hai cercato per:"
|
115
115
|
form:
|
116
116
|
search:
|
117
117
|
label: cerca per
|
@@ -130,6 +130,7 @@ it:
|
|
130
130
|
constraint: "%{label}: %{value}"
|
131
131
|
many_constraint_values: "%{values} selezionato"
|
132
132
|
title: "%{constraints} - %{application_name} Risultati della ricerca"
|
133
|
+
joiner: " / "
|
133
134
|
pagination:
|
134
135
|
title: Navigazione nei risultati
|
135
136
|
pagination_info:
|
@@ -158,7 +159,7 @@ it:
|
|
158
159
|
start_over: Nuova ricerca
|
159
160
|
view:
|
160
161
|
list: Lista
|
161
|
-
view_title:
|
162
|
+
view_title: "Visualizza i risultati come: "
|
162
163
|
zero_results:
|
163
164
|
modify_search: Modifica la ricerca
|
164
165
|
search_everything: prova a cercare in tutti i campi
|
@@ -195,10 +196,10 @@ it:
|
|
195
196
|
carrier_prompt: Indicare l'operatore
|
196
197
|
submit: Inviare
|
197
198
|
title: Invia per SMS
|
198
|
-
to:
|
199
|
+
to: "Numero di telefono:"
|
199
200
|
success: SMS inviato
|
200
201
|
text:
|
201
|
-
url:
|
202
|
+
url: "Link: %{url}"
|
202
203
|
tools:
|
203
204
|
citation: Cita
|
204
205
|
clear: Cancella
|
@@ -32,25 +32,25 @@ nl:
|
|
32
32
|
apa: APA
|
33
33
|
chicago: Chicago
|
34
34
|
mla: MLA
|
35
|
-
did_you_mean:
|
35
|
+
did_you_mean: "Bedoelde u: %{options}?"
|
36
36
|
email:
|
37
37
|
errors:
|
38
38
|
to:
|
39
39
|
blank: U dient een ontvanger voor dit bericht op te geven.
|
40
40
|
invalid: U dient een geldig e-mailadres op te geven.
|
41
41
|
form:
|
42
|
-
message:
|
42
|
+
message: "Boodschap:"
|
43
43
|
submit: Verzenden
|
44
44
|
title: Email dit
|
45
|
-
to:
|
45
|
+
to: "Email:"
|
46
46
|
success: Email Verzonden
|
47
47
|
text:
|
48
48
|
default_title: N/A
|
49
|
-
message:
|
49
|
+
message: "Boodschap: %{message}"
|
50
50
|
subject:
|
51
|
-
one:
|
51
|
+
one: "Item Record: %{title}"
|
52
52
|
other: Item records
|
53
|
-
url:
|
53
|
+
url: "URL: %{url}"
|
54
54
|
entry_name:
|
55
55
|
default: ingang
|
56
56
|
grouped:
|
@@ -106,9 +106,9 @@ nl:
|
|
106
106
|
filters:
|
107
107
|
label: "%{label}:"
|
108
108
|
remove:
|
109
|
-
label_value:
|
109
|
+
label_value: "Verwijder zoekfilter %{label}: %{value}"
|
110
110
|
value: Verwijder zoekfilter %{value}
|
111
|
-
title:
|
111
|
+
title: "U zocht op:"
|
112
112
|
form:
|
113
113
|
search:
|
114
114
|
label: zoeken op
|
@@ -127,6 +127,7 @@ nl:
|
|
127
127
|
constraint: "%{label}: %{value}"
|
128
128
|
many_constraint_values: "%{values} geselecteerd"
|
129
129
|
title: "%{constraints} - %{application_name} Zoek resultaten"
|
130
|
+
joiner: " / "
|
130
131
|
pagination:
|
131
132
|
title: Zoeken navigatie
|
132
133
|
pagination_info:
|
@@ -155,7 +156,7 @@ nl:
|
|
155
156
|
start_over: Start Opnieuw
|
156
157
|
view:
|
157
158
|
list: Lijst
|
158
|
-
view_title:
|
159
|
+
view_title: "Bekijk resultaten als: "
|
159
160
|
zero_results:
|
160
161
|
modify_search: Probeer uw zoekopdracht aan te passen
|
161
162
|
search_everything: probeer door alles te zoeken
|
@@ -192,10 +193,10 @@ nl:
|
|
192
193
|
carrier_prompt: Gelieve uw carrier op te geven.
|
193
194
|
submit: Verzenden
|
194
195
|
title: SMS dit
|
195
|
-
to:
|
196
|
+
to: "Telefoonnummer:"
|
196
197
|
success: SMS Verzonden
|
197
198
|
text:
|
198
|
-
url:
|
199
|
+
url: "Link: %{url}"
|
199
200
|
tools:
|
200
201
|
citation: Citeer
|
201
202
|
clear: Leeg maken
|
@@ -32,25 +32,25 @@ pt-BR:
|
|
32
32
|
apa: APA
|
33
33
|
chicago: Chicago
|
34
34
|
mla: MLA
|
35
|
-
did_you_mean:
|
35
|
+
did_you_mean: "Você quis dizer: %{options}?"
|
36
36
|
email:
|
37
37
|
errors:
|
38
38
|
to:
|
39
39
|
blank: Você precisa especificar um destinaário para enviar esta mensagem
|
40
40
|
invalid: Verifique seu endereço de email
|
41
41
|
form:
|
42
|
-
message:
|
42
|
+
message: "Mensagem:"
|
43
43
|
submit: Enviar
|
44
44
|
title: Enviar por Email
|
45
|
-
to:
|
45
|
+
to: "Email:"
|
46
46
|
success: Email Enviado
|
47
47
|
text:
|
48
48
|
default_title: N/A
|
49
|
-
message:
|
49
|
+
message: "Mensagem: %{message}"
|
50
50
|
subject:
|
51
|
-
one:
|
51
|
+
one: "Item: %{title}"
|
52
52
|
other: Itens
|
53
|
-
url:
|
53
|
+
url: "URL: %{url}"
|
54
54
|
entry_name:
|
55
55
|
default: registro
|
56
56
|
grouped:
|
@@ -90,7 +90,7 @@ pt-BR:
|
|
90
90
|
close: Ocultar facetas
|
91
91
|
open: Mostrar facetas
|
92
92
|
missing:
|
93
|
-
|
93
|
+
- Ausência
|
94
94
|
more_html: mais <span class="visually-hidden">%{field_name}</span> »
|
95
95
|
pivot:
|
96
96
|
hide: Fechar
|
@@ -107,9 +107,9 @@ pt-BR:
|
|
107
107
|
filters:
|
108
108
|
label: "%{label}:"
|
109
109
|
remove:
|
110
|
-
label_value:
|
110
|
+
label_value: "Remover %{label}: %{value}"
|
111
111
|
value: Remover filtro %{value}
|
112
|
-
title:
|
112
|
+
title: "Sua busca por:"
|
113
113
|
form:
|
114
114
|
search:
|
115
115
|
label: busca
|
@@ -128,6 +128,7 @@ pt-BR:
|
|
128
128
|
constraint: "%{label}: %{value}"
|
129
129
|
many_constraint_values: "%{values} selecionado"
|
130
130
|
title: "%{constraints} - %{application_name} Resultado da Busca"
|
131
|
+
joiner: " / "
|
131
132
|
pagination:
|
132
133
|
title: Navegação nos Resultados
|
133
134
|
pagination_info:
|
@@ -156,7 +157,7 @@ pt-BR:
|
|
156
157
|
start_over: refazer busca
|
157
158
|
view:
|
158
159
|
list: Lista
|
159
|
-
view_title:
|
160
|
+
view_title: "Ver resultados como: "
|
160
161
|
zero_results:
|
161
162
|
modify_search: Tente modificar sua busca
|
162
163
|
search_everything: tente buscar em tudo
|
@@ -193,10 +194,10 @@ pt-BR:
|
|
193
194
|
carrier_prompt: Selecione a Operadora
|
194
195
|
submit: Enviar
|
195
196
|
title: Enviar por SMS
|
196
|
-
to:
|
197
|
+
to: "Celular:"
|
197
198
|
success: SMS Enviado
|
198
199
|
text:
|
199
|
-
url:
|
200
|
+
url: "Link: %{url}"
|
200
201
|
tools:
|
201
202
|
citation: Citar
|
202
203
|
clear: Limpar
|
@@ -32,25 +32,25 @@ sq:
|
|
32
32
|
apa: APA
|
33
33
|
chicago: Chicago
|
34
34
|
mla: MLA
|
35
|
-
did_you_mean:
|
35
|
+
did_you_mean: "A keni menduar: %{options}?"
|
36
36
|
email:
|
37
37
|
errors:
|
38
38
|
to:
|
39
39
|
blank: Duhet të shkruash një pranues për të dëguar mesazh
|
40
40
|
invalid: Duhet të shkruash një email adresë valide
|
41
41
|
form:
|
42
|
-
message:
|
42
|
+
message: "Mesazhi:"
|
43
43
|
submit: Dërgo
|
44
44
|
title: Dërgo Email
|
45
|
-
to:
|
45
|
+
to: "Email:"
|
46
46
|
success: Emaili u dëgua
|
47
47
|
text:
|
48
48
|
default_title: N/A
|
49
|
-
message:
|
49
|
+
message: "Mesazhi: %{message}"
|
50
50
|
subject:
|
51
|
-
one:
|
51
|
+
one: "Item Record: %{title}"
|
52
52
|
other: Item records
|
53
|
-
url:
|
53
|
+
url: "URL: %{url}"
|
54
54
|
entry_name:
|
55
55
|
default: entry
|
56
56
|
grouped:
|
@@ -106,9 +106,9 @@ sq:
|
|
106
106
|
filters:
|
107
107
|
label: "%{label}:"
|
108
108
|
remove:
|
109
|
-
label_value:
|
109
|
+
label_value: "Fshij kufizimin %{label}: %{value}"
|
110
110
|
value: Fshij kufizimin %{value}
|
111
|
-
title:
|
111
|
+
title: "Ju keni kërkuar për:"
|
112
112
|
form:
|
113
113
|
search:
|
114
114
|
label: kërko për
|
@@ -127,6 +127,7 @@ sq:
|
|
127
127
|
constraint: "%{label}: %{value}"
|
128
128
|
many_constraint_values: "%{values} zgjedhura"
|
129
129
|
title: "%{constraints} - %{application_name} Rezultatet e kërkimit"
|
130
|
+
joiner: " / "
|
130
131
|
pagination:
|
131
132
|
title: Navigimi i rezultateteve
|
132
133
|
pagination_info:
|
@@ -155,7 +156,7 @@ sq:
|
|
155
156
|
start_over: Fillo nga e para
|
156
157
|
view:
|
157
158
|
list: List
|
158
|
-
view_title:
|
159
|
+
view_title: "Shiko rezultatin si: "
|
159
160
|
zero_results:
|
160
161
|
modify_search: Provo të ndryshosh kërkimin
|
161
162
|
search_everything: provo të kërkosh çdo gjë
|
@@ -192,10 +193,10 @@ sq:
|
|
192
193
|
carrier_prompt: Ju lutemi zgjedheni operatorin
|
193
194
|
submit: Dërgo
|
194
195
|
title: SMS
|
195
|
-
to:
|
196
|
+
to: "Numri i telefonit:"
|
196
197
|
success: SMS-i u dëgua
|
197
198
|
text:
|
198
|
-
url:
|
199
|
+
url: "Link: %{url}"
|
199
200
|
tools:
|
200
201
|
citation: Citati
|
201
202
|
clear: Fshij
|
@@ -48,9 +48,9 @@ zh:
|
|
48
48
|
default_title: 无
|
49
49
|
message: 正文: %{message}
|
50
50
|
subject:
|
51
|
-
one:
|
51
|
+
one: "记录: %{title}"
|
52
52
|
other: 记录
|
53
|
-
url:
|
53
|
+
url: "网址: %{url}"
|
54
54
|
entry_name:
|
55
55
|
default: 条目
|
56
56
|
grouped:
|
@@ -106,7 +106,7 @@ zh:
|
|
106
106
|
filters:
|
107
107
|
label: "%{label}:"
|
108
108
|
remove:
|
109
|
-
label_value:
|
109
|
+
label_value: "删除限定条件 %{label}: %{value}"
|
110
110
|
value: 删除限定条件 %{value}
|
111
111
|
title: 你在搜索:
|
112
112
|
form:
|
@@ -127,10 +127,11 @@ zh:
|
|
127
127
|
constraint: "%{label}: %{value}"
|
128
128
|
many_constraint_values: "%{values} 已选"
|
129
129
|
title: "%{constraints} - %{application_name} 搜索结果"
|
130
|
+
joiner: " / "
|
130
131
|
pagination:
|
131
132
|
title: 搜索结果导航
|
132
133
|
pagination_info:
|
133
|
-
no_items_found:
|
134
|
+
no_items_found: "没有找到 %{entry_name} "
|
134
135
|
pages:
|
135
136
|
one: "<strong>%{start_num}</strong> - <strong>%{end_num}</strong> 共 <strong>%{total_num}</strong>"
|
136
137
|
other: "<strong>%{start_num}</strong> - <strong>%{end_num}</strong> 共 <strong>%{total_num}</strong>"
|
@@ -155,7 +156,7 @@ zh:
|
|
155
156
|
start_over: 重新开始
|
156
157
|
view:
|
157
158
|
list: 列表
|
158
|
-
view_title:
|
159
|
+
view_title: "以如下方式察看搜索结果: "
|
159
160
|
zero_results:
|
160
161
|
modify_search: 请更改你的搜索条件
|
161
162
|
search_everything: 试一试搜索所有记录
|
@@ -173,7 +174,7 @@ zh:
|
|
173
174
|
page_title: 搜索历史 - %{application_name}
|
174
175
|
recent: 你最近搜索历史
|
175
176
|
save: 保存
|
176
|
-
title:
|
177
|
+
title: ""
|
177
178
|
skip_links:
|
178
179
|
first_result: 转到第一个搜索结果
|
179
180
|
label: 跳过链接
|
@@ -192,10 +193,10 @@ zh:
|
|
192
193
|
carrier_prompt: 请选择运营商
|
193
194
|
submit: 发送
|
194
195
|
title: 通过短信发送
|
195
|
-
to:
|
196
|
+
to: "电话号码:"
|
196
197
|
success: 已发送短信
|
197
198
|
text:
|
198
|
-
url:
|
199
|
+
url: "链接: %{url}"
|
199
200
|
tools:
|
200
201
|
citation: 引用
|
201
202
|
clear: 清除
|
@@ -96,6 +96,10 @@ module Blacklight
|
|
96
96
|
##
|
97
97
|
# == Response models
|
98
98
|
|
99
|
+
# @!attribute repository_class
|
100
|
+
# @return [Class] Class for sending and receiving requests from a search index
|
101
|
+
# defaults to the class configured in blacklight.yml
|
102
|
+
property :repository_class, default: Blacklight.repository_class
|
99
103
|
# @!attribute search_builder_class
|
100
104
|
# @return [Class] class for converting Blacklight parameters to request parameters for the repository_class
|
101
105
|
property :search_builder_class, default: ::SearchBuilder
|
@@ -162,6 +166,8 @@ module Blacklight
|
|
162
166
|
respond_to: OpenStructWithHashAccess.new,
|
163
167
|
# component class used to render the facet grouping
|
164
168
|
facet_group_component: Blacklight::Response::FacetGroupComponent,
|
169
|
+
# component class used to render the facet search and start at
|
170
|
+
facet_filters_component: Blacklight::Facets::FiltersComponent,
|
165
171
|
# component class used to render the facet pagination
|
166
172
|
facet_pagination_component: Blacklight::FacetFieldPaginationComponent,
|
167
173
|
# component class used to render search constraints
|
@@ -379,7 +385,7 @@ module Blacklight
|
|
379
385
|
|
380
386
|
# @return [Blacklight::Repository]
|
381
387
|
def repository
|
382
|
-
|
388
|
+
repository_class.new(self)
|
383
389
|
end
|
384
390
|
|
385
391
|
# @return [String] The destination for the link around the logo in the header
|
@@ -52,12 +52,15 @@ module Blacklight::Solr
|
|
52
52
|
|
53
53
|
##
|
54
54
|
# @return [boolean] true if the repository is reachable
|
55
|
-
def ping
|
55
|
+
def ping?
|
56
56
|
response = connection.send_and_receive 'admin/ping', {}
|
57
57
|
Blacklight.logger&.info("Ping [#{connection.uri}] returned: '#{response['status']}'")
|
58
58
|
response['status'] == "OK"
|
59
59
|
end
|
60
60
|
|
61
|
+
alias ping ping?
|
62
|
+
Blacklight.deprecation.deprecate_methods(Repository, ping: 'use Repository#ping? instead')
|
63
|
+
|
61
64
|
##
|
62
65
|
# Execute a solr query at the given path with the parameters
|
63
66
|
# TODO: Make this private after we have a way to abstract admin/luke and ping
|
data/lib/blacklight.rb
CHANGED
@@ -29,14 +29,16 @@ module Blacklight
|
|
29
29
|
# the class Blacklight::(name of the adapter)::Repository, e.g.
|
30
30
|
# elastic_search => Blacklight::ElasticSearch::Repository
|
31
31
|
def self.repository_class
|
32
|
-
|
32
|
+
if connection_config && !connection_config.key?(:adapter)
|
33
|
+
raise "The value for :adapter was not found in the blacklight.yml config"
|
34
|
+
end
|
35
|
+
|
36
|
+
case connection_config&.fetch(:adapter) || 'solr' # rubocop:disable Lint/LiteralAsCondition
|
33
37
|
when 'solr'
|
34
38
|
Blacklight::Solr::Repository
|
35
39
|
when /::/
|
36
40
|
connection_config[:adapter].constantize
|
37
41
|
else
|
38
|
-
raise "The value for :adapter was not found in the blacklight.yml config" unless connection_config.key? :adapter
|
39
|
-
|
40
42
|
Blacklight.const_get("#{connection_config.fetch(:adapter)}/Repository".classify)
|
41
43
|
end
|
42
44
|
end
|
@@ -65,8 +65,8 @@ class <%= controller_name.classify %>Controller < ApplicationController
|
|
65
65
|
config.add_results_collection_tool(:view_type_group)
|
66
66
|
|
67
67
|
config.add_show_tools_partial(:bookmark, component: Blacklight::Document::BookmarkComponent, if: :render_bookmarks_control?)
|
68
|
-
config.add_show_tools_partial(:email, callback: :email_action, validator: :
|
69
|
-
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :
|
68
|
+
config.add_show_tools_partial(:email, callback: :email_action, validator: :email_params_valid?)
|
69
|
+
config.add_show_tools_partial(:sms, if: :render_sms_action?, callback: :sms_action, validator: :sms_params_valid?)
|
70
70
|
config.add_show_tools_partial(:citation)
|
71
71
|
|
72
72
|
config.add_nav_action(:bookmark, partial: 'blacklight/nav/bookmark', if: :render_bookmarks_control?)
|
data/package.json
CHANGED
data/spec/features/modal_spec.rb
CHANGED
@@ -6,7 +6,7 @@ RSpec.describe 'Modal' do
|
|
6
6
|
expect(page).to have_no_selector 'dialog#blacklight-modal'
|
7
7
|
click_on 'Email'
|
8
8
|
expect(page).to have_css 'dialog#blacklight-modal'
|
9
|
-
|
9
|
+
find('button[aria-label=Close]').click
|
10
10
|
expect(page).to have_no_selector 'dialog#blacklight-modal'
|
11
11
|
end
|
12
12
|
end
|
@@ -5,6 +5,26 @@ RSpec.describe Blacklight::Configuration, :api do
|
|
5
5
|
described_class.new
|
6
6
|
end
|
7
7
|
|
8
|
+
describe "#repository" do
|
9
|
+
context 'when the class is configured in blacklight.yml' do
|
10
|
+
it "uses the default repository class" do
|
11
|
+
expect(config.repository).to be_a(Blacklight::Solr::Repository)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
context 'when the class is set in the configuration' do
|
16
|
+
let(:custom_repository_class) { Class.new(Blacklight::Solr::Repository) }
|
17
|
+
|
18
|
+
before do
|
19
|
+
config.repository_class = custom_repository_class
|
20
|
+
end
|
21
|
+
|
22
|
+
it "uses the custom repository class" do
|
23
|
+
expect(config.repository).to be_a(custom_repository_class)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
8
28
|
it "supports arbitrary configuration values" do
|
9
29
|
config.a = 1
|
10
30
|
|
@@ -56,5 +56,22 @@ RSpec.describe Blacklight::JsonPresenter, :api do
|
|
56
56
|
expect(search_facets.map(&:name)).to eq ['format_si']
|
57
57
|
end
|
58
58
|
end
|
59
|
+
|
60
|
+
context 'when facets are in multiple groups' do
|
61
|
+
before do
|
62
|
+
config.add_facet_field 'author_tsim', label: 'author', group: 'other-group'
|
63
|
+
end
|
64
|
+
|
65
|
+
let(:aggregations) do
|
66
|
+
{
|
67
|
+
'format_si' => Blacklight::Solr::Response::Facets::FacetField.new("format_si", [{ label: "Book", value: 'Book', hits: 20 }]),
|
68
|
+
'author_tsim' => Blacklight::Solr::Response::Facets::FacetField.new("author_tsim", [{ label: "Julie", value: 'Julie', hits: 1 }])
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'filters out the facets that are not defined' do
|
73
|
+
expect(search_facets.map(&:name)).to eq %w[format_si author_tsim]
|
74
|
+
end
|
75
|
+
end
|
59
76
|
end
|
60
77
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blacklight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.0.
|
4
|
+
version: 9.0.0.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
- Justin Coyne
|
17
17
|
bindir: exe
|
18
18
|
cert_chain: []
|
19
|
-
date: 2025-06-
|
19
|
+
date: 2025-06-27 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rails
|
@@ -448,7 +448,6 @@ files:
|
|
448
448
|
- app/assets/stylesheets/blacklight/_facets.scss
|
449
449
|
- app/assets/stylesheets/blacklight/_group.scss
|
450
450
|
- app/assets/stylesheets/blacklight/_header.scss
|
451
|
-
- app/assets/stylesheets/blacklight/_icons.scss
|
452
451
|
- app/assets/stylesheets/blacklight/_layout.scss
|
453
452
|
- app/assets/stylesheets/blacklight/_modal.scss
|
454
453
|
- app/assets/stylesheets/blacklight/_pagination.scss
|
@@ -1023,7 +1022,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1023
1022
|
- !ruby/object:Gem::Version
|
1024
1023
|
version: '0'
|
1025
1024
|
requirements: []
|
1026
|
-
rubygems_version: 3.6.
|
1025
|
+
rubygems_version: 3.6.2
|
1027
1026
|
specification_version: 4
|
1028
1027
|
summary: Blacklight provides a discovery interface for any Solr (http://lucene.apache.org/solr)
|
1029
1028
|
index.
|