blacklight 5.0.0.pre1 → 5.0.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -4
  3. data/VERSION +1 -1
  4. data/app/assets/stylesheets/blacklight/_bookmark.css.scss +4 -0
  5. data/app/assets/stylesheets/blacklight/_catalog.css.scss +9 -13
  6. data/app/helpers/blacklight/blacklight_helper_behavior.rb +15 -9
  7. data/app/helpers/blacklight/catalog_helper_behavior.rb +8 -25
  8. data/app/helpers/blacklight/facets_helper_behavior.rb +1 -1
  9. data/app/helpers/blacklight/hash_as_hidden_fields_helper_behavior.rb +1 -1
  10. data/app/helpers/blacklight/render_constraints_helper_behavior.rb +2 -2
  11. data/app/helpers/blacklight/search_history_constraints_helper_behavior.rb +1 -1
  12. data/app/views/bookmarks/index.html.erb +1 -1
  13. data/app/views/catalog/_did_you_mean.html.erb +1 -1
  14. data/app/views/catalog/_document.html.erb +4 -10
  15. data/app/views/catalog/{_document_header.html.erb → _index_header_default.html.erb} +6 -3
  16. data/app/views/catalog/_paginate_compact.html.erb +5 -0
  17. data/app/views/catalog/_show_header_default.html.erb +2 -0
  18. data/app/views/catalog/index.html.erb +1 -1
  19. data/app/views/catalog/show.html.erb +4 -10
  20. data/lib/blacklight.rb +0 -1
  21. data/lib/blacklight/configuration.rb +2 -2
  22. data/lib/blacklight/controller.rb +0 -1
  23. data/lib/blacklight/solr/document.rb +2 -0
  24. data/lib/blacklight/solr/document/schema_org.rb +7 -0
  25. data/lib/blacklight/solr_response.rb +4 -0
  26. data/lib/blacklight/user.rb +0 -6
  27. data/spec/controllers/application_controller_spec.rb +1 -2
  28. data/spec/controllers/bookmarks_controller_spec.rb +8 -9
  29. data/spec/controllers/catalog_controller_spec.rb +72 -73
  30. data/spec/controllers/saved_searches_controller_spec.rb +1 -2
  31. data/spec/controllers/search_history_controller_spec.rb +9 -10
  32. data/spec/features/search_pagination_spec.rb +1 -0
  33. data/spec/features/search_results_spec.rb +1 -0
  34. data/spec/features/search_spec.rb +1 -0
  35. data/spec/helpers/blacklight_helper_spec.rb +103 -93
  36. data/spec/helpers/catalog_helper_spec.rb +34 -21
  37. data/spec/helpers/facets_helper_spec.rb +41 -41
  38. data/spec/helpers/hash_as_hidden_fields_spec.rb +8 -9
  39. data/spec/helpers/render_constraints_helper_spec.rb +3 -3
  40. data/spec/helpers/search_history_constraints_helper_spec.rb +13 -14
  41. data/spec/lib/{blacklight_configurable_spec.rb → blacklight/configurable_spec.rb} +12 -14
  42. data/spec/lib/{blacklight_configuration_spec.rb → blacklight/configuration_spec.rb} +67 -69
  43. data/spec/lib/{facet_paginator_spec.rb → blacklight/facet_paginator_spec.rb} +13 -16
  44. data/spec/lib/{search_fields_spec.rb → blacklight/search_fields_spec.rb} +14 -15
  45. data/spec/lib/{blacklight_solr_document_dublin_core_spec.rb → blacklight/solr/document/dublin_core_spec.rb} +7 -8
  46. data/spec/lib/{blacklight_email_spec.rb → blacklight/solr/document/email_spec.rb} +5 -6
  47. data/spec/lib/{blacklight_solr_document_more_like_this_spec.rb → blacklight/solr/document/more_like_this_spec.rb} +5 -5
  48. data/spec/lib/{blacklight_sms_spec.rb → blacklight/solr/document/sms_spec.rb} +5 -6
  49. data/spec/lib/{blacklight_solr_document_spec.rb → blacklight/solr/document_spec.rb} +37 -39
  50. data/spec/lib/{solr_helper_spec.rb → blacklight/solr_helper_spec.rb} +183 -183
  51. data/spec/lib/{blacklight_solr_response_spec.rb → blacklight/solr_response_spec.rb} +20 -16
  52. data/spec/lib/{blacklight_user_spec.rb → blacklight/user_spec.rb} +3 -4
  53. data/spec/lib/blacklight_spec.rb +6 -7
  54. data/spec/lib/tasks/blacklight_task_spec.rb +2 -3
  55. data/spec/lib/utils_spec.rb +13 -14
  56. data/spec/models/bookmark_spec.rb +4 -4
  57. data/spec/models/record_mailer_spec.rb +15 -15
  58. data/spec/models/search_spec.rb +7 -7
  59. data/spec/models/solr_document_spec.rb +4 -4
  60. data/spec/routing/catalog_routing_spec.rb +12 -12
  61. data/spec/spec_helper.rb +1 -3
  62. data/spec/test_app_templates/Gemfile.extra +1 -2
  63. data/spec/views/catalog/_constraints_element.html.erb_spec.rb +12 -13
  64. data/spec/views/catalog/_document.html.erb_spec.rb +19 -2
  65. data/spec/views/catalog/_document_list.html.erb_spec.rb +0 -1
  66. data/spec/views/catalog/_facets.html.erb_spec.rb +5 -5
  67. data/spec/views/catalog/_index_default.erb_spec.rb +10 -11
  68. data/spec/views/catalog/_paginate_compact.html.erb_spec.rb +45 -0
  69. data/spec/views/catalog/_search_header.erb_spec.rb +0 -1
  70. data/spec/views/catalog/_show_default.erb_spec.rb +10 -11
  71. data/spec/views/catalog/_show_sidebar.erb_spec.rb +2 -3
  72. data/spec/views/catalog/index.atom.builder_spec.rb +26 -27
  73. data/spec/views/catalog/index.html.erb_spec.rb +1 -1
  74. data/spec/views/catalog/show.html.erb_spec.rb +56 -0
  75. data/tasks/blacklight.rake +1 -1
  76. metadata +65 -64
  77. data/lib/blacklight/legacy_controller_methods.rb +0 -26
  78. data/spec/rcov.opts +0 -3
  79. data/spec/support/assert_difference.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5631f0f750bdf8d5e7976d0b0a771537d1aa06d6
