commonwealth-vlr-engine 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/assets/stylesheets/commonwealth-vlr-engine/advanced_search.scss +1 -1
  4. data/app/assets/stylesheets/commonwealth-vlr-engine/basic_search.scss +6 -1
  5. data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +1 -0
  6. data/app/assets/stylesheets/commonwealth-vlr-engine/folders.scss +1 -1
  7. data/app/assets/stylesheets/commonwealth-vlr-engine/header.scss +9 -0
  8. data/app/assets/stylesheets/commonwealth-vlr-engine/home.scss +9 -0
  9. data/app/assets/stylesheets/commonwealth-vlr-engine/twitter_typeahead.scss +9 -0
  10. data/app/controllers/blacklight_advanced_search/advanced_controller.rb +12 -48
  11. data/app/controllers/bookmarks_controller.rb +8 -8
  12. data/app/controllers/collections_controller.rb +10 -26
  13. data/app/controllers/folder_items_actions_controller.rb +2 -2
  14. data/app/controllers/folders_controller.rb +10 -6
  15. data/app/controllers/image_viewer_controller.rb +2 -2
  16. data/app/controllers/institutions_controller.rb +13 -12
  17. data/app/controllers/ocr_search_controller.rb +2 -8
  18. data/app/controllers/saved_searches_controller.rb +8 -0
  19. data/app/controllers/search_history_controller.rb +8 -0
  20. data/app/helpers/commonwealth_vlr_engine/application_helper.rb +37 -37
  21. data/app/helpers/commonwealth_vlr_engine/blacklight_helper.rb +3 -11
  22. data/app/helpers/commonwealth_vlr_engine/blacklight_url_helper.rb +1 -16
  23. data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +1 -1
  24. data/app/helpers/commonwealth_vlr_engine/collections_helper_behavior.rb +1 -1
  25. data/app/helpers/commonwealth_vlr_engine/institutions_helper_behavior.rb +2 -2
  26. data/app/helpers/commonwealth_vlr_engine/vlr_blacklight_maps_helper_behavior.rb +10 -6
  27. data/app/views/advanced/_advanced_search_fields.html.erb +2 -2
  28. data/app/views/advanced/_advanced_search_form.html.erb +2 -2
  29. data/app/views/advanced/index.html.erb +1 -1
  30. data/app/views/bookmarks/index.html.erb +1 -1
  31. data/app/views/catalog/_basic_search.html.erb +5 -3
  32. data/app/views/catalog/_constraints.html.erb +1 -1
  33. data/app/views/catalog/_facet_limit_series.html.erb +7 -5
  34. data/app/views/catalog/_index_gallery.html.erb +1 -3
  35. data/app/views/catalog/{_index_map_institutions.html.erb → _index_mapview_institutions.html.erb} +0 -0
  36. data/app/views/catalog/_search_form.html.erb +14 -4
  37. data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +9 -0
  38. data/app/views/catalog/_show_partials/_show_flagged_notice.html.erb +1 -1
  39. data/app/views/catalog/_show_tools.html.erb +2 -2
  40. data/app/views/catalog/_zero_results.html.erb +1 -1
  41. data/app/views/collections/_search_form_collection.html.erb +1 -1
  42. data/app/views/collections/show.html.erb +1 -1
  43. data/app/views/feedback/complete.html.erb +1 -1
  44. data/app/views/institutions/_search_form_institution.html.erb +1 -1
  45. data/app/views/layouts/commonwealth-vlr-engine.html.erb +2 -2
  46. data/app/views/ocr_search/_search_form_ocr.html.erb +1 -1
  47. data/app/views/pages/home.html.erb +2 -1
  48. data/app/views/saved_searches/index.html.erb +4 -4
  49. data/app/views/search_history/index.html.erb +5 -5
  50. data/app/views/shared/_folder_item_actions.html.erb +1 -2
  51. data/app/views/shared/_footer.html.erb +1 -1
  52. data/app/views/shared/_header_navbar.html.erb +1 -1
  53. data/app/views/shared/_nav_links.html.erb +2 -2
  54. data/app/views/shared/_search_form_header.html.erb +9 -3
  55. data/app/views/shared/_sitelinks_search_box.html.erb +12 -0
  56. data/app/views/shared/_tools.html.erb +2 -2
  57. data/app/views/shared/_user_util_links.html.erb +2 -2
  58. data/app/views/users/show.html.erb +2 -2
  59. data/commonwealth-vlr-engine.gemspec +4 -4
  60. data/config/initializers/assets.rb +2 -0
  61. data/config/locales/commonwealth-vlr-engine.en.yml +4 -0
  62. data/config/routes.rb +1 -0
  63. data/lib/commonwealth-vlr-engine.rb +6 -16
  64. data/lib/commonwealth-vlr-engine/controller_override.rb +82 -47
  65. data/lib/commonwealth-vlr-engine/engine.rb +6 -4
  66. data/lib/commonwealth-vlr-engine/render_constraints_override.rb +3 -2
  67. data/lib/commonwealth-vlr-engine/search_builder/collections_search_builder.rb +14 -0
  68. data/lib/commonwealth-vlr-engine/{commonwealth_search_builder.rb → search_builder/commonwealth_search_builder_behavior.rb} +9 -2
  69. data/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder.rb +14 -0
  70. data/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder.rb +11 -0
  71. data/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder.rb +15 -0
  72. data/lib/commonwealth-vlr-engine/search_builder/ocr_search_builder.rb +10 -0
  73. data/lib/commonwealth-vlr-engine/version.rb +1 -1
  74. data/lib/generators/commonwealth_vlr_engine/controller_generator.rb +1 -2
  75. data/lib/generators/commonwealth_vlr_engine/localassets_generator.rb +1 -1
  76. data/lib/generators/commonwealth_vlr_engine/model_generator.rb +3 -16
  77. data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +8 -0
  78. data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_search_builder.rb +17 -0
  79. data/lib/generators/commonwealth_vlr_engine/templates/{commonwealth_vlr_engine.css.scss → commonwealth_vlr_engine.scss} +0 -0
  80. data/spec/controllers/catalog_controller_spec.rb +20 -3
  81. data/spec/controllers/collections_controller_spec.rb +2 -2
  82. data/spec/controllers/folder_items_actions_controller_spec.rb +2 -2
  83. data/spec/controllers/institutions_controller_spec.rb +13 -0
  84. data/spec/controllers/ocr_search_controller_spec.rb +4 -0
  85. data/spec/features/more_like_this_search_spec.rb +1 -1
  86. data/spec/features/ocr_search/index_spec.rb +1 -1
  87. data/spec/helpers/institutions_helper_spec.rb +10 -5
  88. data/spec/lib/commonwealth-vlr-engine/search_builder/collections_search_builder_spec.rb +19 -0
  89. data/spec/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior_spec.rb +116 -0
  90. data/spec/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder_spec.rb +19 -0
  91. data/spec/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder_spec.rb +19 -0
  92. data/spec/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder_spec.rb +19 -0
  93. data/spec/lib/commonwealth-vlr-engine/search_builder/ocr_search_builder_spec.rb +19 -0
  94. data/spec/test_app_templates/lib/generators/test_app_generator.rb +2 -0
  95. data/tasks/vlr_engine.rake +1 -1
  96. metadata +38 -23
  97. data/app/views/bookmarks/_tools.html.erb +0 -25
  98. data/app/views/catalog/_index_list_default.html.erb +0 -13
  99. data/lib/commonwealth-vlr-engine/route_sets.rb +0 -49
  100. data/lib/commonwealth-vlr-engine/routes.rb +0 -21
  101. data/spec/lib/commonwealth-vlr-engine/commonwealth_search_builder_spec.rb +0 -101
  102. data/spec/lib/commonwealth-vlr-engine/controller_override_spec.rb +0 -41
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ class SavedSearchesController < ApplicationController
3
+ include Blacklight::SavedSearches
4
+
5
+ helper BlacklightAdvancedSearch::RenderConstraintsOverride
6
+ helper BlacklightMaps::RenderConstraintsOverride
7
+ helper CommonwealthVlrEngine::RenderConstraintsOverride
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ class SearchHistoryController < ApplicationController
3
+ include Blacklight::SearchHistory
4
+
5
+ helper BlacklightAdvancedSearch::RenderConstraintsOverride
6
+ helper BlacklightMaps::RenderConstraintsOverride
7
+ helper CommonwealthVlrEngine::RenderConstraintsOverride
8
+ end
@@ -52,16 +52,16 @@ module CommonwealthVlrEngine
52
52
  # TODO: this isn't used anywhere in the app, get rid of it?
