blacklight 7.5.0 → 7.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.docker/app/Dockerfile +26 -0
- data/.docker/app/entrypoint.sh +6 -0
- data/.env +5 -0
- data/.gitignore +0 -1
- data/.rubocop_todo.yml +26 -37
- data/.travis.yml +16 -24
- data/Gemfile +4 -1
- data/README.md +4 -0
- data/VERSION +1 -1
- data/app/assets/stylesheets/blacklight/_pagination.scss +4 -0
- data/app/components/blacklight/constraint_layout_component.html.erb +23 -0
- data/app/components/blacklight/constraint_layout_component.rb +16 -0
- data/app/components/blacklight/facet_field_component.html.erb +25 -0
- data/app/components/blacklight/facet_field_component.rb +11 -0
- data/app/components/blacklight/facet_field_list_component.html.erb +18 -0
- data/app/components/blacklight/facet_field_list_component.rb +22 -0
- data/app/components/blacklight/facet_field_no_layout_component.rb +13 -0
- data/app/components/blacklight/facet_item_component.rb +120 -0
- data/app/controllers/concerns/blacklight/catalog.rb +4 -1
- data/app/helpers/blacklight/blacklight_helper_behavior.rb +4 -2
- data/app/helpers/blacklight/catalog_helper_behavior.rb +2 -4
- data/app/helpers/blacklight/configuration_helper_behavior.rb +3 -2
- data/app/helpers/blacklight/facets_helper_behavior.rb +84 -48
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +64 -33
- data/app/javascript/blacklight/modal.js +1 -1
- data/app/models/blacklight/icon.rb +11 -5
- data/app/models/concerns/blacklight/document/extensions.rb +3 -0
- data/app/models/concerns/blacklight/document/semantic_fields.rb +0 -4
- data/app/presenters/blacklight/document_presenter.rb +27 -36
- data/app/presenters/blacklight/facet_field_presenter.rb +57 -0
- data/app/presenters/blacklight/facet_item_presenter.rb +81 -0
- data/app/presenters/blacklight/field_presenter.rb +31 -6
- data/app/presenters/blacklight/index_presenter.rb +2 -2
- data/app/presenters/blacklight/show_presenter.rb +3 -3
- data/app/views/catalog/_citation.html.erb +1 -1
- data/app/views/catalog/_constraints.html.erb +2 -2
- data/app/views/catalog/_constraints_element.html.erb +5 -24
- data/app/views/catalog/_email_form.html.erb +1 -1
- data/app/views/catalog/_facet_layout.html.erb +8 -17
- data/app/views/catalog/_facet_limit.html.erb +3 -12
- data/app/views/catalog/_facet_pagination.html.erb +2 -2
- data/app/views/catalog/_facet_pivot.html.erb +4 -4
- data/app/views/catalog/_field.json.jbuilder +2 -2
- data/app/views/catalog/_index.html.erb +3 -3
- data/app/views/catalog/_previous_next_doc.html.erb +5 -5
- data/app/views/catalog/_search_form.html.erb +1 -1
- data/app/views/catalog/_show.html.erb +3 -3
- data/app/views/catalog/_sms_form.html.erb +1 -1
- data/app/views/catalog/_sort_and_per_page.html.erb +1 -1
- data/app/views/catalog/_start_over.html.erb +1 -0
- data/app/views/catalog/_thumbnail.html.erb +1 -1
- data/app/views/catalog/index.json.jbuilder +2 -1
- data/app/views/catalog/show.html.erb +1 -1
- data/app/views/catalog/show.json.jbuilder +2 -1
- data/app/views/layouts/blacklight/base.html.erb +2 -2
- data/blacklight.gemspec +1 -0
- data/config/locales/blacklight.ar.yml +30 -24
- data/config/locales/blacklight.de.yml +2 -0
- data/config/locales/blacklight.en.yml +2 -0
- data/config/locales/blacklight.es.yml +2 -0
- 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/docker-compose.yml +35 -0
- data/lib/blacklight/configuration/field.rb +5 -4
- data/lib/blacklight/engine.rb +2 -6
- data/lib/blacklight/nested_open_struct_with_hash_access.rb +1 -1
- data/lib/blacklight/search_state.rb +52 -0
- data/lib/blacklight/solr/response/facets.rb +2 -0
- data/lib/generators/blacklight/assets_generator.rb +10 -0
- data/package.json +1 -1
- data/spec/{views/catalog/_constraints_element.html.erb_spec.rb → components/blacklight/constraint_layout_component_spec.rb} +22 -12
- data/spec/components/blacklight/facet_field_list_component_spec.rb +108 -0
- data/spec/components/blacklight/facet_item_component_spec.rb +50 -0
- data/spec/controllers/catalog_controller_spec.rb +13 -1
- data/spec/features/facets_spec.rb +1 -1
- data/spec/helpers/blacklight/configuration_helper_behavior_spec.rb +3 -0
- data/spec/helpers/blacklight/facets_helper_behavior_spec.rb +24 -12
- data/spec/helpers/blacklight/render_constraints_helper_behavior_spec.rb +4 -23
- data/spec/helpers/blacklight_helper_spec.rb +17 -0
- data/spec/helpers/catalog_helper_spec.rb +0 -7
- data/spec/lib/blacklight/search_state_spec.rb +50 -0
- data/spec/models/blacklight/icon_spec.rb +15 -6
- data/spec/models/blacklight/solr/response/facets_spec.rb +30 -1
- data/spec/presenters/blacklight/document_presenter_spec.rb +22 -62
- data/spec/presenters/blacklight/facet_field_presenter_spec.rb +109 -0
- data/spec/presenters/blacklight/facet_item_presenter_spec.rb +92 -0
- data/spec/presenters/blacklight/field_presenter_spec.rb +268 -0
- data/spec/presenters/blacklight/index_presenter_spec.rb +0 -142
- data/spec/presenters/blacklight/show_presenter_spec.rb +0 -177
- data/spec/spec_helper.rb +2 -0
- data/spec/support/presenter_test_helpers.rb +11 -0
- data/spec/views/catalog/_facet_group.html.erb_spec.rb +1 -0
- data/spec/views/catalog/_previous_next_doc.html.erb_spec.rb +18 -0
- data/tasks/blacklight.rake +30 -23
- metadata +48 -7
- data/Vagrantfile +0 -79
- data/provision.sh +0 -30
@@ -3,7 +3,7 @@
|
|
3
3
|
module Blacklight
|
4
4
|
# Renders a field and handles link_to_facet or helper_method if supplied
|
5
5
|
class FieldPresenter
|
6
|
-
# @param
|
6
|
+
# @param view_context [Object] the context in which to execute helper methods
|
7
7
|
# @param document [SolrDocument] the document
|
8
8
|
# @param field_config [Blacklight::Configuration::Field] the field's configuration
|
9
9
|
# @param options [Hash]
|
@@ -11,8 +11,8 @@ module Blacklight
|
|
11
11
|
# @option options [Array] :except_operations
|
12
12
|
# @option options [Object] :value
|
13
13
|
# @option options [Array] :steps
|
14
|
-
def initialize(
|
15
|
-
@
|
14
|
+
def initialize(view_context, document, field_config, options = {})
|
15
|
+
@view_context = view_context
|
16
16
|
@document = document
|
17
17
|
@field_config = field_config
|
18
18
|
@options = options
|
@@ -28,10 +28,35 @@ module Blacklight
|
|
28
28
|
@except_operations += [Rendering::HelperMethod] if options.key? :value
|
29
29
|
end
|
30
30
|
|
31
|
-
attr_reader :
|
31
|
+
attr_reader :view_context, :document, :field_config, :except_operations, :options
|
32
32
|
|
33
33
|
def render
|
34
|
-
Rendering::Pipeline.new(values
|
34
|
+
Rendering::Pipeline.new(values, field_config, document, view_context, pipeline_steps, options).render
|
35
|
+
end
|
36
|
+
|
37
|
+
def values
|
38
|
+
@values ||= retrieve_values
|
39
|
+
end
|
40
|
+
|
41
|
+
def label(context = 'index', **options)
|
42
|
+
field_config.display_label(context, count: retrieve_values.count, **options)
|
43
|
+
end
|
44
|
+
|
45
|
+
##
|
46
|
+
# Check to see if the given field should be rendered in this context
|
47
|
+
# @param [Blacklight::Configuration::Field] field_config
|
48
|
+
# @return [Boolean]
|
49
|
+
def render_field?
|
50
|
+
view_context.should_render_field?(field_config, document)
|
51
|
+
end
|
52
|
+
|
53
|
+
##
|
54
|
+
# Check if a document has (or, might have, in the case of accessor methods) a value for
|
55
|
+
# the given solr field
|
56
|
+
# @param [Blacklight::Configuration::Field] field_config
|
57
|
+
# @return [Boolean]
|
58
|
+
def any?
|
59
|
+
values.present?
|
35
60
|
end
|
36
61
|
|
37
62
|
private
|
@@ -40,7 +65,7 @@ module Blacklight
|
|
40
65
|
(options[:steps] || Rendering::Pipeline.operations) - except_operations
|
41
66
|
end
|
42
67
|
|
43
|
-
def retrieve_values
|
68
|
+
def retrieve_values
|
44
69
|
FieldRetriever.new(document, field_config).fetch
|
45
70
|
end
|
46
71
|
end
|
@@ -12,7 +12,7 @@ module Blacklight
|
|
12
12
|
value = case field_or_string_or_proc
|
13
13
|
when Symbol
|
14
14
|
config = field_config(field_or_string_or_proc)
|
15
|
-
|
15
|
+
field_presenter(config).values
|
16
16
|
when Proc
|
17
17
|
Deprecation.warn(self, "calling IndexPresenter.label with a Proc is deprecated. " \
|
18
18
|
"First argument must be a symbol. This will be removed in Blacklight 8")
|
@@ -24,7 +24,7 @@ module Blacklight
|
|
24
24
|
end
|
25
25
|
|
26
26
|
value = document.id if value.blank?
|
27
|
-
|
27
|
+
field_value(config, values: Array.wrap(value), except_operations: [Rendering::HelperMethod])
|
28
28
|
end
|
29
29
|
|
30
30
|
deprecation_deprecate label: 'Use #heading'
|
@@ -20,12 +20,12 @@ module Blacklight
|
|
20
20
|
# @see #document_heading
|
21
21
|
# @return [String]
|
22
22
|
def html_title
|
23
|
-
return
|
23
|
+
return field_value(view_config.html_title_field) if view_config.html_title_field.is_a? Blacklight::Configuration::Field
|
24
24
|
|
25
25
|
if view_config.html_title_field
|
26
26
|
fields = Array.wrap(view_config.html_title_field) + [configuration.document_model.unique_key]
|
27
|
-
f = fields.lazy.map { |field| field_config(field) }.detect { |field_config|
|
28
|
-
|
27
|
+
f = fields.lazy.map { |field| field_config(field) }.detect { |field_config| field_presenter(field_config).any? }
|
28
|
+
field_value(f)
|
29
29
|
else
|
30
30
|
heading
|
31
31
|
end
|
@@ -2,8 +2,8 @@
|
|
2
2
|
<div id="appliedParams" class="clearfix constraints-container">
|
3
3
|
<h2 class="sr-only"><%= t('blacklight.search.search_constraints_header') %></h2>
|
4
4
|
|
5
|
-
<%=
|
5
|
+
<%= render 'start_over' %>
|
6
6
|
<span class="constraints-label sr-only"><%= t('blacklight.search.filters.title') %></span>
|
7
|
-
<%= render_constraints(params) %>
|
7
|
+
<%= render_constraints(controller.params != params ? params : search_state) %>
|
8
8
|
</div>
|
9
9
|
<% end %>
|
@@ -7,27 +7,8 @@
|
|
7
7
|
options ||= {}
|
8
8
|
%>
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<% unless value.blank? %>
|
16
|
-
<%= content_tag :span, value, class: 'filter-value', title: strip_tags(value) %>
|
17
|
-
<% end %>
|
18
|
-
</span>
|
19
|
-
<% unless options[:remove].blank? %>
|
20
|
-
<% accessible_remove_label = content_tag :span, class: 'sr-only' do
|
21
|
-
if label.blank?
|
22
|
-
t('blacklight.search.filters.remove.value', value: value)
|
23
|
-
else
|
24
|
-
t('blacklight.search.filters.remove.label_value', label: label, value: value)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
%>
|
28
|
-
|
29
|
-
<%= link_to(content_tag(:span, '✖', class: 'remove-icon') + accessible_remove_label,
|
30
|
-
options[:remove], class: 'btn btn-outline-secondary remove'
|
31
|
-
) %>
|
32
|
-
<%- end -%>
|
33
|
-
</span>
|
10
|
+
<%= render(Blacklight::ConstraintLayoutComponent.new(
|
11
|
+
classes: options[:classes],
|
12
|
+
label: label,
|
13
|
+
value: value,
|
14
|
+
remove_path: options[:remove])) %>
|
@@ -1,17 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= facet_field_label(facet_field.key) %>
|
10
|
-
</button>
|
11
|
-
</h3>
|
12
|
-
<div id="<%= facet_field_id(facet_field) %>" aria-labelledby="<%= facet_field_id(facet_field) %>-header" class="panel-collapse facet-content collapse <%= "show" unless should_collapse_facet?(facet_field) %>">
|
13
|
-
<div class="card-body">
|
14
|
-
<%= yield %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
</div>
|
1
|
+
<%= render(Blacklight::FacetFieldComponent.new(facet_field: facet_field_presenter(facet_field, nil))) do |component| %>
|
2
|
+
<% component.with(:label) do %>
|
3
|
+
<%= facet_field_label(facet_field.key) %>
|
4
|
+
<% end %>
|
5
|
+
<% component.with(:body) do %>
|
6
|
+
<%= yield %>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<% unless paginator.last_page? || params[:action] == "facet" %>
|
6
|
-
<li class="more_facets">
|
7
|
-
<%= link_to t("more_#{field_name}_html", scope: 'blacklight.search.facets', default: :more_html, field_name: facet_field_label(facet_field.key)),
|
8
|
-
search_facet_path(id: facet_field.key),
|
9
|
-
data: { blacklight_modal: 'trigger' } %>
|
10
|
-
</li>
|
11
|
-
<% end %>
|
12
|
-
</ul>
|
1
|
+
<%= render(Blacklight::FacetFieldListComponent.new(
|
2
|
+
facet_field: facet_field_presenter(facet_field, display_facet),
|
3
|
+
layout: false)) %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<div class="prev_next_links btn-group">
|
2
2
|
<%= link_to_previous_page @pagination, raw(t('views.pagination.previous')), params: search_state.to_h, param_name: blacklight_config.facet_paginator_class.request_keys[:page], class: 'btn btn-link', data: { blacklight_modal: "preserve" } do %>
|
3
|
-
|
3
|
+
<%= content_tag :span, raw(t('views.pagination.previous')), class: 'disabled btn' %>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<%= link_to_next_page @pagination, raw(t('views.pagination.next')), params: search_state.to_h, param_name: blacklight_config.facet_paginator_class.request_keys[:page], class: 'btn btn-link', data: { blacklight_modal: "preserve" } do %>
|
7
|
-
|
7
|
+
<%= content_tag :span, raw(t('views.pagination.next')), class: 'disabled btn' %>
|
8
8
|
<% end %>
|
9
9
|
</div>
|
10
10
|
|
@@ -2,10 +2,10 @@
|
|
2
2
|
<% display_facet.items.each do |item| -%>
|
3
3
|
<li>
|
4
4
|
<span class="facet-values">
|
5
|
-
<% if facet_in_params?(field_name, item) %>
|
6
|
-
<%= render_selected_facet_value(field_name, item) %>
|
7
|
-
<% else %>
|
8
|
-
<%= render_facet_value(field_name, item) %>
|
5
|
+
<% if facet_in_params?(field_name, item) %>
|
6
|
+
<%= render_selected_facet_value(field_name, item) %>
|
7
|
+
<% else %>
|
8
|
+
<%= render_facet_value(field_name, item) %>
|
9
9
|
<% end -%>
|
10
10
|
</span>
|
11
11
|
|
@@ -4,7 +4,7 @@ json.set!(field_name) do
|
|
4
4
|
json.id "#{document_url}##{field_name}"
|
5
5
|
json.type 'document_value'
|
6
6
|
json.attributes do
|
7
|
-
json.value
|
8
|
-
json.label
|
7
|
+
json.value field_presenter.render
|
8
|
+
json.label field_presenter.label(view_type)
|
9
9
|
end
|
10
10
|
end
|
@@ -2,9 +2,9 @@
|
|
2
2
|
<%# default partial to display solr document fields in catalog index view -%>
|
3
3
|
<dl class="document-metadata dl-invert row">
|
4
4
|
|
5
|
-
<% doc_presenter.fields_to_render.each do |field_name, field| -%>
|
6
|
-
<dt class="blacklight-<%= field_name.parameterize %> col-md-3"><%= render_index_field_label document, field: field_name %></dt>
|
7
|
-
<dd class="blacklight-<%= field_name.parameterize %> col-md-9"><%=
|
5
|
+
<% doc_presenter.fields_to_render.each do |field_name, field, field_presenter| -%>
|
6
|
+
<dt class="blacklight-<%= field_name.parameterize %> col-md-3"><%= render_index_field_label document, label: field_presenter.label, field: field_name %></dt>
|
7
|
+
<dd class="blacklight-<%= field_name.parameterize %> col-md-9"><%= field_presenter.render %></dd>
|
8
8
|
<% end -%>
|
9
9
|
|
10
10
|
</dl>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%
|
2
|
-
<div class='pagination-search-widgets'>
|
3
|
-
|
1
|
+
<% if @search_context[:prev] || @search_context[:next] %>
|
2
|
+
<div class='pagination-search-widgets'>
|
3
|
+
|
4
4
|
<div class="page-links">
|
5
5
|
<%= link_to_previous_document @search_context[:prev] %> |
|
6
6
|
|
@@ -8,5 +8,5 @@
|
|
8
8
|
|
9
9
|
<%= link_to_next_document @search_context[:next] %>
|
10
10
|
</div>
|
11
|
-
|
12
|
-
|
11
|
+
</div>
|
12
|
+
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= form_tag search_action_url, method: :get, class: 'search-query-form', role: 'search' do %>
|
1
|
+
<%= form_tag search_action_url, method: :get, class: 'search-query-form', role: 'search', 'aria-label' => t('blacklight.search.form.submit') do %>
|
2
2
|
<%= render_hash_as_hidden_fields(search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
|
3
3
|
<% if search_fields.length > 1 %>
|
4
4
|
<label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% doc_presenter = show_presenter(document) %>
|
2
2
|
<%# default partial to display solr document fields in catalog show view -%>
|
3
3
|
<dl class="row dl-invert document-metadata">
|
4
|
-
<% doc_presenter.fields_to_render.each do |field_name, field| -%>
|
5
|
-
<dt class="blacklight-<%= field_name.parameterize %> col-md-3"><%= render_document_show_field_label document, field: field_name %></dt>
|
6
|
-
<dd class="blacklight-<%= field_name.parameterize %> col-md-9"><%=
|
4
|
+
<% doc_presenter.fields_to_render.each do |field_name, field, field_presenter| -%>
|
5
|
+
<dt class="blacklight-<%= field_name.parameterize %> col-md-3"><%= render_document_show_field_label document, label: field_presenter.label, field: field_name %></dt>
|
6
|
+
<dd class="blacklight-<%= field_name.parameterize %> col-md-9"><%= field_presenter.render %></dd>
|
7
7
|
<% end -%>
|
8
8
|
</dl>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div id="sortAndPerPage" class="sort-pagination d-md-flex justify-content-between">
|
1
|
+
<div id="sortAndPerPage" class="sort-pagination d-md-flex justify-content-between" role="navigation" aria-label="<%= t('blacklight.search.per_page.aria_label')%>">
|
2
2
|
<%= render partial: "paginate_compact", object: @response if show_pagination? %>
|
3
3
|
<%= render_results_collection_tools wrapping_class: "search-widgets" %>
|
4
4
|
</div>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= link_to t('blacklight.search.start_over'), start_over_path, class: "catalog_startOverLink btn btn-primary" %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if presenter(document).thumbnail.exists? && tn = presenter(document).thumbnail.thumbnail_tag({}, counter: document_counter_with_offset(document_counter)) %>
|
1
|
+
<% if presenter(document).thumbnail.exists? && tn = presenter(document).thumbnail.thumbnail_tag({ alt: '' }, 'aria-hidden': true, tabindex: -1, counter: document_counter_with_offset(document_counter)) %>
|
2
2
|
<div class="document-thumbnail">
|
3
3
|
<%= tn %>
|
4
4
|
</div>
|
@@ -17,11 +17,12 @@ json.data do
|
|
17
17
|
json.id document.id
|
18
18
|
json.type doc_presenter.display_type.first
|
19
19
|
json.attributes do
|
20
|
-
doc_presenter.fields_to_render.each do |field_name, field|
|
20
|
+
doc_presenter.fields_to_render.each do |field_name, field, field_presenter|
|
21
21
|
json.partial! 'field', field: field,
|
22
22
|
field_name: field_name,
|
23
23
|
document_url: document_url,
|
24
24
|
doc_presenter: doc_presenter,
|
25
|
+
field_presenter: field_presenter,
|
25
26
|
view_type: 'index'
|
26
27
|
end
|
27
28
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if current_search_session %>
|
2
2
|
<div id="appliedParams" class="clearfix constraints-container">
|
3
|
-
<%=
|
3
|
+
<%= render 'start_over' %>
|
4
4
|
<%= link_back_to_catalog class: 'btn btn-outline-secondary' %>
|
5
5
|
</div>
|
6
6
|
<% end %>
|
@@ -11,11 +11,12 @@ json.data do
|
|
11
11
|
json.id @document.id
|
12
12
|
json.type doc_presenter.display_type.first
|
13
13
|
json.attributes do
|
14
|
-
doc_presenter.fields_to_render.each do |field_name, field|
|
14
|
+
doc_presenter.fields_to_render.each do |field_name, field, field_presenter|
|
15
15
|
json.partial! 'field', field: field,
|
16
16
|
field_name: field_name,
|
17
17
|
document_url: document_url,
|
18
18
|
doc_presenter: doc_presenter,
|
19
|
+
field_presenter: field_presenter,
|
19
20
|
view_type: 'show'
|
20
21
|
end
|
21
22
|
end
|
@@ -17,11 +17,11 @@
|
|
17
17
|
<%= content_for(:head) %>
|
18
18
|
</head>
|
19
19
|
<body class="<%= render_body_class %>">
|
20
|
-
<
|
20
|
+
<nav id="skip-link" role="navigation" aria-label="<%= t('blacklight.skip_links.label') %>">
|
21
21
|
<%= link_to t('blacklight.skip_links.search_field'), '#search_field', class: 'element-invisible element-focusable rounded-bottom py-2 px-3', data: { turbolinks: 'false' } %>
|
22
22
|
<%= link_to t('blacklight.skip_links.main_content'), '#main-container', class: 'element-invisible element-focusable rounded-bottom py-2 px-3', data: { turbolinks: 'false' } %>
|
23
23
|
<%= content_for(:skip_links) %>
|
24
|
-
</
|
24
|
+
</nav>
|
25
25
|
<%= render partial: 'shared/header_navbar' %>
|
26
26
|
|
27
27
|
<main id="main-container" class="<%= container_classes %>" role="main" aria-label="<%= t('blacklight.main.aria.main_container') %>">
|
data/blacklight.gemspec
CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_dependency "jbuilder", '~> 2.7'
|
31
31
|
s.add_dependency "kaminari", ">= 0.15" # the pagination (page 1,2,3, etc..) of our search results
|
32
32
|
s.add_dependency "deprecation"
|
33
|
+
s.add_dependency "view_component"
|
33
34
|
|
34
35
|
s.add_development_dependency "rsolr", ">= 1.0.6", "< 3" # Library for interacting with rSolr.
|
35
36
|
s.add_development_dependency "rspec-rails", "~> 4.0.0.beta2"
|
@@ -3,8 +3,8 @@ ar:
|
|
3
3
|
pagination:
|
4
4
|
first: 'الأولى «'
|
5
5
|
last: 'الأخيرة »'
|
6
|
-
previous: '«
|
7
|
-
next: '
|
6
|
+
previous: '« السابق'
|
7
|
+
next: 'التالي »'
|
8
8
|
truncate: '…'
|
9
9
|
aria:
|
10
10
|
container_label: 'روابط الصفحات'
|
@@ -22,6 +22,7 @@ ar:
|
|
22
22
|
blacklight:
|
23
23
|
application_name: 'Blacklight'
|
24
24
|
skip_links:
|
25
|
+
label: 'تخطي الروابط'
|
25
26
|
main_content: 'انتقل إلى المحتوى الرئيسي'
|
26
27
|
search_field: 'انتقل إلى البحث'
|
27
28
|
first_result: 'انتقل إلى النتيجة الأولى'
|
@@ -51,7 +52,8 @@ ar:
|
|
51
52
|
few: 'أضيفت الصفحات المفضلة بنجاح.'
|
52
53
|
many: 'أضيفت الصفحات المفضلة بنجاح.'
|
53
54
|
other: 'أضيفت الصفحات المفضلة بنجاح.'
|
54
|
-
|
55
|
+
|
56
|
+
failure: 'معذرة! حدثت مشكلة في حفظ الصفحات المفضلة.'
|
55
57
|
remove:
|
56
58
|
button: 'إزالة الصفحة المفضلة'
|
57
59
|
success: 'أزيلت الصفحة المفضلة بنجاح.'
|
@@ -60,7 +62,7 @@ ar:
|
|
60
62
|
clear:
|
61
63
|
action_title: 'مسح الصفحات المفضلة'
|
62
64
|
action_confirm: 'هل ترغب في مسح الصفحات المفضلة؟'
|
63
|
-
success: '
|
65
|
+
success: 'تم مسح صفحاتك المفضلة.'
|
64
66
|
failure: 'معذرة! حدثت مشكلة في مسح صفحاتك المفضلة.'
|
65
67
|
need_login: 'يُرجى تسجيل الدخول لتنظيم صفحاتك المفضلة وعرضها.'
|
66
68
|
list_title: 'صفحاتك المفضلة'
|
@@ -68,14 +70,14 @@ ar:
|
|
68
70
|
|
69
71
|
search_history:
|
70
72
|
clear:
|
71
|
-
action_title: '
|
73
|
+
action_title: 'امسح سجل البحث السابق'
|
72
74
|
action_confirm: 'هل ترغب في مسح سجل البحث السابق؟'
|
73
|
-
success: '
|
75
|
+
success: 'تم مسح سجل بحثك السابق.'
|
74
76
|
failure: 'حدثت مشكلة في مسح سجل بحثك السابق.'
|
75
77
|
title: 'سجل البحث'
|
76
78
|
page_title: 'سجل البحث - %{application_name}'
|
77
|
-
no_history: '
|
78
|
-
recent: '
|
79
|
+
no_history: 'لا يوجد لديك سجل بحث'
|
80
|
+
recent: 'سجل ابحاثك السابقة'
|
79
81
|
forget: 'تراجع'
|
80
82
|
save: 'حفظ'
|
81
83
|
|
@@ -83,7 +85,7 @@ ar:
|
|
83
85
|
title: 'أدوات'
|
84
86
|
citation: 'استشهاد مرجعي'
|
85
87
|
email: 'بريد إلكتروني'
|
86
|
-
sms: '
|
88
|
+
sms: 'إرسله كرسالة نصية قصيرة'
|
87
89
|
clear: 'مسح'
|
88
90
|
|
89
91
|
citation:
|
@@ -93,12 +95,12 @@ ar:
|
|
93
95
|
|
94
96
|
email:
|
95
97
|
form:
|
96
|
-
title: '
|
98
|
+
title: 'إرسله عبرالبريد الإلكتروني'
|
97
99
|
to: 'بريد إلكتروني:'
|
98
100
|
message: 'الرسالة:'
|
99
101
|
submit: 'إرسال'
|
100
102
|
text:
|
101
|
-
default_title: 'لا
|
103
|
+
default_title: 'لا يوجد'
|
102
104
|
title: 'العنوان: %{value}'
|
103
105
|
author: 'المؤلف: %{value}'
|
104
106
|
format: 'الصيغة: %{value}'
|
@@ -110,30 +112,31 @@ ar:
|
|
110
112
|
few: 'سجلات المادة'
|
111
113
|
many: 'سجلات المادة'
|
112
114
|
other: 'سجلات المادة'
|
115
|
+
|
113
116
|
url: 'الرابط: %{url}'
|
114
117
|
message: 'الرسالة: %{message}'
|
115
118
|
|
116
|
-
success:
|
119
|
+
success: "تم إرسال البريد الإلكتروني"
|
120
|
+
|
117
121
|
errors:
|
118
122
|
to:
|
119
123
|
invalid: 'يجب إدخال عنوان بريد إلكتروني صحيح'
|
120
124
|
blank: 'يجب إدخال مُستلم من أجل إرسال هذه الرسالة'
|
121
|
-
|
122
125
|
sms:
|
123
126
|
form:
|
124
|
-
title: '
|
127
|
+
title: 'إرسله كرسالة نصية قصيرة'
|
125
128
|
to: 'رقم الهاتف:'
|
126
129
|
carrier: 'شركة الاتصالات'
|
127
130
|
carrier_prompt: 'يرجى تحديد شركة الاتصالات'
|
128
131
|
submit: 'إرسال'
|
129
132
|
text:
|
130
133
|
title: '%{value}'
|
131
|
-
author: '
|
134
|
+
author: ' بواسطة %{value}'
|
132
135
|
url: 'الرابط: %{url}'
|
133
|
-
success:
|
136
|
+
success: "تم الإرسال كرسالة نصية قصيرة"
|
134
137
|
errors:
|
135
138
|
to:
|
136
|
-
invalid: 'يجب إدخال رقم هاتف صحيح من 10
|
139
|
+
invalid: 'يجب إدخال رقم هاتف صحيح من 10 أرقام'
|
137
140
|
blank: "يجب إدخال رقم هاتف المستلم لإرسال هذه الرسالة"
|
138
141
|
carrier:
|
139
142
|
blank: 'يجب تحديد شركة الاتصالات'
|
@@ -147,11 +150,11 @@ ar:
|
|
147
150
|
title: '%{constraints} - %{application_name} نتائج البحث'
|
148
151
|
constraint: '%{label}: %{value}'
|
149
152
|
many_constraint_values: 'تم تحديد %{values}'
|
150
|
-
header: '
|
153
|
+
header: 'ابحث'
|
151
154
|
search_constraints_header: 'قيود البحث'
|
152
155
|
search_results: 'نتائج البحث'
|
153
156
|
errors:
|
154
|
-
request_error: "معذرة،
|
157
|
+
request_error: "معذرة، لم أفهم ما تبحث عنه."
|
155
158
|
invalid_solr_id: "معذرة! لقد طلبت سجلًا غير موجود."
|
156
159
|
per_page:
|
157
160
|
label: '%{count}<span class="sr-only"> لكل صفحة</span>'
|
@@ -159,17 +162,18 @@ ar:
|
|
159
162
|
button_label_html: '%{count}<span class="d-none d-sm-inline"> لكل صفحة</span>'
|
160
163
|
title: 'عدد النتائج المعروضة في الصفحة'
|
161
164
|
submit: 'تحديث'
|
165
|
+
aria_label: 'تصفح النتائج'
|
162
166
|
sort:
|
163
167
|
label: 'ترتيب حسب %{field}' # TODO: Remove during major release
|
164
168
|
label_html: 'ترتيب <span class="d-none d-sm-inline"> حسب %{field}</span>'
|
165
169
|
submit: 'نتائج الترتيب'
|
166
170
|
form:
|
167
171
|
search_field:
|
168
|
-
label: '
|
172
|
+
label: 'ابحث في'
|
169
173
|
title: 'خيارات البحث المستهدفة'
|
170
174
|
post_label: 'عن'
|
171
175
|
search:
|
172
|
-
label: '
|
176
|
+
label: 'ابحث عن'
|
173
177
|
placeholder: 'بحث...'
|
174
178
|
submit: 'بحث'
|
175
179
|
pagination:
|
@@ -184,6 +188,7 @@ ar:
|
|
184
188
|
few: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> من <strong>%{total_num}</strong>'
|
185
189
|
many: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> من <strong>%{total_num}</strong>'
|
186
190
|
other: '<strong>%{start_num}</strong> - <strong>%{end_num}</strong> من <strong>%{total_num}</strong>'
|
191
|
+
|
187
192
|
entry_pagination_info:
|
188
193
|
zero: '<strong>%{current}</strong> من <strong>%{total}</strong>'
|
189
194
|
one: '<strong>%{current}</strong> من <strong>%{total}</strong>'
|
@@ -191,10 +196,11 @@ ar:
|
|
191
196
|
few: '<strong>%{current}</strong> من <strong>%{total}</strong>'
|
192
197
|
many: '<strong>%{current}</strong> من <strong>%{total}</strong>'
|
193
198
|
other: '<strong>%{current}</strong> من <strong>%{total}</strong>'
|
199
|
+
|
194
200
|
documents:
|
195
201
|
aria:
|
196
202
|
search_results: 'نتائج البحث'
|
197
|
-
limit_search: '
|
203
|
+
limit_search: '...ابحث عن العناصر حسب'
|
198
204
|
counter: '%{counter}. '
|
199
205
|
facets:
|
200
206
|
title: 'تحديد نطاق البحث'
|
@@ -231,9 +237,9 @@ ar:
|
|
231
237
|
zero_results:
|
232
238
|
title: "لا توجد نتائج للبحث"
|
233
239
|
modify_search: "حاول تعديل معايير البحث"
|
234
|
-
use_fewer_keywords: "استخدم كلمات
|
240
|
+
use_fewer_keywords: "استخدم كلمات أساسية أقل أولاً، ثم أعد تحديد البحث باستخدام الروابط على اليسار."
|
235
241
|
search_fields: "لقد بحثت باستخدام %{search_fields}"
|
236
|
-
search_everything: "
|
242
|
+
search_everything: "حاول البحث عن كل شيء"
|
237
243
|
view_title: "عرض النتائج ك: "
|
238
244
|
view:
|
239
245
|
list: "قائمة"
|