blacklight 4.9.0 → 5.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -1
  3. data/.travis.yml +22 -12
  4. data/Gemfile +3 -40
  5. data/LICENSE +1 -2
  6. data/README.md +1 -2
  7. data/Rakefile +0 -4
  8. data/VERSION +1 -1
  9. data/app/assets/images/blacklight/logo.png +0 -0
  10. data/app/assets/javascripts/blacklight/ajax_modal.js +190 -0
  11. data/app/assets/javascripts/blacklight/blacklight.js +7 -17
  12. data/app/assets/javascripts/blacklight/checkbox_submit.js +1 -1
  13. data/app/assets/stylesheets/blacklight/{_blacklight_base.scss → _blacklight_base.css.scss} +0 -21
  14. data/app/assets/stylesheets/blacklight/_bookmark.css.scss +4 -0
  15. data/app/assets/stylesheets/blacklight/_catalog.css.scss +192 -0
  16. data/app/assets/stylesheets/blacklight/_facets.css.scss +141 -0
  17. data/app/assets/stylesheets/blacklight/{_group.scss → _group.css.scss} +1 -1
  18. data/app/assets/stylesheets/blacklight/_header.css.scss +44 -0
  19. data/app/assets/stylesheets/blacklight/_layout.css.scss +5 -0
  20. data/app/assets/stylesheets/blacklight/{_modal.scss → _modal.css.scss} +7 -7
  21. data/app/assets/stylesheets/blacklight/_search_history.css.scss +20 -0
  22. data/app/assets/stylesheets/blacklight/{blacklight.scss → blacklight.css.scss} +0 -0
  23. data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +14 -0
  24. data/app/controllers/bookmarks_controller.rb +0 -4
  25. data/app/controllers/feedback_controller.rb +0 -4
  26. data/app/helpers/blacklight/blacklight_helper_behavior.rb +45 -155
  27. data/app/helpers/blacklight/catalog_helper_behavior.rb +8 -41
  28. data/app/helpers/blacklight/facets_helper_behavior.rb +20 -43
  29. data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +2 -9
  30. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +9 -14
  31. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +6 -6
  32. data/app/views/_flash_msg.html.erb +9 -2
  33. data/app/views/_user_util_links.html.erb +29 -15
  34. data/app/views/bookmarks/_tools.html.erb +4 -7
  35. data/app/views/bookmarks/index.html.erb +3 -2
  36. data/app/views/catalog/_citation.html.erb +1 -1
  37. data/app/views/catalog/_constraints.html.erb +1 -1
  38. data/app/views/catalog/_constraints_element.html.erb +12 -8
  39. data/app/views/catalog/_did_you_mean.html.erb +2 -2
  40. data/app/views/catalog/_document_header.html.erb +3 -3
  41. data/app/views/catalog/_email_form.html.erb +10 -10
  42. data/app/views/catalog/_facet_layout.html.erb +11 -3
  43. data/app/views/catalog/_facet_limit.html.erb +7 -7
  44. data/app/views/catalog/_facet_pagination.html.erb +8 -7
  45. data/app/views/catalog/_facet_pivot.html.erb +3 -1
  46. data/app/views/catalog/_facets.html.erb +12 -9
  47. data/app/views/catalog/_paginate_compact.html.erb +1 -7
  48. data/app/views/catalog/_per_page_widget.html.erb +5 -8
  49. data/app/views/catalog/_previous_next_doc.html.erb +11 -9
  50. data/app/views/catalog/_refworks_form.html.erb +3 -4
  51. data/app/views/catalog/_results_pagination.html.erb +1 -1
  52. data/app/views/catalog/_search_form.html.erb +16 -14
  53. data/app/views/catalog/_show_sidebar.html.erb +7 -9
  54. data/app/views/catalog/_show_tools.html.erb +13 -7
  55. data/app/views/catalog/_sms_form.html.erb +8 -8
  56. data/app/views/catalog/_sort_and_per_page.html.erb +4 -6
  57. data/app/views/catalog/_sort_widget.html.erb +5 -6
  58. data/app/views/catalog/email.html.erb +1 -1
  59. data/app/views/catalog/facet.html.erb +2 -8
  60. data/app/views/catalog/index.html.erb +11 -6
  61. data/app/views/catalog/show.html.erb +5 -5
  62. data/app/views/catalog/sms.html.erb +1 -1
  63. data/app/views/catalog/sms_sent.html.erb +1 -1
  64. data/app/views/feedback/complete.html.erb +2 -2
  65. data/app/views/feedback/show.html.erb +1 -1
  66. data/app/views/kaminari/blacklight/_paginator.html.erb +1 -1
  67. data/app/views/kaminari/blacklight_compact/_paginator.html.erb +25 -5
  68. data/app/views/layouts/blacklight.html.erb +23 -23
  69. data/app/views/saved_searches/index.html.erb +2 -2
  70. data/app/views/search_history/index.html.erb +5 -7
  71. data/app/views/shared/_header_navbar.html.erb +23 -23
  72. data/blacklight.gemspec +10 -13
  73. data/config/locales/blacklight.en.yml +1 -12
  74. data/config/locales/blacklight.fr.yml +1 -12
  75. data/gemfiles/rails3.gemfile +21 -0
  76. data/gemfiles/rails4.gemfile +20 -0
  77. data/lib/blacklight.rb +0 -8
  78. data/lib/blacklight/base.rb +0 -2
  79. data/lib/blacklight/catalog.rb +6 -32
  80. data/lib/blacklight/catalog/search_context.rb +8 -48
  81. data/lib/blacklight/configurable.rb +2 -1
  82. data/lib/blacklight/configuration.rb +1 -2
  83. data/lib/blacklight/configuration/facet_field.rb +0 -2
  84. data/lib/blacklight/engine.rb +3 -3
  85. data/lib/blacklight/legacy_controller_methods.rb +1 -64
  86. data/lib/blacklight/rails/routes.rb +17 -0
  87. data/lib/blacklight/routes.rb +46 -40
  88. data/lib/blacklight/solr.rb +1 -0
  89. data/lib/blacklight/solr/document.rb +21 -42
  90. data/lib/blacklight/solr/facet_paginator.rb +30 -54
  91. data/lib/blacklight/solr/request.rb +45 -0
  92. data/lib/blacklight/solr_helper.rb +16 -53
  93. data/lib/blacklight/solr_response.rb +0 -6
  94. data/lib/blacklight/user.rb +2 -7
  95. data/lib/blacklight/utils.rb +1 -9
  96. data/lib/generators/blacklight/assets_generator.rb +0 -14
  97. data/lib/generators/blacklight/blacklight_generator.rb +17 -14
  98. data/lib/generators/blacklight/templates/blacklight.css.scss +3 -0
  99. data/lib/generators/blacklight/templates/catalog_controller.rb +4 -1
  100. data/lib/railties/blacklight.rake +3 -1
  101. data/solr/sample_solr_documents.yml +641 -0
  102. data/spec/controllers/application_controller_spec.rb +5 -21
  103. data/spec/controllers/bookmarks_controller_spec.rb +11 -11
  104. data/spec/controllers/catalog_controller_spec.rb +122 -119
  105. data/spec/controllers/search_history_controller_spec.rb +8 -8
  106. data/spec/features/alternate_controller_spec.rb +5 -5
  107. data/spec/features/facets_spec.rb +9 -0
  108. data/spec/features/record_view_spec.rb +1 -1
  109. data/spec/features/search_filters_spec.rb +97 -41
  110. data/spec/features/search_results_spec.rb +14 -17
  111. data/spec/features/search_sort_spec.rb +1 -1
  112. data/spec/helpers/blacklight_helper_spec.rb +170 -285
  113. data/spec/helpers/catalog_helper_spec.rb +57 -96
  114. data/spec/helpers/facets_helper_spec.rb +130 -152
  115. data/spec/helpers/hash_as_hidden_fields_spec.rb +9 -15
  116. data/spec/helpers/render_constraints_helper_spec.rb +5 -5
  117. data/spec/helpers/search_history_constraints_helper_spec.rb +21 -21
  118. data/spec/lib/blacklight/routes_spec.rb +25 -0
  119. data/spec/lib/blacklight/solr/request_spec.rb +37 -0
  120. data/spec/lib/blacklight/solr_response/group_response_spec.rb +2 -2
  121. data/spec/lib/blacklight_configurable_spec.rb +16 -16
  122. data/spec/lib/blacklight_configuration_spec.rb +132 -132
  123. data/spec/lib/blacklight_email_spec.rb +4 -4
  124. data/spec/lib/blacklight_sms_spec.rb +4 -4
  125. data/spec/lib/blacklight_solr_document_dublin_core_spec.rb +6 -6
  126. data/spec/lib/blacklight_solr_document_more_like_this_spec.rb +4 -4
  127. data/spec/lib/blacklight_solr_document_spec.rb +36 -36
  128. data/spec/lib/blacklight_solr_response_spec.rb +43 -48
  129. data/spec/lib/blacklight_spec.rb +6 -14
  130. data/spec/lib/blacklight_user_spec.rb +5 -9
  131. data/spec/lib/facet_paginator_spec.rb +59 -51
  132. data/spec/lib/search_fields_spec.rb +13 -13
  133. data/spec/lib/solr_helper_spec.rb +258 -304
  134. data/spec/lib/tasks/blacklight_task_spec.rb +1 -1
  135. data/spec/lib/utils_spec.rb +16 -46
  136. data/spec/models/bookmark_spec.rb +6 -7
  137. data/spec/models/record_mailer_spec.rb +16 -16
  138. data/spec/models/search_spec.rb +8 -8
  139. data/spec/models/solr_document_spec.rb +6 -77
  140. data/spec/routing/catalog_routing_spec.rb +16 -10
  141. data/spec/spec_helper.rb +7 -7
  142. data/spec/support/assert_difference.rb +2 -2
  143. data/spec/support/features.rb +0 -11
  144. data/spec/support/features/session_helpers.rb +3 -3
  145. data/spec/support/include_text.rb +2 -2
  146. data/spec/test_app_templates/Gemfile.extra +10 -2
  147. data/spec/test_app_templates/lib/generators/test_app_generator.rb +12 -18
  148. data/spec/views/catalog/_constraints_element.html.erb_spec.rb +13 -13
  149. data/spec/views/catalog/_document.html.erb_spec.rb +1 -1
  150. data/spec/views/catalog/_document_list.html.erb_spec.rb +1 -1
  151. data/spec/views/catalog/_facets.html.erb_spec.rb +13 -14
  152. data/spec/views/catalog/_index_default.erb_spec.rb +21 -21
  153. data/spec/views/catalog/_search_header.erb_spec.rb +1 -1
  154. data/spec/views/catalog/_show_default.erb_spec.rb +21 -21
  155. data/spec/views/catalog/_show_sidebar.erb_spec.rb +7 -7
  156. data/spec/views/catalog/_thumbnail_default.erb_spec.rb +3 -3
  157. data/spec/views/catalog/index.atom.builder_spec.rb +29 -29
  158. data/spec/views/catalog/index.html.erb_spec.rb +6 -7
  159. data/tasks/blacklight.rake +8 -2
  160. metadata +84 -180
  161. data/app/assets/javascripts/blacklight/css_dropdowns.js +0 -10
  162. data/app/assets/javascripts/blacklight/facet_expand_contract.js +0 -41
  163. data/app/assets/javascripts/blacklight/lightbox_dialog.js +0 -70
  164. data/app/assets/javascripts/blacklight/select_submit.js +0 -27
  165. data/app/assets/javascripts/blacklight/zebra_stripe.js +0 -13
  166. data/app/assets/javascripts/improved-modal/bootstrap-modal.js +0 -355
  167. data/app/assets/javascripts/improved-modal/bootstrap-modalmanager.js +0 -370
  168. data/app/assets/stylesheets/blacklight/_bookmark.scss +0 -33
  169. data/app/assets/stylesheets/blacklight/_catalog.scss +0 -255
  170. data/app/assets/stylesheets/blacklight/_dropdown.scss +0 -57
  171. data/app/assets/stylesheets/blacklight/_facets.scss +0 -197
  172. data/app/assets/stylesheets/blacklight/_footer.scss +0 -0
  173. data/app/assets/stylesheets/blacklight/_header.scss +0 -53
  174. data/app/assets/stylesheets/blacklight/_layout.scss +0 -10
  175. data/app/assets/stylesheets/blacklight/_mixins.scss +0 -0
  176. data/app/assets/stylesheets/blacklight/_print.scss +0 -0
  177. data/app/assets/stylesheets/blacklight/_responsive.scss +0 -3
  178. data/app/assets/stylesheets/blacklight/_search_history.scss +0 -42
  179. data/app/assets/stylesheets/blacklight/blacklight_defaults.scss +0 -49
  180. data/app/assets/stylesheets/blacklight/responsive_partials/_catalog.scss +0 -5
  181. data/app/assets/stylesheets/blacklight/responsive_partials/_facets.scss +0 -37
  182. data/app/assets/stylesheets/blacklight/responsive_partials/_header.scss +0 -30
  183. data/app/assets/stylesheets/improved-modal/bootstrap-modal.css +0 -217
  184. data/app/helpers/blacklight/html_head_helper_behavior.rb +0 -118
  185. data/app/helpers/html_head_helper.rb +0 -3
  186. data/app/views/catalog/_bookmark_form.html.erb +0 -7
  187. data/app/views/catalog/_marc_view.html.erb +0 -32
  188. data/app/views/catalog/librarian_view.html.erb +0 -10
  189. data/config/routes.rb +0 -17
  190. data/doc/Atom-Responses.md +0 -90
  191. data/doc/Blacklight-3.0-Release-Notes-And-Upgrade-Guide.md +0 -107
  192. data/doc/Blacklight-3.2-Release-Notes-and-Upgrade-Guide.md +0 -191
  193. data/doc/Blacklight-3.3-release-notes-and-upgrade-guide.md +0 -37
  194. data/doc/Blacklight-3.4-release-notes-and-upgrade-guide.md +0 -27
  195. data/doc/Blacklight-3.5-release-notes-and-upgrade-guide.md +0 -44
  196. data/doc/Blacklight-3.6-release-notes-and-upgrade-guide.md +0 -25
  197. data/doc/Blacklight-3.7-release-notes-and-upgrade-guide.md +0 -80
  198. data/doc/Blacklight-3.8-release-notes-and-upgrade-guide.md +0 -11
  199. data/doc/Blacklight-4.0-release-notes-and-upgrade-guide.md +0 -135
  200. data/doc/Blacklight-4.1-release-notes-and-upgrade-guide.md +0 -17
  201. data/doc/Blacklight-4.2-release-notes-and-upgrade-guide.md +0 -25
  202. data/doc/Blacklight-4.3-release-notes-and-upgrade-guide.md +0 -21
  203. data/doc/Blacklight-4.4-release-notes-and-upgrade-guide.md +0 -41
  204. data/doc/Blacklight-Add-ons.md +0 -28
  205. data/doc/Blacklight-configuration.md +0 -411
  206. data/doc/Blacklight-on-Heroku.md +0 -135
  207. data/doc/Code4Lib-2014.md +0 -48
  208. data/doc/Community-principles.md +0 -44
  209. data/doc/Configuring-and-Customizing-Blacklight.md +0 -271
  210. data/doc/Configuring-rails-routes.md +0 -13
  211. data/doc/Contributing-to-Blacklight.md +0 -25
  212. data/doc/Examples.md +0 -94
  213. data/doc/Extending-or-Modifying-Blacklight-Search-Behavior.md +0 -141
  214. data/doc/FAQs.md +0 -1
  215. data/doc/Home.md +0 -80
  216. data/doc/How-to-release-a-version.md +0 -29
  217. data/doc/Indexing-your-data-into-solr.md +0 -32
  218. data/doc/Integration-with-Rails-Footnotes.md +0 -20
  219. data/doc/Internationalization.md +0 -32
  220. data/doc/JSON-API.md +0 -17
  221. data/doc/Pagination.md +0 -51
  222. data/doc/Providing-your-own-view-templates.md +0 -109
  223. data/doc/Quickstart.md +0 -115
  224. data/doc/README_SOLR.md +0 -245
  225. data/doc/Release-Notes-And-Upgrade-Guides.md +0 -20
  226. data/doc/Roadmap.md +0 -43
  227. data/doc/Sunspot-for-indexing.md +0 -46
  228. data/doc/Theming.md +0 -64
  229. data/doc/User-Authentication.md +0 -60
  230. data/doc/testing.md +0 -57
  231. data/lib/SolrMarc.jar +0 -0
  232. data/lib/blacklight/mash.rb +0 -19
  233. data/lib/blacklight/solr/document/marc.rb +0 -71
  234. data/lib/blacklight/solr/document/marc_export.rb +0 -590
  235. data/lib/generators/blacklight/marc_generator.rb +0 -66
  236. data/lib/generators/blacklight/templates/blacklight.scss +0 -4
  237. data/lib/generators/blacklight/templates/config/SolrMarc/config-test.properties +0 -37
  238. data/lib/generators/blacklight/templates/config/SolrMarc/config.properties +0 -37
  239. data/lib/generators/blacklight/templates/config/SolrMarc/index.properties +0 -97
  240. data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/dewey.bsh +0 -47
  241. data/lib/generators/blacklight/templates/config/SolrMarc/index_scripts/format.bsh +0 -126
  242. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/README_MAPS +0 -1
  243. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/callnumber_map.properties +0 -407
  244. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/composition_era_map.properties +0 -56
  245. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/country_map.properties +0 -379
  246. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/format_map.properties +0 -50
  247. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/instrument_map.properties +0 -101
  248. data/lib/generators/blacklight/templates/config/SolrMarc/translation_maps/language_map.properties +0 -490
  249. data/lib/railties/solr_marc.rake +0 -162
  250. data/spec/data/test_data.utf8.mrc +0 -1
  251. data/spec/features/librarian_view_spec.rb +0 -13
  252. data/spec/helpers/html_head_helper_spec.rb +0 -164
  253. data/spec/lib/blacklight_solr_document_marc_spec.rb +0 -89
  254. data/spec/lib/marc_export_spec.rb +0 -746
  255. data/spec/lib/tasks/solr_marc_task_spec.rb +0 -60
  256. data/spec/requests/alternate_controller_spec.rb +0 -16
  257. data/spec/routing/routes_spec.rb +0 -20
  258. data/spec/views/catalog/_constraints.html.erb_spec.rb +0 -33
  259. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +0 -49
  260. data/test_support/data/test_data.utf8.mrc +0 -1
