blacklight 7.26.0 → 7.26.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61a8ce6dc6b7186a9facb02e2862cd9ab252992fd16ac8f3cfb52bb0dc414a0b
4
- data.tar.gz: 8fca956b142ab7f1c446858320df1247bed718197ab499e826eb663406db95d9
3
+ metadata.gz: 5943737d0e65f97d49929bd5e1698de5f42a3cea352150f56e2417834ef307ea
4
+ data.tar.gz: e2ddfa33c4e1cf788a22084e9465acad0a530ea9d714e820c91805f09a8a2b80
5
5
  SHA512:
6
- metadata.gz: 175534daee84446996871538ece0c562194b485d53b801cb8ab839569fe36c712d94c7629623dc5e32d4e58993d82bc4f899669dbdfaf30de5447235236728f4
7
- data.tar.gz: 53c10ab08c741669511f9e77ea1d948968fc0b635b16a883c5c055ebeab45dfd9d7ab295838049f5ff27328f40bb66e06f919a28c649b4c3a89595c49812f176
6
+ metadata.gz: 2d8f7cfb29344d217c4f8f1929fa9ac422567b59ab47d893ccea78f425be5524f75e1456f19fc3bfc25b7211f17b152f7de0a02733bfe4c9bb7f9fd0b6044219
7
+ data.tar.gz: 6219cde27cd67bfb826532d2b08b6d50a720104a12525251dc79b59a35bb9be0ba5f776f5d6b2e09a3fcbecf410445ba827d4ba85b9106c00a52fe7424aea8f0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.26.0
1
+ 7.26.1
@@ -120,6 +120,21 @@
120
120
  text-align: right;
121
121
  width: 5em;
122
122
  }
123
+
124
+ .facet-checkbox {
125
+ display: table-cell;
126
+ width: 1.25rem;
127
+ vertical-align: top;
128
+ }
129
+
130
+ .label-and-count {
131
+ display: table;
132
+ width: 100%;
133
+ }
134
+
135
+ .label-and-count label {
136
+ display: table-row;
137
+ }
123
138
  }
124
139
 
