blacklight_advanced_search 6.4.1 → 8.0.0.alpha2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ruby.yml +125 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop.yml +4 -2
  5. data/.rubocop_todo.yml +6 -374
  6. data/Gemfile +3 -8
  7. data/README.md +46 -60
  8. data/Rakefile +2 -2
  9. data/VERSION +1 -1
  10. data/blacklight_advanced_search.gemspec +6 -7
  11. data/config/routes.rb +1 -1
  12. data/lib/blacklight_advanced_search/advanced_query_parser.rb +24 -38
  13. data/lib/blacklight_advanced_search/advanced_search_builder.rb +27 -24
  14. data/lib/blacklight_advanced_search/controller.rb +15 -16
  15. data/lib/blacklight_advanced_search/engine.rb +0 -1
  16. data/lib/blacklight_advanced_search/redirect_legacy_params_filter.rb +24 -7
  17. data/lib/blacklight_advanced_search.rb +0 -4
  18. data/lib/generators/blacklight_advanced_search/install_generator.rb +3 -37
  19. data/lib/parsing_nesting/grammar.rb +0 -12
  20. data/solr/conf/schema.xml +326 -573
  21. data/solr/conf/solrconfig.xml +80 -294
  22. data/spec/features/blacklight_advanced_search_form_spec.rb +13 -18
  23. data/spec/lib/advanced_search_builder_spec.rb +11 -9
  24. data/spec/spec_helper.rb +46 -14
  25. data/spec/test_app_templates/app/controllers/catalog_controller.rb +5 -7
  26. metadata +41 -62
  27. data/.travis.yml +0 -21
  28. data/app/assets/javascripts/blacklight_advanced_search.js +0 -5
  29. data/app/assets/stylesheets/blacklight_advanced_search/advanced_results.css +0 -21
  30. data/app/assets/stylesheets/blacklight_advanced_search/blacklight_advanced_search_styles.css.scss +0 -58
  31. data/app/assets/stylesheets/blacklight_advanced_search.css +0 -6
  32. data/app/controllers/advanced_controller.rb +0 -25
  33. data/app/controllers/blacklight_advanced_search/advanced_controller.rb +0 -25
  34. data/app/helpers/advanced_helper.rb +0 -4
  35. data/app/helpers/blacklight_advanced_search/advanced_helper_behavior.rb +0 -57
  36. data/app/views/advanced/_advanced_search_facets.html.erb +0 -16
  37. data/app/views/advanced/_advanced_search_facets_as_select.html.erb +0 -30
  38. data/app/views/advanced/_advanced_search_fields.html.erb +0 -8
  39. data/app/views/advanced/_advanced_search_form.html.erb +0 -43
  40. data/app/views/advanced/_advanced_search_help.html.erb +0 -24
  41. data/app/views/advanced/_advanced_search_submit_btns.html.erb +0 -12
  42. data/app/views/advanced/_facet_limit.html.erb +0 -15
  43. data/app/views/advanced/index.html.erb +0 -21
  44. data/app/views/blacklight_advanced_search/_facet_limit.html.erb +0 -16
  45. data/config/jetty.yml +0 -4
  46. data/config/locales/blacklight_advanced_search.en.yml +0 -12
  47. data/lib/blacklight_advanced_search/catalog_helper_override.rb +0 -30
  48. data/lib/blacklight_advanced_search/filter_parser.rb +0 -11
  49. data/lib/blacklight_advanced_search/parsing_nesting_parser.rb +0 -15
  50. data/lib/blacklight_advanced_search/render_constraints_override.rb +0 -136
  51. data/lib/generators/blacklight_advanced_search/assets_generator.rb +0 -53
  52. data/lib/generators/blacklight_advanced_search/templates/advanced_controller.rb +0 -56
  53. data/lib/generators/blacklight_advanced_search/templates/saved_searches_controller.rb +0 -6
  54. data/lib/generators/blacklight_advanced_search/templates/search_history_controller.rb +0 -6
  55. data/solr/sample_solr_documents.yml +0 -2692
  56. data/spec/helpers/advanced_helper_spec.rb +0 -13
  57. data/spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb +0 -39
  58. data/spec/lib/filter_parser_spec.rb +0 -22