4
- data.tar.gz: bbacc4edb12e35515e736b2c9affcae1f77be44a
3
+ metadata.gz: c7f3074193519ca823f3af1b5db3d88b3cd42ce0
4
+ data.tar.gz: 478b01d0e5292996ed40da54ce6fe5a7e1258f60
5
5
  SHA512:
6
- metadata.gz: be0707d62ef0c9a16c9a16d5de6bc621f4e1ea4bfb1528a7a8731c71ccf94f76ec7728d4d7b67b38ee5c91ddf4d082019922dce72f72db4286d440f5ad6a2307
7
- data.tar.gz: 9b3b49fa307537ba8e5efee64a683292641a6d9477795e54b038a7d493bb74e205d239f3bfd1f5bbef3a27861737ece82d102c582857577d91c77f2d8024714b
6
+ metadata.gz: 4502e598ed76de63d1a36ecffdb2f19b1b5e8c93f6a56ec7fbfb077b30cb56fdf56859368c401c2003bc45bd272d88b3542c2a320b368828e93d490a6cddc1f7
7
+ data.tar.gz: 7f77de71e7536ebf916dc24a46152b43cd458f1a9d77c1127f9e38720ba85c09f6ad00b8568fdbcb5ae20f8638f36f77aa586c4ad93795313371d8c4d46c289f
data/.travis.yml CHANGED
@@ -10,10 +10,6 @@ rvm:
10
10
  before_install:
11
11
  - gem install bundler
12
12
 