@@ -34,9 +34,6 @@ fr:
34
34
  or: 'ou'
35
35
 
36
36
  bookmarks:
37
- collection:
38
- add:
39
- button: 'Panier'
40
37
  title: 'Favoris'
41
38
  no_bookmarks: 'Accédez à votre compte pour conserver des références dans votre panier'
42
39
  add:
@@ -116,7 +113,6 @@ fr:
116
113
  refworks: 'Exporter vers Refworks'
117
114
  email: 'Envoyer'
118
115
  sms: 'SMS'
119
- librarian_view: 'Vue UNIMARC'
120
116
  clear: 'Effacer'
121
117
 
122
118
  citation:
@@ -181,7 +177,7 @@ fr:
181
177
  request_error: "Pardon, nous n'avons pas compris votre recherche."
182
178
  invalid_solr_id: "Vous avez demandé une notice qui n'existe pas."
183
179
  per_page:
184
- label: '%{count}<span class="hide-text"> par page</span>'
180
+ label: '%{count}<span class="sr-only"> par page</span>'
185
181
  button_label: '%{count} par page'
186
182
  title: 'Nombre de résultats à afficher par page'
187
183
  submit: 'mettre à jour'
@@ -228,16 +224,9 @@ fr:
228
224
  remove:
229
225
  value: 'Supprimer la restriction %{value}'
