commonwealth-vlr-engine 0.0.4 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_120x120.png +0 -0
  4. data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_152x152.png +0 -0
  5. data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_60x60.png +0 -0
  6. data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_76x76.png +0 -0
  7. data/app/assets/javascripts/blacklight_google_analytics/blacklight_google_analytics.js.erb +11 -0
  8. data/app/assets/javascripts/commonwealth-vlr-engine.js +3 -0
  9. data/app/assets/javascripts/commonwealth-vlr-engine/download_utils.js +4 -0
  10. data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +1 -0
  11. data/app/assets/stylesheets/commonwealth-vlr-engine/downloads.scss +18 -0
  12. data/app/assets/stylesheets/commonwealth-vlr-engine/facets.scss +64 -0
  13. data/app/assets/stylesheets/commonwealth-vlr-engine/vlr_dependencies.css +3 -1
  14. data/app/controllers/bookmarks_controller.rb +7 -2
  15. data/app/controllers/collections_controller.rb +1 -109
  16. data/app/controllers/concerns/commonwealth_vlr_engine/collections_controller_behavior.rb +132 -0
  17. data/app/controllers/concerns/commonwealth_vlr_engine/downloads_controller_behavior.rb +184 -0
  18. data/app/controllers/concerns/commonwealth_vlr_engine/institutions_controller_behavior.rb +70 -0
  19. data/app/controllers/downloads_controller.rb +4 -0
  20. data/app/controllers/iiif_manifest_controller.rb +2 -7
  21. data/app/controllers/image_viewer_controller.rb +3 -13
  22. data/app/controllers/institutions_controller.rb +1 -65
  23. data/app/controllers/ocr_search_controller.rb +1 -1
  24. data/app/controllers/saved_searches_controller.rb +2 -0
  25. data/app/controllers/search_history_controller.rb +2 -0
  26. data/app/helpers/commonwealth_vlr_engine/application_helper.rb +20 -2
  27. data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +36 -53
  28. data/app/helpers/commonwealth_vlr_engine/downloads_helper_behavior.rb +192 -0
  29. data/app/helpers/commonwealth_vlr_engine/facets_helper.rb +3 -1
  30. data/app/helpers/commonwealth_vlr_engine/ocr_search_helper_behavior.rb +5 -0
  31. data/app/helpers/commonwealth_vlr_engine/search_history_constraints_helper.rb +25 -0
  32. data/app/helpers/downloads_helper.rb +3 -0
  33. data/app/views/catalog/_add_this.html.erb +3 -1
  34. data/app/views/catalog/_folder_item_control.html.erb +2 -1
  35. data/app/views/catalog/_index_mapview.html.erb +9 -0
  36. data/app/views/catalog/_more_like_this.html.erb +1 -1
  37. data/app/views/catalog/_show_cite_tools.html.erb +3 -0
  38. data/app/views/catalog/_show_default.html.erb +13 -12
  39. data/app/views/catalog/_show_partials/_show_book_viewer_link.html.erb +1 -1
  40. data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +3 -3
  41. data/app/views/catalog/_show_partials/_show_downloads.html.erb +1 -1
  42. data/app/views/catalog/_show_partials/_show_volumes.html.erb +1 -1
  43. data/app/views/catalog/_show_sharing_tools.html.erb +3 -0
  44. data/app/views/collections/show.html.erb +1 -0
  45. data/app/views/downloads/_terms_of_use.html.erb +29 -0
  46. data/app/views/downloads/show.html.erb +29 -0
  47. data/app/views/image_viewer/_render_book_viewer.html.erb +1 -1
  48. data/app/views/institutions/show.html.erb +2 -10
  49. data/app/views/layouts/commonwealth-vlr-engine.html.erb +1 -4
  50. data/app/views/ocr_search/_index_ocr_list.html.erb +3 -3
  51. data/app/views/shared/_mobile_icon_tags.html.erb +4 -0
  52. data/app/views/shared/_search_form_header.html.erb +1 -1
  53. data/app/views/shared/_tools.html.erb +5 -5
  54. data/commonwealth-vlr-engine.gemspec +8 -6
  55. data/config/initializers/patch_blacklight_advanced_search.rb +6 -6
  56. data/config/initializers/patch_blacklight_range_limit.rb +18 -0
  57. data/config/jetty.yml +1 -1
  58. data/config/locales/commonwealth-vlr-engine.en.yml +12 -0
  59. data/config/routes.rb +6 -0
  60. data/lib/commonwealth-vlr-engine.rb +1 -0
  61. data/lib/commonwealth-vlr-engine/controller.rb +18 -3
  62. data/lib/commonwealth-vlr-engine/controller_override.rb +79 -21
  63. data/lib/commonwealth-vlr-engine/engine.rb +1 -0
  64. data/lib/commonwealth-vlr-engine/render_constraints_override.rb +15 -14
  65. data/lib/commonwealth-vlr-engine/search_builder/collections_search_builder.rb +1 -1
  66. data/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior.rb +13 -1
  67. data/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder.rb +1 -1
  68. data/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder.rb +1 -1
  69. data/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder.rb +2 -1
  70. data/lib/commonwealth-vlr-engine/streaming.rb +50 -0
  71. data/lib/commonwealth-vlr-engine/version.rb +1 -1
  72. data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +8 -0
  73. data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_search_builder.rb +4 -3
  74. data/lib/generators/commonwealth_vlr_engine/templates/config/vlr.yml +3 -0
  75. data/solr_conf/conf/solrconfig.xml +42 -5
  76. data/spec/controllers/collections_controller_spec.rb +20 -0
  77. data/spec/controllers/downloads_controller_spec.rb +65 -0
  78. data/spec/controllers/image_viewer_controller_spec.rb +0 -18
  79. data/spec/controllers/institutions_controller_spec.rb +7 -0
  80. data/spec/features/advanced_search_date_range_spec.rb +36 -0
  81. data/spec/features/collections/index_spec.rb +6 -0
  82. data/spec/features/collections/show_spec.rb +38 -0
  83. data/spec/features/more_like_this_search_spec.rb +18 -1
  84. data/spec/fixtures/sample_solr_documents.yml +107 -19
  85. data/spec/helpers/application_helper_spec.rb +9 -2
  86. data/spec/helpers/catalog_helper_spec.rb +26 -42
  87. data/spec/helpers/downloads_helper_spec.rb +173 -0
  88. data/spec/helpers/ocr_search_helper_spec.rb +15 -7
  89. data/spec/helpers/range_limit_helper_spec.rb +20 -0
  90. data/spec/helpers/search_history_constraints_helper_spec.rb +39 -0
  91. data/spec/lib/commonwealth-vlr-engine/controller_override_spec.rb +37 -0
  92. data/spec/lib/commonwealth-vlr-engine/render_constraints_override_spec.rb +0 -10
  93. data/spec/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior_spec.rb +21 -3
  94. data/spec/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder_spec.rb +1 -1
  95. metadata +99 -12
  96. data/app/helpers/commonwealth_vlr_engine/component_helper.rb +0 -22
  97. data/app/views/catalog/_show_tools.html.erb +0 -42
  98. data/spec/helpers/component_helper_spec.rb +0 -34