metadata CHANGED
@@ -1,36 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight_advanced_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.4.1
4
+ version: 8.0.0.alpha2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
8
8
  - Chris Beer
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-09-11 00:00:00.000000000 Z
12
+ date: 2022-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blacklight
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '6.0'
21
18
  - - ">="
22
19
  - !ruby/object:Gem::Version
23
- version: 6.0.1
20
+ version: '7.15'
21
+ - - "<"
22
+ - !ruby/object:Gem::Version
23
+ version: '9'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - "~>"
29
- - !ruby/object:Gem::Version
30
- version: '6.0'
31
28
  - - ">="
32
29
  - !ruby/object:Gem::Version
33
- version: 6.0.1
30
+ version: '7.15'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '9'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: parslet
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -65,14 +65,14 @@ dependencies:
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.0'
68
+ version: '5.0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '5.0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: capybara
78
78
  requirement: !ruby/object:Gem::Requirement
@@ -91,30 +91,30 @@ dependencies:
91
91
  name: solr_wrapper
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '0.14'
96
+ version: '0'
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: '0.14'
103
+ version: '0'
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: engine_cart
106
106
  requirement: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.10'
110
+ version: '2.0'
111
111
  type: :development
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.10'
117
+ version: '2.0'
118
118
  - !ruby/object:Gem::Dependency
119
119
  name: rubocop
120
120
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +129,20 @@ dependencies:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0'
132
+ - !ruby/object:Gem::Dependency
133
+ name: rubocop-rails
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ type: :development
140
+ prerelease: false
141
+ version_requirements: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
132
146
  - !ruby/object:Gem::Dependency
133
147
  name: rubocop-rspec
134
148
  requirement: !ruby/object:Gem::Requirement
@@ -157,62 +171,35 @@ dependencies:
157
171
  - - ">="
158
172
  - !ruby/object:Gem::Version
159
173
  version: '0'
160
- description:
174
+ description:
161
175
  email:
162
176
  - blacklight-development@googlegroups.com
163
177
  executables: []
164
178
  extensions: []
165
179
  extra_rdoc_files: []
166
180
  files:
181
+ - ".github/workflows/ruby.yml"
167
182
  - ".gitignore"
168
183
  - ".rspec"
169
184
  - ".rubocop.yml"
170
185
  - ".rubocop_todo.yml"
171
186
  - ".solr_wrapper.yml"
172
- - ".travis.yml"
173
187
  - Gemfile
174
188
  - LICENSE
175
189
  - README.md
176
190
  - Rakefile
177
191
  - VERSION
178
- - app/assets/javascripts/blacklight_advanced_search.js
179
- - app/assets/stylesheets/blacklight_advanced_search.css
180
- - app/assets/stylesheets/blacklight_advanced_search/advanced_results.css
181
- - app/assets/stylesheets/blacklight_advanced_search/blacklight_advanced_search_styles.css.scss
182
- - app/controllers/advanced_controller.rb
183
- - app/controllers/blacklight_advanced_search/advanced_controller.rb
184
- - app/helpers/advanced_helper.rb
185
- - app/helpers/blacklight_advanced_search/advanced_helper_behavior.rb
186
- - app/views/advanced/_advanced_search_facets.html.erb
187
- - app/views/advanced/_advanced_search_facets_as_select.html.erb
188
- - app/views/advanced/_advanced_search_fields.html.erb
189
- - app/views/advanced/_advanced_search_form.html.erb
190
- - app/views/advanced/_advanced_search_help.html.erb
191
- - app/views/advanced/_advanced_search_submit_btns.html.erb
192
- - app/views/advanced/_facet_limit.html.erb
193
- - app/views/advanced/index.html.erb
194
- - app/views/blacklight_advanced_search/_facet_limit.html.erb
195
192
  - blacklight_advanced_search.gemspec
196
- - config/jetty.yml
197
- - config/locales/blacklight_advanced_search.en.yml
198
193
  - config/routes.rb
199
194
  - lib/blacklight_advanced_search.rb
200
195
  - lib/blacklight_advanced_search/advanced_query_parser.rb
201
196
  - lib/blacklight_advanced_search/advanced_search_builder.rb