230
226
  label_value: 'Supprimer la restriction %{label}: %{value}'
231
- librarian_view:
232
- title: 'Vue UNIMARC'
233
- leader: 'LABEL %{leader}'
234
- empty: 'Pas MARC trouvé.'
235
227
  start_over: 'Accueil'
236
- index:
237
- label: '%{label}'
238
228
  show:
239
229
  title: '%{document_title} - %{application_name}'
240
- label: '%{label}'
241
230
  rss_feed: 'RSS pour les résultats'
242
231
  atom_feed: 'Atom pour les résultats'
243
232
  fields:
@@ -0,0 +1,21 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Please see blacklight.gemspec for dependency information.
4
+ gemspec :path=>"../"
5
+
6
+ gem 'rails', "~> 3.2"
7
+
8
+ gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
9
+
10
+ group :test do
11
+ gem 'devise'
12
+ gem 'devise-guests'
13
+ gem "bootstrap-sass"
14
+ gem 'turbolinks'
15
+ gem 'uglifier'
16
+ end
17
+
18
+ f = File.expand_path(File.dirname(__FILE__) + '/../spec/test_app_templates/Gemfile.extra')
19
+ if File.exists?(f)
20
+ eval File.read(f), nil, f
21
+ end
@@ -0,0 +1,20 @@
1
+ source 'http://rubygems.org'
2
+
3
+ # Please see blacklight.gemspec for dependency information.
4
+ gemspec :path=>"../"
5
+
6
+ gem 'rails', '~> 4.0.0'
7
+
8
+ gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
9
+
10
+ group :test do
11
+ gem 'devise'
12
+ gem 'devise-guests'
13
+ gem "bootstrap-sass"
14
+ gem 'turbolinks'
15
+ end
16
+
17
+ f = File.expand_path(File.dirname(__FILE__) + '/../spec/test_app_templates/Gemfile.extra')
18
+ if File.exists?(f)
19
+ eval File.read(f), nil, f
20
+ end
@@ -1,7 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require 'kaminari'
3
3
  require 'rsolr'
