commonwealth-vlr-engine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (361) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +91 -0
  3. data/.gitmodules +3 -0
  4. data/Gemfile +20 -0
  5. data/LICENSE +202 -0
  6. data/README.md +38 -0
  7. data/Rakefile +43 -0
  8. data/app/assets/images/commonwealth-vlr-engine/bplLoginButton.png +0 -0
  9. data/app/assets/images/commonwealth-vlr-engine/dc_audio-icon.png +0 -0
  10. data/app/assets/images/commonwealth-vlr-engine/dc_collection-icon.png +0 -0
  11. data/app/assets/images/commonwealth-vlr-engine/dc_image-icon.png +0 -0
  12. data/app/assets/images/commonwealth-vlr-engine/dc_institution-icon.png +0 -0
  13. data/app/assets/images/commonwealth-vlr-engine/dc_moving-image-icon.png +0 -0
  14. data/app/assets/images/commonwealth-vlr-engine/dc_text-icon.png +0 -0
  15. data/app/assets/images/commonwealth-vlr-engine/facebookLoginButton.png +0 -0
  16. data/app/assets/images/commonwealth-vlr-engine/loading-wdl-grid.gif +0 -0
  17. data/app/assets/images/commonwealth-vlr-engine/loading-wdl.gif +0 -0
  18. data/app/assets/images/commonwealth-vlr-engine/loading.gif +0 -0
  19. data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_grouphover.png +0 -0
  20. data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_hover.png +0 -0
  21. data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_pressed.png +0 -0
  22. data/app/assets/images/commonwealth-vlr-engine/openseadragon/fullpage_rest.png +0 -0
  23. data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_grouphover.png +0 -0
  24. data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_hover.png +0 -0
  25. data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_pressed.png +0 -0
  26. data/app/assets/images/commonwealth-vlr-engine/openseadragon/home_rest.png +0 -0
  27. data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_grouphover.png +0 -0
  28. data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_hover.png +0 -0
  29. data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_pressed.png +0 -0
  30. data/app/assets/images/commonwealth-vlr-engine/openseadragon/next_rest.png +0 -0
  31. data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_grouphover.png +0 -0
  32. data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_hover.png +0 -0
  33. data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_pressed.png +0 -0
  34. data/app/assets/images/commonwealth-vlr-engine/openseadragon/previous_rest.png +0 -0
  35. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_grouphover.png +0 -0
  36. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_hover.png +0 -0
  37. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_pressed.png +0 -0
  38. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateleft_rest.png +0 -0
  39. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_grouphover.png +0 -0
  40. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_hover.png +0 -0
  41. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_pressed.png +0 -0
  42. data/app/assets/images/commonwealth-vlr-engine/openseadragon/rotateright_rest.png +0 -0
  43. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_grouphover.png +0 -0
  44. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_hover.png +0 -0
  45. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_pressed.png +0 -0
  46. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomin_rest.png +0 -0
  47. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_grouphover.png +0 -0
  48. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_hover.png +0 -0
  49. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_pressed.png +0 -0
  50. data/app/assets/images/commonwealth-vlr-engine/openseadragon/zoomout_rest.png +0 -0
  51. data/app/assets/images/commonwealth-vlr-engine/vlr_logo_img.png +0 -0
  52. data/app/assets/javascripts/blacklight_gallery.js +1 -0
  53. data/app/assets/javascripts/blacklight_google_analytics/blacklight_google_analytics.js.erb +165 -0
  54. data/app/assets/javascripts/bootstrap-accessibility-plugin/bootstrap-accessibility.js +586 -0
  55. data/app/assets/javascripts/commonwealth-vlr-engine.js +22 -0
  56. data/app/assets/javascripts/commonwealth-vlr-engine/collection_facets.js +5 -0
  57. data/app/assets/javascripts/commonwealth-vlr-engine/disable_dropdown_nav.js +21 -0
  58. data/app/assets/javascripts/commonwealth-vlr-engine/feedback_alerts.js.erb +19 -0
  59. data/app/assets/javascripts/commonwealth-vlr-engine/folder_tools.js +26 -0
  60. data/app/assets/javascripts/commonwealth-vlr-engine/multi_img_viewer.js.erb +20 -0
  61. data/app/assets/javascripts/commonwealth-vlr-engine/ocr_search_utils.js.erb +32 -0
  62. data/app/assets/javascripts/commonwealth-vlr-engine/volumes_list.js +5 -0
  63. data/app/assets/javascripts/openseadragon.js +2 -0
  64. data/app/assets/javascripts/respond/respond.min.js +6 -0
  65. data/app/assets/javascripts/wdl-viewer/fd-slider.js +1303 -0
  66. data/app/assets/javascripts/wdl-viewer/jquery-deparam.js +113 -0
  67. data/app/assets/javascripts/wdl-viewer/jquery.ba-throttle-debounce.min.js +9 -0
  68. data/app/assets/javascripts/wdl-viewer/jquery.hammer.min.js +7 -0
  69. data/app/assets/javascripts/wdl-viewer/modernizr-wdl.min.js +3 -0
  70. data/app/assets/javascripts/wdl-viewer/wdl-search.js +33 -0
  71. data/app/assets/javascripts/wdl-viewer/wdl-viewer_commonwealth.js +1147 -0
  72. data/app/assets/stylesheets/blacklight_advanced_search.css +5 -0
  73. data/app/assets/stylesheets/blacklight_gallery.css +1 -0
  74. data/app/assets/stylesheets/blacklight_maps.css +1 -0
  75. data/app/assets/stylesheets/bootstrap-accessibility-plugin/bootstrap-accessibility.css +105 -0
  76. data/app/assets/stylesheets/commonwealth-vlr-engine/advanced_search.scss +139 -0
  77. data/app/assets/stylesheets/commonwealth-vlr-engine/basic_search.scss +47 -0
  78. data/app/assets/stylesheets/commonwealth-vlr-engine/book_viewer.scss +576 -0
  79. data/app/assets/stylesheets/commonwealth-vlr-engine/carousel.scss +94 -0
  80. data/app/assets/stylesheets/commonwealth-vlr-engine/cmmnwlth_defaults.scss +45 -0
  81. data/app/assets/stylesheets/commonwealth-vlr-engine/cmmnwlth_shared.scss +75 -0
  82. data/app/assets/stylesheets/commonwealth-vlr-engine/collections.scss +563 -0
  83. data/app/assets/stylesheets/commonwealth-vlr-engine/commonwealth-vlr-engine.css +32 -0
  84. data/app/assets/stylesheets/commonwealth-vlr-engine/facets.scss +111 -0
  85. data/app/assets/stylesheets/commonwealth-vlr-engine/feedback.scss +10 -0
  86. data/app/assets/stylesheets/commonwealth-vlr-engine/folders.scss +276 -0
  87. data/app/assets/stylesheets/commonwealth-vlr-engine/footer.scss +47 -0
  88. data/app/assets/stylesheets/commonwealth-vlr-engine/header.scss +329 -0
  89. data/app/assets/stylesheets/commonwealth-vlr-engine/home.scss +269 -0
  90. data/app/assets/stylesheets/commonwealth-vlr-engine/index.scss +580 -0
  91. data/app/assets/stylesheets/commonwealth-vlr-engine/institutions.scss +246 -0
  92. data/app/assets/stylesheets/commonwealth-vlr-engine/pages.scss +31 -0
  93. data/app/assets/stylesheets/commonwealth-vlr-engine/search_inside.scss +172 -0
  94. data/app/assets/stylesheets/commonwealth-vlr-engine/searches.scss +55 -0
  95. data/app/assets/stylesheets/commonwealth-vlr-engine/show.scss +840 -0
  96. data/app/assets/stylesheets/commonwealth-vlr-engine/signin.scss +43 -0
  97. data/app/assets/stylesheets/commonwealth-vlr-engine/users.scss +18 -0
  98. data/app/assets/stylesheets/commonwealth-vlr-engine/vlr_dependencies.css +8 -0
  99. data/app/assets/stylesheets/ie_fixes.css +16 -0
  100. data/app/assets/stylesheets/openseadragon.css +1 -0
  101. data/app/assets/stylesheets/wdl-viewer/fd-slider.min.css +2 -0
  102. data/app/controllers/blacklight_advanced_search/advanced_controller.rb +66 -0
  103. data/app/controllers/bookmarks_controller.rb +38 -0
  104. data/app/controllers/collections_controller.rb +128 -0
  105. data/app/controllers/commonwealth_vlr_engine/application_controller.rb +8 -0
  106. data/app/controllers/feedback_controller.rb +39 -0
  107. data/app/controllers/folder_items_actions_controller.rb +72 -0
  108. data/app/controllers/folder_items_controller.rb +90 -0
  109. data/app/controllers/folders_controller.rb +132 -0
  110. data/app/controllers/iiif_manifest_controller.rb +74 -0
  111. data/app/controllers/image_viewer_controller.rb +34 -0
  112. data/app/controllers/institutions_controller.rb +62 -0
  113. data/app/controllers/ocr_search_controller.rb +78 -0
  114. data/app/controllers/pages_controller.rb +5 -0
  115. data/app/controllers/users/omniauth_callbacks_controller.rb +10 -0
  116. data/app/controllers/users/registrations_controller.rb +3 -0
  117. data/app/controllers/users/sessions_controller.rb +3 -0
  118. data/app/controllers/users_controller.rb +27 -0
  119. data/app/helpers/blacklight_maps_helper.rb +3 -0
  120. data/app/helpers/collections_helper.rb +3 -0
  121. data/app/helpers/commonwealth_vlr_engine/application_helper.rb +200 -0
  122. data/app/helpers/commonwealth_vlr_engine/blacklight_helper.rb +35 -0
  123. data/app/helpers/commonwealth_vlr_engine/blacklight_url_helper.rb +53 -0
  124. data/app/helpers/commonwealth_vlr_engine/catalog_helper.rb +414 -0
  125. data/app/helpers/commonwealth_vlr_engine/collections_helper_behavior.rb +19 -0
  126. data/app/helpers/commonwealth_vlr_engine/component_helper.rb +22 -0
  127. data/app/helpers/commonwealth_vlr_engine/facets_helper.rb +20 -0
  128. data/app/helpers/commonwealth_vlr_engine/feedback_helper_behavior.rb +14 -0
  129. data/app/helpers/commonwealth_vlr_engine/folders_helper_behavior.rb +9 -0
  130. data/app/helpers/commonwealth_vlr_engine/image_viewer_helper_behavior.rb +14 -0
  131. data/app/helpers/commonwealth_vlr_engine/institutions_helper_behavior.rb +31 -0
  132. data/app/helpers/commonwealth_vlr_engine/layout_helper.rb +22 -0
  133. data/app/helpers/commonwealth_vlr_engine/ocr_search_helper_behavior.rb +48 -0
  134. data/app/helpers/commonwealth_vlr_engine/pages_helper_behavior.rb +38 -0
  135. data/app/helpers/commonwealth_vlr_engine/vlr_blacklight_maps_helper_behavior.rb +59 -0
  136. data/app/helpers/feedback_helper.rb +3 -0
  137. data/app/helpers/folders_helper.rb +3 -0
  138. data/app/helpers/image_viewer_helper.rb +3 -0
  139. data/app/helpers/institutions_helper.rb +3 -0
  140. data/app/helpers/ocr_search_helper.rb +3 -0
  141. data/app/helpers/pages_helper.rb +3 -0
  142. data/app/mailers/notifier.rb +5 -0
  143. data/app/models/carousel_slide.rb +7 -0
  144. data/app/models/record_mailer.rb +18 -0
  145. data/app/models/user.rb +15 -0
  146. data/app/views/advanced/_advanced_search_date.html.erb +23 -0
  147. data/app/views/advanced/_advanced_search_facets.html.erb +5 -0
  148. data/app/views/advanced/_advanced_search_fields.html.erb +39 -0
  149. data/app/views/advanced/_advanced_search_form.html.erb +51 -0
  150. data/app/views/advanced/_advanced_search_help.html.erb +13 -0
  151. data/app/views/advanced/_facet_layout.html.erb +9 -0
  152. data/app/views/advanced/_facet_limit.html.erb +15 -0
  153. data/app/views/advanced/index.html.erb +29 -0
  154. data/app/views/blacklight_advanced_search/_facet_limit.html.erb +12 -0
  155. data/app/views/bookmarks/_tools.html.erb +25 -0
  156. data/app/views/bookmarks/index.html.erb +64 -0
  157. data/app/views/bookmarks/update.js.erb +1 -0
  158. data/app/views/bpluser/folders/_folder.html.erb +36 -0
  159. data/app/views/catalog/_add_this.html.erb +10 -0
  160. data/app/views/catalog/_az_links.html.erb +15 -0
  161. data/app/views/catalog/_basic_search.html.erb +67 -0
  162. data/app/views/catalog/_citation.html.erb +50 -0
  163. data/app/views/catalog/_constraints.html.erb +26 -0
  164. data/app/views/catalog/_document_collections_gallery.html.erb +7 -0
  165. data/app/views/catalog/_facet_limit_series.html.erb +21 -0
  166. data/app/views/catalog/_facets.html.erb +31 -0
  167. data/app/views/catalog/_facets_series.html.erb +4 -0
  168. data/app/views/catalog/_folder_item_control.html.erb +64 -0
  169. data/app/views/catalog/_index_collections_gallery.html.erb +12 -0
  170. data/app/views/catalog/_index_gallery.html.erb +11 -0
  171. data/app/views/catalog/_index_header_default.html.erb +22 -0
  172. data/app/views/catalog/_index_list_collection.html.erb +33 -0
  173. data/app/views/catalog/_index_list_default.html.erb +13 -0
  174. data/app/views/catalog/_index_map_institutions.html.erb +10 -0
  175. data/app/views/catalog/_index_masonry.html.erb +8 -0
  176. data/app/views/catalog/_index_slideshow.html.erb +18 -0
  177. data/app/views/catalog/_more_like_this.html.erb +9 -0
  178. data/app/views/catalog/_opengraph.html.erb +16 -0
  179. data/app/views/catalog/_previous_next_doc.html.erb +22 -0
  180. data/app/views/catalog/_results_pagination.html.erb +9 -0
  181. data/app/views/catalog/_search_form.html.erb +23 -0
  182. data/app/views/catalog/_search_header.html.erb +5 -0
  183. data/app/views/catalog/_show_default.html.erb +75 -0
  184. data/app/views/catalog/_show_main_content.html.erb +27 -0
  185. data/app/views/catalog/_show_more_like_this.html.erb +15 -0
  186. data/app/views/catalog/_show_partials/_show_book_viewer_link.html.erb +25 -0
  187. data/app/views/catalog/_show_partials/_show_default_img.html.erb +32 -0
  188. data/app/views/catalog/_show_partials/_show_default_metadata.html.erb +486 -0
  189. data/app/views/catalog/_show_partials/_show_default_simple_img_viewer.html.erb +45 -0
  190. data/app/views/catalog/_show_partials/_show_downloads.html.erb +14 -0
  191. data/app/views/catalog/_show_partials/_show_flagged_notice.html.erb +29 -0
  192. data/app/views/catalog/_show_partials/_show_multi_img.html.erb +42 -0
  193. data/app/views/catalog/_show_partials/_show_multi_img_pagination.html.erb +20 -0
  194. data/app/views/catalog/_show_partials/_show_oai_item_img.html.erb +5 -0
  195. data/app/views/catalog/_show_partials/_show_oai_item_link.html.erb +8 -0
  196. data/app/views/catalog/_show_partials/_show_prev_next_carousel_links.html.erb +17 -0
  197. data/app/views/catalog/_show_partials/_show_volumes.html.erb +52 -0
  198. data/app/views/catalog/_show_sidebar.html.erb +1 -0
  199. data/app/views/catalog/_show_tools.html.erb +42 -0
  200. data/app/views/catalog/_zero_results.html.erb +20 -0
  201. data/app/views/catalog/email.html.erb +6 -0
  202. data/app/views/catalog/index.html.erb +17 -0
  203. data/app/views/catalog/metadata_view.html.erb +7 -0
  204. data/app/views/catalog/show.html.erb +13 -0
  205. data/app/views/collections/_search_form_collection.html.erb +23 -0
  206. data/app/views/collections/index.html.erb +30 -0
  207. data/app/views/collections/show.html.erb +116 -0
  208. data/app/views/devise/confirmations/new.html.erb +14 -0
  209. data/app/views/devise/mailer/reset_password_instructions.html.erb +13 -0
  210. data/app/views/devise/passwords/edit.html.erb +33 -0
  211. data/app/views/devise/passwords/new.html.erb +31 -0
  212. data/app/views/devise/registrations/edit.html.erb +83 -0
  213. data/app/views/devise/registrations/new.html.erb +53 -0
  214. data/app/views/devise/sessions/new.html.erb +75 -0
  215. data/app/views/devise/shared/_links.erb +29 -0
  216. data/app/views/feedback/complete.html.erb +9 -0
  217. data/app/views/feedback/show.html.erb +61 -0
  218. data/app/views/folder_items/create.js.erb +1 -0
  219. data/app/views/folder_items/destroy.js.erb +1 -0
  220. data/app/views/folder_items/item_actions.js.erb +2 -0
  221. data/app/views/folder_items/update.js.erb +1 -0
  222. data/app/views/folders/_in_folder.html.erb +2 -0
  223. data/app/views/folders/_new_edit_form_fields.html.erb +36 -0
  224. data/app/views/folders/edit.html.erb +25 -0
  225. data/app/views/folders/index.html.erb +73 -0
  226. data/app/views/folders/new.html.erb +27 -0
  227. data/app/views/folders/public_list.html.erb +44 -0
  228. data/app/views/folders/show.html.erb +98 -0
  229. data/app/views/image_viewer/_book_viewer_help.html.erb +125 -0
  230. data/app/views/image_viewer/_render_book_viewer.html.erb +185 -0
  231. data/app/views/image_viewer/book_viewer.html.erb +57 -0
  232. data/app/views/image_viewer/show.js.erb +19 -0
  233. data/app/views/institutions/_intro_text.html.erb +1 -0
  234. data/app/views/institutions/_map_institutions_search.html.erb +9 -0
  235. data/app/views/institutions/_search_form_institution.html.erb +24 -0
  236. data/app/views/institutions/index.html.erb +31 -0
  237. data/app/views/institutions/show.html.erb +104 -0
  238. data/app/views/layouts/_google_analytics.html.erb +9 -0
  239. data/app/views/layouts/book_viewer.html.erb +37 -0
  240. data/app/views/layouts/commonwealth-vlr-engine.html.erb +59 -0
  241. data/app/views/notifier/feedback.text.erb +6 -0
  242. data/app/views/ocr_search/_index_ocr_list.html.erb +17 -0
  243. data/app/views/ocr_search/_search_form_ocr.html.erb +23 -0
  244. data/app/views/ocr_search/_snippets_more.html.erb +15 -0
  245. data/app/views/ocr_search/_zero_results_ocr.html.erb +9 -0
  246. data/app/views/ocr_search/index.html.erb +49 -0
  247. data/app/views/pages/_carousel.html.erb +46 -0
  248. data/app/views/pages/_home_partials/_banner.html.erb +23 -0
  249. data/app/views/pages/_home_partials/_browse.html.erb +55 -0
  250. data/app/views/pages/_home_partials/_context.html.erb +24 -0
  251. data/app/views/pages/_home_partials/_home_content.html.erb +14 -0
  252. data/app/views/pages/about.html.erb +10 -0
  253. data/app/views/pages/about_site.html.erb +6 -0
  254. data/app/views/pages/explore.html.erb +32 -0
  255. data/app/views/pages/home.html.erb +3 -0
  256. data/app/views/record_mailer/email_record.text.erb +7 -0
  257. data/app/views/saved_searches/index.html.erb +60 -0
  258. data/app/views/search_history/index.html.erb +59 -0
  259. data/app/views/shared/_error_messages.html.erb +9 -0
  260. data/app/views/shared/_flash_msg_maintenance.html.erb +6 -0
  261. data/app/views/shared/_folder_item_actions.html.erb +66 -0
  262. data/app/views/shared/_folder_tools.html.erb +4 -0
  263. data/app/views/shared/_footer.html.erb +14 -0
  264. data/app/views/shared/_header_navbar.html.erb +34 -0
  265. data/app/views/shared/_nav_links.html.erb +58 -0
  266. data/app/views/shared/_search_form_header.html.erb +16 -0
  267. data/app/views/shared/_tools.html.erb +14 -0
  268. data/app/views/shared/_user_util_links.html.erb +43 -0
  269. data/app/views/users/show.html.erb +33 -0
  270. data/commonwealth-vlr-engine.gemspec +47 -0
  271. data/config/initializers/patch_blacklight_advanced_search.rb +74 -0
  272. data/config/initializers/patch_blacklight_maps.rb +20 -0
  273. data/config/jetty.yml +7 -0
  274. data/config/locales/commonwealth-vlr-engine.en.yml +463 -0
  275. data/config/routes.rb +92 -0
  276. data/lib/commonwealth-vlr-engine.rb +55 -0
  277. data/lib/commonwealth-vlr-engine/commonwealth_search_builder.rb +66 -0
  278. data/lib/commonwealth-vlr-engine/controller.rb +69 -0
  279. data/lib/commonwealth-vlr-engine/controller_override.rb +238 -0
  280. data/lib/commonwealth-vlr-engine/engine.rb +40 -0
  281. data/lib/commonwealth-vlr-engine/finder.rb +285 -0
  282. data/lib/commonwealth-vlr-engine/iiif_manifest.rb +189 -0
  283. data/lib/commonwealth-vlr-engine/notifier.rb +33 -0
  284. data/lib/commonwealth-vlr-engine/pages.rb +33 -0
  285. data/lib/commonwealth-vlr-engine/render_constraints_override.rb +57 -0
  286. data/lib/commonwealth-vlr-engine/route_sets.rb +49 -0
  287. data/lib/commonwealth-vlr-engine/routes.rb +21 -0
  288. data/lib/commonwealth-vlr-engine/version.rb +3 -0
  289. data/lib/generators/commonwealth_vlr_engine/controller_generator.rb +92 -0
  290. data/lib/generators/commonwealth_vlr_engine/environment_generator.rb +49 -0
  291. data/lib/generators/commonwealth_vlr_engine/install_generator.rb +57 -0
  292. data/lib/generators/commonwealth_vlr_engine/localassets_generator.rb +29 -0
  293. data/lib/generators/commonwealth_vlr_engine/model_generator.rb +65 -0
  294. data/lib/generators/commonwealth_vlr_engine/routes_generator.rb +39 -0
  295. data/lib/generators/commonwealth_vlr_engine/templates/commonwealth_vlr_engine.css.scss +4 -0
  296. data/lib/generators/commonwealth_vlr_engine/templates/config/contact_emails.yml.sample +13 -0
  297. data/lib/generators/commonwealth_vlr_engine/templates/config/fedora.yml.sample +6 -0
  298. data/lib/generators/commonwealth_vlr_engine/templates/config/geojson_static_file.yml.sample +11 -0
  299. data/lib/generators/commonwealth_vlr_engine/templates/config/google_analytics.yml.sample +10 -0
  300. data/lib/generators/commonwealth_vlr_engine/templates/config/iiif_server.yml.sample +10 -0
  301. data/lib/generators/commonwealth_vlr_engine/templates/config/initializers/a_load_commonwealth_vlr_configs.rb +14 -0
  302. data/lib/generators/commonwealth_vlr_engine/templates/config/initializers/devise.rb +269 -0
  303. data/lib/generators/commonwealth_vlr_engine/templates/config/initializers/secret_token.rb +8 -0
  304. data/lib/generators/commonwealth_vlr_engine/templates/config/locales/blacklight.en.yml +44 -0
  305. data/lib/generators/commonwealth_vlr_engine/templates/config/locales/devise.en.yml +12 -0
  306. data/lib/generators/commonwealth_vlr_engine/templates/config/omniauth-facebook.yml.sample +14 -0
  307. data/lib/generators/commonwealth_vlr_engine/templates/config/omniauth-polaris.yml.sample +20 -0
  308. data/lib/generators/commonwealth_vlr_engine/templates/config/vlr.yml +13 -0
  309. data/lib/generators/commonwealth_vlr_engine/yml_generator.rb +29 -0
  310. data/lib/railties/commonwealth_vlr_engine.rake +6 -0
  311. data/solr_conf/conf/schema.xml +476 -0
  312. data/solr_conf/conf/solrconfig.xml +286 -0
  313. data/spec/controllers/catalog_controller_spec.rb +67 -0
  314. data/spec/controllers/collections_controller_spec.rb +127 -0
  315. data/spec/controllers/feedback_controller_spec.rb +51 -0
  316. data/spec/controllers/folder_items_actions_controller_spec.rb +99 -0
  317. data/spec/controllers/folder_items_controller_spec.rb +90 -0
  318. data/spec/controllers/folders_controller_spec.rb +368 -0
  319. data/spec/controllers/iiif_manifest_controller_spec.rb +85 -0
  320. data/spec/controllers/image_viewer_controller_spec.rb +50 -0
  321. data/spec/controllers/institutions_controller_spec.rb +64 -0
  322. data/spec/controllers/ocr_search_controller_spec.rb +71 -0
  323. data/spec/controllers/pages_controller_spec.rb +58 -0
  324. data/spec/controllers/users_controller_spec.rb +62 -0
  325. data/spec/features/catalog/_az_links_spec.rb +27 -0
  326. data/spec/features/catalog/_show_partials/_show_book_viewer_link_spec.rb +47 -0
  327. data/spec/features/catalog/_show_partials/_show_default_simple_img_viewer_spec.rb +19 -0
  328. data/spec/features/catalog/_show_partials/_show_flagged_notice_spec.rb +23 -0
  329. data/spec/features/catalog/_show_partials/_show_multi_img_spec.rb +18 -0
  330. data/spec/features/catalog/_show_partials/_show_volumes_spec.rb +24 -0
  331. data/spec/features/collections/index_spec.rb +35 -0
  332. data/spec/features/feedback/show_spec.rb +47 -0
  333. data/spec/features/image_viewer/book_viewer_spec.rb +67 -0
  334. data/spec/features/institutions/index_spec.rb +31 -0
  335. data/spec/features/institutions/map_view_spec.rb +37 -0
  336. data/spec/features/more_like_this_search_spec.rb +23 -0
  337. data/spec/features/ocr_search/index_spec.rb +89 -0
  338. data/spec/fixtures/sample_rss_feed.xml +56 -0
  339. data/spec/fixtures/sample_solr_documents.yml +2748 -0
  340. data/spec/helpers/application_helper_spec.rb +114 -0
  341. data/spec/helpers/catalog_helper_spec.rb +386 -0
  342. data/spec/helpers/collections_helper_spec.rb +28 -0
  343. data/spec/helpers/component_helper_spec.rb +34 -0
  344. data/spec/helpers/folders_helper_spec.rb +31 -0
  345. data/spec/helpers/image_viewer_helper_spec.rb +15 -0
  346. data/spec/helpers/institutions_helper_spec.rb +53 -0
  347. data/spec/helpers/ocr_search_helper_spec.rb +70 -0
  348. data/spec/helpers/pages_helper_spec.rb +21 -0
  349. data/spec/lib/commonwealth-vlr-engine/commonwealth_search_builder_spec.rb +101 -0
  350. data/spec/lib/commonwealth-vlr-engine/controller_override_spec.rb +41 -0
  351. data/spec/lib/commonwealth-vlr-engine/controller_spec.rb +33 -0
  352. data/spec/lib/commonwealth-vlr-engine/finder_spec.rb +140 -0
  353. data/spec/lib/commonwealth-vlr-engine/iiif_manifest_spec.rb +157 -0
  354. data/spec/lib/commonwealth-vlr-engine/render_constraints_override_spec.rb +97 -0
  355. data/spec/mailers/notifier_spec.rb +31 -0
  356. data/spec/models/carousel_slide_spec.rb +38 -0
  357. data/spec/spec_helper.rb +40 -0
  358. data/spec/tasks/vlr_engine_rake_spec.rb +28 -0
  359. data/spec/test_app_templates/lib/generators/test_app_generator.rb +23 -0
  360. data/tasks/vlr_engine.rake +46 -0
  361. metadata +788 -0