@@ -7,7 +7,9 @@ module CommonwealthVlrEngine
7
7
  # don't display 'Collections' genre_basic_ssim facet value
8
8
  # on collections#index or collections#facet views
9
9
  def render_facet_item(facet_field, item)
10
- return if controller.controller_name == 'collections' && controller.action_name == 'index' && item.value == 'Collections'
10
+ return if controller.controller_name == 'collections' &&
11
+ (controller.action_name == 'index' || controller.action_name == 'facet') &&
12
+ item.value == 'Collections'
11
13
  if facet_in_params?(facet_field, item.value )
12
14
  render_selected_facet_value(facet_field, item)
13
15
  else
@@ -7,6 +7,11 @@ module CommonwealthVlrEngine
7
7
  term_freq > 0 ? term_freq : term_freq+1
8
8
  end
9
9
 
10
+ # determine of the item has text content that can be searched
11
+ def has_searchable_text?(document)
12
+ document['has_searchable_text_bsi']
13
+ end
14
+
10
15
  # if current_search_session exists, return query_params['q'], otherwise return nil
11
16
  # @current_search_session is defined in Blacklight::SearchContext
12
17
  def ocr_q_params(current_search_session)
@@ -0,0 +1,25 @@
1
+ module CommonwealthVlrEngine
2
+ module SearchHistoryConstraintsHelper
3
+ include Blacklight::SearchHistoryConstraintsHelperBehavior
4
+
5
+ # include render_search_to_s_mlt() in rendered constraints
6
+ def render_search_to_s(params)
7
+ render_search_to_s_advanced(params) + render_search_to_s_mlt(params) + super
8
+ end
9
+
10
+ # render the MLT search query constraint, used on Search History page.
11
+ def render_search_to_s_mlt(params)
12
+ return "".html_safe if params[:mlt_id].blank?
13
+ render_search_to_s_element(t('blacklight.more_like_this.constraint_label'),
14
+ render_filter_value(params[:mlt_id]))
15
+ end
16
+
17
+ # render advanced search date constraints, used on SearchHistory, etc.
18
+ def render_search_to_s_advanced(params)
19
+ return "".html_safe if params[:date_start].blank? && params[:date_end].blank?
20
+ render_search_to_s_element(t('blacklight.advanced_search.constraints.date'),
21
+ render_filter_value(date_range_constraints_to_s(params)))
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,3 @@
1
+ module DownloadsHelper
2
+ include CommonwealthVlrEngine::DownloadsHelperBehavior
3
+ end
@@ -1,3 +1,4 @@
1
+ <div class="documentFunctions">
1
2
  <!-- AddThis Button BEGIN -->
