hydra-head 4.1.3 → 5.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (412) hide show
  1. metadata +28 -617
  2. data/.gitignore +0 -73
  3. data/.gitmodules +0 -4
  4. data/Gemfile +0 -14
  5. data/HISTORY.textile +0 -99
  6. data/INSTALL_PREREQ.textile +0 -3
  7. data/LICENSE +0 -14
  8. data/README.textile +0 -129
  9. data/Rakefile +0 -5
  10. data/app/assets/images/hydra/powered_by_hydra.png +0 -0
  11. data/app/assets/images/hydra/search-button.png +0 -0
  12. data/app/assets/javascripts/date-picker/booking/index.html +0 -368
  13. data/app/assets/javascripts/date-picker/calendarHTML.txt +0 -84
  14. data/app/assets/javascripts/date-picker/css/datepicker.css +0 -511
  15. data/app/assets/javascripts/date-picker/css/demo.css +0 -229
  16. data/app/assets/javascripts/date-picker/index.html +0 -798
  17. data/app/assets/javascripts/date-picker/js/datepicker.js +0 -2898
  18. data/app/assets/javascripts/date-picker/js/datepicker.packed.js +0 -1
  19. data/app/assets/javascripts/date-picker/js/lang/ar.js +0 -9
  20. data/app/assets/javascripts/date-picker/js/lang/cs.js +0 -9
  21. data/app/assets/javascripts/date-picker/js/lang/da.js +0 -10
  22. data/app/assets/javascripts/date-picker/js/lang/de.js +0 -10
  23. data/app/assets/javascripts/date-picker/js/lang/en.js +0 -9
  24. data/app/assets/javascripts/date-picker/js/lang/eo.js +0 -13
  25. data/app/assets/javascripts/date-picker/js/lang/es.js +0 -9
  26. data/app/assets/javascripts/date-picker/js/lang/et.js +0 -23
  27. data/app/assets/javascripts/date-picker/js/lang/fi.js +0 -7
  28. data/app/assets/javascripts/date-picker/js/lang/fr.js +0 -69
  29. data/app/assets/javascripts/date-picker/js/lang/he.js +0 -9
  30. data/app/assets/javascripts/date-picker/js/lang/hu.js +0 -9
  31. data/app/assets/javascripts/date-picker/js/lang/id.js +0 -9
  32. data/app/assets/javascripts/date-picker/js/lang/it.js +0 -11
  33. data/app/assets/javascripts/date-picker/js/lang/kr.js +0 -9
  34. data/app/assets/javascripts/date-picker/js/lang/lt.js +0 -8
  35. data/app/assets/javascripts/date-picker/js/lang/lv.js +0 -9
  36. data/app/assets/javascripts/date-picker/js/lang/nl.js +0 -9
  37. data/app/assets/javascripts/date-picker/js/lang/no.js +0 -9
  38. data/app/assets/javascripts/date-picker/js/lang/pl.js +0 -10
  39. data/app/assets/javascripts/date-picker/js/lang/pt-br.js +0 -11
  40. data/app/assets/javascripts/date-picker/js/lang/pt.js +0 -9
  41. data/app/assets/javascripts/date-picker/js/lang/ru.js +0 -11
  42. data/app/assets/javascripts/date-picker/js/lang/se.js +0 -9
  43. data/app/assets/javascripts/date-picker/js/lang/si.js +0 -9
  44. data/app/assets/javascripts/date-picker/js/lang/tr.js +0 -9
  45. data/app/assets/javascripts/date-picker/language/index.html +0 -240
  46. data/app/assets/javascripts/date-picker/media/Thumbs.db +0 -0
  47. data/app/assets/javascripts/date-picker/media/backstripes.gif +0 -0
  48. data/app/assets/javascripts/date-picker/media/bg_header.jpg +0 -0
  49. data/app/assets/javascripts/date-picker/media/bullet1.gif +0 -0
  50. data/app/assets/javascripts/date-picker/media/bullet2.gif +0 -0
  51. data/app/assets/javascripts/date-picker/media/cal-grey.gif +0 -0
  52. data/app/assets/javascripts/date-picker/media/cal.gif +0 -0
  53. data/app/assets/javascripts/date-picker/media/gradient-e5e5e5-ffffff.gif +0 -0
  54. data/app/assets/javascripts/hydra/hydra-head.js +0 -195
  55. data/app/assets/javascripts/hydra/mediashelf.datepicker.js +0 -39
  56. data/app/assets/javascripts/hydra/mediashelf.placeholder.js +0 -67
  57. data/app/assets/javascripts/jquery.form.js +0 -1076
  58. data/app/assets/javascripts/jquery.ui.datepicker.js +0 -1793
  59. data/app/assets/javascripts/spin.min.js +0 -2
  60. data/app/assets/stylesheets/hydra/html_refactor.css +0 -79
  61. data/app/assets/stylesheets/hydra/hydrangea-split-button.css +0 -18
  62. data/app/assets/stylesheets/hydra/hydrangea.css +0 -288
  63. data/app/assets/stylesheets/hydra/ie-styles.css +0 -149
  64. data/app/assets/stylesheets/hydra/styles.css +0 -946
  65. data/app/assets/stylesheets/redmond/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  66. data/app/assets/stylesheets/redmond/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
  67. data/app/assets/stylesheets/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
  68. data/app/assets/stylesheets/redmond/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
  69. data/app/assets/stylesheets/redmond/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  70. data/app/assets/stylesheets/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
  71. data/app/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
  72. data/app/assets/stylesheets/redmond/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
  73. data/app/assets/stylesheets/redmond/images/ui-icons_217bc0_256x240.png +0 -0
  74. data/app/assets/stylesheets/redmond/images/ui-icons_2e83ff_256x240.png +0 -0
  75. data/app/assets/stylesheets/redmond/images/ui-icons_469bdd_256x240.png +0 -0
  76. data/app/assets/stylesheets/redmond/images/ui-icons_6da8d5_256x240.png +0 -0
  77. data/app/assets/stylesheets/redmond/images/ui-icons_cd0a0a_256x240.png +0 -0
  78. data/app/assets/stylesheets/redmond/images/ui-icons_d8e7f3_256x240.png +0 -0
  79. data/app/assets/stylesheets/redmond/images/ui-icons_f9bd01_256x240.png +0 -0
  80. data/app/assets/stylesheets/redmond/jquery-ui-1.8.5.custom.css +0 -572
  81. data/app/controllers/downloads_controller.rb +0 -20
  82. data/app/controllers/hydra/application_controller.rb +0 -5
  83. data/app/controllers/hydra/assets_controller.rb +0 -12
  84. data/app/controllers/hydra/contributors_controller.rb +0 -115
  85. data/app/controllers/hydra/file_assets_controller.rb +0 -3
  86. data/app/controllers/hydra/permissions_controller.rb +0 -117
  87. data/app/controllers/user_sessions_controller.rb +0 -13
  88. data/app/helpers/application_helper.rb +0 -3
  89. data/app/helpers/article_metadata_helper.rb +0 -4
  90. data/app/helpers/blacklight_helper.rb +0 -4
  91. data/app/helpers/downloads_helper.rb +0 -4
  92. data/app/helpers/facets_helper.rb +0 -4
  93. data/app/helpers/generic_content_objects_helper.rb +0 -4
  94. data/app/helpers/hydra/application_helper_behavior.rb +0 -8
  95. data/app/helpers/hydra/article_metadata_helper_behavior.rb +0 -95
  96. data/app/helpers/hydra/blacklight_helper_behavior.rb +0 -128
  97. data/app/helpers/hydra/downloads_helper_behavior.rb +0 -24
  98. data/app/helpers/hydra/facets_helper_behavior.rb +0 -34
  99. data/app/helpers/hydra/generic_content_objects_helper_behavior.rb +0 -17
  100. data/app/helpers/hydra/hydra_assets_helper_behavior.rb +0 -76
  101. data/app/helpers/hydra/hydra_fedora_metadata_helper_behavior.rb +0 -379
  102. data/app/helpers/hydra/hydra_helper_behavior.rb +0 -195
  103. data/app/helpers/hydra/hydra_uploader_helper_behavior.rb +0 -23
  104. data/app/helpers/hydra/inline_editable_metadata_helper_behavior.rb +0 -21
  105. data/app/helpers/hydra/javascript_includes_helper_behavior.rb +0 -94
  106. data/app/helpers/hydra/personalization_helper_behavior.rb +0 -49
  107. data/app/helpers/hydra/release_process_helper_behavior.rb +0 -37
  108. data/app/helpers/hydra_assets_helper.rb +0 -4
  109. data/app/helpers/hydra_fedora_metadata_helper.rb +0 -4
  110. data/app/helpers/hydra_helper.rb +0 -4
  111. data/app/helpers/hydra_uploader_helper.rb +0 -4
  112. data/app/helpers/inline_editable_metadata_helper.rb +0 -4
  113. data/app/helpers/javascript_includes_helper.rb +0 -4
  114. data/app/helpers/personalization_helper.rb +0 -4
  115. data/app/helpers/release_process_helper.rb +0 -4
  116. data/app/models/file_asset.rb +0 -5
  117. data/app/models/generic_content.rb +0 -26
  118. data/app/models/generic_image.rb +0 -67
  119. data/app/models/hydra/datastream/properties.rb +0 -24
  120. data/app/models/mods_asset.rb +0 -24
  121. data/app/models/superuser.rb +0 -14
  122. data/app/models/user_attribute.rb +0 -37
  123. data/app/models/uses_default_partials.rb +0 -23
  124. data/app/views/_add_assets_links.html.erb +0 -14
  125. data/app/views/_flash_msg.html.erb +0 -5
  126. data/app/views/_user_util_links.html.erb +0 -31
  127. data/app/views/catalog/_citation.html.erb +0 -11
  128. data/app/views/catalog/_constraints_element.html.erb +0 -34
  129. data/app/views/catalog/_delete_partials/_default.html.erb +0 -22
  130. data/app/views/catalog/_document_list.html.erb +0 -11
  131. data/app/views/catalog/_edit_partials/_default.html.erb +0 -57
  132. data/app/views/catalog/_edit_partials/_default_details.html.erb +0 -13
  133. data/app/views/catalog/_facets.html.erb +0 -37
  134. data/app/views/catalog/_home.html.erb +0 -6
  135. data/app/views/catalog/_home_text.html.erb +0 -4
  136. data/app/views/catalog/_index_partials/_default.html.erb +0 -20
  137. data/app/views/catalog/_index_partials/_default_details.html.erb +0 -14
  138. data/app/views/catalog/_index_partials/_default_group.html.erb +0 -15
  139. data/app/views/catalog/_opensearch_response_metadata.html.erb +0 -2
  140. data/app/views/catalog/_show_partials/_default.html.erb +0 -21
  141. data/app/views/catalog/_show_partials/_default_details.html.erb +0 -15
  142. data/app/views/catalog/_show_partials/_facets.html.erb +0 -52
  143. data/app/views/catalog/_sms_form.html.erb +0 -21
  144. data/app/views/catalog/_sort_and_per_page.html.erb +0 -23
  145. data/app/views/catalog/_uva_tabs.html.erb +0 -10
  146. data/app/views/catalog/about.html.erb +0 -0
  147. data/app/views/catalog/show.html.erb +0 -40
  148. data/app/views/contributors/_add_contributor_split_button.html.erb +0 -10
  149. data/app/views/contributors/_edit_conference.html.erb +0 -29
  150. data/app/views/contributors/_edit_organization.html.erb +0 -29
  151. data/app/views/contributors/_edit_person.html.erb +0 -39
  152. data/app/views/contributors/_index.html.erb +0 -11
  153. data/app/views/contributors/_new.html.erb +0 -10
  154. data/app/views/contributors/_show_conference.html.erb +0 -12
  155. data/app/views/contributors/_show_organization.html.erb +0 -21
  156. data/app/views/contributors/_show_person.html.erb +0 -17
  157. data/app/views/contributors/new.html.erb +0 -14
  158. data/app/views/downloads/index.html.erb +0 -1
  159. data/app/views/generic_content_objects/_contributor_form.html.erb +0 -11
  160. data/app/views/generic_content_objects/_description_form.html.erb +0 -7
  161. data/app/views/generic_content_objects/_edit_description.html.erb +0 -23
  162. data/app/views/generic_content_objects/_new.html.erb +0 -0
  163. data/app/views/generic_content_objects/_show_description.html.erb +0 -41
  164. data/app/views/generic_contents/_edit.html.erb +0 -10
  165. data/app/views/generic_contents/_index.html.erb +0 -21
  166. data/app/views/generic_contents/_show.html.erb +0 -6
  167. data/app/views/generic_contents/_show_content.html.erb +0 -7
  168. data/app/views/generic_images/_edit.html.erb +0 -36
  169. data/app/views/generic_images/_index.html.erb +0 -24
  170. data/app/views/generic_images/_show.html.erb +0 -13
  171. data/app/views/generic_images/_show_all.html.erb +0 -14
  172. data/app/views/generic_images/_show_content.html.erb +0 -7
  173. data/app/views/hydra/file_assets/_asset_saved_flash.html.erb +0 -2
  174. data/app/views/hydra/file_assets/_deletable_result.html.erb +0 -5
  175. data/app/views/hydra/file_assets/_file_assets_form.html.erb +0 -11
  176. data/app/views/hydra/file_assets/_index.html.erb +0 -29
  177. data/app/views/hydra/file_assets/_new.html.erb +0 -6
  178. data/app/views/hydra/file_assets/_result.html.erb +0 -11
  179. data/app/views/hydra/file_assets/index.html.erb +0 -5
  180. data/app/views/hydra/permissions/_edit_person_permissions.html.erb +0 -30
  181. data/app/views/hydra/permissions/_index.html.erb +0 -46
  182. data/app/views/hydra/permissions/_new.html.erb +0 -14
  183. data/app/views/hydra/permissions/_permissions_form.html.erb +0 -23
  184. data/app/views/hydra/permissions/index.html.erb +0 -1
  185. data/app/views/hydra/permissions/new.html.erb +0 -1
  186. data/app/views/layouts/hydra-head.html.erb +0 -47
  187. data/app/views/mods_assets/_additional_info_form.html.erb +0 -44
  188. data/app/views/mods_assets/_contributor_form.html.erb +0 -14
  189. data/app/views/mods_assets/_edit.html.erb +0 -10
  190. data/app/views/mods_assets/_edit_description.html.erb +0 -73
  191. data/app/views/mods_assets/_edit_journal.html.erb +0 -57
  192. data/app/views/mods_assets/_index.html.erb +0 -1
  193. data/app/views/mods_assets/_index_list.html.erb +0 -37
  194. data/app/views/mods_assets/_index_table.html.erb +0 -7
  195. data/app/views/mods_assets/_progress_box.html.erb +0 -82
  196. data/app/views/mods_assets/_publication_form.html.erb +0 -13
  197. data/app/views/mods_assets/_show.html.erb +0 -39
  198. data/app/views/mods_assets/_show_additional_info.html.erb +0 -17
  199. data/app/views/mods_assets/_show_contributors.html.erb +0 -7
  200. data/app/views/mods_assets/_show_description.html.erb +0 -35
  201. data/app/views/mods_assets/_show_file_assets.html.erb +0 -22
  202. data/app/views/mods_assets/_show_journal.html.erb +0 -42
  203. data/app/views/mods_assets/_show_permissions.html.erb +0 -15
  204. data/app/views/mods_assets/_show_publication.html.erb +0 -8
  205. data/app/views/shared/_delete_asset_confirmation.html.erb +0 -17
  206. data/app/views/user_sessions/_login_form.html.erb +0 -10
  207. data/app/views/user_sessions/logged_out.html.erb +0 -1
  208. data/config/fedora.yml +0 -15
  209. data/config/jetty.yml +0 -6
  210. data/config/locales/hydra.en.yml +0 -7
  211. data/config/role_map_cucumber.yml +0 -10
  212. data/config/role_map_development.yml +0 -12
  213. data/config/role_map_production.yml +0 -2
  214. data/config/role_map_test.yml +0 -14
  215. data/config/routes.rb +0 -12
  216. data/config/solr.yml +0 -9
  217. data/config/solr_mappings.yml +0 -22
  218. data/db/migrate/20101105214243_add_user_attributes_table.rb +0 -15
  219. data/db/migrate/20101108192527_create_superusers.rb +0 -12
  220. data/fedora_conf/conf/development/fedora.fcfg +0 -1021
  221. data/fedora_conf/conf/test/fedora.fcfg +0 -1021
  222. data/hydra-head.gemspec +0 -41
  223. data/init.rb +0 -4
  224. data/install.rb +0 -1
  225. data/lib/application_helper.rb +0 -3
  226. data/lib/generators/hydra/assets_generator.rb +0 -50
  227. data/lib/generators/hydra/cucumber_support_generator.rb +0 -29
  228. data/lib/generators/hydra/head_generator.rb +0 -165
  229. data/lib/generators/hydra/hyhead_fixtures_generator.rb +0 -27
  230. data/lib/generators/hydra/templates/catalog_controller.rb +0 -162
  231. data/lib/generators/hydra/templates/config/fedora.yml +0 -14
  232. data/lib/generators/hydra/templates/config/initializers/action_dispatch_http_upload_monkey_patch.rb +0 -12
  233. data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +0 -44
  234. data/lib/generators/hydra/templates/config/role_map_cucumber.yml +0 -10
  235. data/lib/generators/hydra/templates/config/role_map_development.yml +0 -12
  236. data/lib/generators/hydra/templates/config/role_map_production.yml +0 -2
  237. data/lib/generators/hydra/templates/config/role_map_test.yml +0 -15
  238. data/lib/generators/hydra/templates/config/solr.yml +0 -10
  239. data/lib/generators/hydra/templates/config/solr_mappings.yml +0 -22
  240. data/lib/generators/hydra/templates/fedora_conf/conf/development/fedora.fcfg +0 -1021
  241. data/lib/generators/hydra/templates/fedora_conf/conf/test/fedora.fcfg +0 -1021
  242. data/lib/generators/hydra/templates/migrations/create_superusers.rb +0 -12
  243. data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +0 -124
  244. data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +0 -394
  245. data/lib/generators/hydra/templates/solr_conf/solr.xml +0 -35
  246. data/lib/hydra-head.rb +0 -29
  247. data/lib/hydra-head/controller.rb +0 -29
  248. data/lib/hydra-head/engine.rb +0 -29
  249. data/lib/hydra-head/routes.rb +0 -90
  250. data/lib/hydra-head/version.rb +0 -4
  251. data/lib/hydra.rb +0 -52
  252. data/lib/hydra/assets.rb +0 -7
  253. data/lib/hydra/assets_controller_helper.rb +0 -122
  254. data/lib/hydra/catalog.rb +0 -11
  255. data/lib/hydra/controller.rb +0 -26
  256. data/lib/hydra/controller/assets_controller_behavior.rb +0 -143
  257. data/lib/hydra/controller/catalog_controller_behavior.rb +0 -56
  258. data/lib/hydra/controller/controller_behavior.rb +0 -59
  259. data/lib/hydra/controller/file_assets_behavior.rb +0 -144
  260. data/lib/hydra/controller/repository_controller_behavior.rb +0 -119
  261. data/lib/hydra/controller/upload_behavior.rb +0 -139
  262. data/lib/hydra/file_assets.rb +0 -11
  263. data/lib/hydra/file_assets_helper.rb +0 -12
  264. data/lib/hydra/generic_content.rb +0 -130
  265. data/lib/hydra/generic_image.rb +0 -112
  266. data/lib/hydra/generic_user_attributes.rb +0 -41
  267. data/lib/hydra/global_configurable.rb +0 -46
  268. data/lib/hydra/model_methods.rb +0 -104
  269. data/lib/hydra/model_mixins.rb +0 -8
  270. data/lib/hydra/model_mixins/common_metadata.rb +0 -25
  271. data/lib/hydra/model_mixins/solr_document_extension.rb +0 -24
  272. data/lib/hydra/models/file_asset.rb +0 -78
  273. data/lib/hydra/repository_controller.rb +0 -28
  274. data/lib/hydra/rights_metadata.rb +0 -194
  275. data/lib/hydra/solr.rb +0 -9
  276. data/lib/hydra/submission_workflow.rb +0 -138
  277. data/lib/hydra/superuser_attributes.rb +0 -19
  278. data/lib/hydra/ui.rb +0 -6
  279. data/lib/hydra/ui/controller.rb +0 -46
  280. data/lib/hydra/workflow.rb +0 -5
  281. data/lib/hydra/workflow/controller.rb +0 -3
  282. data/lib/mediashelf/active_fedora_helper.rb +0 -73
  283. data/lib/prev_next_links.rb +0 -33
  284. data/lib/railties/active-fedora.rake +0 -1
  285. data/lib/railties/hydra-fixtures.rake +0 -50
  286. data/lib/railties/hydra_jetty.rake +0 -53
  287. data/lib/user_attributes_loader.rb +0 -26
  288. data/solr/conf/schema.xml +0 -116
  289. data/solr/conf/solrconfig.xml +0 -311
  290. data/solr/solr.xml +0 -35
  291. data/solr_conf/conf/schema.xml +0 -124
  292. data/solr_conf/conf/solrconfig.xml +0 -394
  293. data/solr_conf/solr.xml +0 -35
  294. data/tasks/active-fedora.rake +0 -1
  295. data/tasks/hydra-head-fixtures.rake +0 -58
  296. data/tasks/hydra-head.rake +0 -209
  297. data/tasks/hydra_jetty.rake +0 -53
  298. data/tasks/hyhead_rspec.rake +0 -57
  299. data/tasks/replicator.rake +0 -27
  300. data/tasks/solrizer-fedora.rake +0 -53
  301. data/tasks/solrizer.rake +0 -13
  302. data/test_support/etc/Gemfile +0 -46
  303. data/test_support/etc/common_metadata_asset.rb +0 -18
  304. data/test_support/features/absent_model_edit.feature +0 -27
  305. data/test_support/features/absent_model_search_result.feature +0 -18
  306. data/test_support/features/absent_model_show.feature +0 -27
  307. data/test_support/features/button_add_assets.feature +0 -22
  308. data/test_support/features/button_add_generic_content.feature +0 -11
  309. data/test_support/features/button_add_image.feature +0 -11
  310. data/test_support/features/button_add_mods_asset.feature +0 -11
  311. data/test_support/features/button_delete_asset.feature +0 -13
  312. data/test_support/features/contributor_add.feature +0 -44
  313. data/test_support/features/default_partials_edit.feature +0 -27
  314. data/test_support/features/default_partials_search_result.feature +0 -22
  315. data/test_support/features/default_partials_show.feature +0 -24
  316. data/test_support/features/file_upload.feature +0 -80
  317. data/test_support/features/generic_content_create.feature +0 -7
  318. data/test_support/features/generic_content_edit.feature +0 -21
  319. data/test_support/features/generic_content_search_result.feature +0 -22
  320. data/test_support/features/generic_content_show.feature +0 -20
  321. data/test_support/features/generic_image_create.feature +0 -7
  322. data/test_support/features/generic_image_edit.feature +0 -21
  323. data/test_support/features/generic_image_search_result.feature +0 -22
  324. data/test_support/features/generic_image_show.feature +0 -20
  325. data/test_support/features/home_page.feature +0 -9
  326. data/test_support/features/html_validity.feature +0 -43
  327. data/test_support/features/mods_asset_contributors_edit.feature +0 -88
  328. data/test_support/features/mods_asset_create.feature +0 -17
  329. data/test_support/features/mods_asset_edit.feature +0 -65
  330. data/test_support/features/mods_asset_edit_without_permission.feature +0 -15
  331. data/test_support/features/mods_asset_search_result.feature +0 -24
  332. data/test_support/features/mods_asset_show.feature +0 -90
  333. data/test_support/features/nonexistent_object_show.feature +0 -9
  334. data/test_support/features/permissions_add.feature +0 -16
  335. data/test_support/features/permissions_edit.feature +0 -65
  336. data/test_support/features/step_definitions/catalog_index_steps.rb +0 -14
  337. data/test_support/features/step_definitions/create_asset_steps.rb +0 -3
  338. data/test_support/features/step_definitions/edit_metadata_steps.rb +0 -72
  339. data/test_support/features/step_definitions/file_list_steps.rb +0 -36
  340. data/test_support/features/step_definitions/html_validity_steps.rb +0 -64
  341. data/test_support/features/step_definitions/hydra_metadata_steps.rb +0 -3
  342. data/test_support/features/step_definitions/hydra_steps.rb +0 -8
  343. data/test_support/features/step_definitions/inline_editable_edit_steps.rb +0 -77
  344. data/test_support/features/step_definitions/search_steps.rb +0 -88
  345. data/test_support/features/step_definitions/searching_steps.rb +0 -22
  346. data/test_support/features/step_definitions/show_document_steps.rb +0 -89
  347. data/test_support/features/step_definitions/user_steps.rb +0 -42
  348. data/test_support/features/step_definitions/web_steps.rb +0 -223
  349. data/test_support/features/support/env.rb +0 -57
  350. data/test_support/features/support/paths.rb +0 -85
  351. data/test_support/features/switch_users.feature +0 -14
  352. data/test_support/features/view_catalog_index.feature +0 -18
  353. data/test_support/fixtures/empty_file.txt +0 -0
  354. data/test_support/fixtures/hydra_test_default_partials.foxml.xml +0 -80
  355. data/test_support/fixtures/hydra_test_generic_content.foxml.xml +0 -138
  356. data/test_support/fixtures/hydra_test_generic_image.foxml.xml +0 -395
  357. data/test_support/fixtures/hydra_test_no_model.foxml.xml +0 -79
  358. data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +0 -1212
  359. data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +0 -4946
  360. data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +0 -234
  361. data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +0 -177
  362. data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +0 -170
  363. data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +0 -187
  364. data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +0 -676
  365. data/test_support/fixtures/hydrus_admin_class1.foxml.xml +0 -176
  366. data/test_support/fixtures/image.jp2 +0 -0
  367. data/test_support/fixtures/libra-oa_1.foxml.xml +0 -2324
  368. data/test_support/fixtures/libra-oa_2.foxml.xml +0 -2422
  369. data/test_support/fixtures/libra-oa_7.foxml.xml +0 -1735
  370. data/test_support/fixtures/small_file.txt +0 -1
  371. data/test_support/spec/controllers/catalog_controller_spec.rb +0 -138
  372. data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +0 -67
  373. data/test_support/spec/controllers/catalog_valid_html_spec.rb +0 -123
  374. data/test_support/spec/controllers/contributors_controller_spec.rb +0 -67
  375. data/test_support/spec/controllers/file_assets_controller_spec.rb +0 -194
  376. data/test_support/spec/controllers/hydra-assets_controller_spec.rb +0 -151
  377. data/test_support/spec/controllers/hydra_controller_spec.rb +0 -43
  378. data/test_support/spec/controllers/hydra_ui_controller_spec.rb +0 -21
  379. data/test_support/spec/controllers/permissions_controller_spec.rb +0 -39
  380. data/test_support/spec/controllers/user_sessions_controller_spec.rb +0 -35
  381. data/test_support/spec/factories.rb +0 -11
  382. data/test_support/spec/helpers/access_controls_enforcement_spec.rb +0 -119
  383. data/test_support/spec/helpers/access_controls_evaluation_spec.rb +0 -26
  384. data/test_support/spec/helpers/assets_controller_helper_spec.rb +0 -63
  385. data/test_support/spec/helpers/blacklight_helper_spec.rb +0 -60
  386. data/test_support/spec/helpers/file_assets_helper_spec.rb +0 -116
  387. data/test_support/spec/helpers/generic_content_objects_helper_spec.rb +0 -17
  388. data/test_support/spec/helpers/hydra-repository_controller_spec.rb +0 -54
  389. data/test_support/spec/helpers/hydra_assets_helper_spec.rb +0 -143
  390. data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +0 -255
  391. data/test_support/spec/helpers/hydra_helper_spec.rb +0 -105
  392. data/test_support/spec/helpers/hydra_model_methods_spec.rb +0 -88
  393. data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +0 -26
  394. data/test_support/spec/helpers/javascript_includes_helper_spec.rb +0 -51
  395. data/test_support/spec/integration/file_asset_spec.rb +0 -68
  396. data/test_support/spec/lib/catalog_spec.rb +0 -23
  397. data/test_support/spec/lib/global_configurable_spec.rb +0 -98
  398. data/test_support/spec/lib/hydra_submission_workflow_spec.rb +0 -141
  399. data/test_support/spec/lib/model_methods_spec.rb +0 -29
  400. data/test_support/spec/models/file_asset_spec.rb +0 -25
  401. data/test_support/spec/models/generic_content_spec.rb +0 -39
  402. data/test_support/spec/models/generic_image_spec.rb +0 -75
  403. data/test_support/spec/models/mods_asset_spec.rb +0 -20
  404. data/test_support/spec/models/solr_document_spec.rb +0 -17
  405. data/test_support/spec/models/user_spec.rb +0 -94
  406. data/test_support/spec/rcov.opts +0 -3
  407. data/test_support/spec/spec.opts +0 -4
  408. data/test_support/spec/spec_helper.rb +0 -63
  409. data/test_support/spec/support/matchers/helper_matcher.rb +0 -14
  410. data/test_support/spec/support/matchers/solr_matchers.rb +0 -60
  411. data/test_support/spec/unit/hydra-head-engine_spec.rb +0 -8
  412. data/test_support/spec/unit/hydra-head_spec.rb +0 -8