@@ -0,0 +1,45 @@
1
+ <%# this partial creates the OpenSeadragon image viewer modal %>
2
+ <div id="img_viewer_modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="<%= object_title.gsub(/\'/,'') %>" aria-hidden="true">
3
+ <div class="modal-dialog">
4
+ <div class="modal-content">
5
+ <div class="modal-header">
6
+ <button type="button" class="close" data-dismiss="modal">
7
+ <span aria-hidden="true">&times;</span>
8
+ <span class="sr-only">Close</span>
9
+ </button>
10
+ <h4 class="modal-title" id="img_viewer_title"><%= object_title.gsub(/\'/,'') %></h4>
11
+ </div>
12
+ <div class="modal-body" id="img_viewer_osd"></div>
13
+ <div class="modal-footer"></div>
14
+ </div>
15
+ </div>
16
+ </div>
17
+
18
+ <script type="text/javascript">
19
+ OSd_viewer = {};
20
+ $('#img_viewer_link, #img_show_zoom_cue').click(function() {
21
+ $('#img_viewer_modal').modal();
22
+ $("#img_viewer_osd").css("height", $(window).height() - 60);
23
+ OSd_viewer.viewer = new OpenSeadragon({
24
+ id: "img_viewer_osd",
25
+ prefixUrl: '',
26
+ navImages: $.parseJSON('<%= osd_nav_images('commonwealth-vlr-engine/openseadragon').html_safe %>'),
27
+ tileSources: ['<%= IIIF_SERVER['url'] + image_pid + '/info.json' %>'],
28
+ autoHideControls: false,
29
+ immediateRender: navigator.userAgent.match(/mobile/i),
30
+ showNavigator: true,
31
+ navigatorPosition: 'TOP_RIGHT',
32
+ showRotationControl: true,
33
+ navigationControlAnchor: OpenSeadragon.ControlAnchor.BOTTOM_RIGHT,
34
+ showFullPageControl: false
35
+ });
36
+ return false;
37
+ });
38
+ $('#img_viewer_modal').on('hidden.bs.modal', function (e) {
39
+ $("#img_viewer_osd").find('.openseadragon-container').remove();
40
+ if (OSd_viewer.viewer) {
41
+ OSd_viewer.viewer.destroy();
42
+ OSd_viewer.viewer = null;
43
+ }
44
+ });
45
+ </script>
@@ -0,0 +1,14 @@
1
+ <div class="panel panel-default" id="sidebar-downloads">
2
+ <div class="panel-heading">
3
+ <%= t('blacklight.downloads.title') %>
4
+ </div>
5
+
6
+ <div class="panel-body">
7
+ <ul class="nav nav-list">
8
+ <% create_download_links(document, object_files, 'sidebar_downloads_link').each do |link| %>
9
+ <li class="download_list_item"><%= link %></li>
10
+ <% end %>
11
+ <!-- <li class="download_info"><%# t('blacklight.downloads.link_info') %></li> -->
12
+ </ul>
13
+ </div>
14
+ </div>
@@ -0,0 +1,29 @@
1
+ <div class="modal fade" id="flagged_warning" tabindex="-1" role="dialog" aria-labelledby="flaggedWarning">
2
+ <div class="modal-dialog modal-lg">
3
+ <div class="modal-content">
4
+ <div class="modal-header">
5
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
6
+ <h3 class="modal-title">EXPLICIT CONTENT WARNING</h3>
7
+ </div>
8
+ <div class="modal-body">
9
+ <p><strong>This item contains content that could be offensive to some viewers or inappropriate for minors.</strong></p>
10
+ <p>&nbsp;</p>
11
+ <p>Click "View Content" to continue to the item or "Back to Search" to return to the search results page.</p>
12
+ </div>
13
+ <div class="modal-footer">
14
+ <button type="button" class="btn btn-warning" data-dismiss="modal">View Content</button>
15
+ <!-- <button type="button" class="btn btn-danger">Back to Search</button> -->
16
+ <% if current_search_session %>
17
+ <%= link_back_to_catalog(:class => 'btn btn-danger') %>
18
+ <% else %>
19
+ <%= link_to t('blacklight.back_to_search'), catalog_index_path, :class => 'btn btn-danger' %>
20
+ <% end %>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
25
+ <script type="text/javascript">
26
+ // fire the warning modal and make the backdrop very dark
27
+ $('#flagged_warning').modal();
28
+ $(".modal-backdrop").css("opacity",".95");
29
+ </script>
@@ -0,0 +1,42 @@
1
+ <% current_img = params[:view].presence || image_files.first %>
2
+ <% page_sequence = create_img_sequence(image_files,current_img) %>
3
+ <div id="multi_img_show_container">
4
+ <div class="row">
5
+ <div class="col-sm-12">
6
+ <% unless page_sequence[:total] == 1 %>
7
+ <div id="page_sequence_wrapper" class="well">
8
+ <%= render :partial => 'catalog/_show_partials/show_multi_img_pagination',
9
+ :locals => {:page_sequence => page_sequence} %>
10
+ </div>
11
+ <% end %>
12
+ </div>
13
+ </div>
14
+ <div class="row">
15
+ <div id="multi_img_pane" class="col-sm-9 carousel">
16
+ <%= render :partial => 'catalog/_show_partials/show_default_img',
17
+ :locals => {:document => @document,
18
+ :image_pid => current_img,
19
+ :page_sequence => page_sequence } %>
20
+ </div>
21
+ <div class="col-sm-3">
22
+ <div id="thumbnail_list_wrapper" class="well">
23
+ <%= content_tag :ul,
24
+ :id => 'thumbnail_list',
25
+ :class => 'list-unstyled',
26
+ :style => ('text-align:left' if image_files.length > 3) do %>
27
+ <% image_files.each_with_index do |image_file, index| %>
28
+ <li>
29
+ <%= link_to(image_tag(datastream_disseminator_url(image_file,'thumbnail300'),:alt => 'image ' + (index+1).to_s),
30
+ image_viewer_path(@document.id, :view => image_file),
31
+ :class => 'prev_next' + (' in_viewer' if params[:view] == image_file || (params[:view].nil? && index == 0)).to_s,
32
+ :title => 'View image ' + (index+1).to_s,
33
+ :data => { :viewer => image_file },
34
+ :remote => true) %>
35
+ </li>
36
+ <% end %>
37
+ <% end %>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ <%= javascript_include_tag('commonwealth-vlr-engine/multi_img_viewer') %>
@@ -0,0 +1,20 @@
1
+ <%# display the page sequence %>
2
+ <div id="page_sequence">
3
+ Viewing image <%= page_sequence[:index] %> of <%= page_sequence[:total] %>
4
+ <div id="page_sequence_pagination">
5
+ <%= link_to('< Previous',
6
+ image_viewer_path(@document.id,
7
+ :view => page_sequence[:prev]),
8
+ :class => 'prev_next',
9
+ :title => t('blacklight.images.prev'),
10
+ :data => { :viewer => page_sequence[:prev] },
11
+ :remote => true) if page_sequence[:prev] %>
12
+ <%= link_to('Next >',
13
+ image_viewer_path(@document.id,
14
+ :view => page_sequence[:next]),
15
+ :class => 'prev_next',
16
+ :title => t('blacklight.images.next'),
17
+ :data => { :viewer => page_sequence[:next] },
18
+ :remote => true) if page_sequence[:next] %>
19
+ </div>
20
+ </div>
@@ -0,0 +1,5 @@
1
+ <%= link_to(img,
2
+ document[:identifier_uri_ss],
3
+ :target => '_blank',
4
+ :title => t('blacklight.oai_objects.link_to_item',
5
+ :institution_name => return_oai_inst_name(document))) %>
@@ -0,0 +1,8 @@
1
+ <div id="oai_item_link">
2
+ <%= link_to(document[:identifier_uri_ss],
3
+ :class => 'view_oai_item',
4
+ :target => '_blank' ) do %>
5
+ <%= t('blacklight.oai_objects.link_to_item',
6
+ :institution_name => return_oai_inst_name(document)) %> <span class="glyphicon glyphicon-share"></span>
7
+ <% end %>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ <%# show the previous and next links as carousel controls for multi-img objects %>
2
+ <%= link_to('&lsaquo;'.html_safe,
3
+ image_viewer_path(@document.id,
4
+ :view => page_sequence[:prev]),
5
+ :class => 'left carousel-control prev_next',
6
+ :id => 'carousel-nav_prev',
7
+ :title => t('blacklight.images.prev'),
8
+ :data => { :viewer => page_sequence[:prev] },
9
+ :remote => true) if page_sequence[:prev] %>
10
+ <%= link_to('&rsaquo;'.html_safe,
11
+ image_viewer_path(@document.id,
12
+ :view => page_sequence[:next]),
13
+ :class => 'right carousel-control prev_next',
14
+ :id => 'carousel-nav_next',
15
+ :title => t('blacklight.images.next'),
16
+ :data => { :viewer => page_sequence[:next] },
17
+ :remote => true) if page_sequence[:next] %>
@@ -0,0 +1,52 @@
1
+ <div class="panel panel-default" id="volumes_wrapper">
2
+ <div class="panel-heading">
3
+ <i class="fa fa-book"></i> <%= t('blacklight.book_viewer.link_to_reader') %>
4
+ </div>
5
+
6
+ <div class="panel-body">
7
+ <ul class="nav nav-list">
8
+ <% volumes.each_with_index do |volume, index| %>
9
+ <% volume_title = render_volume_title(volume[:vol_doc]) %>
10
+ <li class="volume_listing" id="volume_listing_<%= index %>">
11
+ <a class="collapsed volume_title" role="button" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_<%= index %>" href="<%= solr_document_path(volume[:vol_doc].id) %>" aria-expanded="false" aria-controls="collapse_<%= index %>">
12
+ <%= volume_title %>
13
+ </a>
14
+ <div id="collapse_<%= index %>" class="volume_details panel-collapse collapse" role="tabpanel" aria-labelledby="heading_<%= index %>">
15
+ <div class="read_volume_link_wrap">
16
+ <ul class="vol_read_search_links list-inline">
17
+ <li class="vol_book_viewer_link_wrap">
18
+ <%= link_to(book_viewer_path(volume[:vol_doc].id),
19
+ :class => 'book_viewer_link btn',
20
+ :rel => 'nofollow') do %>
21
+ <i class="fa fa-book"></i> Read <%= volume_title %>
22
+ <% end %>
23
+ </li>
24
+ <% if document['identifier_ia_id_ssi'] %>
25
+ <li class="vol_search_inside_link_wrap">
26
+ <%= link_to(ocr_search_path(:id => volume[:vol_doc].id,
27
+ :ocr_q => ocr_q_params(current_search_session)),
28
+ :class => 'search_inside_link btn',
29
+ :rel => 'nofollow',
30
+ :data => {:ajax_modal => 'trigger'}) do %>
31
+ <i class="fa fa-search"></i> Search <%= volume_title %>
32
+ <% end %>
33
+ </li>
34
+ <% end %>
35
+ </ul>
36
+ </div>
37
+ <div class="download_volume_links">
38
+ <i class="fa fa-download"></i> Downloads
39
+ <ul class="volume_downloads">
40
+ <% create_download_links(volume[:vol_doc], volume[:vol_files], 'volume_downloads_link').each do |link| %>
41
+ <li class="download_list_item"><%= link %></li>
42
+ <% end %>
43
+ </ul>
44
+ </div>
45
+ </div>
46
+ </li>
47
+ <% end %>
48
+ </ul>
49
+ </div>
50
+
51
+ </div>
52
+ <%= javascript_include_tag('commonwealth-vlr-engine/volumes_list') %>
@@ -0,0 +1 @@
1
+ <%= render :partial => 'show_tools' %>
@@ -0,0 +1,42 @@
1
+ <%-
2
+ # Compare with render_document_functions_partial helper, and
3
+ # _document_functions partial. BL actually has two groups
4
+ # of document-related tools. "document functions" by default
5
+ # contains Bookmark functionality shown on both results and
6
+ # item view. While "document tools" contains external export type
7
+ # functions by default only on detail.
8
+
9
+ -%>
10
+ <div class="panel panel-default show-tools">
11
+ <div class="panel-heading">
12
+ <%= t('blacklight.tools.title') %>
13
+ </div>
14
+
15
+ <div class="panel-body">
16
+ <ul class="nav">
17
+ <li>
18
+ <%= render_show_doc_actions @document %>
19
+ </li>
20
+ <% if @document.respond_to?( :to_email_text ) %>
21
+ <li class="email">
22
+ <%= link_to content_tag(:span, '', :class => 'glyphicon glyphicon-envelope') + ' ' + t('blacklight.tools.email'),
23
+ email_catalog_path(:id => @document),
24
+ {:id => 'emailLink', :data => {:ajax_modal => 'trigger'}} %>
25
+ </li>
26
+ <%- end -%>
27
+ <%# if (@document.respond_to?(:export_as_mla_citation_txt) || @document.respond_to?(:export_as_apa_citation_txt)) %>
28
+ <li class="cite">
29
+ <%= link_to content_tag(:span, '', :class => 'glyphicon glyphicon-list-alt') + ' ' + t('blacklight.tools.citation'),
30
+ citation_catalog_path(:id => @document),
31
+ {:id => 'citeLink', :data => {:ajax_modal => 'trigger'}} %>
32
+ </li>
33
+ <%# end %>
34
+
35
+ <%# if @document.respond_to?(:to_marc) %>
36
+ <!-- <li class="librarian_view">
37
+ <%# link_to t('blacklight.tools.librarian_view.link'), librarian_view_catalog_path(@document), {:id => 'librarianLink', :class => 'lightboxLink'} %>
38
+ </li> -->
39
+ <%# end %>
40
+ </ul>
41
+ </div>
42
+ </div>
@@ -0,0 +1,20 @@
1
+ <!-- <h2><%# t 'blacklight.search.zero_results.title' %></h2> -->
2
+ <div id="documents" class="noresults">
3
+ <!-- <h3><%# t 'blacklight.search.zero_results.modify_search' %></h3> -->
4
+ <h4>Search Tips</h4>
5
+
6
+ <ul id="search_tips_list">
7
+ <li><%= t 'blacklight.search.zero_results.use_fewer_keywords' %></li>
8
+
9
+ <%- if params[:q] and params[:search_field] and params[:search_field] != blacklight_config.default_search_field.try(:key) -%>
10
+ <li><%= t 'blacklight.search.zero_results.search_fields', :search_fields => search_field_label(params) %> --
11
+ <%= link_to t('blacklight.search.zero_results.search_everything',
12
+ field: blacklight_config.default_search_field.label),
13
+ url_for(params_for_search(:search_field=>blacklight_config.default_search_field.key)) %>
14
+ </li>
15
+ <%- end %>
16
+
17
+ <li>If you're still having trouble finding what you're looking for, <%= link_to 'contact us', feedback_path %> and we'll try and help.</li>
18
+
19
+ </ul>
20
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="modal-header">
2
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
3
+ <h1><%= t('blacklight.email.form.title') %></h1>
4
+ <p>Send an email with a link to this item.</p>
5
+ </div>
6
+ <%= render :partial => 'email_form' %>
@@ -0,0 +1,17 @@
1
+ <%# check for search params %>
2
+ <% if has_search_parameters? %>
3
+
4
+ <div id="sidebar" class="col-sm-3">
5
+ <%= render 'search_sidebar' %>
6
+ </div>
7
+
8
+ <div id="content" class="<%= main_content_classes %>">
9
+ <%= render 'search_results' %>
10
+ </div>
11
+
12
+ <% else %>
13
+
14
+ <%# if no input/search params, render basic_search partial %>
15
+ <%= render :partial => 'catalog/basic_search' %>
16
+
17
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <div class="modal-header">
2
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
3
+ <h3 class="modal-title"><%= t('blacklight.tools.librarian_view.title') %></h3>
4
+ </div>
5
+ <div class="mods_xml_display">
6
+ <%= content_tag(:pre, render_mods_xml_record(@document[:id])) %>
7
+ </div>
@@ -0,0 +1,13 @@
1
+ <% if @document[blacklight_config.flagged_field.to_sym] %>
2
+ <%= render :partial => 'catalog/_show_partials/show_flagged_notice' %>
3
+ <% end %>
4
+
5
+ <div id="content" class="<%= show_content_classes %>">
6
+ <%= render_document_main_content_partial %>
7
+ </div>
8
+
9
+
10
+
11
+
12
+
13
+
@@ -0,0 +1,23 @@
1
+ <div id="collection_search_form">
2
+ <%= form_tag search_action_url,
3
+ :method => :get,
4
+ :class => 'search-query-form form-inline collection-search' do %>
5
+ <%= render_hash_as_hidden_fields(params_for_search(:f => params[:f]).except('q', 'search_field', 'qt', 'page')) %>
6
+
7
+ <div class="input-group pull-left">
8
+ <label for="q_coll" class="sr-only"><%= t('blacklight.search.form.collection') %></label>
9
+ <%= text_field_tag :q,
10
+ params[:q],
11
+ :placeholder => t('blacklight.search.form.collection'),
12
+ :class => 'search_q q form-control',
13
+ :id => 'q_coll',
14
+ :autofocus => false %>
15
+ <span class="input-group-btn">
16
+ <button type="submit" class="btn btn-primary search-btn" id="collection-search">
17
+ <span class="submit-search-text"><%=t('blacklight.search.form.submit')%></span>
18
+ <span class="glyphicon glyphicon-search glyphicon-white"></span>
19
+ </button>
20
+ </span>
21
+ </div>
22
+ <% end %>
23
+ </div>
@@ -0,0 +1,30 @@
1
+ <% @page_title = t('blacklight.collections.index.page_title', :application_name => application_name) %>
2
+ <% content_for(:head) { render_opensearch_response_metadata } %>
3
+
4
+ <div id="collections_index_title" class="col-sm-12">
5
+ <h2><%= t('blacklight.collections.index.title') %></h2>
6
+ </div>
7
+
8
+ <div id="content" class="col-sm-9 collections-list">
9
+
10
+ <% if should_render_col_az? %>
11
+ <%= render partial: 'catalog/az_links', locals: {az_label: t('blacklight.collections.index.a-z_label'),
12
+ az_link_path: 'collections_path',
13
+ az_exclude: ['Q','X']} %>
14
+ <% end %>
15
+
16
+ <%= render 'catalog/constraints' %>
17
+
18
+ <%= render 'catalog/sort_and_per_page' %>
19
+
20
+ <h2 class="sr-only"><%= t('blacklight.search.search_results') %></h2>
21
+
22
+ <%= render_document_index %>
23
+
24
+ <%= render 'catalog/results_pagination' %>
25
+
26
+ </div>
27
+
28
+ <div id="sidebar" class="col-sm-3">
29
+ <%= render 'catalog/search_sidebar' %>
30
+ </div>
@@ -0,0 +1,116 @@
1
+ <div id="content" class="col-sm-12 show-document">
2
+
3
+ <% @page_title = t('blacklight.search.show.title', :document_title => @document[blacklight_config.show.title_field], :application_name => application_name) %>
4
+ <% content_for(:head) { render_link_rel_alternates } %>
5
+
6
+ <%# this should be in a partial -%>
7
+ <div id="document" class="<%= render_document_class %>">
8
+
9
+ <div id="doc_<%= @document.id.to_s.parameterize %>">
10
+
11
+ <h2 class="collection-title"><%= @collection_title %></h2>
12
+
13
+ <% if t('blacklight.home.browse.institutions.enabled') %>
14
+ <h4 class="collection-provenance">
15
+ <% if @document[:institution_pid_ssi] %>
16
+ <%= link_to(@document[blacklight_config.institution_field.to_sym][0],
17
+ institutions_path + '/' + @document[:institution_pid_ssi],
18
+ :id => 'institution_link') %>
19
+ <% elsif @document[:physical_location_ssim] %>
20
+ <%= @document[:physical_location_ssim][0] %>
21
+ <% end %>
22
+ </h4>
23
+ <% end %>
24
+
25
+ <div class="document">
26
+
27
+ <div class="row">
28
+
29
+ <div class="col-sm-9">
30
+ <div id="collection_img">
31
+ <% if @collection_image_pid && @collection_image_info %>
32
+ <% image_title = @collection_image_info[:title] %>
33
+ <% if @collection_image_pid.match(/oai/) || @collection_image_info[:access_master] == false %>
34
+ <% img_element = image_tag(datastream_disseminator_url(@collection_image_pid,'thumbnail300'),
35
+ :alt => image_title,
36
+ :class => 'collection_img_show') %>
37
+ <% else %>
38
+ <% img_element = iiif_image_tag(@collection_image_pid,
39
+ {:size => 'pct:20',
40
+ :alt => image_title,
41
+ :class => 'collection_img_show'}) %>
42
+ <% end %>
43
+ <%= link_to(img_element,
44
+ solr_document_path(@collection_image_info[:pid])) %>
45
+ <div id="collection_img_caption">
46
+ <%= link_to(image_title,
47
+ solr_document_path(@collection_image_info[:pid])) %>
48
+ </div>
49
+ <% else %>
50
+ <%= image_tag(collection_icon_path,
51
+ :alt => @collection_title,
52
+ :class => 'collection_img_show') %>
53
+ <% end %>
54
+ </div>
55
+ <div id="collection_search_tools" class="well well-sm">
56
+ <%= render :partial => 'search_form_collection', :locals => {:document => @document} %>
57
+ <span class="collection_search_separator">or</span>
58
+ <div id="collection_view_all">
59
+ <% if @document[blacklight_config.institution_field.to_sym] %>
60
+ <%= link_to_all_col_items(@collection_title,
61
+ t('blacklight.home.browse.institutions.enabled') ? @document[blacklight_config.institution_field.to_sym] : nil,
62
+ 'btn btn-info view-all-col') %>
63
+ <% end %>
64
+ </div>
65
+ </div>
66
+
67
+ <div id="collection_desc">
68
+ <% if @document[:abstract_tsim] %>
69
+ <% @document[:abstract_tsim].each do |abstract| %>
70
+ <%= abstract.html_safe %>
71
+ <% end %>
72
+ <% end %>
73
+ </div>
74
+
75
+ <% if has_facet_values? %w[related_item_series_ssim] %>
76
+ <div id="series_wrapper">
77
+ <%= render :partial=> 'catalog/facets_series' %>
78
+ </div>
79
+ <% end %>
80
+
81
+ <% # map for collections#show view %>
82
+ <% unless @response.aggregations[map_facet_field].items.empty? %>
83
+ <div id="blacklight-collection-map-container">
84
+ <h4><%= t('blacklight.collections.map.title') %></h4>
85
+ <%= render :partial => 'catalog/index_map',
86
+ :locals => {:geojson_features => serialize_geojson(map_facet_values,
87
+ 'index')} %>
88
+ </div>
89
+ </div>
90
+ <% end %>
91
+
92
+ </div>
93
+
94
+ <div id="sidebar" class="col-sm-3">
95
+ <%= javascript_include_tag 'commonwealth-vlr-engine/collection_facets' %>
96
+ <%= render 'search_sidebar' %>
97
+ </div>
98
+
99
+ </div>
100
+
101
+ </div>
102
+
103
+ </div>
104
+
105
+ </div>
106
+
107
+ <% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
108
+ <!--
109
+ // COinS, for Zotero among others.
110
+ // This document_partial_name(@document) business is not quite right,
111
+ // but has been there for a while.
112
+ -->
113
+ <span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_partial_name(@document)) %>"></span>
114
+ <% end %>
115
+
116
+ </div>