53
53
  def link_to_field(fieldname, fieldvalue, displayvalue = nil)
54
54
  p = {:search_field => fieldname, :q => '"'+fieldvalue+'"'}
55
- link_url = catalog_index_path(p)
55
+ link_url = search_catalog_path(p)
56
56
  display = displayvalue.blank? ? fieldvalue: displayvalue
57
57
  link_to(display, link_url)
58
58
  end
59
59
 
60
60
  def link_to_facet(field_value, field, displayvalue = nil)
61
61
  if field == 'genre_basic_ssim'
62
- link_to(render_format(field_value), catalog_index_path(:f => {field => [field_value]}))
62
+ link_to(render_format(field_value), search_catalog_path(:f => {field => [field_value]}))
63
63
  else
64
- link_to(displayvalue.presence || field_value, catalog_index_path(:f => {field => [field_value]}))
64
+ link_to(displayvalue.presence || field_value, search_catalog_path(:f => {field => [field_value]}))
65
65
  end
66
66
  end
67
67
 
@@ -71,11 +71,11 @@ module CommonwealthVlrEngine
71
71
  fields.each_with_index do |field, index|
72
72
  facets[field] = [field_values[index]]
73
73
  end
74
- link_to(displayvalue.presence || field_values[0], catalog_index_path(:f => facets))
74
+ link_to(displayvalue.presence || field_values[0], search_catalog_path(:f => facets))
75
75
  end