13
- matrix:
14
- allow_failures:
15
- - rvm: 2.1.0
16
-
17
13
  gemfile:
18
14
  - gemfiles/rails3.gemfile
19
15
  - gemfiles/rails4.gemfile
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0.pre1
1
+ 5.0.0.pre2
@@ -2,3 +2,7 @@
2
2
  #refworks-form .btn {
3
3
  padding: $nav-link-padding;
4
4
  }
5
+
6
+ .clear-bookmarks {
7
+ margin-left: 4px;
8
+ }
@@ -82,15 +82,6 @@ span.constraints-label {
82
82
  padding-top: $padding-base-vertical;
83
83
  border-bottom:1px dotted $table-border-color;
84
84
  }
85
-
86
- .documentFunctions {
87
- @extend .pull-right;
88
-
89
- .bookmark_toggle
90
- {
91
- display:inline;
92
- }
93
- }
94
85
  }
95
86
 
96
87
  // Tools link on documetn show page
@@ -100,6 +91,15 @@ span.constraints-label {
100
91
  }
101
92
  }
102
93
 
94
+ // bookmarks checkbox on index, give it some
95
+ // lower margin when it collapses
96
+ .index-document-functions {
97
+ margin-bottom: ($line-height-computed / 2);
98
+ @media (min-width: $screen-sm-min) {
99
+ margin-bottom: 0;
100
+ }
101
+ }
102
+
103
103
 
104
104
  #sidebar form {
105
105
  margin: 0;
@@ -182,10 +182,6 @@ label.toggle_bookmark
182
182
 
183
183
  }
184
184
 