@@ -1,41 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "hydra-head/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "hydra-head"
7
- s.version = HydraHead::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield, Justin Coyne & many more. See https://github.com/projecthydra/hydra-head/contributors"]
10
- s.email = ["hydra-tech@googlegroups.com"]
11
- s.homepage = "http://projecthydra.org"
12
- s.summary = %q{Hydra-Head Rails Engine (requires Rails3) }
13
- s.description = %q{Hydra-Head is a Rails Engine containing the core code for a Hydra application. The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora, solrizer, and om}
14
-
15
- s.add_dependency "rails", '~>3.2.3'
16
- s.add_dependency "blacklight", '~>3.4'
17
- s.add_dependency "devise"
18
- s.add_dependency "active-fedora", '~>4.1'
19
- s.add_dependency 'RedCloth', '=4.2.9'
20
- s.add_dependency 'block_helpers'
21
- s.add_dependency 'sanitize'
22
- s.add_dependency 'hydra-mods', ">= 0.0.5"
23
- s.add_dependency 'deprecation', ">= 0.0.5"
24
- s.add_dependency 'jquery-rails'
25
- s.add_dependency 'hydra-access-controls', ">= 0.0.5"
26
-
27
- s.add_development_dependency 'sqlite3'
28
- s.add_development_dependency 'yard'
29
- s.add_development_dependency 'jettywrapper', ">=1.3.0"
30
- s.add_development_dependency 'rspec-rails'
31
- s.add_development_dependency 'mocha'
32
- s.add_development_dependency 'cucumber-rails', '>=1.2.0'
33
- s.add_development_dependency 'factory_girl', "~> 2.6.0"
34
- s.add_development_dependency 'solrizer-fedora', '>=2.1.0'
35
-
36
-
37
- s.files = `git ls-files`.split("\n")
38
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
39
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
40
- s.require_paths = ["lib"]
41
- end
data/init.rb DELETED
@@ -1,4 +0,0 @@
1
- # Include hook code here
2
- require "hydra"
3
- require "hydra-head"
4
- Hydra.extend Blacklight::Configurable # not sure why this isn't being executed in lib/hydra.rb
data/install.rb DELETED
@@ -1 +0,0 @@
1
- # Install hook code here
@@ -1,3 +0,0 @@
1
- # Needed for testing
2
- module ApplicationHelper
3
- end
@@ -1,50 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- # Copy Blacklight assets to public folder in current app.
3
- # If you want to do this on application startup, you can
4
- # add this next line to your one of your environment files --
5
- # generally you'd only want to do this in 'development', and can
6
- # add it to environments/development.rb:
7
- # require File.join(Hydra.root, "lib", "generators", "hydra", "assets_generator.rb")
8
- # Hydra::Assets.start(["--force", "--quiet"])
9
-
10
-
11
- # Need the requires here so we can call the generator from environment.rb
12
- # as suggested above.
13
- require 'rails/generators'
14
- require 'rails/generators/base'
15
- module Hydra
16
- class AssetsGenerator < Rails::Generators::Base
17
- source_root File.expand_path('../templates', __FILE__)
18
-
19
- def assets
20
- if use_asset_pipeline?
21
- insert_into_file "app/assets/stylesheets/application.css", :after => " *= require_self" do
22
- %q{
23
- *
24
- * Required by Hydra
25
- *= require 'hydra/styles'
26
- }
27
- end
28
-
29
- insert_into_file "app/assets/javascripts/application.js", :after => "//= require jquery_ujs" do
30
- %q{
31
- // Required by Hydra
32
- //= require 'jquery.ui.datepicker.js'
33
- }
34
- end
35
- directory("../../../../app/assets/images/blacklight", "public/images/blacklight")
36
- else
37
- # directories are relative to the source_root
38
- directory("../../../../assets/images", "public/images")
39
- directory("../../../../assets/stylesheets", "public/stylesheets")
40
- directory("../../../../assets/javascripts", "public/javascripts")
41
- end
42
- end
43
-
44
- private
45
- def use_asset_pipeline?
46
- (Rails::VERSION::MAJOR >= 3 and Rails::VERSION::MINOR >= 1) and Rails.application.config.assets.enabled
47
- end
48
-
49
- end
50
- end
@@ -1,29 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- require 'rails/generators'
3
- require 'rails/generators/migration'
4
-
5
- module Hydra
6
- class CucumberSupportGenerator < Rails::Generators::Base
7
-
8
- source_root File.expand_path('../../../../test_support/features', __FILE__)
9
-
10
- argument :features_dir, :type => :string , :default => "features"
11
-
12
- desc """
13
- This Generator copies Hydra's cucumber step definitions and paths into your application's features directory.
14
- We have plans to provide the step definitions directly through the hydra-head gem without requiring this step of copying the files.
15
- In the meantime, you need to copy the files in order to use them.
16
-
17
- Defaults to assuming that your cucumber features live in a directory called \"features\". To pass in an alternative path to your features directory,
18
-
19
- rails generate hydra:cucumber_support test_support/features
20
-
21
- """
22
-
23
- def copy_cucumber_support
24
- directory("step_definitions", "#{features_dir}/step_definitions")
25
- copy_file("support/paths.rb", "#{features_dir}/support/paths.rb")
26
- end
27
-
28
- end
29
- end
@@ -1,165 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- require 'rails/generators'
3
- require 'rails/generators/migration'
4
-
5
- module Hydra
6
- class HeadGenerator < Rails::Generators::Base
7
- include Rails::Generators::Migration
8
-
9
- source_root File.expand_path('../templates', __FILE__)
10
-
11
- argument :model_name, :type => :string , :default => "user"
12
-
13
- desc """
14
- This generator makes the following changes to your application:
15
- 1. Creates a database migration for superusers if they do not exist in /db/migrate
16
- 2. Adds additional mime types to you application in the file '/config/initializers/mime_types.rb'
17
- 3. Creates config/initializers/hydra_config.rb
18
- 4. Creates config/fedora.yml and config/solr.yml which you may need to modify to tell the hydra head where to find fedora & solr
19
- 5. Creates a number of role_map config files that are used in the placeholder user roles implementation
20
- Enjoy building your Hydra Head!
21
- """
22
-
23
- #
24
- # Config Files & Initializers
25
- #
26
-
27
- # Copy all files in templates/config directory to host config
28
- def create_configuration_files
29
- #CatalogController
30
- copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
31
-
32
- # Initializers
33
- copy_file "config/initializers/hydra_config.rb", "config/initializers/hydra_config.rb"
34
- copy_file "config/initializers/action_dispatch_http_upload_monkey_patch.rb", "config/initializers/action_dispatch_http_upload_monkey_patch.rb"
35
-
36
- # Role Mappings
37
- copy_file "config/role_map_cucumber.yml", "config/role_map_cucumber.yml"
38
- copy_file "config/role_map_development.yml", "config/role_map_development.yml"
39
- copy_file "config/role_map_production.yml", "config/role_map_production.yml"
40
- copy_file "config/role_map_test.yml", "config/role_map_test.yml"
41
-
42
- # Solr Mappings
43
- copy_file "config/solr_mappings.yml", "config/solr_mappings.yml"
44
-
45
- # Fedora & Solr YAML files
46
- copy_file "config/fedora.yml", "config/fedora.yml"
47
- copy_file "config/solr.yml", "config/solr.yml"
48
-
49
- # Fedora & Solr Config files
50
- directory "fedora_conf"
51
- directory "solr_conf"
52
- end
53
-
54
- # Register mimetypes required by hydra-head
55
- def add_mime_types
56
- puts "Updating Mime Types"
57
- insert_into_file "config/initializers/mime_types.rb", :before => 'Mime::Type.register_alias "text/plain", :refworks_marc_txt' do <<EOF
58
- # Mime Types Added By Hydra Head:
59
-
60
- # Mime::Type.register "text/html", :html
61
- # Mime::Type.register "application/pdf", :pdf
62
- # Mime::Type.register "image/jpeg2000", :jp2
63
- Mime::Type.register_alias "text/html", :textile
64
- Mime::Type.register_alias "text/html", :inline
65
-
66
- EOF
67
- end
68
- end
69
-
70
- #
71
- # Static Assets
72
- #
73
- # Call external generator in AssetsGenerator, which copies static assets like stylesheets, javascript and images
74
- # into the app's public directory
75
- def copy_public_assets
76
- generate "hydra:assets"
77
- end
78
-
79
- #
80
- # Migrations
81
- #
82
-
83
- # Implement the required interface for Rails::Generators::Migration.
84
- # taken from http://github.com/rails/rails/blob/master/activerecord/lib/generators/active_record.rb
85
- def self.next_migration_number(dirname)
86
- unless @prev_migration_nr
87
- @prev_migration_nr = Time.now.utc.strftime("%Y%m%d%H%M%S").to_i
88
- else
89
- @prev_migration_nr += 1
90
- end
91
- @prev_migration_nr.to_s
92
- end
93
-
94
- # Add Hydra behaviors to the user model
95
- def inject_hydra_user_behavior
96
- file_path = "app/models/#{model_name.underscore}.rb"
97
- if File.exists?(file_path)
98
- inject_into_class file_path, model_name.classify do
99
- "# Connects this user object to Hydra behaviors. " +
100
- "\n include Hydra::User\n"
101
- end
102
- else
103
- puts " \e[31mFailure\e[0m Hydra requires a user object in order to apply access controls. This generators assumes that the model is defined in the file #{file_path}, which does not exist. If you used a different name, please re-run the generator and provide that name as an argument. Such as \b rails -g hydra:head client"
104
- end
105
- end
106
-
107
- # Add Hydra behaviors and Filters to CatalogController
108
- def inject_hydra_catalog_behavior
109
- puts "Adding Hydra behaviors to CatalogController"
110
- controller_name = "catalog_controller"
111
- file_path = "app/controllers/#{controller_name.underscore}.rb"
112
- if File.exists?(file_path)
113
- insert_into_file file_path, :after => 'include Blacklight::Catalog' do
114
- "\n # Extend Blacklight::Catalog with Hydra behaviors (primarily editing)." +
115
- "\n include Hydra::Controller::CatalogControllerBehavior\n" +
116
- "\n # These before_filters apply the hydra access controls" +
117
- "\n before_filter :enforce_access_controls" +
118
- "\n before_filter :enforce_viewing_context_for_show_requests, :only=>:show" +
119
- "\n # This applies appropriate access controls to all solr queries" +
120
- "\n CatalogController.solr_search_params_logic << :add_access_controls_to_solr_params" +
121
- "\n # This filters out objects that you want to exclude from search results, like FileAssets" +
122
- "\n CatalogController.solr_search_params_logic << :exclude_unwanted_models"
123
-
124
- end
125
- else
126
- puts " \e[31mFailure\e[0m Could not find #{model_name.underscore}.rb. To add Hydra behaviors to your Blacklight::Catalog Controllers, you must include the Hydra::Controller::ControllerBehavior module in the Controller class definition. See the Hydra::Controller::ControllerBehavior section in the Hydra API Docs for more info."
127
- end
128
- end
129
-
130
- # Inject call to HydraHead.add_routes in config/routes.rb
131
- def inject_hydra_routes
132
- insert_into_file "config/routes.rb", :after => 'Blacklight.add_routes(self)' do
133
- "\n # Add Hydra routes. For options, see API docs for HydraHead.routes"
134
- "\n HydraHead.add_routes(self)"
135
- end
136
- end
137
-
138
- # Add Hydra to the application controller
139
- def inject_hydra_controller_behavior
140
- puts "Adding Hydra behaviors to ApplicationController"
141
- controller_name = "ApplicationController"
142
- file_path = "app/controllers/#{controller_name.underscore}.rb"
143
- if File.exists?(file_path)
144
- insert_into_file file_path, :after => 'include Blacklight::Controller' do
145
- " \n# Adds Hydra behaviors into the application controller \n" +
146
- " include Hydra::Controller::ControllerBehavior\n" +
147
- " def layout_name\n" +
148
- " 'hydra-head'\n" +
149
- " end\n"
150
- end
151
- else
152
- puts " \e[31mFailure\e[0m Could not find #{model_name.underscore}.rb. To add Hydra behaviors to your Blacklight::Catalog Controllers, you must include the Hydra::Controller::ControllerBehavior module in the Controller class definition. See the Hydra::Controller::ControllerBehavior section in the Hydra API Docs for more info."
153
- end
154
- end
155
-
156
- def create_migration_file
157
- migration_template 'migrations/create_superusers.rb', 'db/migrate/create_superusers.rb'
158
- end
159
-
160
-
161
-
162
-
163
-
164
- end # HeadGenerator
165
- end # Hydra
@@ -1,27 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- require 'rails/generators'
3
- require 'rails/generators/migration'
4
-
5
- module Hydra
6
- class HyheadFixturesGenerator < Rails::Generators::Base
7
-
8
- source_root File.expand_path('../../../../', __FILE__)
9
-
10
- desc """
11
- This Generator copies the hydra-head sample/test objects into your application's test_support/fixtures directory
12
- These objects are useful for getting a sense of how hydra works, but you will want to delete them and create your own
13
- fixtures to run your application's tests against.
14
-
15
- After running this generator, you can import your fixtures into fedora & solr by running
16
-
17
- rake hydra:fixtures:refresh
18
- rake hydra:fixtures:refresh RAILS_ENV=test
19
-
20
- """
21
-
22
- def copy_hyhead_fixtures
23
- directory("test_support/fixtures", "spec/fixtures")
24
- end
25
-
26
- end
27
- end
@@ -1,162 +0,0 @@
1
- # -*- encoding : utf-8 -*-
2
- require 'blacklight/catalog'
3
-
4
- class CatalogController < ApplicationController
5
-
6
- include Blacklight::Catalog
7
-
8
- configure_blacklight do |config|
9
- config.default_solr_params = {
10
- :qt => 'search',
11
- :rows => 10
12
- }
13
-
14
- # solr field configuration for search results/index views
15
- config.index.show_link = 'title_t'
16
- config.index.record_display_type = 'has_model_s'
17
-
18
- # solr field configuration for document/show views
19
- config.show.html_title = 'title_t'
20
- config.show.heading = 'title_t'
21
- config.show.display_type = 'has_model_s'
22
-
23
- # solr fields that will be treated as facets by the blacklight application
24
- # The ordering of the field names is the order of the display
25
- #
26
- # Setting a limit will trigger Blacklight's 'more' facet values link.
27
- # * If left unset, then all facet values returned by solr will be displayed.
28
- # * If set to an integer, then "f.somefield.facet.limit" will be added to
29
- # solr request, with actual solr request being +1 your configured limit --
30
- # you configure the number of items you actually want _displayed_ in a page.
31
- # * If set to 'true', then no additional parameters will be sent to solr,
32
- # but any 'sniffed' request limit parameters will be used for paging, with
33
- # paging at requested limit -1. Can sniff from facet.limit or
34
- # f.specific_field.facet.limit solr request params. This 'true' config
35
- # can be used if you set limits in :default_solr_params, or as defaults
36
- # on the solr side in the request handler itself. Request handler defaults
37
- # sniffing requires solr requests to be made with "echoParams=all", for
38
- # app code to actually have it echo'd back to see it.
39
- #
40
- # :show may be set to false if you don't want the facet to be drawn in the
41
- # facet bar
42
- config.add_facet_field 'object_type_facet', :label => 'Format'
43
- config.add_facet_field 'pub_date', :label => 'Publication Year'
44
- config.add_facet_field 'subject_topic_facet', :label => 'Topic', :limit => 20
45
- config.add_facet_field 'language_facet', :label => 'Language', :limit => true
46
- config.add_facet_field 'lc_1letter_facet', :label => 'Call Number'
47
- config.add_facet_field 'subject_geo_facet', :label => 'Region'
48
- config.add_facet_field 'subject_era_facet', :label => 'Era'
49
-
50
- # Have BL send all facet field names to Solr, which has been the default
51
- # previously. Simply remove these lines if you'd rather use Solr request
52
- # handler defaults, or have no facets.
53
- config.default_solr_params[:'facet.field'] = config.facet_fields.keys
54
- #use this instead if you don't want to query facets marked :show=>false
55
- #config.default_solr_params[:'facet.field'] = config.facet_fields.select{ |k, v| v[:show] != false}.keys
56
-
57
-
58
- # solr fields to be displayed in the index (search results) view
59
- # The ordering of the field names is the order of the display
60
- config.add_index_field 'title_display', :label => 'Title:'
61
- config.add_index_field 'title_vern_display', :label => 'Title:'
62
- config.add_index_field 'author_display', :label => 'Author:'
63
- config.add_index_field 'author_vern_display', :label => 'Author:'
64
- config.add_index_field 'format', :label => 'Format:'
65
- config.add_index_field 'language_facet', :label => 'Language:'
66
- config.add_index_field 'published_display', :label => 'Published:'
67
- config.add_index_field 'published_vern_display', :label => 'Published:'
68
- config.add_index_field 'lc_callnum_display', :label => 'Call number:'
69
-
70
- # solr fields to be displayed in the show (single result) view
71
- # The ordering of the field names is the order of the display
72
- config.add_show_field 'title_display', :label => 'Title:'
73
- config.add_show_field 'title_vern_display', :label => 'Title:'
74
- config.add_show_field 'subtitle_display', :label => 'Subtitle:'
75
- config.add_show_field 'subtitle_vern_display', :label => 'Subtitle:'
76
- config.add_show_field 'author_display', :label => 'Author:'
77
- config.add_show_field 'author_vern_display', :label => 'Author:'
78
- config.add_show_field 'format', :label => 'Format:'
79
- config.add_show_field 'url_fulltext_display', :label => 'URL:'
80
- config.add_show_field 'url_suppl_display', :label => 'More Information:'
81
- config.add_show_field 'language_facet', :label => 'Language:'
82
- config.add_show_field 'published_display', :label => 'Published:'
83
- config.add_show_field 'published_vern_display', :label => 'Published:'
84
- config.add_show_field 'lc_callnum_display', :label => 'Call number:'
85
- config.add_show_field 'isbn_t', :label => 'ISBN:'
86
-
87
- # "fielded" search configuration. Used by pulldown among other places.
88
- # For supported keys in hash, see rdoc for Blacklight::SearchFields
89
- #
90
- # Search fields will inherit the :qt solr request handler from
91
- # config[:default_solr_parameters], OR can specify a different one
92
- # with a :qt key/value. Below examples inherit, except for subject
93
- # that specifies the same :qt as default for our own internal
94
- # testing purposes.
95
- #
96
- # The :key is what will be used to identify this BL search field internally,
97
- # as well as in URLs -- so changing it after deployment may break bookmarked
98
- # urls. A display label will be automatically calculated from the :key,
99
- # or can be specified manually to be different.
100
-
101
- # This one uses all the defaults set by the solr request handler. Which
102
- # solr request handler? The one set in config[:default_solr_parameters][:qt],
103
- # since we aren't specifying it otherwise.
104
-
105
- config.add_search_field 'all_fields', :label => 'All Fields'
106
-
107
-
108
- # Now we see how to over-ride Solr request handler defaults, in this
109
- # case for a BL "search field", which is really a dismax aggregate
110
- # of Solr search fields.
111
-
112
- config.add_search_field('title') do |field|
113
- # solr_parameters hash are sent to Solr as ordinary url query params.
114
- field.solr_parameters = { :'spellcheck.dictionary' => 'title' }
115
-
116
- # :solr_local_parameters will be sent using Solr LocalParams
117
- # syntax, as eg {! qf=$title_qf }. This is neccesary to use
118
- # Solr parameter de-referencing like $title_qf.
119
- # See: http://wiki.apache.org/solr/LocalParams
120
- field.solr_local_parameters = {
121
- :qf => '$title_qf',
122
- :pf => '$title_pf'
123
- }
124
- end
125
-
126
- config.add_search_field('author') do |field|
127
- field.solr_parameters = { :'spellcheck.dictionary' => 'author' }
128
- field.solr_local_parameters = {
129
- :qf => '$author_qf',
130
- :pf => '$author_pf'
131
- }
132
- end
133
-
134
- # Specifying a :qt only to show it's possible, and so our internal automated
135
- # tests can test it. In this case it's the same as
136
- # config[:default_solr_parameters][:qt], so isn't actually neccesary.
137
- config.add_search_field('subject') do |field|
138
- field.solr_parameters = { :'spellcheck.dictionary' => 'subject' }
139
- field.qt = 'search'
140
- field.solr_local_parameters = {
141
- :qf => '$subject_qf',
142
- :pf => '$subject_pf'
143
- }
144
- end
145
-
146
- # "sort results by" select (pulldown)
147
- # label in pulldown is followed by the name of the SOLR field to sort by and
148
- # whether the sort is ascending or descending (it must be asc or desc
149
- # except in the relevancy case).
150
- config.add_sort_field 'score desc, pub_date_sort desc, title_sort asc', :label => 'relevance'
151
- config.add_sort_field 'pub_date_sort desc, title_sort asc', :label => 'year'
152
- config.add_sort_field 'author_sort asc, title_sort asc', :label => 'author'
153
- config.add_sort_field 'title_sort asc, pub_date_sort desc', :label => 'title'
154
-
155
- # If there are more than this many search results, no spelling ("did you
156
- # mean") suggestion is offered.
157
- config.spell_max = 5
158
- end
159
-
160
-
161
-
162
- end