76
76
 
77
77
  def link_to_county_facet(field_value, field)
78
- link_to(field_value + ' County', catalog_index_path(:f => {field => [field_value + ' (county)']}))
78
+ link_to(field_value + ' County', search_catalog_path(:f => {field => [field_value + ' (county)']}))
79
79
  end
80
80
 
81
81
  # returns the direct URL to a datastream in Fedora
@@ -145,52 +145,52 @@ module CommonwealthVlrEngine
145
145
  def osd_nav_images(path_to_directory)
146
146
  {
147
147
  zoomIn: {
148
- REST: image_path("#{path_to_directory}/zoomin_rest.png"),
149
- GROUP: image_path("#{path_to_directory}/zoomin_grouphover.png"),
150
- HOVER: image_path("#{path_to_directory}/zoomin_hover.png"),
151
- DOWN: image_path("#{path_to_directory}/zoomin_pressed.png")
148
+ REST: path_to_image("#{path_to_directory}/zoomin_rest.png"),
149
+ GROUP: path_to_image("#{path_to_directory}/zoomin_grouphover.png"),
150
+ HOVER: path_to_image("#{path_to_directory}/zoomin_hover.png"),
151
+ DOWN: path_to_image("#{path_to_directory}/zoomin_pressed.png")
152
152
  },
153
153
  zoomOut: {
154
- REST: image_path("#{path_to_directory}/zoomout_rest.png"),
155
- GROUP: image_path("#{path_to_directory}/zoomout_grouphover.png"),
156
- HOVER: image_path("#{path_to_directory}/zoomout_hover.png"),
157
- DOWN: image_path("#{path_to_directory}/zoomout_pressed.png")
154
+ REST: path_to_image("#{path_to_directory}/zoomout_rest.png"),
155
+ GROUP: path_to_image("#{path_to_directory}/zoomout_grouphover.png"),
156
+ HOVER: path_to_image("#{path_to_directory}/zoomout_hover.png"),
157
+ DOWN: path_to_image("#{path_to_directory}/zoomout_pressed.png")
158
158
  },
159
159
  home: {
160
- REST: image_path("#{path_to_directory}/home_rest.png"),
161
- GROUP: image_path("#{path_to_directory}/home_grouphover.png"),
162
- HOVER: image_path("#{path_to_directory}/home_hover.png"),
163
- DOWN: image_path("#{path_to_directory}/home_pressed.png")
160
+ REST: path_to_image("#{path_to_directory}/home_rest.png"),
161
+ GROUP: path_to_image("#{path_to_directory}/home_grouphover.png"),
162
+ HOVER: path_to_image("#{path_to_directory}/home_hover.png"),
163
+ DOWN: path_to_image("#{path_to_directory}/home_pressed.png")
164
164
  },
165
165
  fullpage: {
166
- REST: image_path("#{path_to_directory}/fullpage_rest.png"),
167
- GROUP: image_path("#{path_to_directory}/fullpage_grouphover.png"),
168
- HOVER: image_path("#{path_to_directory}/fullpage_hover.png"),
169
- DOWN: image_path("#{path_to_directory}/fullpage_pressed.png")
166
+ REST: path_to_image("#{path_to_directory}/fullpage_rest.png"),
167
+ GROUP: path_to_image("#{path_to_directory}/fullpage_grouphover.png"),
168
+ HOVER: path_to_image("#{path_to_directory}/fullpage_hover.png"),
169
+ DOWN: path_to_image("#{path_to_directory}/fullpage_pressed.png")
170
170
  },
171
171
  rotateleft: {
172
- REST: image_path("#{path_to_directory}/rotateleft_rest.png"),
173
- GROUP: image_path("#{path_to_directory}/rotateleft_grouphover.png"),
174
- HOVER: image_path("#{path_to_directory}/rotateleft_hover.png"),
175
- DOWN: image_path("#{path_to_directory}/rotateleft_pressed.png")
172
+ REST: path_to_image("#{path_to_directory}/rotateleft_rest.png"),
173
+ GROUP: path_to_image("#{path_to_directory}/rotateleft_grouphover.png"),
174
+ HOVER: path_to_image("#{path_to_directory}/rotateleft_hover.png"),
175
+ DOWN: path_to_image("#{path_to_directory}/rotateleft_pressed.png")
176
176
  },
177
177
  rotateright: {
178
- REST: image_path("#{path_to_directory}/rotateright_rest.png"),
179
- GROUP: image_path("#{path_to_directory}/rotateright_grouphover.png"),
180
- HOVER: image_path("#{path_to_directory}/rotateright_hover.png"),
181
- DOWN: image_path("#{path_to_directory}/rotateright_pressed.png")
178
+ REST: path_to_image("#{path_to_directory}/rotateright_rest.png"),
179
+ GROUP: path_to_image("#{path_to_directory}/rotateright_grouphover.png"),
180
+ HOVER: path_to_image("#{path_to_directory}/rotateright_hover.png"),
181
+ DOWN: path_to_image("#{path_to_directory}/rotateright_pressed.png")
182
182
  },
183
183
  previous: {
184
- REST: image_path("#{path_to_directory}/previous_rest.png"),
185
- GROUP: image_path("#{path_to_directory}/previous_grouphover.png"),
186
- HOVER: image_path("#{path_to_directory}/previous_hover.png"),
187
- DOWN: image_path("#{path_to_directory}/previous_pressed.png")
184
+ REST: path_to_image("#{path_to_directory}/previous_rest.png"),
185
+ GROUP: path_to_image("#{path_to_directory}/previous_grouphover.png"),
186
+ HOVER: path_to_image("#{path_to_directory}/previous_hover.png"),
187
+ DOWN: path_to_image("#{path_to_directory}/previous_pressed.png")
188
188
  },
189
189
  next: {
190
- REST: image_path("#{path_to_directory}/next_rest.png"),
191
- GROUP: image_path("#{path_to_directory}/next_grouphover.png"),
192
- HOVER: image_path("#{path_to_directory}/next_hover.png"),
193
- DOWN: image_path("#{path_to_directory}/next_pressed.png")
190
+ REST: path_to_image("#{path_to_directory}/next_rest.png"),
191
+ GROUP: path_to_image("#{path_to_directory}/next_grouphover.png"),
192
+ HOVER: path_to_image("#{path_to_directory}/next_hover.png"),
193
+ DOWN: path_to_image("#{path_to_directory}/next_pressed.png")
194
194
  }
195
195
  }.to_json