202
- - lib/blacklight_advanced_search/catalog_helper_override.rb
203
197
  - lib/blacklight_advanced_search/controller.rb
204
198
  - lib/blacklight_advanced_search/engine.rb
205
- - lib/blacklight_advanced_search/filter_parser.rb
206
- - lib/blacklight_advanced_search/parsing_nesting_parser.rb
207
199
  - lib/blacklight_advanced_search/redirect_legacy_params_filter.rb
208
- - lib/blacklight_advanced_search/render_constraints_override.rb
209
200
  - lib/blacklight_advanced_search/version.rb
210
- - lib/generators/blacklight_advanced_search/assets_generator.rb
211
201
  - lib/generators/blacklight_advanced_search/blacklight_advanced_search_generator.rb
212
202
  - lib/generators/blacklight_advanced_search/install_generator.rb
213
- - lib/generators/blacklight_advanced_search/templates/advanced_controller.rb
214
- - lib/generators/blacklight_advanced_search/templates/saved_searches_controller.rb
215
- - lib/generators/blacklight_advanced_search/templates/search_history_controller.rb
216
203
  - lib/parsing_nesting/Readme.rdoc
217
204
  - lib/parsing_nesting/grammar.rb
218
205
  - lib/parsing_nesting/tree.rb
@@ -232,14 +219,10 @@ files:
232
219
  - solr/conf/xslt/example_atom.xsl
233
220
  - solr/conf/xslt/example_rss.xsl
234
221
  - solr/conf/xslt/luke.xsl
235
- - solr/sample_solr_documents.yml
236
222
  - spec/features/blacklight_advanced_search_form_spec.rb
237
- - spec/helpers/advanced_helper_spec.rb
238
223
  - spec/integration/blacklight_stub_spec.rb
239
224
  - spec/lib/advanced_search_builder_spec.rb
240
- - spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb
241
225
  - spec/lib/deep_merge_spec.rb
242
- - spec/lib/filter_parser_spec.rb
243
226
  - spec/parsing_nesting/build_tree_spec.rb
244
227
  - spec/parsing_nesting/consuming_spec.rb
245
228
  - spec/parsing_nesting/to_solr_spec.rb
@@ -249,9 +232,9 @@ files:
249
232
  - spec/test_app_templates/lib/generators/test_app_generator.rb
250
233
  homepage: http://projectblacklight.org/
251
234
  licenses:
252
- - Apache 2.0
235
+ - Apache-2.0
253
236
  metadata: {}
254
- post_install_message:
237
+ post_install_message:
255
238
  rdoc_options: []
256
239
  require_paths:
257
240
  - lib
@@ -262,23 +245,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
262
245
  version: '0'
263
246
  required_rubygems_version: !ruby/object:Gem::Requirement
264
247
  requirements:
265
- - - ">="
248
+ - - ">"
266
249
  - !ruby/object:Gem::Version
267
- version: '0'
250
+ version: 1.3.1
268
251
  requirements: []
269
- rubyforge_project: blacklight
270
- rubygems_version: 2.6.11
271
- signing_key:
252
+ rubygems_version: 3.3.7
253
+ signing_key:
272
254
  specification_version: 4
273
255
  summary: Blacklight Advanced Search plugin
274
256
  test_files:
275
257
  - spec/features/blacklight_advanced_search_form_spec.rb
276
- - spec/helpers/advanced_helper_spec.rb
277
258
  - spec/integration/blacklight_stub_spec.rb
278
259
  - spec/lib/advanced_search_builder_spec.rb
279
- - spec/lib/blacklight_advanced_search/render_constraints_override_spec.rb
280
260
  - spec/lib/deep_merge_spec.rb
281
- - spec/lib/filter_parser_spec.rb
282
261
  - spec/parsing_nesting/build_tree_spec.rb
283
262
  - spec/parsing_nesting/consuming_spec.rb
284
263
  - spec/parsing_nesting/to_solr_spec.rb