185
- .index_title {
186
- float: left;
187
- }
188
-
189
185
  .document-thumbnail {
190
186
  float: right;
191
187
  padding-left: 20px;
@@ -72,12 +72,12 @@ module Blacklight::BlacklightHelperBehavior
72
72
  # Save function area for search results 'index' view, normally
73
73
  # renders next to title.
74
74
  def render_index_doc_actions(document, options={})
75
- wrapping_class = options.delete(:wrapping_class) || "documentFunctions"
75
+ wrapping_class = options.delete(:wrapping_class) || "index-document-functions"
76
76
 
77
77
  content = []
78
78
  content << render(:partial => 'catalog/bookmark_control', :locals => {:document=> document}.merge(options)) if render_bookmarks_control?
79
79
 
80
- content_tag("div", safe_join(content, "\n".html_safe), :class=> wrapping_class)
80
+ content_tag("div", safe_join(content, "\n"), :class=> wrapping_class)
81
81
  end
82
82
 
83
83
  # Save function area for item detail 'show' view, normally
@@ -90,7 +90,7 @@ module Blacklight::BlacklightHelperBehavior
90
90
  content = []
91
91
  content << render(:partial => 'catalog/bookmark_control', :locals => {:document=> document}.merge(options)) if render_bookmarks_control?
92
92
 
93
- content_tag("div", safe_join(content, "\n".html_safe), :class=> wrapping_class)
93
+ content_tag("div", safe_join(content, "\n"), :class=> wrapping_class)
94
94
  end
95
95
 
96
96
  ##
@@ -189,7 +189,7 @@ module Blacklight::BlacklightHelperBehavior
189
189
 
190
190
  tag ||= :h4
191
191
 
192
- content_tag(tag, render_field_value(document_heading(document)))
192
+ content_tag(tag, render_field_value(document_heading(document)), :itemprop => "name")
193
193
  end
194
194
 
195
195
  # Used in the show view for setting the main html document title
@@ -316,6 +316,11 @@ module Blacklight::BlacklightHelperBehavior
316
316
 
317
317
  def render_field_value value=nil, field_config=nil
318
318
  safe_values = Array(value).collect { |x| x.respond_to?(:force_encoding) ? x.force_encoding("UTF-8") : x }
319
+
320
+ if field_config and field_config.itemprop
321
+ safe_values = safe_values.map { |x| content_tag :span, x, :itemprop => field_config.itemprop }
322
+ end
323
+
319
324
  safe_join(safe_values, (field_config.separator if field_config) || field_value_separator)
320
325
  end
321
326
 
@@ -371,6 +376,12 @@ module Blacklight::BlacklightHelperBehavior
371
376
  "#{display_type.gsub("-"," ")}".parameterize("_").to_s
372
377
  end
373
378
 
379
+ def render_document_partials(doc, actions = [], locals ={})
380
+ safe_join(actions.map do |action_name|
381
+ render_document_partial(doc, action_name, locals)
382
+ end, "\n")
383
+ end
384
+
374
385
  # given a doc and action_name, this method attempts to render a partial template
375
386
  # based on the value of doc[:format]
376
387
  # if this value is blank (nil/empty) the "default" is used
@@ -405,11 +416,6 @@ module Blacklight::BlacklightHelperBehavior
405
416
  link_to(raw(render_search_to_s(params)), catalog_index_path(params)).html_safe
406
417
  end
407
418
 
408
- #
409
- # shortcut for built-in Rails helper, "number_with_delimiter"
410
- #
411
- def format_num(num); number_with_delimiter(num) end
412
-
413
419
  #
414
420
  # link based helpers ->
415
421
  #
@@ -1,13 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Blacklight::CatalogHelperBehavior
3
3
 
4
- # Pass in an RSolr::Response (or duck-typed similar) object,
5
- # it translates to a Kaminari-paginatable
6
- # object, with the keys Kaminari views expect.
7
- def paginate_params(response)
8
- response
9
- end
10
-
11
4
  # Equivalent to kaminari "paginate", but takes an RSolr::Response as first argument.
12
5
  # Will convert it to something kaminari can deal with (using #paginate_params), and
13
6
  # then call kaminari paginate with that. Other arguments (options and block) same as
@@ -17,11 +10,6 @@ module Blacklight::CatalogHelperBehavior
17
10
  paginate response, options, &block
18
11
  end
19
12
 
20
- #
21
- # shortcut for built-in Rails helper, "number_with_delimiter"
22
- #
23
- def format_num(num); number_with_delimiter(num) end
24
-
25
13
  # Override the Kaminari page_entries_info helper with our own, blacklight-aware
26
14
  # implementation
27
15
  #
@@ -30,9 +18,9 @@ module Blacklight::CatalogHelperBehavior
30
18
  entry_name = if options[:entry_name]
31
19
  options[:entry_name]
32
20
  elsif collection.respond_to? :model # DataMapper
33
- collection.model.model_name.humanize.downcase
21
+ collection.model.model_name.human.downcase
34
22
  elsif collection.respond_to? :model_name and !collection.model_name.nil? # AR, Blacklight::PaginationMethods
35
- collection.model_name.humanize.downcase
23
+ collection.model_name.human.downcase
36
24
  elsif collection.is_a?(::Kaminari::PaginatableArray)
37
25
  'entry'
38
26
  else
@@ -49,15 +37,15 @@ module Blacklight::CatalogHelperBehavior
49
37
  end
50
38
 
51
39
  end_num = if collection.offset_value + end_num <= collection.total_count
52
- format_num(collection.offset_value + end_num)
40
+ collection.offset_value + end_num
53
41
  else
54
- format_num(collection.total_count)
42
+ collection.total_count
55
43
  end
56
44
 
57
45
  case collection.total_count
58
46
  when 0; t('blacklight.search.pagination_info.no_items_found', :entry_name => entry_name ).html_safe
59
47
  when 1; t('blacklight.search.pagination_info.single_item_found', :entry_name => entry_name).html_safe
60
- else; t('blacklight.search.pagination_info.pages', :entry_name => entry_name, :current_page => collection.current_page, :num_pages => collection.total_pages, :start_num => format_num(collection.offset_value + 1) , :end_num => end_num, :total_num => collection.total_count, :count => collection.total_pages).html_safe
48
+ else; t('blacklight.search.pagination_info.pages', :entry_name => entry_name, :current_page => collection.current_page, :num_pages => collection.total_pages, :start_num => number_with_delimiter(collection.offset_value + 1) , :end_num => number_with_delimiter(end_num), :total_num => number_with_delimiter(collection.total_count), :count => collection.total_pages).html_safe
61
49
  end
62
50
  end
63
51
 
@@ -73,7 +61,7 @@ module Blacklight::CatalogHelperBehavior
73
61
  # Code should call this method rather than interrogating session directly,
74
62
  # because implementation of where this data is stored/retrieved may change.
75
63
  def item_page_entry_info
76
- t('blacklight.search.entry_pagination_info.other', :current => format_num(search_session[:counter]), :total => format_num(search_session[:total]), :count => search_session[:total].to_i).html_safe
64
+ t('blacklight.search.entry_pagination_info.other', :current => number_with_delimiter(search_session[:counter]), :total => number_with_delimiter(search_session[:total]), :count => search_session[:total].to_i).html_safe
77
65
  end
78
66
 
79
67
  # Look up search field user-displayable label
@@ -109,14 +97,13 @@ module Blacklight::CatalogHelperBehavior
109
97
 
110
98
  def show_sort_and_per_page? response = nil
111
99
  response ||= @response
112
- response.total > 1
100
+ !response.empty?
113
101
  end
114
102
 
115
103
  def should_autofocus_on_search_box?
116
104
  controller.is_a? Blacklight::Catalog and
117
105
  action_name == "index" and
118
- params[:q].to_s.empty? and
119
- params[:f].to_s.empty?
106
+ !has_search_parameters?
120
107
  end
121
108
 
122
109
  def has_thumbnail? document
@@ -145,8 +132,4 @@ module Blacklight::CatalogHelperBehavior
145
132
  def add_group_facet_params_and_redirect group
146
133
  add_facet_params_and_redirect(group.field, group.key)
147
134
  end
148
-
149
- def response_has_no_search_results?
150
- @response.total == 0
151
- end
152
135
  end
@@ -10,7 +10,7 @@ module Blacklight::FacetsHelperBehavior
10
10
  def render_facet_partials fields = facet_field_names, options = {}
11
11
  safe_join(facets_from_request(fields).map do |display_facet|
12
12
  render_facet_limit(display_facet, options)
13
- end.compact, "\n".html_safe)
13
+ end.compact, "\n")
14
14
  end