196
196
  end
@@ -16,17 +16,9 @@ module CommonwealthVlrEngine
16
16
  # local override to use custom #document_heading method (above) for catalog#show title heading
17
17
  def render_document_heading(*args)
18
18
  options = args.extract_options!
19
-
20
- tag_or_document = args.first
21
-
22
- if tag_or_document.is_a? String or tag_or_document.is_a? Symbol
23
- Deprecation.warn(Blacklight::BlacklightHelperBehavior, "#render_document_heading with a tag argument is deprecated; pass e.g. `tag: :h4` instead")
24
- tag = tag_or_document
25
- document = @document
26
- else
27
- tag = options.fetch(:tag, :h4)
28
- document = tag_or_document || @document
29
- end
19
+ document = args.first
20
+ tag = options.fetch(:tag, :h4)
21
+ document = document || @document
30
22
 
31
23
  content_tag(tag, document_heading(document), itemprop: "name")
32
24
  end
@@ -2,22 +2,6 @@ module CommonwealthVlrEngine
2
2
  module BlacklightUrlHelper
3
3
  include Blacklight::UrlHelperBehavior
4
4
 
5
- # overriding to allow use in collections#show and institutions#show
6
- # so facet links in those views point to catalog#index
7
- def add_facet_params_and_redirect(field, item)
8
- new_params = add_facet_params(field, item)
9
-
10
- # Delete any request params from facet-specific action, needed
11
- # to redir to index action properly.
12
- request_keys = blacklight_config.facet_paginator_class.request_keys
13
- new_params.except! *request_keys.values
14
-
15
- # Force controller#action to be catalog#index.
16
- new_params[:action] = "index"
17
- new_params[:controller] = "catalog"
18
- new_params
19
- end
20
-
21
5
  # need this method for rss and atom polymorphic_url(url_for_document(document))