2
3
  <div id="social_media_links" class="addthis_toolbox addthis_default_style addthis_32x32_style">
3
4
  <a class="addthis_button_facebook" style="cursor:pointer"></a>
@@ -7,4 +8,5 @@
7
8
  <a class="addthis_button_compact"></a>
8
9
  </div>
9
10
  <script type="text/javascript" src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=xa-505226a67a68dc99"></script>
10
- <!-- AddThis Button END -->
11
+ <!-- AddThis Button END -->
12
+ </div>
@@ -1,5 +1,5 @@
1
1
  <% if current_or_guest_user %>
2
-
2
+ <div class="documentFunctions">
3
3
  <div id="folder_item_toggle">
4
4
 
5
5
  <% if current_user %>
@@ -59,6 +59,7 @@
59
59
  <% end %>
60
60
 
61
61
  </div>
62
+ </div>
62
63
 
63
64
  <% end %>
64
65
 
@@ -0,0 +1,9 @@
1
+ <%= blacklight_map_tag('blacklight-index-map',
2
+ {data:{searchcontrol: true,
3
+ catalogpath: search_catalog_path,
4
+ placenamefield: blacklight_config.view.maps.placename_field,
5
+ clustercount:'hits',
6
+ searchresultsview: default_document_index_view_type,
7
+ initialzoom: blacklight_config.view.maps.show_initial_zoom
8
+ }}) %>
9
+ <%= javascript_tag "$('#blacklight-index-map').blacklight_leaflet_map(#{geojson_features});" %>
@@ -1,7 +1,7 @@
1
1
  <div id="more_like_this" class="well well-sm">
2
2
  <h4><%= t('blacklight.more_like_this.heading') %></h4>
3
3
  <div id="more_like_this_docs" class="row">
4
- <%= render :collection => document.more_like_this,
4
+ <%= render :collection => mlt_document_list,
5
5
  :partial => 'show_more_like_this',
6
6
  :as => :document %>
7
7
  </div>