15
15
 
16
16
 
@@ -24,7 +24,7 @@ module Blacklight::HashAsHiddenFieldsHelperBehavior
24
24
  end
25
25
  end
26
26
 
27
- safe_join(hidden_fields, "\n".html_safe)
27
+ safe_join(hidden_fields, "\n")
28
28
  end
29
29
 
30
30
  protected
@@ -43,7 +43,7 @@ module Blacklight::RenderConstraintsHelperBehavior
43
43
  content << render_filter_element(facet, values, localized_params)
44
44
  end
45
45
 
46
- safe_join(content.flatten, "\n".html_safe)
46
+ safe_join(content.flatten, "\n")
47
47
  end
48
48
 
49
49
  def render_filter_element(facet, values, localized_params)
@@ -55,7 +55,7 @@ module Blacklight::RenderConstraintsHelperBehavior
55
55
  :remove => url_for(remove_facet_params(facet, val, localized_params)),
56
56
  :classes => ["filter", "filter-" + facet.parameterize]
57
57
  )
58
- end, "\n".html_safe)
58
+ end, "\n")
59
59
  end
60
60
 
61
61
  # Render a label/value constraint on the screen. Can be called
@@ -35,7 +35,7 @@ module Blacklight::SearchHistoryConstraintsHelperBehavior
35
35
  render_filter_value(value, facet_field)
36
36
  end, content_tag(:span, " #{t('blacklight.and')} ", :class =>'filterSeparator'))
37
37
  )
38
- end, " \n ".html_safe)
38
+ end, " \n ")
39
39
  end
40
40
 
41
41
  # value can be Array, in which case elements are joined with