22
6
  # because polymorphic_url appends any action passed in arg hash to route
23
7
  # so we need to re-route to the correct url
@@ -36,6 +20,7 @@ module CommonwealthVlrEngine
36
20
  end
37
21
 
38
22
  # override to route to collections#show and institutions#show where appropriate
23
+ # this uses the older BL 5.14 def as the basis, but don't really need to update to BL6.* model
39
24
  def url_for_document doc, options = {}
40
25
  if respond_to?(:blacklight_config) && doc.respond_to?(:[])
41
26
  display_type = doc[blacklight_config.show.display_type_field].presence
@@ -269,7 +269,7 @@ module CommonwealthVlrEngine
269
269
  if document[:subject_facet_ssim] || document[:subject_geo_city_ssim]
270
270
  content_tag :div, :id => 'more_mlt_link_wrapper' do
271
271
  link_to t('blacklight.more_like_this.more_mlt_link'),
272
- catalog_index_path(:mlt_id => document.id,
272
+ search_catalog_path(:mlt_id => document.id,
273
273
  :qt => 'mlt'),
274
274
  :id => 'more_mlt_link'
275
275
  end
@@ -6,7 +6,7 @@ module CommonwealthVlrEngine
6
6
  facet_params = {blacklight_config.collection_field => [col_title]}
7
7
  facet_params[blacklight_config.institution_field] = institution_name if institution_name
8
8
  link_to(t('blacklight.collections.browse.all'),
9
- catalog_index_path(:f => facet_params),
9
+ search_catalog_path(:f => facet_params),
10
10
  :class => link_class)
11
11
  end
12
12
 
@@ -4,7 +4,7 @@ module CommonwealthVlrEngine
4
4
  # link to view all items from an institution
5
5
  def link_to_all_inst_items(link_class)
6
6
  link_to(t('blacklight.institutions.browse.all'),
7
- catalog_index_path(:f => {blacklight_config.institution_field => [@institution_title]}),
7
+ search_catalog_path(:f => {blacklight_config.institution_field => [@institution_title]}),
8
8
  :class => link_class)
9
9
  end
10
10
 
@@ -13,7 +13,7 @@ module CommonwealthVlrEngine
13
13
  def render_institutions_index documents = nil, locals = {}
14
14
  documents ||= @document_list
15
15
  if document_index_view_type.to_s == 'maps'
16
- render :partial => 'catalog/index_map_institutions',
16
+ render :partial => 'catalog/index_mapview_institutions',
17
17
  :locals => {:geojson_features => serialize_geojson(map_facet_values,
18
18
  nil,
19
19
  {partial: 'institutions/map_institutions_search'})}
@@ -5,9 +5,8 @@ module CommonwealthVlrEngine
5
5
  # OVERRIDE: convert state abbreviations, deal with complex locations, etc.
6
6
  # create a link to a location name facet value
7
7
  def link_to_placename_field field_value, field, displayvalue = nil, catalogpath = nil
8
- search_path = catalogpath || 'catalog_index_path'
8
+ search_path = catalogpath || 'search_catalog_path'
9
9
  new_params = params
10
- new_params[:view] = default_document_index_view_type
11
10
  field_values = field_value.split(', ')
12
11
  if field_values.last.match(/[\.\)]/) # Mass.)