4
- require 'deprecation'
5
4
 
6
5
  module Blacklight
7
6
 
@@ -10,7 +9,6 @@ module Blacklight
10
9
  autoload :SearchFields, 'blacklight/search_fields'
11
10
 
12
11
  autoload :Solr, 'blacklight/solr'
13
- autoload :Marc, 'blacklight/marc'
14
12
 
15
13
  autoload :SolrHelper, 'blacklight/solr_helper'
16
14
 
@@ -30,7 +28,6 @@ module Blacklight
30
28
  autoload :Facet, 'blacklight/facet'
31
29
 
32
30
  extend SearchFields
33
- extend Deprecation
34
31
 
35
32
  require 'blacklight/version'
36
33
  require 'blacklight/engine' if defined?(Rails)
@@ -41,7 +38,6 @@ module Blacklight
41
38
 
42
39
  # Adding a little jruby support
43
40
  def self.jruby?
44
- Deprecation.warn(Blacklight, "Blacklight.jruby? is deprecated")
45
41
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
46
42
  end
47
43
 
@@ -54,7 +50,6 @@ module Blacklight
54
50
  end
55
51
 
56
52
  def self.solr
57
- Deprecation.warn Blacklight, "Blacklight.solr is deprecated and will be removed in Blacklight 5.0"
58
53
  @solr ||= RSolr.connect(Blacklight.solr_config)