@@ -9,7 +9,7 @@
9
9
 
10
10
  <h3><%= t('blacklight.bookmarks.no_bookmarks') %></h3>
11
11
  <% else %>
12
- <%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path, :method => :delete, :data => { :confirm => t('blacklight.bookmarks.clear.action_confirm') }, :class => 'btn btn-danger pull-right' %>
12
+ <%= link_to t('blacklight.bookmarks.clear.action_title'), clear_bookmarks_path, :method => :delete, :data => { :confirm => t('blacklight.bookmarks.clear.action_confirm') }, :class => 'clear-bookmarks btn btn-danger pull-right' %>
13
13
  <%= render 'sort_and_per_page' %>
14
14
  <%= render 'tools' %>
15
15
 
@@ -1,5 +1,5 @@
1
1
  <% if @response.total <= spell_check_max and @response.spelling.words.size > 0 %>
2
2
  <div id="spell">
3
- <h4 class="suggest"><em><%= t('blacklight.did_you_mean', :options => safe_join(@response.spelling.words.map { |word| link_to_query(word) }, " #{t('blacklight.or')} ".html_safe)).html_safe %></em></h4>
3
+ <h4 class="suggest"><em><%= t('blacklight.did_you_mean', :options => safe_join(@response.spelling.words.map { |word| link_to_query(word) }, " #{t('blacklight.or')} ")).html_safe %></em></h4>
4
4
  </div>
5
5
  <% end %>
@@ -1,10 +1,4 @@
1
- <% # container for a single doc -%>
2
- <div class="document <%= render_document_class document %>">
3
- <%= render :partial => 'document_header', :locals => { :document => document, :document_counter => document_counter } %>
4
-
5
- <%= render_document_partial document, :thumbnail, :document_counter => document_counter %>
6
-
7
- <% # main container for doc partial view -%>
8
- <%= render_document_partial document, :index, :document_counter => document_counter %>
9
-
10
- </div>
1
+ <% # container for a single doc -%>
2
+ <div class="document <%= render_document_class document %>" itemscope itemtype="<%= document.itemtype %>">
3
+ <%= render_document_partials document, blacklight_config.index.partials, :document_counter => document_counter %>
4
+ </div>
@@ -2,14 +2,17 @@
2
2
  <% # header bar for doc items in index view -%>
3
3
  <div class="documentHeader row">
4
4
 
5
- <%- # main title container for doc partial view -%>
6
- <h5 class="index_title col-sm-10">
5
+ <%# main title container for doc partial view
6
+ How many bootstrap columns need to be reserved
7
+ for bookmarks control depends on size.
8
+ -%>
9
+ <h5 class="index_title col-sm-9 col-lg-10">
7
10
  <% counter = document_counter_with_offset(document_counter) %>
8
11
  <%= t('blacklight.search.documents.counter', :counter => counter) if counter %>
9
12
  <%= link_to_document document, :label=>document_show_link_field(document), :counter => counter %>
10
13
  </h5>
11
14
 
12
15
  <% # bookmark functions for items/docs -%>
13
- <%= render_index_doc_actions document, :wrapping_class => "documentFunctions col-sm-2" %>
16
+ <%= render_index_doc_actions document, :wrapping_class => "index-document-functions col-sm-3 col-lg-2" %>
14
17
  </div>
15
18
 
@@ -1 +1,6 @@
1
+ <%# Call with a Blacklight::SolrResponse or any other kaminari-compatible collection
2
+ to render Blacklight's compact pagination info component:
3
+
4
+ <%= render :partial => "paginate_compact", :object => @response
5
+ -%>
1
6
  <%= paginate paginate_compact, :page_entries_info => page_entries_info(paginate_compact), :theme => :blacklight_compact %>
@@ -0,0 +1,2 @@
1
+ <% # bookmark/folder functions -%>
2
+ <%= render_document_heading(document, :tag => :h1) %>
@@ -25,7 +25,7 @@
25
25
 
26
26
  <h2 class="sr-only"><%= t('blacklight.search.search_results') %></h2>