data/.travis.yml DELETED
@@ -1,21 +0,0 @@
1
- notifications:
2
- email: false
3
-
4
- rvm:
5
- - 2.4.1
6
- - 2.3.3
7
-
8
- matrix:
9
- include:
10
- - rvm: 2.3.3
11
- env: "RAILS_VERSION=5.0.3"
12
-
13
- notifications:
14
- irc: "irc.freenode.org#blacklight"
15
- email:
16
- - blacklight-commits@googlegroups.com
17
- env:
18
- global:
19
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
20
-
21
- jdk: oraclejdk8
@@ -1,5 +0,0 @@
1
- // Yeah, this is empty right now. It used to have stuff.
2
- // We're leaving it here, so if in future versions of advanced_search it has
3
- // stuff, existing apps will already be linked in.
4
-
5
- //Is this a bad idea, it should just be removed? Not sure.
@@ -1,21 +0,0 @@
1
- /* Classes used for styling our custom components on the search results page */
2
-
3
- /* constraints */
4
-
5
- .inclusive_or.appliedFilter {
6
- /* kinda lame, but we have to group the 'any' criteria somehow, as they are still
7
- 'and'd with facet and other criteria. It's got a bootstrap 'well' class
8
- on it already. */
9
- display: inline-block;
10
- padding: 4px 8px;
11
- margin: 0;
12
- }
13
-
14
- .inclusive_or .operator {
15
- margin-right: 1em;
16
- }
17
-
18
-
19
- #appliedParams .inclusive_or .operator {
20
- font-weight: 500;
21
- }
@@ -1,58 +0,0 @@
1
-
2
- /* Random styles */
3
-
4
-
5
-
6
- form.advanced .adv_facet_selections {
7
- color:green;
8
- font-size: 80%;
9
- display: block;
10
- margin-top: 0.25em;
11
- }
12
-
13
- .advanced-search-form {
14
- .query-criteria-heading {
15
- // seems neccesary to get select menu to align okay, not sure why.
16
- vertical-align: bottom;
17
- margin-top: 0;
18
- }
19
-
20
-
21
- select.form-control.sort-select {
22
- width: auto; // why does Bootstrap try to insist on explicit width? dunno.
23
- display: inline-block;
24
- }
25
-
26
- .query-criteria, .limit-criteria, .sort-submit-buttons {
27
- margin-bottom: 4em;
28
- }
29
-
30
- }
31
-
32
- .blacklight-advanced-facet-select {
33
- // have to do some terribly complicated things with display:table and NESTED
34
- // tables to add our checkbox and <label> element and still use display-table
35
- // to align everything. sorry!
36
- .facet-checkbox, .label-and-count {
37
- display: table-cell;
38
- }
39
-
40
- .label-and-count {
41
- width: 100%;
42
- padding-left: 1em;
43
- }
44
-
45
-
46
- label {
47
- // a nested table, with existing from BL text and count as display:table-cell
48
- // already. the "display:table-row" element is implicit and will be added
49
- // by browser as a psuedo-element inside this label.
50
- display:table;
51
- width: 100%;
52
- font-weight: normal;
53
-
54
- margin: 0;
55
- padding: 0;
56
- }
57
- }
58
-
@@ -1,6 +0,0 @@
1
- /* Master manifest file for engine, so local app can require
2
- * this one file, but get all our files -- and local app
3
- * require does not need to change if we change file list.
4
- *
5
- *= require_tree './blacklight_advanced_search'
6
- */
@@ -1,25 +0,0 @@
1
- # This class should NOT be generated into local app. If you generated
2
- # into local app in a previous version, remove that, config is done
3
- # in CatalogController now.
4
- #
5
- # Note that this NEEDS to sub-class CatalogController, so it gets any
6
- # custom searching behavior you've added, and uses when fetching facets
7
- # etc. It does that right now because BlacklightAdvancedSearch::AdvancedController
8
- # is hard-coded to subclass CatalogController.
9
- #
10
- # TODO:
11
- # This seperate controller may not need to exist at all -- it just exists
12
- # to provide the advanced search form (and fetching of facets to display
13
- # on that form). Instead, mix-in a new "advanced" action to CatalogController?
14
- # (Make a backwards compat route though).
15
- #
16
- # Alternately, if this does exist as a seperate controller, it should
17
- # _directly_ < CatalogController, and BlacklightAdvancedSearch::AdvancedController
18
- # should be a mix-in that does not assume parent controller. Then, if you have
19
- # multi-controllers, you just need to create new `AdvancedControllerForX < XController`
20
- # which still mixes in BlacklightAdvancedSearch::AdvancedController. There
21
- # are probably some other edges that need to be smoothed for that approach, but
22
- # that'd be the direction.
23
- class AdvancedController < BlacklightAdvancedSearch::AdvancedController
24
- copy_blacklight_config_from(CatalogController)
25
- end
@@ -1,25 +0,0 @@
1
- # Need to sub-class CatalogController so we get all other plugins behavior
2
- # for our own "inside a search context" lookup of facets.
3
- class BlacklightAdvancedSearch::AdvancedController < CatalogController
4
- def index
5
- @response = get_advanced_search_facets unless request.method == :post
6
- end
7
-
8
- protected
9
-
10
- # Override to use the engine routes
11
- def search_action_url(options = {})
12
- blacklight_advanced_search_engine.url_for(options.merge(action: 'index'))
13
- end
14
-
15
- def get_advanced_search_facets
16
- # We want to find the facets available for the current search, but:
17
- # * IGNORING current query (add in facets_for_advanced_search_form filter)
18
- # * IGNORING current advanced search facets (remove add_advanced_search_to_solr filter)
19
- response, _ = search_results(params) do |search_builder|
20
- search_builder.except(:add_advanced_search_to_solr).append(:facets_for_advanced_search_form)
21
- end
22
-
23
- response
24
- end
25
- end
@@ -1,4 +0,0 @@
1
- # Helper methods for the advanced search form
2
- module AdvancedHelper
3
- include BlacklightAdvancedSearch::AdvancedHelperBehavior
4
- end
@@ -1,57 +0,0 @@
1
- module BlacklightAdvancedSearch
2
- # implementation for AdvancedHelper
3
- module AdvancedHelperBehavior
4
- # Fill in default from existing search, if present
5
- # -- if you are using same search fields for basic
6
- # search and advanced, will even fill in properly if existing
7
- # search used basic search on same field present in advanced.
8
- def label_tag_default_for(key)
9
- if !params[key].blank?
10
- return params[key]
11
- elsif params["search_field"] == key
12
- return params["q"]
13
- else
14
- return nil
15
- end
16
- end
17
-
18
- # Is facet value in adv facet search results?
19
- def facet_value_checked?(field, value)
20
- BlacklightAdvancedSearch::QueryParser.new(params, blacklight_config).filters_include_value?(field, value)
21
- end
22
-
23
- def select_menu_for_field_operator
24
- options = {
25
- t('blacklight_advanced_search.all') => 'AND',
26
- t('blacklight_advanced_search.any') => 'OR'
27
- }.sort
28
-
29
- select_tag(:op, options_for_select(options, params[:op]), class: 'input-small')
30
- end
31
-
32
- # Current params without fields that will be over-written by adv. search,
33
- # or other fields we don't want.
34
- def advanced_search_context
35
- my_params = search_state.params_for_search.except :page, :f_inclusive, :q, :search_field, :op, :index, :sort
36
-
37
- my_params.except!(*search_fields_for_advanced_search.map { |_key, field_def| field_def[:key] })
38
- end
39
-
40
- def search_fields_for_advanced_search
41
- @search_fields_for_advanced_search ||= begin
42
- blacklight_config.search_fields.select { |_k, v| v.include_in_advanced_search || v.include_in_advanced_search.nil? }
43
- end
44
- end
45
-
46
- def facet_field_names_for_advanced_search
47
- @facet_field_names_for_advanced_search ||= begin
48
- blacklight_config.facet_fields.select { |_k, v| v.include_in_advanced_search || v.include_in_advanced_search.nil? }.values.map(&:field)
49
- end
50
- end
51
-
52
- # Use configured facet partial name for facet or fallback on 'catalog/facet_limit'
53
- def advanced_search_facet_partial_name(display_facet)
54
- facet_configuration_for_field(display_facet.name).try(:partial) || "catalog/facet_limit"
55
- end
56
- end
57
- end
@@ -1,16 +0,0 @@
1
- <%# used to render facets with checkboxes on advanced search form,
2
- we pretty much just use the built-in blacklight render_facet_partials
3
- helper.
4
-
5
- But we've provided a local override of the _facet_limit
6
- partial in our own `views/advanced/_facet_limit.html.erb`,
7
- that is written to include checkboxes for form selection.
8
-
9
- This is the default display of facets, but you can
10
- also choose to use _advanced_search_facets_as_select,
11
- for a chosen.js-compatible multi-select.
12
- %>
13
-
14
- <div class="advanced-facet-limits panel-group">
15
- <%= render_facet_partials facet_field_names_for_advanced_search %>
16
- </div>
@@ -1,30 +0,0 @@
1
- <%# alternate version of facets on form that renders using multi-select.
2
- Has to copy and paste more code from blacklight than default, making
3
- it somewhat more fragile.
4
-
5
- Logic taken from facets_helper_behavior.rb, #render_facet_partials and
6
- #render_facet_limit.
7
- %>
8
-
9
- <% facets_from_request(facet_field_names).each do |display_facet| %>
10
- <% if should_render_facet?(display_facet) %>
11
- <div class="form-group advanced-search-facet">
12
- <%= label_tag display_facet.name.parameterize, :class => "col-sm-3 control-label" do %>
13
- <%= facet_field_label(display_facet.name) %>
14
- <% end %>
15
-
16
- <div class="col-sm-9">
17
- <%= content_tag(:select, :multiple => true,
18
- :name => "f_inclusive[#{display_facet.name}][]",
19
- :id => display_facet.name.parameterize,
20
- :class => "form-control advanced-search-facet-select") do %>
21
- <% display_facet.items.each do |facet_item| %>
22
- <%= content_tag :option, :value => facet_item.value, :selected => facet_value_checked?(display_facet.name, facet_item.value) do %>
23
- <%= facet_item.label %>&nbsp;&nbsp;(<%= number_with_delimiter facet_item.hits %>)
24
- <% end %>
25
- <% end %>
26
- <% end %>
27
- </div>
28
- </div>
29
- <% end %>
30
- <% end %>
@@ -1,8 +0,0 @@
1
- <%- search_fields_for_advanced_search.each do |key, field_def| -%>
2
- <div class="form-group advanced-search-field">
3
- <%= label_tag key, "#{field_def.label }", :class => "col-sm-3 control-label" %>
4
- <div class="col-sm-9">
5
- <%= text_field_tag key, label_tag_default_for(key), :class => 'form-control' %>
6
- </div>
7
- </div>
8
- <%- end -%>
@@ -1,43 +0,0 @@
1
- <% unless (search_context_str = render_search_to_s( advanced_search_context)).blank? %>
2
- <div class="constraints well search_history">
3
- <h4><%= t 'blacklight_advanced_search.form.search_context' %></h4>
4
- <%= search_context_str %>
5
- </div>
6
- <% end %>
7
-
8
- <%= form_tag search_catalog_path, :class => 'advanced form-horizontal', :method => :get do %>
9
-
10
- <%= render_hash_as_hidden_fields(advanced_search_context) %>
11
-
12
- <div class="input-criteria">
13
-
14
- <div class="query-criteria">
15
- <h3 class="query-criteria-heading">
16
- <%= t('blacklight_advanced_search.form.query_criteria_heading_html', :select_menu => select_menu_for_field_operator ) %>
17
- </h3>
18
-
19
- <div id="advanced_search">
20
- <%= render 'advanced/advanced_search_fields' %>
21
- </div>
22
- </div>
23
-
24
- <div class="limit-criteria">
25
- <h3 class="limit-criteria-heading"><%= t('blacklight_advanced_search.form.limit_criteria_heading_html')%></h3>
26
-
27
- <div id="advanced_search_facets" class="limit_input">
28
- <% if blacklight_config.try(:advanced_search).try {|h| h[:form_facet_partial] } %>
29
- <%= render blacklight_config.advanced_search[:form_facet_partial] %>
30
- <% else %>
31
- <%= render 'advanced_search_facets' %>
32
- <% end %>
33
- </div>
34
- </div>
35
- </div>
36
-
37
- <hr>
38
-
39
- <div class="sort-submit-buttons clearfix">
40
- <%= render 'advanced_search_submit_btns' %>
41
- </div>
42
-
43
- <% end %>
@@ -1,24 +0,0 @@
1
- <div class='panel panel-default'>
2
- <div class="panel-heading">Search tips</div>
3
- <div class="panel-body">
4
- <ul class="advanced-help">
5
- <li>Select "match all" to require all fields.
6
- </li>
7
-
8
- <li>Select "match any" to find at least one field.
9
- </li>
10
-
11
- <li>Combine keywords and attributes to find specific items.
12
- </li>
13
-
14
- <li>Use quotation marks to search as a phrase.
15
-
16
- <li>Use "+" before a term to make it required. (Otherwise results matching only some of your terms may be included).</li>
17
-
18
- <li>Use "-" before a word or phrase to exclude.
19
-
20
- <li>Use "OR", "AND", and "NOT" to create complex boolean logic. You can use parentheses in your complex expressions. </li>
21
- <li>Truncation and wildcards are not supported - word-stemming is done automatically.</li>
22
- </ul>
23
- </div>
24
- </div>
@@ -1,12 +0,0 @@
1
- <div class="sort-buttons pull-left">
2
- <%= label_tag(:sort, t('blacklight_advanced_search.form.sort_label'), :class => "control-label") %>
3
-
4
- <%= select_tag(:sort, options_for_select(sort_fields, h(current_sort_field && current_sort_field.key)), :class => "form-control sort-select") %>
5
- <%= hidden_field_tag(:search_field, blacklight_config.advanced_search[:url_key]) %>
6
- </div>
7
-
8
- <div class="submit-buttons pull-right">
9
- <%= link_to t('blacklight_advanced_search.form.start_over'), blacklight_advanced_search_engine.advanced_search_path, :class =>"btn btn-default advanced-search-start-over" %>
10
-
11
- <%= submit_tag t('blacklight_advanced_search.form.search_btn'), :class=>'btn btn-primary advanced-search-submit', :id => "advanced-search-submit" %>
12
- </div>
@@ -1,15 +0,0 @@
1
- <ul class="facet-values list-unstyled blacklight-advanced-facet-select">
2
- <% display_facet.items.each do |item| -%>
3
- <li>
4
- <span class="facet-checkbox">
5
- <%= check_box_tag "f_inclusive[#{solr_field}][]", item.value.to_sym, facet_value_checked?(solr_field, item.value), :id => "f_inclusive_#{solr_field}_#{item.value.parameterize}"%>
6
- </span>
7
-
8
- <span class="label-and-count">
9
- <%= label_tag "f_inclusive_#{solr_field}_#{item.value.parameterize}" do %>
10
- <%= render_facet_value(solr_field, item, :suppress_link => true) %>
11
- <% end %>
12
- <span>
13
- </li>
14
- <% end -%>
15
- </ul>
@@ -1,21 +0,0 @@
1
- <% @page_title = "More Search Options - #{application_name}" %>
2
-
3
- <div class="advanced-search-form col-sm-12">
4
-
5
- <h1 class="advanced page-header">
6
- <%= t('blacklight_advanced_search.form.title') %>
7
- <%= link_to t('blacklight_advanced_search.form.start_over'), blacklight_advanced_search_engine.advanced_search_path, :class =>"btn btn-default pull-right advanced-search-start-over" %>
8
- </h1>
9
-
10
- <div class="row">
11
-
12
- <div class="col-md-8">
13
- <%= render 'advanced_search_form' %>
14
- </div>
15
- <div class="col-md-4">
16
- <%= render "advanced_search_help" %>
17
- </div>
18
-
19
- </div>
20
-
21
- </div>
@@ -1,16 +0,0 @@
1
- <div class="advanced_facet_limit">
2
- <div class="inclusive_or well">
3
- <h4>Any of:</h4>
4
- <ul class="list-unstyled facet-values">
5
- <% advanced_query.filters[solr_field].each do |value| %>
6
- <li>
7
- <span class="selected"><%= h(value) %></span>
8
- <%= link_to(remove_advanced_facet_param(solr_field, value, params), :class => "remove") do %>
9
- <span class="glyphicon glyphicon-remove"></span><span class="sr-only">[remove]</span>
10
- <% end %>
11
- </li>
12
- <% end %>
13
- </ul>
14
- </div>
15
- <%= render_facet_limit display_facet, :layout => nil, :partial => advanced_search_facet_partial_name(display_facet) %>
16
- </div>