59
54
  end
60
55
 
@@ -119,12 +114,10 @@ module Blacklight
119
114
  # BE AWARE - When you do this, you are monkey patching Blacklight
120
115
  # we should eventually find a better way - such as the acts_as pattern
121
116
  def self.models_dir
122
- Deprecation.warn(Blacklight, "Blacklight.models_dir is deprecated")
123
117
  "#{root}/app/models"
124
118
  end
125
119
 
126
120
  def self.controllers_dir
127
- Deprecation.warn(Blacklight, "Blacklight.controllers_dir is deprecated")
128
121
  "#{root}/app/controllers"
129
122
  end
130
123
 
@@ -138,7 +131,6 @@ module Blacklight
138
131
  # full_path_to_solr_marc_jar = Blacklight.locate_path 'solr_marc', 'SolrMarc.jar'
139
132
 
140
133
  def self.locate_path(*subpath_fragments)
141
- Deprecation.warn(Blacklight, "Blacklight.locate_path is deprecated")
142
134
  subpath = subpath_fragments.join('/')
143
135
  base_match = [Rails.root, self.root].find do |base|
144
136
  File.exists? File.join(base, subpath)
@@ -5,8 +5,6 @@ module Blacklight::Base
5
5
  include Blacklight::Configurable
6
6
  include Blacklight::SolrHelper