27
27
 
28
- <%- if response_has_no_search_results? %>
28
+ <%- if @response.empty? %>
29
29
  <%= render "zero_results" %>
30
30
  <%- elsif render_grouped_response? %>
31
31
  <%= render_grouped_document_index %>
@@ -5,20 +5,14 @@
5
5
 
6
6
  <% @page_title = t('blacklight.search.show.title', :document_title => document_show_html_title, :application_name => application_name) -%>
7
7
  <% content_for(:head) { render_link_rel_alternates } -%>
8
-
9
8
  <%# this should be in a partial -%>
10
- <div id="document" class="<%= render_document_class %>">
9
+
10
+ <div id="document" class="document <%= render_document_class %>" itemscope itemtype="<%= @document.itemtype %>">
11
11
  <div id="doc_<%= @document.id.to_s.parameterize %>">
12
12
 
13
-
14
13
  <% # bookmark/folder functions -%>
15
- <%= render_document_heading(:h1) %>
16
-
17
- <div class="document">
18
- <%= render_document_partial @document, :show %>
19
- </div>
20
-
21
-
14
+ <%= render_document_partials @document, blacklight_config.show.partials %>
15
+
22
16
  </div>
23
17
  </div>
24
18
 
data/lib/blacklight.rb CHANGED
@@ -17,7 +17,6 @@ module Blacklight
17
17
  autoload :User, 'blacklight/user'
18
18
 
19
19
  autoload :Controller, 'blacklight/controller'
20
- autoload :LegacyControllerMethods, 'blacklight/legacy_controller_methods'
21
20
  autoload :Base, 'blacklight/base'
22
21
  autoload :Catalog, 'blacklight/catalog'
23
22
 
@@ -17,8 +17,8 @@ module Blacklight
17
17
  :default_solr_params => {},
18
18
  :document_solr_request_handler => nil,
19
19
  :default_document_solr_params => {},
20
- :show => OpenStructWithHashAccess.new(:html_title => unique_key, :heading => unique_key),
21
- :index => OpenStructWithHashAccess.new(:show_link => unique_key, :record_display_type => 'format', :group => false),
20
+ :show => OpenStructWithHashAccess.new(:partials => [:show_header, :show], :html_title => unique_key, :heading => unique_key),
21
+ :index => OpenStructWithHashAccess.new(:partials => [:index_header, :thumbnail, :index], :show_link => unique_key, :record_display_type => 'format', :group => false),
22
22
  :spell_max => 5,
23
23
  :max_per_page => 100,
24
24
  :per_page => [10,20,50,100],
@@ -5,7 +5,6 @@
5
5
  module Blacklight::Controller
6
6
 
7
7
  extend ActiveSupport::Concern
8
- include Blacklight::LegacyControllerMethods
9
8
 
10
9
  included do
11
10
  include Blacklight::SearchFields
@@ -16,6 +16,7 @@ require 'rsolr'
16
16
  #
17
17
 
18
18
  module Blacklight::Solr::Document
19
+ autoload :SchemaOrg, 'blacklight/solr/document/schema_org'
19
20
  autoload :DublinCore, 'blacklight/solr/document/dublin_core'
20
21
  autoload :Email, 'blacklight/solr/document/email'
21
22
  autoload :Sms, 'blacklight/solr/document/sms'
@@ -24,6 +25,7 @@ module Blacklight::Solr::Document
24
25
  autoload :MoreLikeThis, 'blacklight/solr/document/more_like_this'
25
26
 
26
27
  extend ActiveSupport::Concern
28
+ include Blacklight::Solr::Document::SchemaOrg
27
29
  include Blacklight::Solr::Document::Export
28
30
  include Blacklight::Solr::Document::MoreLikeThis
29
31
 
@@ -0,0 +1,7 @@
1
+ module Blacklight::Solr::Document::SchemaOrg
2
+
3
+ def itemtype
4
+ "http://schema.org/Thing"
5
+ end
6
+
7
+ end