13
12
  field_values = [field_values.join(', ')]
@@ -23,24 +22,29 @@ module CommonwealthVlrEngine
23
22
  field_values[field_values.length-1] = state_name if state_name
24
23
  end
25
24
  field_values.each do |val|
25
+ # new_params = new_params.to_hash
26
26
  place = val.match(/\(county\)/) ? val : val.gsub(/\s\([a-z]*\)\z/,'')
27
- new_params = add_facet_params(field, place, new_params) unless params[:f] && params[:f][field] && params[:f][field].include?(place)
28
- new_params[:view] = default_document_index_view_type
27
+ unless params[:f] && params[:f][field] && params[:f][field].include?(place)
28
+ # have to initialize SearchState with existing params as Hash, not HashWithIndifferentAccess
29
+ new_params = Blacklight::SearchState.new(new_params.to_hash,
30
+ blacklight_config).add_facet_params(field, place)
31
+ end
29
32
  end
33
+ new_params[:view] = default_document_index_view_type
30
34
  link_to(displayvalue.presence || field_value,
31
35
  self.send(search_path,new_params.except(:id, :spatial_search_type, :coordinates)))
32
36
  end
33
37
 
34
38
  # OVERRIDE: use a static file for catalog#map so page loads faster
35
39
  # render the map for #index and #map views
36
- def render_index_map
40
+ def render_index_mapview
37
41
  static_geojson_file_loc = "#{Rails.root.to_s}/#{GEOJSON_STATIC_FILE['filepath']}"
38
42
  if Rails.env.to_s == 'production' && params[:action] == 'map' && File::exists?(static_geojson_file_loc)
39
43
  geojson_for_map = File.open(static_geojson_file_loc).first
40
44
  else
41
45
  geojson_for_map = serialize_geojson(map_facet_values)
42
46
  end
43
- render :partial => 'catalog/index_map',
47
+ render :partial => 'catalog/index_mapview',
44
48
  :locals => {:geojson_features => geojson_for_map}
45
49
  end
46
50
 
@@ -27,8 +27,8 @@
27
27
  </div>
28
28
  </div>
29
29
  <div class="pull-right">
30
- <%= submit_tag 'Search', :class=>'btn btn-primary advanced_submit', :id=>'advanced_search' %>
31
- <%= link_to 'Start over', {:controller => 'advanced', :action => 'index'}, :class =>'reset btn btn-default' %>
30
+ <%= submit_tag t('blacklight_advanced_search.form.search_btn'), :class=>'btn btn-primary advanced_submit', :id=>'advanced_search' %>
31
+ <%= link_to t('blacklight_advanced_search.form.start_over'), blacklight_advanced_search_engine.advanced_search_path, :class =>'reset btn btn-default' %>
32
32
  </div>
33
33
 
34
34
  <%# search_fields_for_advanced_search.each do |key, field_def| -%>
@@ -1,4 +1,4 @@
1
- <%= form_tag catalog_index_path, :id => 'advanced_search_form', :class => 'advanced form-horizontal', :method => :get do %>
1
+ <%= form_tag search_catalog_path, :id => 'advanced_search_form', :class => 'advanced form-horizontal', :method => :get do %>
2
2
  <%# search_as_hidden_fields(:params => advanced_search_context,
3
3
  :op => 'AND' ) %>
4
4
  <div class="row">
@@ -28,7 +28,7 @@
28
28
  <div class="pull-right">
29
29
  <%= submit_tag 'Search', :class=>'btn btn-primary advanced_submit' %>
30
30
  <%= link_to 'Start over',