125
140
  .facet-extended-list {
@@ -1,4 +1,4 @@
1
- <% if constraints.present? %>
1
+ <% if constraints? %>
2
2
  <div class="constraints well search_history">
3
3
  <h4><%= t 'blacklight.advanced_search.form.search_context' %></h4>
4
4
  <% constraints.each do |constraint| %>
@@ -11,8 +11,8 @@
11
11
  <%= render_hash_as_hidden_fields(@params) %>
12
12
 
13
13
  <div class="input-criteria">
14
- <div class="query-criteria">
15
- <h2 class="query-criteria-heading">
14
+ <div class="query-criteria mb-4">
15
+ <h2 class="query-criteria-heading h3 mb-4">
16
16
  <%= t('blacklight.advanced_search.form.query_criteria_heading_html', select_menu: default_operator_menu) %>
17
17
  </h2>
18
18
 
@@ -23,28 +23,32 @@
23
23
  </div>
24
24
  </div>
25
25
 
26
- <div class="limit-criteria">
27
- <h2 class="limit-criteria-heading"><%= t('blacklight.advanced_search.form.limit_criteria_heading_html')%></h2>
26
+ <% if search_filter_controls? %>
27
+ <div class="limit-criteria mb-4">
28
+ <h2 class="limit-criteria-heading h3"><%= t('blacklight.advanced_search.form.limit_criteria_heading_html')%></h2>
28
29
 
29
- <div id="advanced_search_facets" class="limit_input">
30
- <div class="advanced-facet-limits panel-group">
31
- <% search_filter_controls.each do |control| %>
32
- <%= control %>
33
- <% end %>
30
+ <div id="advanced_search_facets" class="limit_input row">
31
+ <div class="advanced-facet-limits panel-group col-md-9 offset-md-3">
32
+ <% search_filter_controls.each do |control| %>
33
+ <%= control %>
34
+ <% end %>
35
+ </div>
34
36
  </div>
35
37
  </div>
36
- </div>
38
+ <% end %>
37
39
  </div>
38
40
 
39
- <%= content_tag :h2, t('blacklight.advanced_search.form.sort_label') %>
40
- <div class="form-group row">
41
- <div class="col-sm-offset-3 col-sm-4">
42
- <%= sort_fields_select %>
41
+ <% if sort_fields_select %>
42
+ <div class="form-group row mb-4">
43
+ <%= content_tag :h2, t('blacklight.advanced_search.form.sort_label'), class: 'col-md-3 col-form-label text-md-right' %>
44
+ <div class="col">
45
+ <%= sort_fields_select %>
46
+ </div>
43
47
  </div>
44
- </div>
48
+ <% end %>
45
49
 
46
50
  <div class="form-group row">
47
- <div class="submit-buttons col-sm-offset-3 col-sm-9">
51
+ <div class="submit-buttons col-md-9 offset-md-3">
48
52
  <%= submit_tag t('blacklight.advanced_search.form.search_btn_html'), class: 'btn btn-primary advanced-search-submit', id: "advanced-search-submit" %>
49
53
  <%= button_tag t('blacklight.advanced_search.form.start_over_html'), type: 'reset', class: 'btn btn-link advanced-search-start-over' %>
50
54
  </div>
@@ -31,7 +31,9 @@ module Blacklight
31
31
 
32
32
  def sort_fields_select
33
33
  options = sort_fields.values.map { |field_config| [helpers.sort_field_label(field_config.key), field_config.key] }
34
- select_tag(:sort, options_for_select(options, params[:sort]), class: "form-control sort-select")
34
+ return unless options.any?
35
+
36
+ select_tag(:sort, options_for_select(options, params[:sort]), class: "form-control sort-select w-auto")
35
37
  end
36
38
 
37
39
  private
@@ -41,7 +43,7 @@ module Blacklight
41
43
  search_field_control do
42
44
  fields_for('clause[]', i, include_id: false) do |f|
43
45
  content_tag(:div, class: 'form-group advanced-search-field row') do
44
- f.label(:query, field.display_label('search'), class: "col-sm-3 col-form-label") +
46
+ f.label(:query, field.display_label('search'), class: "col-md-3 col-form-label text-md-right") +
45
47
  content_tag(:div, class: 'col-sm-9') do
46
48
  f.hidden_field(:field, value: field.key) +
47
49
  f.text_field(:query, value: query_for_search_clause(field.key), class: 'form-control')
@@ -62,12 +64,16 @@ module Blacklight
62
64
  end
63
65
 
64
66
  def initialize_constraints
65
- constraint do
66
- params = helpers.search_state.params_for_search.except :page, :f_inclusive, :q, :search_field, :op, :index, :sort
67
+ params = helpers.search_state.params_for_search.except :page, :f_inclusive, :q, :search_field, :op, :index, :sort
68
+
69
+ adv_search_context = helpers.search_state.reset(params)
67
70
 
68
- adv_search_context = helpers.search_state.reset(params)
71
+ constraints_text = render(Blacklight::ConstraintsComponent.for_search_history(search_state: adv_search_context))
69
72
 
70
- Blacklight::ConstraintsComponent.for_search_history(search_state: adv_search_context)
73
+ return if constraints_text.blank?
74
+
75
+ constraint do
76
+ constraints_text
71
77
  end
72
78
  end
73
79
 
@@ -13,7 +13,8 @@
13
13
 
14
14
  <span class="label-and-count">
15
15
  <%= label_tag "f_inclusive_#{@facet_field.key}_#{idx}" do %>
16
- <%= presenter.label %>
16
+ <span class="facet-label"><%= presenter.label %></span>
17
+ <span class="facet-count"><%= t('blacklight.search.facets.count', number: number_with_delimiter(presenter.hits)) %></span>
17
18
  <% end %>
18
19
  <span>
19
20
  </li>
@@ -17,6 +17,7 @@
17
17
  </updateHandler>
18
18
 
19
19
  <!-- solr lib dirs -->
20
+ <lib dir="${solr.install.dir:../../../..}/contrib/modules/lib" />
20
21
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
21
22
  <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
22
23
 
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: 7.26.0
4
+ version: 7.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -17,7 +17,7 @@ authors:
17
17
  autorequire:
18
18
  bindir: exe
19
19
  cert_chain: []
20
- date: 2022-06-20 00:00:00.000000000 Z
20
+ date: 2022-06-27 00:00:00.000000000 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  name: rails