7
7
 
8
- require 'blacklight/catalog/search_context'
9
- include Blacklight::Catalog::SearchContext
10
8
 
11
9
  included do
12
10
  # When RSolr::RequestError is raised, the rsolr_request_error method is executed.
@@ -1,11 +1,11 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Blacklight::Catalog
3
- extend Deprecation
4
- self.deprecation_horizon = 'Blacklight 5.x'
5
-
6
3
  extend ActiveSupport::Concern
7
4
 
8
5
  include Blacklight::Base
6
+
7
+ require 'blacklight/catalog/search_context'
8
+ include Blacklight::Catalog::SearchContext
9
9
 
10
10
  SearchHistoryWindow = 100 # how many searches to save in session history
11
11
 
@@ -27,12 +27,7 @@ module Blacklight::Catalog
27
27
  @filters = params[:f] || []
28
28
 
29
29
  respond_to do |format|
30
- format.html {
31
- Deprecation.silence(Blacklight::LegacyControllerMethods) do
32
- extra_head_content << view_context.auto_discovery_link_tag(:rss, url_for(params.merge(:format => 'rss')), :title => t('blacklight.search.rss_feed') )
33
- extra_head_content << view_context.auto_discovery_link_tag(:atom, url_for(params.merge(:format => 'atom')), :title => t('blacklight.search.atom_feed') )
34
- end
35
- }
30
+ format.html { }
36
31
  format.rss { render :layout => false }
37
32
  format.atom { render :layout => false }
38
33
 
@@ -65,8 +60,8 @@ module Blacklight::Catalog
65
60
 
66
61
  # updates the search counter (allows the show view to paginate)
67
62
  def update
68
- search_session['counter'] = params[:counter]
69
- redirect_to :action => "show"
63
+ search_session[:counter] = params[:counter]
64
+ redirect_to :action => "show", :status => 303
70
65
  end
71
66
 
72
67
  # displays values and pagination links for a single facet field
@@ -158,16 +153,6 @@ module Blacklight::Catalog
158
153
  end
159
154
  end
160
155
 
161
- def librarian_view
162
- @response, @document = get_solr_response_for_doc_id
163
-
164
- respond_to do |format|
165
- format.html
166
- format.js { render :layout => false }
167
- end
168
- end
169
-
170
-
171
156
  protected
172
157
  #
173
158
  # non-routable methods ->
@@ -199,13 +184,6 @@ module Blacklight::Catalog
199
184
  url_for(options.merge(:action => 'index', :only_path => true))
200
185
  end
201
186
 
202
- # we need to know if we are viewing the item as part of search results so we know whether to
203
- # include certain partials or not
204
- def adjust_for_results_view
205
- # deprecated in blacklight 4.x
206
- Deprecation.warn(self, "#adjust_for_results_view helper was deprecated in Blacklight 4.x")
207
- end
208
-
209
187
  # extract the pagination info from the response object
210
188
  def pagination_info response
211
189
  h = {}