@@ -0,0 +1,3 @@
1
+ <%= link_to content_tag(:span, '', :class => 'glyphicon glyphicon-list-alt') + ' ' + t('blacklight.tools.citation'),
2
+ citation_solr_document_path(:id => @document),
3
+ {:id => 'citeLink', :data => {:ajax_modal => 'trigger'}} %>
@@ -1,21 +1,20 @@
1
1
  <%# show the object image(s)/file(s) and metadata %>
2
2
  <%# TODO: refactor how views access files/volumes/etc., this is getting REALLY ugly %>
3
- <% image_files = has_image_files?(@object_files) %>
4
3
  <% volumes = has_volumes?(@document) %>
5
4
  <% book_reader = false %>
6
5
  <% oai_object = @document[blacklight_config.show.display_type_field.to_sym] == 'OAIObject' ? true : false %>
7
- <% if image_files %>
6
+ <% if has_image_files?(@object_files) %>
8
7
  <%= javascript_include_tag 'openseadragon' %>
9
- <% case image_files.length %>
8
+ <% case @object_files[:images].length %>
10
9
  <% when 1 %>
11
10
  <%= render :partial => 'catalog/_show_partials/show_default_img',
12
11
  :locals => {:document => @document,
13
- :image_pid => image_files.first,
12
+ :image_pid => @object_files[:images][0]['id'],
14
13
  :page_sequence => {:total => 1}} %>
15
14
  <% when 2..7 %>
16
15
  <%= render :partial => 'catalog/_show_partials/show_multi_img',
17
16
  :locals => {:document => @document,
18
- :image_files => image_files} %>
17
+ :image_files => image_file_pids(@object_files[:images])} %>
19
18
  <% else %>
20
19
  <% book_reader = true %>
21
20
  <% end %>
@@ -24,7 +23,7 @@
24
23
  <div class="row">
25
24
 
26
25
  <%# show thumbnail or icon if object has no images, or volume list %>
27
- <% if !image_files || book_reader || volumes %>
26
+ <% if !has_image_files?(@object_files) || book_reader || volumes %>
28
27
  <div id="thumbnail_wrapper" class="col-sm-4">
29
28
  <div id="thumb_img_show_container">
30
29
  <% img = create_thumb_img_element(@document, %w(thumb_img_show)) %>
@@ -52,21 +51,23 @@
52
51
  <%= render :partial => 'catalog/_show_partials/show_default_metadata', :locals => {:document => @document} %>
53
52
 
54
53
  <%# more like this %>
55
- <% unless @document.more_like_this.empty? %>
56
- <%= render :partial => 'catalog/more_like_this', :locals => {:document => @document} %>
54
+ <% unless @mlt_document_list.empty? %>
55
+ <%= render partial: 'catalog/more_like_this',
56
+ locals: {document: @document, mlt_document_list: @mlt_document_list} %>
57
57
  <% end %>
58
58
 
59
59
  </div>
60
60
 
61
61
  <div id="sidebar" class="<%= show_sidebar_classes %>">
62
- <%# render files to download %>
63
- <% if has_downloadable_files?(@object_files) %>
64
- <%= render :partial => 'catalog/_show_partials/show_downloads', :locals => {:document => @document, :object_files => @object_files} %>
65
- <% end %>
66
62
 
67
63
  <% # bookmark/folder/sharing functions -%>
68
64
  <%= render_document_sidebar_partial %>
69
65
 
66
+ <%# render files to download %>
67
+ <% if has_downloadable_files?(@document, @object_files) %>
68
+ <%= render :partial => 'catalog/_show_partials/show_downloads', :locals => {:document => @document, :object_files => @object_files} %>
69
+ <% end %>
70
+
70
71
  <%# map view %>
71
72
  <%= render :partial => 'catalog/show_maplet_default' %>
72
73
 
@@ -11,7 +11,7 @@
11
11
  <i class="fa fa-book"></i> <%= t('blacklight.book_viewer.link_to_reader') %>
12
12
  <% end %>
13
13
  </li>