31
- {:controller => 'advanced', :action => 'index'},
31
+ blacklight_advanced_search_engine.advanced_search_path,
32
32
  :class => 'reset btn btn-default' %>
33
33
  </div>
34
34
  </div>
@@ -11,7 +11,7 @@
11
11
 
12
12
  <ul id="search_mode_tabs" class="nav nav-tabs">
13
13
  <li>
14
- <%= link_to 'Basic', catalog_index_path %>
14
+ <%= link_to 'Basic', search_catalog_path %>
15
15
  </li>
16
16
  <li class="active"><a href="#">Advanced</a></li>
17
17
  </ul>
@@ -1,4 +1,4 @@
1
- <% @page_title = t('blacklight.bookmarks.title') + ' - ' + application_name %>
1
+ <% @page_title = t('blacklight.bookmarks.page_title', :application_name => application_name) %>
2
2
 
3
3
  <%= javascript_include_tag 'commonwealth-vlr-engine/folder_tools' %>
4
4
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  <ul id="search_mode_tabs" class="nav nav-tabs">
7
7
  <li class="active"><a href="#">Basic</a></li>
8
- <li class="hidden-xs"><%= link_to 'Advanced', advanced_search_path %></li>
8
+ <li class="hidden-xs"><%= link_to 'Advanced', blacklight_advanced_search_engine.advanced_search_path %></li>
9
9
  </ul>
10
10
 
11
11
  <div class="tab-content">
@@ -22,7 +22,7 @@
22
22
  :method => :get,
23
23
  :id => 'basic_search_form',
24
24
  :class => 'basic-search-form form-inline' do %>
25
- <%= render_hash_as_hidden_fields(params_for_search().except(:q, :qt, :page, :f, :sort)) %>
25
+ <%= render_hash_as_hidden_fields(search_state.params_for_search().except(:q, :qt, :page, :f, :sort)) %>
26
26
  <label for="q_basic" class="sr-only">
27
27
  <%= t('blacklight.search.form.search.label') %>
28
28
  </label>
@@ -31,7 +31,9 @@
31
31
  :placeholder => t('blacklight.search.basic_search.form.q'),
32
32
  :class => 'search_q q form-control',
33
33
  :id => 'q_basic',
34
- :autofocus => should_autofocus_on_search_box? %>
34
+ :autofocus => should_autofocus_on_search_box?,
35
+ data: { autocomplete_enabled: autocomplete_enabled?,
36
+ autocomplete_path: blacklight.suggest_index_path } %>
35
37
 
36
38
  <% unless search_fields.empty? %>
37
39
  <label for="search_field" class="sr-only">
@@ -11,7 +11,7 @@
11
11
  <% if current_user %>
12
12
  <li>
13
13
  <%= link_to t('blacklight.saved_searches.save'),
14
- save_search_path( session[:history].first ),
14
+ blacklight.save_search_path( session[:history].first ),
15
15
  :method => :put,
16
16
  :id=>'saveSearchLink',
17
17
  :class=>'catalog_saveSearchLink btn btn-sm btn-default' %>
@@ -1,15 +1,17 @@
1
1
  <div id="documents">
2
2
  <% display_facet.items.each do |item| -%>
3
3
  <% series_title = facet_display_value(solr_field, item) %>
4
+ <% series_object = get_series_image_obj(series_title, @collection_title) %>
4
5
  <div class="document col-sm-3">
5
6
  <div class="thumbnail">
6
- <%= link_to(create_thumb_img_element(get_series_image_obj(series_title,
7
- @collection_title),
8
- %w(series_thumbnail)),
9
- add_facet_params_and_redirect(solr_field, item)) %>
7
+ <% if series_object %>
8
+ <%= link_to(create_thumb_img_element(series_object,
9
+ %w(series_thumbnail)),
10
+ path_for_facet(solr_field, item)) %>
11
+ <% end %>
10
12
  <div class="caption">
11
13
  <%= (link_to(series_title,
12
- add_facet_params_and_redirect(solr_field, item),
14
+ path_for_facet(solr_field, item),
13
15
  :class=> 'facet_select')).html_safe %><!-- <br/>
14
16
  <span class="series_facet_count">