@@ -264,10 +242,6 @@ module Blacklight::Catalog
264
242
  render "index", :status => 404
265
243
  end
266
244
 
267
- def start_new_search_session?
268
- action_name == "index"
269
- end
270
-
271
245
  def blacklight_solr
272
246
  @solr ||= RSolr.connect(blacklight_solr_config)
273
247
  end
@@ -26,9 +26,9 @@ module Blacklight::Catalog::SearchContext
26
26
  # The current search session
27
27
  def current_search_session
28
28
 
29
- @current_search_session ||= if start_new_search_session?
29
+ @current_search_session ||= if action_name == "index"
30
30
  find_or_initialize_search_session_from_params params
31
- elsif params[:search_context] and !params[:search_context].blank?
31
+ elsif params[:search_context].present?
32
32
  find_or_initialize_search_session_from_params JSON.load(params[:search_context])
33
33
  elsif params[:search_id].present?
34
34
  begin
@@ -37,28 +37,19 @@ module Blacklight::Catalog::SearchContext
37
37
  rescue ActiveRecord::RecordNotFound
38
38
  nil
39
39
  end
40
- elsif search_session['id']
40
+ elsif search_session[:id]
41
41
  begin
42
- searches_from_history.find(search_session['id'])
42
+ searches_from_history.find(search_session[:id])
43
43
  rescue ActiveRecord::RecordNotFound
44
44
  nil
45
45
  end
46
46
  end
47
47
 
48
- if @current_search_session
49
- search_session['id'] = @current_search_session.id
50
- end
48
+ search_session[:id] = @current_search_session.id if @current_search_session
51
49
 
52
50
  @current_search_session
53
51
  end
54
52
 
55
- ##
56
- # If the current action should start a new search session, this should be
57
- # set to true
58
- def start_new_search_session?
59
- false
60
- end
61
-
62
53
  def find_or_initialize_search_session_from_params params
63
54
  params_copy = params.reject { |k,v| blacklisted_search_session_params.include?(k.to_sym) or v.blank? }
64
55
 
@@ -94,46 +85,15 @@ module Blacklight::Catalog::SearchContext
94
85
  # calls setup_previous_document then setup_next_document.
95
86
  # used in the show action for single view pagination.
96
87
  def setup_next_and_previous_documents
97
- if search_session['counter'] and current_search_session
98
- index = search_session['counter'].to_i - 1
88
+ if search_session[:counter] and current_search_session
89
+ index = search_session[:counter].to_i - 1
99
90
  response, documents = get_previous_and_next_documents_for_search index, current_search_session.query_params
100
91
 
101
- search_session['total'] = response.total
92
+ search_session[:total] = response.total
102
93
  @search_context_response = response
103
94
  @previous_document = documents.first
104
95
  @next_document = documents.last
105
96
  end
106
97
  end
107
98
 
108
- # gets a document based on its position within a resultset
109
- def setup_document_by_counter(counter)
110
- ActiveSupport::Deprecation.warn("#setup_document_by_counter helper is deprecated in Blacklight 4.x and will be removed")
111
-
112
- return if counter < 1 or current_search_session.nil?
113
- get_single_doc_via_search(counter, current_search_session.query_params)
114
- end
115
-
116
- def setup_previous_document
117
- ActiveSupport::Deprecation.warn("#setup_previous_document helper was deprecated in Blacklight 4.x; now happens automatically as part of #setup_next_and_previous_documents")
118
- end
119
-
120
- def setup_next_document
121
- ActiveSupport::Deprecation.warn("#setup_next_document helper was deprecated in Blacklight 4.x; now happens automatically as part of #setup_next_and_previous_documents")
122
- end
123
-
124
- def delete_or_assign_search_session_params
125
- # deprecated in blacklight 4.x
126
- ActiveSupport::Deprecation.warn("#delete_or_assign_search_session_params helper was deprecated in Blacklight 4.x; now happens automatically as part of #current_search_session")
127
- end
128
-
129
- def save_current_search_params
130
- # deprecated in blacklight 4.x
131
- ActiveSupport::Deprecation.warn("#save_current_search_params helper was deprecated in Blacklight 4.x; now happens automatically as part of #current_search_session")
132
- end
133
-
134
- # sets some additional search metadata so that the show view can display it.
135
- def set_additional_search_session_values
136
- ActiveSupport::Deprecation.warn("#set_additional_search_session_values helper was deprecated in Blacklight 4.x")
137
- end
138
-
139
99
  end
@@ -41,7 +41,8 @@ module Blacklight::Configurable
41
41
  end
42
42
 
43
43
  ##
44
- # The default configuration object
44
+ # The default configuration object, by default it reads from Blacklight.config for backwards
45
+ # compatibility with Blacklight <= 3.1
45
46
  def default_configuration