14
- <% if document['identifier_ia_id_ssi'] || document['has_searchable_text_bsi'] %>
14
+ <% if has_searchable_text?(document) %>
15
15
  <li id="search_inside_link_wrap">
16
16
  <%= link_to(ocr_search_path,
17
17
  :class => 'search_inside_link btn',
@@ -34,11 +34,11 @@
34
34
  </dd>
35
35
  <% end %>
36
36
  <%# uniform title field %>
37
- <% if document[:title_info_uniform_tsim] %>
37
+ <% if document[:title_info_uniform_ssim] %>
38
38
  <dt><%= t('blacklight.metadata_display.fields.title_uniform') %>:</dt>
39
39
  <dd>
40
- <% document[:title_info_uniform_tsim].each do |uniform_title| %>
41
- <%= uniform_title %><br />
40
+ <% document[:title_info_uniform_ssim].each do |uniform_title| %>
41
+ <%= link_to_facet(uniform_title, 'title_info_uniform_ssim') %><br />
42
42
  <% end %>
43
43
  </dd>
44
44
  <% end %>
@@ -5,7 +5,7 @@
5
5
 
6
6
  <div class="panel-body">
7
7
  <ul class="nav nav-list">
8
- <% create_download_links(document, object_files, 'sidebar_downloads_link').each do |link| %>
8
+ <% create_download_links(document, object_files).each do |link| %>
9
9
  <li class="download_list_item"><%= link %></li>
10
10
  <% end %>
11
11
  <!-- <li class="download_info"><%# t('blacklight.downloads.link_info') %></li> -->
@@ -37,7 +37,7 @@
37
37
  <div class="download_volume_links">
38
38
  <i class="fa fa-download"></i> Downloads
39
39
  <ul class="volume_downloads">
40
- <% create_download_links(volume[:vol_doc], volume[:vol_files], 'volume_downloads_link').each do |link| %>
40
+ <% create_download_links(volume[:vol_doc], volume[:vol_files]).each do |link| %>
41
41
  <li class="download_list_item"><%= link %></li>
42
42
  <% end %>
43
43
  </ul>
@@ -0,0 +1,3 @@
1
+ <%= link_to content_tag(:span, '', :class => 'glyphicon glyphicon-envelope') + ' ' + t('blacklight.tools.email'),
2
+ email_solr_document_path(:id => @document),
3
+ {:id => 'emailLink', :data => {:ajax_modal => 'trigger'}} %>
@@ -92,6 +92,7 @@
92
92
  </div>
93
93
 
94
94
  <div id="sidebar" class="col-sm-3">
95
+ <%= render :partial => 'show_tools' if (request.host_with_port.match(/admin\./) || Rails.application.class.parent_name == 'Commonwealth') %>
95
96
  <%= javascript_include_tag 'commonwealth-vlr-engine/collection_facets' %>
96
97
  <%= render 'search_sidebar' %>
97
98
  </div>
@@ -0,0 +1,29 @@
1
+ <strong>Please review the terms of use for this item:</strong>
2
+ <ul class="downloads_terms">
3
+ <% if document[:rights_ssm] %>
4
+ <% document[:rights_ssm].each do |rights| %>
5
+ <li><%= rights %></li>
6
+ <% end %>
7
+ <% end %>
8
+ <% if document[:license_ssm] %>
9
+ <% document[:license_ssm].each do |license| %>
10
+ <li>
11
+ <%= license %>
12
+ <% if license.match(/\(CC\s/) %>
13
+ <br/>
14
+ <%= link_to t('blacklight.downloads.cc'),
15
+ cc_url(license),
16
+ target: '_blank' %>
17
+ <%= render_cc_license(license) %>
18
+ <% end %>
19
+ </li>
20
+ <% end %>
21
+ <% end %>
22
+ <li>
23
+ <%= link_to t('blacklight.pages.contact.title'), feedback_path %> if you have questions about usage or reproduction.
24
+ </li>
25
+ </ul>
26
+ <p>
27
+ <strong>Click the button below to start your download</strong><br/>
28
+ It may take a few moments for your download to begin, especially for large file sizes.
29
+ </p>
@@ -0,0 +1,29 @@
1
+ <div class="modal-header">
2
+ <button type="button" class="ajax-modal-close close" data-dismiss="modal" aria-hidden="true">×</button>
3
+ <h4 id="downloads_modal_title" class="modal-title">
4
+ <%= truncate("#{t('blacklight.downloads.title')}: #{render_main_title(@parent_document)}",
5
+ length: 55,
6
+ separator: ' ') %>
7
+ </h4>
8
+ </div>
9
+ <div id="downloads_modal" class="modal-body">
10
+ <%= render partial: 'terms_of_use', locals: {document: @parent_document} %>
11
+ </div>
12
+
13
+ <div id="downloads_start_links" class="modal-footer">
14
+ <%= link_to(url_for_download(@document, params[:datastream_id]),
15
+ class: 'trigger_download btn btn-primary ' + params[:datastream_id],
16
+ rel: 'nofollow',
17
+ target: '_blank') do %>
18
+ <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
19
+ <%= "Download #{truncate(download_link_title(@parent_document[:identifier_ia_id_ssi] ? @parent_document : @document,
20
+ @object_profile,
21
+ params[:datastream_id]),
22
+ length: 40,
23
+ omission: '...')} (#{file_type_string(params[:datastream_id],
24
+ @object_profile)}, #{file_size_string(params[:datastream_id],
25
+ @object_profile)})" %>
26
+ <% end %>
27
+ <button type="button" class="btn btn-warning" data-dismiss="modal">Cancel</button>
28
+ </div>
29
+ <%= javascript_include_tag 'commonwealth-vlr-engine/download_utils' %>
@@ -142,7 +142,7 @@ var $window = $(window),
142
142
  seadragonPrefixUrl: '', // "/assets/commonwealth-vlr-engine/openseadragon/"
