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,27 @@
1
+ <%= render 'previous_next_doc' %>
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
+ <div id="document" class="document <%= render_document_class %>" itemscope itemtype="<%= @document.itemtype %>">
7
+
8
+ <div id="doc_<%= @document.id.to_s.parameterize %>">
9
+
10
+ <div id ="item_breadcrumb">
11
+ <%= render_item_breadcrumb(@document) %>
12
+ </div>
13
+
14
+ <%= render_document_partials @document, blacklight_config.view_config(:show).partials %>
15
+
16
+ </div>
17
+
18
+ </div>
19
+
20
+ <% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
21
+ <!--
22
+ // COinS, for Zotero among others.
23
+ // This document_partial_name(@document) business is not quite right,
24
+ // but has been there for a while.
25
+ -->
26
+ <span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(document_partial_name(@document)) %>"></span>
27
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <div class="more_like_this_document col-sm-3">
2
+ <%= link_to(create_thumb_img_element(document, %w(mlt_thumb)),
3
+ url_for_document(document),
4
+ :class => 'mlt_thumb_link thumbnail',
5
+ :title => document[blacklight_config.index.title_field.to_sym]
6
+ )
7
+ %>
8
+ <%= link_to_document(document,
9
+ truncate(render_main_title(document),
10
+ :length => 70,
11
+ :separator => ' ',
12
+ :omission => ' ...'),
13
+ :class => 'mlt_title_link'
14
+ ) %>
15
+ </div>
@@ -0,0 +1,25 @@
1
+ <%= link_to(img,
2
+ book_viewer_path(document.id),
3
+ :title => t('blacklight.book_viewer.link_to_reader'),
4
+ :rel => 'nofollow') %>
5
+ <div id="book_actions_links_wrap">
6
+ <ul id="book_actions_links" class="list-inline">
7
+ <li id="book_viewer_link_wrap">
8
+ <%= link_to(book_viewer_path(document.id),
9
+ :class => 'book_viewer_link btn',
10
+ :rel => 'nofollow') do %>
11
+ <i class="fa fa-book"></i> <%= t('blacklight.book_viewer.link_to_reader') %>
12
+ <% end %>
13
+ </li>
14
+ <% if document['identifier_ia_id_ssi'] %>
15
+ <li id="search_inside_link_wrap">
16
+ <%= link_to(ocr_search_path,
17
+ :class => 'search_inside_link btn',
18
+ :rel => 'nofollow',
19
+ :data => {:ajax_modal => 'trigger'}) do %>
20
+ <i class="fa fa-search"></i> <%= t('blacklight.ocr.search.link') %>
21
+ <% end %>
22
+ </li>
23
+ <% end %>
24
+ </ul>
25
+ </div>
@@ -0,0 +1,32 @@
1
+ <% object_title = document[blacklight_config.index.title_field.to_sym] %>
2
+ <%# img_element = iiif_image_tag(image_pid,
3
+ {:size => ',800',
4
+ :alt => object_title,
5
+ :class => 'img_show'}) %>
6
+ <%# we are using access800 derivative as default catalog#show image for the moment %>
7
+ <% img_element = image_tag(datastream_disseminator_url(image_pid, 'access800'),
8
+ :alt => object_title,
9
+ :class => 'img_show') %>
10
+ <div id="img_show_container">
11
+ <div id="img_show_canvas">
12
+ <%= link_to '#',
13
+ id: 'img_show_zoom_cue',
14
+ :title => t('blacklight.images.zoom'),
15
+ :rel => 'nofollow' do %>
16
+ <% content_tag :i, '', class: 'img_zoom_icon fa fa-search-plus' %>
17
+ <% end %>
18
+ <%= link_to(img_element, '#', :id => 'img_viewer_link',
19
+ :class => 'img_viewer_link',
20
+ :title => t('blacklight.images.zoom'),
21
+ :rel => 'nofollow') %>
22
+ </div>
23
+
24
+ <%= render :partial => 'catalog/_show_partials/show_default_simple_img_viewer',
25
+ :locals => {:object_title => object_title.html_safe,
26
+ :image_pid => image_pid} %>
27
+
28
+ <% unless page_sequence[:total] == 1 %>
29
+ <%= render :partial => 'catalog/_show_partials/show_prev_next_carousel_links',
30
+ :locals => {:page_sequence => page_sequence} %>
31
+ <% end %>
32
+ </div>
@@ -0,0 +1,486 @@
1
+ <div id="item_metadata" class="well">
2
+
3
+ <h3>Item Information</h3>
4
+ <dl class="defList dl-horizontal">
5
+ <%# title field %>
6
+ <% if document[blacklight_config.index.title_field.to_sym] %>
7
+ <dt><%= t('blacklight.metadata_display.fields.title') %>:</dt>
8
+ <dd>
9
+ <%= render_full_title(document) %>
10
+ </dd>
11
+ <% end %>
12
+ <%# translated title field %>
13
+ <% if document[:title_info_translated_tsim] %>
14
+ <dt><%= t('blacklight.metadata_display.fields.title_translated') %>:</dt>
15
+ <dd>
16
+ <% document[:title_info_translated_tsim].each do |translated_title| %>
17
+ <%= translated_title %><br />
18
+ <% end %>
19
+ </dd>
20
+ <% end %>
21
+ <%# alternative title field %>
22
+ <% if document[:title_info_alternative_tsim] %>
23
+ <dt>
24
+ <% if document[:title_info_alternative_label_ssm] %>
25
+ <%= document[:title_info_alternative_label_ssm].first %>
26
+ <% else %>
27
+ <%= t('blacklight.metadata_display.fields.title_alt') %>:
28
+ <% end %>
29
+ </dt>
30
+ <dd>
31
+ <% document[:title_info_alternative_tsim].each do |alt_title| %>
32
+ <%= alt_title %><br />
33
+ <% end %>
34
+ </dd>
35
+ <% end %>
36
+ <%# uniform title field %>
37
+ <% if document[:title_info_uniform_tsim] %>
38
+ <dt><%= t('blacklight.metadata_display.fields.title_uniform') %>:</dt>
39
+ <dd>
40
+ <% document[:title_info_uniform_tsim].each do |uniform_title| %>
41
+ <%= uniform_title %><br />
42
+ <% end %>
43
+ </dd>
44
+ <% end %>
45
+ <%# abstract/description field %>
46
+ <% if document[:abstract_tsim] %>
47
+ <dt><%= t('blacklight.metadata_display.fields.abstract') %>:</dt>
48
+ <dd>
49
+ <% document[:abstract_tsim].each do |abstract| %>
50
+ <%= abstract %><br />
51
+ <% end %>
52
+ </dd>
53
+ <% end %>
54
+ <%# creator field - assumes equal # of roles and creator names %>
55
+ <% if document[:name_personal_tsim] || document[:name_corporate_tsim] || document[:name_generic_tsim] %>
56
+ <% names, roles = setup_names_roles(document) %>
57
+ <% names.each_with_index do |name, index| %>
58
+ <dt><%= roles[index] %>:</dt>
59
+ <dd><%= link_to_facet(name, 'name_facet_ssim') %></dd>
60
+ <% end %>
61
+ <% end %>
62
+ <%# note @type="statement of responsibility" field %>
63
+ <% if document[:note_resp_tsim] %>
64
+ <dt><%= t('blacklight.metadata_display.fields.note_resp') %>:</dt>
65
+ <dd>
66
+ <% document[:note_resp_tsim].each do |resp| %>
67
+ <%= resp %><br />
68
+ <% end %>
69
+ </dd>
70
+ <% end %>
71
+ <%# date field %>
72
+ <% if document[:date_start_tsim] %>
73
+ <dt><%= t('blacklight.metadata_display.fields.date') %>:</dt>
74
+ <dd>
75
+ <% render_mods_dates(document).each do |date| %>
76
+ <%= date %><br/>
77
+ <% end %>
78
+ <%# document[:date_start_tsim].each_with_index do |start_date,index| %>
79
+ <%# date_type = document[:date_type_ssm] ? document[:date_type_ssm][index] : nil %>
80
+ <%# date_qualifier = document[:date_start_qualifier_ssm] ? document[:date_start_qualifier_ssm][index] : nil %>
81
+ <%# date_end = document[:date_end_tsim] ? document[:date_end_tsim][index] : nil %>
82
+ <%# render_mods_dates(start_date,
83
+ date_end,
84
+ date_qualifier,
85
+ date_type) %><!-- <br /> -->
86
+ <%# end %>
87
+ </dd>
88
+ <% end %>
89
+ <%# genre field - basic %>
90
+ <% if document[:genre_basic_ssim] %>
91
+ <dt><%= t('blacklight.metadata_display.fields.genre_basic') %>:</dt>
92
+ <dd>
93
+ <% document[:genre_basic_ssim].each do |format| %>
94
+ <%= link_to_facet(format, 'genre_basic_ssim') %><br />
95
+ <% end %>
96
+ </dd>
97
+ <% end %>
98
+ <%# genre field - specific %>
99
+ <% if document[:genre_specific_ssim] %>
100
+ <dt><%= t('blacklight.metadata_display.fields.genre_specific') %>:</dt>
101
+ <dd>
102
+ <% document[:genre_specific_ssim].each do |genre| %>
103
+ <%= link_to_facet(genre, 'genre_specific_ssim') %><br />
104
+ <% end %>
105
+ </dd>
106
+ <% end %>
107
+ <%# collex field %>
108
+ <%# if document[blacklight_config.collection_field.to_sym] %>
109
+ <!--
110
+ <dt>Digital Collection:</dt>
111
+ <dd>
112
+ <%# document[blacklight_config.collection_field.to_sym].each do |collection| %>
113
+ <%# link_to_facet(collection, 'collection_name_ssim') %><br />
114
+ <%# end %>
115
+ </dd>
116
+ -->
117
+ <%# end %>
118
+ <%# physical location field (including sub_location and shelf_locator) %>
119
+ <% if document[:physical_location_ssim] %>
120
+ <dt><%= t('blacklight.metadata_display.fields.location') %>:</dt>
121
+ <dd>
122
+ <%= link_to_facet(document[:physical_location_ssim].first,
123
+ 'physical_location_ssim') %>
124
+ <% if document[:sub_location_tsim] %>
125
+ <br/><%= document[:sub_location_tsim].first %>
126
+ <% end %>
127
+ <% if document[:shelf_locator_tsim] %>
128
+ <br/><%= document[:shelf_locator_tsim].first %> (<%= t('blacklight.metadata_display.fields.shelf_locator').downcase %>)
129
+ <% end %>
130
+ </dd>
131
+ <% end %>
132
+ <%# related item host field (physical collection) %>
133
+ <% if document[:related_item_host_ssim] %>
134
+ <dt><%= t('blacklight.metadata_display.fields.collection') %>:</dt>
135
+ <dd>
136
+ <% document[:related_item_host_ssim].each do |related_host| %>
137
+ <%= link_to_facet(related_host, 'related_item_host_ssim') %><br />
138
+ <% end %>
139
+ </dd>
140
+ <% end %>
141
+ <%# related item series field (series) %>
142
+ <% if document[:related_item_series_ssim] %>
143
+ <dt><%= t('blacklight.metadata_display.fields.series') %>:</dt>
144
+ <dd>
145
+ <% document[:related_item_series_ssim].each_with_index do |related_series,index| %>
146
+ <%= link_to_facets([related_series, document[:related_item_host_ssim].first],
147
+ %w[related_item_series_ssim related_item_host_ssim]) %>
148
+ <% if document[:related_item_subseries_ssim] && document[:related_item_subseries_ssim][index] %>
149
+ <%= content_tag(:span, t('blacklight.breadcrumb.separator'), :class => 'metadata_breadcrumb') %>
150
+ <%= link_to_facets(
151
+ [document[:related_item_subseries_ssim][index],
152
+ related_series],
153
+ %w[related_item_subseries_ssim related_item_series_ssim]) %>
154
+ <% end %>
155
+ <% if document[:related_item_subsubseries_ssim] && document[:related_item_subsubseries_ssim][index] %>
156
+ <%= content_tag(:span, t('blacklight.breadcrumb.separator'), :class => 'metadata_breadcrumb') %>
157
+ <%= link_to_facets(
158
+ [document[:related_item_subsubseries_ssim][index],
159
+ document[:related_item_subseries_ssim][index],
160
+ related_series],
161
+ %w[related_item_subsubseries_ssim
162
+ related_item_subseries_ssim
163
+ related_item_series_ssim]) %>
164
+ <% end %>
165
+ <br />
166
+ <% end %>
167
+ </dd>
168
+ <% end %>
169
+ <%# topic field %>
170
+ <% if document[:subject_topic_tsim] || document[:subject_name_corporate_tsim] || document[:subject_name_personal_tsim] || document[:subject_name_conference_tsim] || document[:subject_temporal_facet_ssim] || document[:subject_title_tsim] %>
171
+ <dt><%= t('blacklight.metadata_display.fields.subject_topic') %>:</dt>
172
+ <dd>
173
+ <% if document[:subject_topic_tsim] %>
174
+ <% document[:subject_topic_tsim].each do |topic| %>
175
+ <%= link_to_facet(topic, 'subject_facet_ssim') %><br />
176
+ <% end %>
177
+ <% end %>
178
+ <% if document[:subject_name_corporate_tsim] %>
179
+ <% document[:subject_name_corporate_tsim].each do |corp_name| %>
180
+ <%= link_to_facet(corp_name, 'subject_facet_ssim') %><br />
181
+ <% end %>
182
+ <% end %>
183
+ <% if document[:subject_name_personal_tsim] %>
184
+ <% document[:subject_name_personal_tsim].each do |pers_name| %>
185
+ <%= link_to_facet(pers_name, 'subject_facet_ssim') %><br />
186
+ <% end %>
187
+ <% end %>
188
+ <% if document[:subject_name_conference_tsim] %>
189
+ <% document[:subject_name_conference_tsim].each do |conf_name| %>
190
+ <%= link_to_facet(conf_name, 'subject_facet_ssim') %><br />
191
+ <% end %>
192
+ <% end %>
193
+ <% if document[:subject_title_tsim] %>
194
+ <% document[:subject_title_tsim].each do |subj_title| %>
195
+ <%= link_to_facet(subj_title, 'subject_facet_ssim') %><br />
196
+ <% end %>
197
+ <% end %>
198
+ <% if document[:subject_temporal_facet_ssim] %>
199
+ <% document[:subject_temporal_facet_ssim].each do |temporal_subj| %>
200
+ <% if temporal_subj =~ /-[0-9]{2}$/ %>
201
+ <%= link_to_facet(temporal_subj,
202
+ 'subject_facet_ssim',
203
+ render_mods_date(temporal_subj)) %>
204
+ <% else %>
205
+ <%= link_to_facet(temporal_subj, 'subject_facet_ssim') %><br />
206
+ <% end %>
207
+ <% end %>
208
+ <% end %>
209
+ </dd>
210
+ <% end %>
211
+ <%# geo subject field %>
212
+ <% if document[:subject_hiergeo_geojson_ssm] || document[:subject_geo_nonhier_ssim] %>
213
+ <dt><%= t('blacklight.metadata_display.fields.subject_geo') %>:</dt>
214
+ <dd>
215
+ <% if document[:subject_hiergeo_geojson_ssm] %>
216
+ <% document[:subject_hiergeo_geojson_ssm].each do |hier_geojson| %>
217
+ <%= render_hiergo_subject(hier_geojson,
218
+ t('blacklight.breadcrumb.separator'),
219
+ 'metadata_breadcrumb') %><br />
220
+ <% end %>
221
+ <% end %>
222
+ <% if document[:subject_geo_nonhier_ssim] %>
223
+ <% document[:subject_geo_nonhier_ssim].each do |nonhier_geo| %>
224
+ <%= link_to_facet(nonhier_geo, 'subject_geographic_ssim') %><br />
225
+ <% end %>
226
+ <% end %>
227
+ </dd>
228
+ <% end %>
229
+ <%# publisher field %>
230
+ <% if document[:publisher_tsim] %>
231
+ <dt><%= t('blacklight.metadata_display.fields.publisher') %>:</dt>
232
+ <dd>
233
+ <% 0.upto document[:publisher_tsim].length-1 do |index| %>
234
+ <% if document[:pubplace_tsim] %>
235
+ <%= document[:pubplace_tsim][index] + ' : ' if document[:pubplace_tsim][index] %>
236
+ <% end %>
237
+ <%= document[:publisher_tsim][index] %><br />
238
+ <% end %>
239
+ </dd>
240
+ <% end %>
241
+ <%# place of pub. field (if no publisher) %>
242
+ <% if document[:pubplace_tsim] && !document[:publisher_tsim] %>
243
+ <dt><%= t('blacklight.metadata_display.fields.pubplace') %>:</dt>
244
+ <dd>
245
+ <% document[:pubplace_tsim].each do |pubplace| %>
246
+ <%= pubplace %><br />
247
+ <% end %>
248
+ </dd>
249
+ <% end %>
250
+ <%# edition field %>
251
+ <% if document[:edition_tsim] %>
252
+ <dt><%= t('blacklight.metadata_display.fields.edition') %>:</dt>
253
+ <dd>
254
+ <% document[:edition_tsim].each do |edition| %>
255
+ <%= edition %><br />
256
+ <% end %>
257
+ </dd>
258
+ <% end %>
259
+ <%# note @type="performers" field %>
260
+ <% if document[:note_performers_tsim] %>
261
+ <dt><%= t('blacklight.metadata_display.fields.note_performers') %>:</dt>
262
+ <dd>
263
+ <% document[:note_performers_tsim].each do |performers| %>
264
+ <%= performers %><br />
265
+ <% end %>
266
+ </dd>
267
+ <% end %>
268
+ <%# note @type="ownership" field %>
269
+ <% if document[:note_ownership_tsim] %>
270
+ <dt><%= t('blacklight.metadata_display.fields.note_ownership') %>:</dt>
271
+ <dd>
272
+ <% document[:note_ownership_tsim].each do |ownership_note| %>
273
+ <%= ownership_note %><br />
274
+ <% end %>
275
+ </dd>
276
+ <% end %>
277
+ <%# note @type="acquisition" field %>
278
+ <% if document[:note_acquisition_tsim] %>
279
+ <dt><%= t('blacklight.metadata_display.fields.note_acquisition') %>:</dt>
280
+ <dd>
281
+ <% document[:note_acquisition_tsim].each do |acquisition_note| %>
282
+ <%= acquisition_note %><br />
283
+ <% end %>
284
+ </dd>
285
+ <% end %>
286
+ <%# note @type="preferred citation" field %>
287
+ <% if document[:note_citation_tsim] %>
288
+ <dt><%= t('blacklight.metadata_display.fields.note_citation') %>:</dt>
289
+ <dd>
290
+ <% document[:note_citation_tsim].each do |citation_note| %>
291
+ <%= citation_note %><br />
292
+ <% end %>
293
+ </dd>
294
+ <% end %>
295
+ <%# note @type="date" field %>
296
+ <% if document[:note_date_tsim] %>
297
+ <dt><%= t('blacklight.metadata_display.fields.note_date') %>:</dt>
298
+ <dd>
299
+ <% document[:note_date_tsim].each do |date_note| %>
300
+ <%= date_note %><br />
301
+ <% end %>
302
+ </dd>
303
+ <% end %>
304
+ <%# note @type="citation/refernce" field %>
305
+ <% if document[:note_reference_tsim] %>
306
+ <dt><%= t('blacklight.metadata_display.fields.note_reference') %>:</dt>
307
+ <dd>
308
+ <% document[:note_reference_tsim].each do |reference_note| %>
309
+ <%= reference_note %><br />
310
+ <% end %>
311
+ </dd>
312
+ <% end %>
313
+ <%# note field %>
314
+ <% if document[:note_tsim] %>
315
+ <dt><%= t('blacklight.metadata_display.fields.note') %>:</dt>
316
+ <dd>
317
+ <% document[:note_tsim].each do |note| %>
318
+ <%= note %><br/>
319
+ <% end %>
320
+ </dd>
321
+ <% end %>
322
+ <%# extent field %>
323
+ <% if document[:extent_tsi] %>
324
+ <dt><%= t('blacklight.metadata_display.fields.extent') %>:</dt>
325
+ <dd>
326
+ <%= document[:extent_tsi] %>
327
+ </dd>
328
+ <% end %>
329
+ <%# geo scale field %>
330
+ <% if document[:subject_scale_tsim] %>
331
+ <dt><%= t('blacklight.metadata_display.fields.scale') %>:</dt>
332
+ <dd>
333
+ <% document[:subject_scale_tsim].each do |scale| %>
334
+ <%= scale %><br />
335
+ <% end %>
336
+ <% end %>
337
+ <%# lang field %>
338
+ <% if document[:lang_term_ssim] %>
339
+ <dt><%= t('blacklight.metadata_display.fields.language') %>:</dt>
340
+ <dd>
341
+ <% document[:lang_term_ssim].each do |lang| %>
342
+ <%= lang %><br/>
343
+ <% end %>
344
+ </dd>
345
+ <% end %>
346
+ <%# TOC field %>
347
+ <% if document[:table_of_contents_tsi] %>
348
+ <dt><%= t('blacklight.metadata_display.fields.toc') %>:</dt>
349
+ <dd>
350
+ <% document[:table_of_contents_tsi].split('--').each do |toc_entry| %>
351
+ <%= toc_entry.strip %><br />
352
+ <% end %>
353
+ </dd>
354
+ <% end %>
355
+ <%# local-accession id field %>
356
+ <% if document[:local_accession_id_tsim] %>
357
+ <dt><%= t('blacklight.metadata_display.fields.id_local_acc') %>:</dt>
358
+ <dd>
359
+ <% document[:local_accession_id_tsim].each do |accession| %>
360
+ <%= accession %><br />
361
+ <% end %>
362
+ </dd>
363
+ <% end %>
364
+ <%# local-other id field %>
365
+ <% if document[:identifier_local_other_tsim] || document[:identifier_local_other_invalid_tsim] %>
366
+ <dt><%= t('blacklight.metadata_display.fields.id_local_other') %>:</dt>
367
+ <dd>
368
+ <% if document[:identifier_local_other_tsim] %>
369
+ <% document[:identifier_local_other_tsim].each do |local_other| %>
370
+ <%= local_other %><br />
371
+ <% end %>
372
+ <% end %>
373
+ <% if document[:identifier_local_other_invalid_tsim] %>
374
+ <% document[:identifier_local_other_invalid_tsim].each do |local_other_invalid| %>
375
+ <%= local_other_invalid + ' ' + t('blacklight.metadata_display.fields.id_local_other_invalid') %><br />
376
+ <% end %>
377
+ <% end %>
378
+ </dd>
379
+ <% end %>
380
+ <%# local-call id field %>
381
+ <% if document[:identifier_local_call_tsim] %>
382
+ <dt><%= t('blacklight.metadata_display.fields.id_local_call') %>:</dt>
383
+ <dd>
384
+ <% document[:identifier_local_call_tsim].each do |local_call| %>
385
+ <%= local_call %><br />
386
+ <% end %>
387
+ </dd>
388
+ <% end %>
389
+ <%# local-barcode id field %>
390
+ <% if document[:identifier_local_barcode_tsim] %>
391
+ <dt><%= t('blacklight.metadata_display.fields.id_local_barcode') %>:</dt>
392
+ <dd>
393
+ <% document[:identifier_local_barcode_tsim].each do |barcode| %>
394
+ <%= barcode %><br />
395
+ <% end %>
396
+ </dd>
397
+ <% end %>
398
+ <%# isbn id field %>
399
+ <% if document[:identifier_isbn_tsim] %>
400
+ <dt><%= t('blacklight.metadata_display.fields.id_isbn') %>:</dt>
401
+ <dd>
402
+ <% document[:identifier_isbn_tsim].each do |isbn| %>
403
+ <%= isbn %><br />
404
+ <% end %>
405
+ </dd>
406
+ <% end %>
407
+ <%# lccn id field %>
408
+ <% if document[:identifier_lccn_tsim] %>
409
+ <dt><%= t('blacklight.metadata_display.fields.id_lccn') %>:</dt>
410
+ <dd>
411
+ <% document[:identifier_lccn_tsim].each do |lccn| %>
412
+ <%= lccn %><br />
413
+ <% end %>
414
+ </dd>
415
+ <% end %>
416
+ <% if document[:classification_tsim] %>
417
+ <dt><%= t('blacklight.metadata_display.fields.classification') %>:</dt>
418
+ <dd>
419
+ <% document[:classification_tsim].each do |classification| %>
420
+ <%= classification %><br />
421
+ <% end %>
422
+ </dd>
423
+ <% end %>
424
+ <%# related item isReferencedBy field %>
425
+ <% if document[:related_item_isreferencedby_ssm] %>
426
+ <dt><%= t('blacklight.metadata_display.fields.referenced_by') %>:</dt>
427
+ <dd>
428
+ <% document[:related_item_isreferencedby_ssm].each do |reference| %>
429
+ <%= link_to(reference, reference, :target => '_blank') %><br />
430
+ <% end %>
431
+ </dd>
432
+ <% end %>
433
+ <%# URI field %>
434
+ <% if document[:identifier_uri_ss] %>
435
+ <% oai_object = true if document[:active_fedora_model_suffix_ssi] == 'OAIObject' %>
436
+ <dt><%= oai_object ? t('blacklight.metadata_display.fields.id_uri_oai') : t('blacklight.metadata_display.fields.id_uri_ark') %>:</dt>
437
+ <dd>
438
+ <%= link_to(document[:identifier_uri_ss],
439
+ document[:identifier_uri_ss],
440
+ :class => 'uri_metadata_link',
441
+ :target => oai_object ? '_blank' : '_self'
442
+ ) %>
443
+ </dd>
444
+ <% end %>
445
+ <%# rights field %>
446
+ <%# TODO: Remove use_and_reproduction_ssm after November 2014 update has run %>
447
+ <% if document[:use_and_reproduction_ssm] || document[:rights_ssm] || document[:license_ssm] %>
448
+ <dt><%= t('blacklight.metadata_display.fields.rights') %>:</dt>
449
+ <dd>
450
+ <% if document[:use_and_reproduction_ssm] %>
451
+ <% document[:use_and_reproduction_ssm].each do |terms| %>
452
+ <%= terms %><br />
453
+ <% if terms.match(/\(CC\s/) %>
454
+ <%= render_cc_license(terms) %><br />
455
+ <% end %>
456
+ <% end %>
457
+ <% end %>
458
+ <% if document[:rights_ssm] %>
459
+ <% document[:rights_ssm].each do |rights| %>
460
+ <%= rights %><br />
461
+ <% end %>
462
+ <% end %>
463
+ <% if document[:license_ssm] %>
464
+ <% document[:license_ssm].each do |license| %>
465
+ <%= license %><br />
466
+ <% if license.match(/\(CC\s/) %>
467
+ <%= render_cc_license(license) %><br />
468
+ <% end %>
469
+ <% end %>
470
+ <% end %>
471
+ </dd>
472
+ <% end %>
473
+ <%# additional rights/use info field %>
474
+ <% if document[:restrictions_on_access_ssm] %>
475
+ <dt><%= t('blacklight.metadata_display.fields.access') %>:</dt>
476
+ <dd>
477
+ <% document[:restrictions_on_access_ssm].each do |restrictions| %>
478
+ <%= restrictions %><br />
479
+ <% end %>
480
+ </dd>
481
+ <% end %>
482
+ </dl>
483
+ <div class="mods_link_wrapper">
484
+ <%= link_to t('blacklight.tools.librarian_view.link'), metadata_view_catalog_path(@document), {:id => 'librarianLink', :data => {:ajax_modal => 'trigger'}} %>
485
+ </div>
486
+ </div>