46
47
  Blacklight::Configurable.default_configuration.inheritable_copy
47
48
  end
@@ -25,8 +25,7 @@ module Blacklight
25
25
  :search_history_window => Blacklight::Catalog::SearchHistoryWindow,
26
26
  :document_index_view_types => ['list'],
27
27
  :add_facet_fields_to_solr_request => false,
28
- :add_field_configuration_to_solr_request => false,
29
- :http_method => :get
28
+ :add_field_configuration_to_solr_request => false
30
29
  }
31
30
  end
32
31
  end
@@ -7,8 +7,6 @@ module Blacklight
7
7
  self.tag = "#{self.field}_single"
8
8
  self.ex = "#{self.field}_single"
9
9
  end
10
-
11
- self.show = true if self.show.nil?
12
10
  super
13
11
  end
14
12
  end
@@ -1,11 +1,11 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # lib/blacklight/engine.rb
3
- require "blacklight"
4
- require "rails"
5
2
 
6
3
  module Blacklight
7
4
  class Engine < Rails::Engine
8
5
 
6
+ require 'bootstrap-sass'
7
+ require 'blacklight/rails/routes'
8
+
9
9
  # BlacklightHelper is needed by all helpers, so we inject it
10
10
  # into action view base here.
11
11
  initializer 'blacklight.helpers' do |app|
@@ -6,63 +6,6 @@
6
6
  # in here, but you may find them useful.
7
7
  module Blacklight
8
8
  module LegacyControllerMethods
9
- extend ActiveSupport::Concern
10
-
11
- extend Deprecation
12
- self.deprecation_horizon = 'Blacklight 5.x'
13
-
14
-
15
- included do
16
-
17
- before_filter :default_html_head_without_deprecation # add JS/stylesheet stuff
18
-
19
- helper_method :extra_head_content, :stylesheet_links, :javascript_includes
20
- end
21
-
22
- #############
23
- # Display-related methods.
24
- #############
25
-
26
- # before filter to set up our default html HEAD content. Sub-class
27
- # controllers can over-ride this method, or instead turn off the before_filter
28
- # if they like. See:
29
- # http://api.rubyonrails.org/classes/ActionController/Filters/ClassMethods.html
30
- # for how to turn off a filter in a sub-class and such.
31
- def default_html_head
32
- Deprecation.warn Blacklight::LegacyControllerMethods, "#default_html_head is deprecated"
33
- end
34
-
35
- def default_html_head_without_deprecation
36
- Deprecation.silence(Blacklight::LegacyControllerMethods) do
37
- default_html_head
38
- end
39
- end
40
-
41
- # An array of strings to be added to HTML HEAD section of view.
42
- # See ApplicationHelper#render_head_content for details.
43
- def extra_head_content
44
- Deprecation.warn Blacklight::LegacyControllerMethods, "#extra_head_content is deprecated"
45
-
46
- @extra_head_content ||= []
47
- end
48
-
49
- # Array, where each element is an array of arguments to
50
- # Rails stylesheet_link_tag helper. See
51
- # ApplicationHelper#render_head_content for details.
52
- def stylesheet_links
53
- Deprecation.warn Blacklight::LegacyControllerMethods, "#stylesheet_links is deprecated"
54
-
55
- @stylesheet_links ||= []
56
- end
57
-
58
- # Array, where each element is an array of arguments to
59
- # Rails javascript_include_tag helper. See
60
- # ApplicationHelper#render_head_content for details.
61
- def javascript_includes
62
- Deprecation.warn Blacklight::LegacyControllerMethods, "#javascript_includes is deprecated"
63
-
64
- @javascript_includes ||= []
65
- end
66
9
 
67
10
  protected
68
11
  #
@@ -71,18 +14,12 @@ module Blacklight
71
14
  # don't use a layout, otherwise use the "application.html.erb" layout
72
15
  #
73
16
  def choose_layout
74
- Deprecation.warn Blacklight::LegacyControllerMethods, "#choose_layout is deprecated"
75
-
76
- Deprecation.silence(Blacklight::LegacyControllerMethods) do
77
- layout_name unless request.xml_http_request? || ! params[:no_layout].blank?
78
- end
17
+ layout_name unless request.xml_http_request? || ! params[:no_layout].blank?
79
18
  end
80
19
 
81
20
  #over-ride this one locally to change what layout BL controllers use, usually
82
21
  #by defining it in your own application_controller.rb
83
22
  def layout_name
84
- Deprecation.warn Blacklight::LegacyControllerMethods, "#layout_name is deprecated"
85
-
86
23
  'blacklight'
87
24
  end
88
25
  end