143
143
  seadragonNavImages: $.parseJSON('<%= osd_nav_images('commonwealth-vlr-engine/openseadragon').html_safe %>'),
144
144
  thumbUrlTemplate: generateThumbUrl,
145
- fts: <%= @document[:identifier_ia_id_ssi] ? 'true' : 'false' %>,
145
+ fts: <%= has_searchable_text?(@document) ? 'true' : 'false' %>,
146
146
  wordCoordinatesUrlTemplate: generateWordCoordsUrl,
147
147
  ocrSearchPath: "<%= ocr_search_path %>"
148
148
  });
@@ -35,16 +35,7 @@
35
35
  </div>
36
36
  </div>
37
37
 
38
- <% if @institution_image_pid %>
39
- <%= iiif_image_tag(@institution_image_pid,
40
- {:size => 'pct:20',
41
- :alt => @institution_title,
42
- :class => 'institution_img_show'}) %>
43
- <% else %>
44
- <%= image_tag(institution_icon_path,
45
- :alt => @institution_title,
46
- :class => 'institution_img_show') %>
47
- <% end %>
38
+ <%= create_thumb_img_element(@document, ['institution_img_show']) %>
48
39
 
49
40
  <div id="institution_desc">
50
41
 
@@ -81,6 +72,7 @@
81
72
 
82
73
 
83
74
  <div id="sidebar" class="col-sm-3">
75
+ <%= render :partial => 'show_tools' if (request.host_with_port.match(/admin\./) || Rails.application.class.parent_name == 'Commonwealth') %>
84
76
  <%= render 'search_sidebar' %>
85
77
  </div>
86
78
 
@@ -19,10 +19,7 @@
19
19
  <title><%= render_page_title %></title>
20
20
  <%= opensearch_description_tag application_name, opensearch_catalog_url(:format => 'xml') %>
21
21
  <%= favicon_link_tag %>