15
17
  <%# render_facet_count(item.hits) + ' items' %>
@@ -1,6 +1,4 @@
1
- <%# copy (with some changes) of blacklight-gallery/app/views/catalog/_index_gallery %>
2
- <%# need this partial or catalog#index will attempt to render blacklight-maps/index_map %>
3
- <%# whenever rendering a doc with 'map' as the value of blacklight_config.display_type_field %>
1
+ <%# copy (with some changes to styles) of blacklight-gallery/app/views/catalog/_index_gallery %>
4
2
  <div class="document col-xs-6 col-sm-4 col-md-4 <%= cycle('new_row', '', '', name: 'desktop_row_class') %> <%= cycle('new_row_device', '', name: 'device_row_class') %>">
5
3
  <div class="thumbnail">
6
4
  <%= render_thumbnail_tag(document, {}, :counter => document_counter_with_offset(document_counter)) %>
@@ -1,17 +1,27 @@
1
- <%= form_tag search_action_url, :method => :get, :class => 'search-query-form form-inline clearfix navbar-form' do %>
2
- <%= render_hash_as_hidden_fields(params_for_search().except(:q, :search_field, :qt, :page, :utf8)) %>
1
+ <%= form_tag search_action_url, method: :get, class: 'search-query-form form-inline clearfix navbar-form', role: 'search' do %>
2
+ <%= render_hash_as_hidden_fields(search_state.params_for_search().except(:q, :search_field, :qt, :page, :utf8)) %>
3
3
 
4
4
  <% unless search_fields.empty? %>
5
5
 
6
6
  <div class="search_select_wrapper">
7
7
  <label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label>
8
- <%= select_tag(:search_field, options_for_select(search_fields, h(params[:search_field])), :title => t('blacklight.search.form.search_field.title'), :class=>'search_field btn btn-default') %>
8
+ <%= select_tag(:search_field,
9
+ options_for_select(search_fields, h(params[:search_field])),
10
+ title: t('blacklight.search.form.search_field.title'),
11
+ class: 'search_field btn btn-default') %>
9
12
  <span class="sr-only"><%= t('blacklight.search.form.search_field.post_label') %></span>
10
13
  </div>
11
14
  <% end %>
12
15
  <label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
13
16
  <div class="input-group">
14
- <%= text_field_tag :q, params[:q], :placeholder => t('blacklight.search.form.search.placeholder'), :class => 'search_q q form-control', :id => 'q', :autofocus => should_autofocus_on_search_box? %>
17
+ <%= text_field_tag :q,
18
+ params[:q],
19
+ placeholder: t('blacklight.search.form.search.placeholder'),
20
+ class: 'search_q q form-control',
21
+ id: 'q',
22
+ autofocus: should_autofocus_on_search_box?,
23
+ data: { autocomplete_enabled: autocomplete_enabled?,
24
+ autocomplete_path: blacklight.suggest_index_path } %>
15
25
 
16
26
  <span class="input-group-btn">
17
27
  <button type="submit" class="btn btn-primary search-btn" id="search">
@@ -319,6 +319,15 @@
319
319
  <% end %>
320
320
  </dd>
321
321
  <% end %>
322
+ <%# physical description note field %>
323
+ <% if document[:note_physical_tsim] %>
324
+ <dt><%= t('blacklight.metadata_display.fields.note_physical') %>:</dt>
325
+ <dd>
326
+ <% document[:note_physical_tsim].each do |physical_note| %>
327
+ <%= physical_note %><br />
328
+ <% end %>
329
+ </dd>
330
+ <% end %>
322
331
  <%# extent field %>
323
332
  <% if document[:extent_tsi] %>
324
333
  <dt><%= t('blacklight.metadata_display.fields.extent') %>:</dt>
@@ -16,7 +16,7 @@
16
16
  <% if current_search_session %>
17
17
  <%= link_back_to_catalog(:class => 'btn btn-danger') %>
18
18
  <% else %>
19
- <%= link_to t('blacklight.back_to_search'), catalog_index_path, :class => 'btn btn-danger' %>
19
+ <%= link_to t('blacklight.back_to_search'), search_catalog_path, :class => 'btn btn-danger' %>
20
20
  <% end %>
21
21
  </div>
22
22
  </div>