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.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_120x120.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_152x152.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_60x60.png +0 -0
- data/app/assets/images/commonwealth-vlr-engine/vlr_mobile-icons_76x76.png +0 -0
- data/app/assets/javascripts/blacklight_google_analytics/blacklight_google_analytics.js.erb +11 -0
- data/app/assets/javascripts/commonwealth-vlr-engine.js +3 -0
- data/app/assets/javascripts/commonwealth-vlr-engine/download_utils.js +4 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +1 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/downloads.scss +18 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/facets.scss +64 -0
- data/app/assets/stylesheets/commonwealth-vlr-engine/vlr_dependencies.css +3 -1
- data/app/controllers/bookmarks_controller.rb +7 -2
- data/app/controllers/collections_controller.rb +1 -109
- data/app/controllers/concerns/commonwealth_vlr_engine/collections_controller_behavior.rb +132 -0
- data/app/controllers/concerns/commonwealth_vlr_engine/downloads_controller_behavior.rb +184 -0
- data/app/controllers/concerns/commonwealth_vlr_engine/institutions_controller_behavior.rb +70 -0
- data/app/controllers/downloads_controller.rb +4 -0
- data/app/controllers/iiif_manifest_controller.rb +2 -7
- data/app/controllers/image_viewer_controller.rb +3 -13
- data/app/controllers/institutions_controller.rb +1 -65
- data/app/controllers/ocr_search_controller.rb +1 -1
- data/app/controllers/saved_searches_controller.rb +2 -0
- data/app/controllers/search_history_controller.rb +2 -0
- data/app/helpers/commonwealth_vlr_engine/application_helper.rb +20 -2
- data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +36 -53
- data/app/helpers/commonwealth_vlr_engine/downloads_helper_behavior.rb +192 -0
- data/app/helpers/commonwealth_vlr_engine/facets_helper.rb +3 -1
- data/app/helpers/commonwealth_vlr_engine/ocr_search_helper_behavior.rb +5 -0
- data/app/helpers/commonwealth_vlr_engine/search_history_constraints_helper.rb +25 -0
- data/app/helpers/downloads_helper.rb +3 -0
- data/app/views/catalog/_add_this.html.erb +3 -1
- data/app/views/catalog/_folder_item_control.html.erb +2 -1
- data/app/views/catalog/_index_mapview.html.erb +9 -0
- data/app/views/catalog/_more_like_this.html.erb +1 -1
- data/app/views/catalog/_show_cite_tools.html.erb +3 -0
- data/app/views/catalog/_show_default.html.erb +13 -12
- data/app/views/catalog/_show_partials/_show_book_viewer_link.html.erb +1 -1
- data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +3 -3
- data/app/views/catalog/_show_partials/_show_downloads.html.erb +1 -1
- data/app/views/catalog/_show_partials/_show_volumes.html.erb +1 -1
- data/app/views/catalog/_show_sharing_tools.html.erb +3 -0
- data/app/views/collections/show.html.erb +1 -0
- data/app/views/downloads/_terms_of_use.html.erb +29 -0
- data/app/views/downloads/show.html.erb +29 -0
- data/app/views/image_viewer/_render_book_viewer.html.erb +1 -1
- data/app/views/institutions/show.html.erb +2 -10
- data/app/views/layouts/commonwealth-vlr-engine.html.erb +1 -4
- data/app/views/ocr_search/_index_ocr_list.html.erb +3 -3
- data/app/views/shared/_mobile_icon_tags.html.erb +4 -0
- data/app/views/shared/_search_form_header.html.erb +1 -1
- data/app/views/shared/_tools.html.erb +5 -5
- data/commonwealth-vlr-engine.gemspec +8 -6
- data/config/initializers/patch_blacklight_advanced_search.rb +6 -6
- data/config/initializers/patch_blacklight_range_limit.rb +18 -0
- data/config/jetty.yml +1 -1
- data/config/locales/commonwealth-vlr-engine.en.yml +12 -0
- data/config/routes.rb +6 -0
- data/lib/commonwealth-vlr-engine.rb +1 -0
- data/lib/commonwealth-vlr-engine/controller.rb +18 -3
- data/lib/commonwealth-vlr-engine/controller_override.rb +79 -21
- data/lib/commonwealth-vlr-engine/engine.rb +1 -0
- data/lib/commonwealth-vlr-engine/render_constraints_override.rb +15 -14
- data/lib/commonwealth-vlr-engine/search_builder/collections_search_builder.rb +1 -1
- data/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior.rb +13 -1
- data/lib/commonwealth-vlr-engine/search_builder/flagged_search_builder.rb +1 -1
- data/lib/commonwealth-vlr-engine/search_builder/institutions_search_builder.rb +1 -1
- data/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder.rb +2 -1
- data/lib/commonwealth-vlr-engine/streaming.rb +50 -0
- data/lib/commonwealth-vlr-engine/version.rb +1 -1
- data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +8 -0
- data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_search_builder.rb +4 -3
- data/lib/generators/commonwealth_vlr_engine/templates/config/vlr.yml +3 -0
- data/solr_conf/conf/solrconfig.xml +42 -5
- data/spec/controllers/collections_controller_spec.rb +20 -0
- data/spec/controllers/downloads_controller_spec.rb +65 -0
- data/spec/controllers/image_viewer_controller_spec.rb +0 -18
- data/spec/controllers/institutions_controller_spec.rb +7 -0
- data/spec/features/advanced_search_date_range_spec.rb +36 -0
- data/spec/features/collections/index_spec.rb +6 -0
- data/spec/features/collections/show_spec.rb +38 -0
- data/spec/features/more_like_this_search_spec.rb +18 -1
- data/spec/fixtures/sample_solr_documents.yml +107 -19
- data/spec/helpers/application_helper_spec.rb +9 -2
- data/spec/helpers/catalog_helper_spec.rb +26 -42
- data/spec/helpers/downloads_helper_spec.rb +173 -0
- data/spec/helpers/ocr_search_helper_spec.rb +15 -7
- data/spec/helpers/range_limit_helper_spec.rb +20 -0
- data/spec/helpers/search_history_constraints_helper_spec.rb +39 -0
- data/spec/lib/commonwealth-vlr-engine/controller_override_spec.rb +37 -0
- data/spec/lib/commonwealth-vlr-engine/render_constraints_override_spec.rb +0 -10
- data/spec/lib/commonwealth-vlr-engine/search_builder/commonwealth_search_builder_behavior_spec.rb +21 -3
- data/spec/lib/commonwealth-vlr-engine/search_builder/mlt_search_builder_spec.rb +1 -1
- metadata +99 -12
- data/app/helpers/commonwealth_vlr_engine/component_helper.rb +0 -22
- data/app/views/catalog/_show_tools.html.erb +0 -42
- data/spec/helpers/component_helper_spec.rb +0 -34
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe ComponentHelper do
|
4
|
-
|
5
|
-
include Blacklight::SearchHelper
|
6
|
-
|
7
|
-
let(:document) { Blacklight.default_index.search({:q => 'id:"bpl-dev:h702q6403"', :rows => 1}).documents.first }
|
8
|
-
|
9
|
-
before(:each) do
|
10
|
-
allow(helper).to receive(:has_user_authentication_provider?).and_return(true)
|
11
|
-
allow(helper).to receive(:current_or_guest_user).and_return(true)
|
12
|
-
allow(helper).to receive(:current_user).and_return(User.create!({:email => "testy@test.com", :password => "password"}))
|
13
|
-
@current_bookmarks = [] # have to set this for Blacklight::CatalogHelperBehavior#current_bookmarks
|
14
|
-
end
|
15
|
-
|
16
|
-
describe '#render_show_doc_actions' do
|
17
|
-
|
18
|
-
before { @show_doc_actions = helper.render_show_doc_actions(document, {}) }
|
19
|
-
|
20
|
-
it 'should create the document actions controls wrapper' do
|
21
|
-
expect(@show_doc_actions).to include('<div class="documentFunctions">')
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'should include the catalog/add_this partial' do
|
25
|
-
expect(@show_doc_actions).to include('addthis')
|
26
|
-
end
|
27
|
-
|
28
|
-
it 'should include the catalog/folder_item_control partial' do
|
29
|
-
expect(@show_doc_actions).to include('<div id="folder_item_toggle">')
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
end
|