22
- <%= favicon_link_tag 'dc_mobile-icons_60x60.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
23
- <%= favicon_link_tag 'dc_mobile-icons_76x76.png', :rel => 'apple-touch-icon', :type => 'image/png', :sizes => '76x76' %>
24
- <%= favicon_link_tag 'dc_mobile-icons_120x120.png', :rel => 'apple-touch-icon', :type => 'image/png', :sizes => '120x120' %>
25
- <%= favicon_link_tag 'dc_mobile-icons_152x152.png', :rel => 'apple-touch-icon', :type => 'image/png', :sizes => '152x152' %>
22
+ <%= render_mobile_icon_tags %>
26
23
  <%= stylesheet_link_tag "application", :media => "all" %>
27
24
  <%= javascript_include_tag "application" %>
28
25
  <%= csrf_meta_tags %>
@@ -1,3 +1,4 @@
1
+ <% doc_presenter = index_presenter(document) %>
1
2
  <div class="ocr_search_result">
2
3
  <dl class="defList ocr_defList dl-horizontal">
3
4
  <dt><span class="ocr_page_link"><%= render_page_link(document, @image_pid_list, params[:id]) %></span></dt>
@@ -8,9 +9,8 @@
8
9
  </div>
9
10
  <% end %>
10
11
  <div class="ocr_snippets">
11
- <%= render_index_field_value document,
12
- field: blacklight_config.ocr_search_field,
13
- counter: document_counter_with_offset(document_counter) %>
12
+ <%= doc_presenter.field_value(blacklight_config.ocr_search_field,
13
+ {counter: document_counter_with_offset(document_counter)}) %>
14
14
  </div>
15
15
  </dd>
16
16
  </dl>
@@ -0,0 +1,4 @@
1
+ <%= favicon_link_tag 'commonwealth-vlr-engine/vlr_mobile-icons_60x60.png', :rel => 'apple-touch-icon', :type => 'image/png' %>
2
+ <%= favicon_link_tag 'commonwealth-vlr-engine/vlr_mobile-icons_76x76.png', :rel => 'apple-touch-icon', :type => 'image/png', :sizes => '76x76' %>
3
+ <%= favicon_link_tag 'commonwealth-vlr-engine/vlr_mobile-icons_120x120.png', :rel => 'apple-touch-icon', :type => 'image/png', :sizes => '120x120' %>
4
+ <%= favicon_link_tag 'commonwealth-vlr-engine/vlr_mobile-icons_152x152.png', :rel => 'apple-touch-icon', :type => 'image/png', :sizes => '152x152' %>
@@ -1,5 +1,5 @@
1
1
  <%= form_tag search_action_url, :method => :get, :class => 'header-search-form form-inline' do %>
2
- <%= render_hash_as_hidden_fields(search_state.params_for_search(:search_field => default_search_field[:key]).except('q', 'qt', 'page', 'utf8', 'f', 'sort', 'mlt_id', 'coordinates', 'spatial_search_type', 'view')) %>
2
+ <%= render_hash_as_hidden_fields(search_state.params_for_search(:search_field => default_search_field[:key]).except('q', 'qt', 'page', 'utf8', 'f', 'sort', 'mlt_id', 'coordinates', 'spatial_search_type', 'view', 'range', 'date_start', 'date_end')) %>
3
3
 
4
4
  <div class="input-group pull-left">
5
5
  <label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
@@ -1,14 +1,14 @@
1
1
  <input type="checkbox" name="selectAll" id="selectAllItems" />
2
2
  <ul class="folderItemToolsList">
3
- <li class="cite">
3
+ <li class="cite">
4
4
  <%= link_to content_tag(:span, '', :class => 'glyphicon glyphicon-list-alt') + ' ' + t('blacklight.tools.citation'),
5
5
  citation_solr_documents_path(:id => ''),
6
- {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink btn btn-default'} %>
7
- </li>
8
- <li class="email">
6
+ {:id => 'citeLink', :name => 'citation', :class => 'lightboxLink btn btn-default'} %>
7
+ </li>
8
+ <li class="email">
9
9
  <%= link_to content_tag(:span, '', :class => 'glyphicon glyphicon-envelope') + ' ' + t('blacklight.tools.email'),
10
10
  email_solr_documents_path(:id => ''),
11
11
  :class => 'lightboxLink btn btn-default',
12
12
  :id => 'emailLink' %>
13
- </li>
13
+ </li>
14
14
  </ul>
@@ -18,14 +18,16 @@ Gem::Specification.new do |spec|
18
18
  spec.require_paths = ['lib']
19
19
 
20
20
  spec.add_dependency 'rails', '~>4.2.0'
21
- spec.add_dependency 'blacklight', '>= 6.1.0'
22
- spec.add_dependency 'blacklight_advanced_search', '6.0.2'
23
- spec.add_dependency 'blacklight-gallery', '0.5.0'
21
+ spec.add_dependency 'blacklight', '>= 6.3.0'
22
+ spec.add_dependency 'blacklight_advanced_search', '6.2.1'
23
+ spec.add_dependency 'blacklight-gallery', '0.6.1'
24
24
  spec.add_dependency 'blacklight-maps', '0.5.0'
25
+ spec.add_dependency 'leaflet-rails', '~> 0.7.3' # remove once blacklight-maps has been updated
26
+ spec.add_dependency 'blacklight_range_limit', '6.0.0'
27
+ spec.add_dependency 'openseadragon', '0.3.1'
25
28
  spec.add_dependency 'bootstrap-sass', '~> 3.0'
26
29
  spec.add_dependency 'font-awesome-sass', '4.1.0'
27
- spec.add_dependency 'bpluser'
28
- #, '~> 0.0.7'
30
+ spec.add_dependency 'bpluser' #, '~> 0.0.7'
29
31
  spec.add_dependency 'typhoeus'
30
32
  spec.add_dependency 'devise-guests', '0.3.3'
31
33
  spec.add_dependency 'omniauth'
@@ -35,7 +37,7 @@ Gem::Specification.new do |spec|
35
37
  spec.add_dependency 'omniauth-polaris'
36
38
  spec.add_dependency 'madison', '~> 0.5.0'
37
39
  spec.add_dependency 'osullivan'
38
-
40
+ spec.add_dependency 'zipline'
39
41
 
40
42
  spec.add_development_dependency 'bundler', '~> 1.5'
41
43
  spec.add_development_dependency 'rake'
@@ -9,13 +9,13 @@ class BlacklightAdvancedSearch::QueryParser
9
9
  # LOCAL OVERRIDE of BlacklightAdvancedSearch::ParsingNestingParser#process_query
10
10
  def process_query(params,config)
11
11
  queries = []
12
- keyword_queries.each do |field,query|
13
- queries << ParsingNesting::Tree.parse(query, config.advanced_search[:query_parser]).to_query( local_param_hash(field, config) )
14
- end
12
+ queries = keyword_queries.map do |field, query|
13
+ queries << ParsingNesting::Tree.parse(query, config.advanced_search[:query_parser]).to_query(local_param_hash(field, config))
14
+ end.join(" #{keyword_op} ")
15
15
  if params[:date_start].blank? && params[:date_end].blank?
16
- queries.join( ' ' + keyword_op + ' ')
16
+ queries
17
17
  else
18
- queries.join( ' ' + keyword_op + ' ') + ' AND ' + add_date_range_to_queries(params)
18
+ queries.blank? ? add_date_range_to_queries(params) : [queries, add_date_range_to_queries(params)].join(' AND ')
19
19
  end
20
20
  end
21
21
 
@@ -67,7 +67,7 @@ module BlacklightAdvancedSearch::RenderConstraintsOverride
67
67
  if is_advanced_search? localized_params
68
68
  true
69
69
  else
70
- !(localized_params[:q].blank? and localized_params[:f].blank? and localized_params[:f_inclusive].blank? and localized_params[:mlt_id].blank? and localized_params[:coordinates].blank?)
70
+ !(localized_params[:q].blank? && localized_params[:f].blank? && localized_params[:f_inclusive].blank? && localized_params[:mlt_id].blank? && localized_params[:coordinates].blank?)
71
71
  end
72
72
  end
73
73