hydra-head 3.0.0pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (366) hide show
  1. data/.gitignore +71 -0
  2. data/.gitmodules +6 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +257 -0
  5. data/README.textile +150 -0
  6. data/README_RAILS3_CHANGES.textile +42 -0
  7. data/Rakefile +5 -0
  8. data/TESTING.textile +85 -0
  9. data/app/controllers/assets_controller.rb +117 -0
  10. data/app/controllers/contributors_controller.rb +54 -0
  11. data/app/controllers/file_assets_controller.rb +152 -0
  12. data/app/controllers/permissions_controller.rb +137 -0
  13. data/app/controllers/user_sessions_controller.rb +14 -0
  14. data/app/helpers/article_metadata_helper.rb +80 -0
  15. data/app/helpers/blacklight_helper.rb +192 -0
  16. data/app/helpers/downloads_helper.rb +19 -0
  17. data/app/helpers/generic_content_objects_helper.rb +16 -0
  18. data/app/helpers/hydra_assets_helper.rb +75 -0
  19. data/app/helpers/hydra_djatoka_helper.rb +23 -0
  20. data/app/helpers/hydra_fedora_metadata_helper.rb +365 -0
  21. data/app/helpers/hydra_helper.rb +155 -0
  22. data/app/helpers/hydra_uploader_helper.rb +18 -0
  23. data/app/helpers/inline_editable_metadata_helper.rb +15 -0
  24. data/app/helpers/javascript_includes_helper.rb +93 -0
  25. data/app/helpers/release_process_helper.rb +32 -0
  26. data/app/models/audio_asset.rb +8 -0
  27. data/app/models/file_asset.rb +111 -0
  28. data/app/models/generic_content.rb +21 -0
  29. data/app/models/generic_image.rb +62 -0
  30. data/app/models/image_asset.rb +8 -0
  31. data/app/models/mods_asset.rb +6 -0
  32. data/app/models/role_mapper.rb +22 -0
  33. data/app/models/superuser.rb +6 -0
  34. data/app/models/video_asset.rb +8 -0
  35. data/app/views/_add_assets_links.html.erb +13 -0
  36. data/app/views/_brown_sidebar.html +15 -0
  37. data/app/views/_user_util_links.html.erb +31 -0
  38. data/app/views/catalog/_citation.html.erb +11 -0
  39. data/app/views/catalog/_constraints_element.html.erb +34 -0
  40. data/app/views/catalog/_delete_partials/_default.html.erb +29 -0
  41. data/app/views/catalog/_document_list.html.erb +11 -0
  42. data/app/views/catalog/_edit_partials/_default.html.erb +64 -0
  43. data/app/views/catalog/_edit_partials/_default_details.html.erb +15 -0
  44. data/app/views/catalog/_email_form.html.erb +9 -0
  45. data/app/views/catalog/_facets.html.erb +37 -0
  46. data/app/views/catalog/_flash_msg.html.erb +17 -0
  47. data/app/views/catalog/_home.html.erb +6 -0
  48. data/app/views/catalog/_home_text.html.erb +10 -0
  49. data/app/views/catalog/_index_partials/_default.html.erb +20 -0
  50. data/app/views/catalog/_index_partials/_default_details.html.erb +11 -0
  51. data/app/views/catalog/_index_partials/_default_group.html.erb +15 -0
  52. data/app/views/catalog/_search_form.html.erb +12 -0
  53. data/app/views/catalog/_show_partials/_default.html.erb +23 -0
  54. data/app/views/catalog/_show_partials/_default_details.html.erb +12 -0
  55. data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
  56. data/app/views/catalog/_sms_form.html.erb +21 -0
  57. data/app/views/catalog/_sort_and_per_page.html.erb +22 -0
  58. data/app/views/catalog/_uva_tabs.html.erb +10 -0
  59. data/app/views/catalog/about.html.erb +0 -0
  60. data/app/views/catalog/show.html.erb +48 -0
  61. data/app/views/contributors/_add_contributor_split_button.html.erb +10 -0
  62. data/app/views/contributors/_edit_conference.html.erb +29 -0
  63. data/app/views/contributors/_edit_organization.html.erb +29 -0
  64. data/app/views/contributors/_edit_person.html.erb +42 -0
  65. data/app/views/contributors/_index.html.erb +12 -0
  66. data/app/views/contributors/_new.html.erb +10 -0
  67. data/app/views/contributors/_show_conference.html.erb +22 -0
  68. data/app/views/contributors/_show_organization.html.erb +29 -0
  69. data/app/views/contributors/_show_person.html.erb +17 -0
  70. data/app/views/contributors/new.html.erb +13 -0
  71. data/app/views/downloads/index.html.erb +1 -0
  72. data/app/views/file_assets/_deletable_result.html.erb +5 -0
  73. data/app/views/file_assets/_index.html.erb +15 -0
  74. data/app/views/file_assets/_new.html.erb +2 -0
  75. data/app/views/file_assets/_result.html.erb +16 -0
  76. data/app/views/file_assets/index.html.erb +5 -0
  77. data/app/views/fluid_infusion/_uploader.html.erb +81 -0
  78. data/app/views/fluid_infusion/_uploader_generic_content_objects.js.erb +38 -0
  79. data/app/views/fluid_infusion/_uploader_js.erb +45 -0
  80. data/app/views/generic_content_objects/_edit_description.html.erb +50 -0
  81. data/app/views/generic_content_objects/_new.html.erb +0 -0
  82. data/app/views/generic_content_objects/_show_description.html.erb +68 -0
  83. data/app/views/generic_content_objects/contributors/_edit_conference.html.erb +29 -0
  84. data/app/views/generic_content_objects/contributors/_edit_organization.html.erb +29 -0
  85. data/app/views/generic_content_objects/contributors/_edit_person.html.erb +37 -0
  86. data/app/views/generic_content_objects/contributors/_new.html.erb +10 -0
  87. data/app/views/generic_content_objects/contributors/_show_conference.html.erb +22 -0
  88. data/app/views/generic_content_objects/contributors/_show_organization.html.erb +22 -0
  89. data/app/views/generic_content_objects/contributors/_show_person.html.erb +38 -0
  90. data/app/views/generic_contents/_edit.html.erb +59 -0
  91. data/app/views/generic_contents/_index.html.erb +23 -0
  92. data/app/views/generic_contents/_show.html.erb +18 -0
  93. data/app/views/generic_contents/_show_content.html.erb +4 -0
  94. data/app/views/generic_images/_edit.html.erb +59 -0
  95. data/app/views/generic_images/_index.html.erb +24 -0
  96. data/app/views/generic_images/_show.html.erb +18 -0
  97. data/app/views/generic_images/_show_all.html.erb +14 -0
  98. data/app/views/generic_images/_show_content.html.erb +7 -0
  99. data/app/views/layouts/application.html.erb +57 -0
  100. data/app/views/layouts/hydra-head.html.erb +12 -0
  101. data/app/views/mods_assets/_edit.html.erb +49 -0
  102. data/app/views/mods_assets/_edit_description.html.erb +82 -0
  103. data/app/views/mods_assets/_edit_journal.html.erb +72 -0
  104. data/app/views/mods_assets/_index.html.erb +1 -0
  105. data/app/views/mods_assets/_index_list.html.erb +37 -0
  106. data/app/views/mods_assets/_index_table.html.erb +7 -0
  107. data/app/views/mods_assets/_progress_box.html.erb +82 -0
  108. data/app/views/mods_assets/_show.html.erb +44 -0
  109. data/app/views/mods_assets/_show_description.html.erb +44 -0
  110. data/app/views/mods_assets/_show_journal.html.erb +42 -0
  111. data/app/views/mods_assets/_show_permissions.html.erb +14 -0
  112. data/app/views/permissions/_edit_person_permissions.html.erb +35 -0
  113. data/app/views/permissions/_index.html.erb +55 -0
  114. data/app/views/permissions/_new.html.erb +18 -0
  115. data/app/views/permissions/index.html.erb +1 -0
  116. data/app/views/permissions/new.html.erb +1 -0
  117. data/app/views/shared/_delete_asset_confirmation.html.erb +17 -0
  118. data/app/views/user_sessions/_login_form.html.erb +10 -0
  119. data/app/views/user_sessions/logged_out.html.erb +1 -0
  120. data/config/routes.rb +12 -0
  121. data/fedora_conf/conf/fedora.fcfg +1021 -0
  122. data/hydra-head.gemspec +70 -0
  123. data/lib/application_controller.rb +25 -0
  124. data/lib/application_helper.rb +2 -0
  125. data/lib/engine.rb +30 -0
  126. data/lib/generators/hydra/head_generator.rb +152 -0
  127. data/lib/generators/hydra/templates/config/fedora.yml +17 -0
  128. data/lib/generators/hydra/templates/config/initializers/blacklight_config.rb +246 -0
  129. data/lib/generators/hydra/templates/config/initializers/fedora_config.rb +23 -0
  130. data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +29 -0
  131. data/lib/generators/hydra/templates/config/role_map_cucumber.yml +10 -0
  132. data/lib/generators/hydra/templates/config/role_map_development.yml +12 -0
  133. data/lib/generators/hydra/templates/config/role_map_production.yml +2 -0
  134. data/lib/generators/hydra/templates/config/role_map_test.yml +15 -0
  135. data/lib/generators/hydra/templates/config/solr.yml +10 -0
  136. data/lib/generators/hydra/templates/config/solr_mappings.yml +22 -0
  137. data/lib/generators/hydra/templates/fedora_conf/conf/fedora.fcfg +1021 -0
  138. data/lib/generators/hydra/templates/migrations/add_user_attributes_table.rb +15 -0
  139. data/lib/generators/hydra/templates/migrations/create_superusers.rb +12 -0
  140. data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +118 -0
  141. data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +332 -0
  142. data/lib/generators/hydra/templates/solr_conf/solr.xml +35 -0
  143. data/lib/hydra-head.rb +29 -0
  144. data/lib/hydra-head/engine.rb +9 -0
  145. data/lib/hydra-head/routes.rb +87 -0
  146. data/lib/hydra-head/version.rb +4 -0
  147. data/lib/hydra.rb +22 -0
  148. data/lib/hydra/access_controls_enforcement.rb +236 -0
  149. data/lib/hydra/access_controls_evaluation.rb +97 -0
  150. data/lib/hydra/assets_controller_helper.rb +144 -0
  151. data/lib/hydra/catalog.rb +64 -0
  152. data/lib/hydra/common_mods_index_methods.rb +42 -0
  153. data/lib/hydra/controller.rb +7 -0
  154. data/lib/hydra/file_assets_helper.rb +144 -0
  155. data/lib/hydra/fixtures.rb +43 -0
  156. data/lib/hydra/generic_content.rb +113 -0
  157. data/lib/hydra/generic_image.rb +100 -0
  158. data/lib/hydra/image.rb +177 -0
  159. data/lib/hydra/model_methods.rb +95 -0
  160. data/lib/hydra/model_mixins.rb +2 -0
  161. data/lib/hydra/model_mixins/common_metadata.rb +24 -0
  162. data/lib/hydra/model_mixins/mods_object.rb +16 -0
  163. data/lib/hydra/mods_article.rb +505 -0
  164. data/lib/hydra/mods_dataset.rb +165 -0
  165. data/lib/hydra/mods_generic_content.rb +494 -0
  166. data/lib/hydra/mods_image.rb +494 -0
  167. data/lib/hydra/repository_controller.rb +102 -0
  168. data/lib/hydra/rights_metadata.rb +189 -0
  169. data/lib/hydra/superuser_attributes.rb +12 -0
  170. data/lib/hydra/testing_server.rb +183 -0
  171. data/lib/hydra/user.rb +22 -0
  172. data/lib/mediashelf/active_fedora_helper.rb +72 -0
  173. data/lib/railties/all_tests.rake +23 -0
  174. data/lib/railties/hydra-fixtures.rake +184 -0
  175. data/lib/railties/hydra_jetty.rake +79 -0
  176. data/lib/railties/hyhead_cucumber.rake +127 -0
  177. data/lib/railties/hyhead_rspec.rake +137 -0
  178. data/lib/stanford/searchworks_helper.rb +1338 -0
  179. data/lib/stanford/solr_helper.rb +108 -0
  180. data/lib/uva/mods_index_methods.rb +24 -0
  181. data/solr_conf/conf/schema.xml +122 -0
  182. data/solr_conf/conf/solrconfig.xml +332 -0
  183. data/solr_conf/solr.xml +35 -0
  184. data/tasks/hydra-head-fixtures.rake +54 -0
  185. data/tasks/hydra-head.rake +247 -0
  186. data/tasks/hydra_jetty.rake +79 -0
  187. data/tasks/replicator.rake +27 -0
  188. data/tasks/solrizer-fedora.rake +53 -0
  189. data/tasks/solrizer.rake +13 -0
  190. data/test_support/etc/Gemfile +29 -0
  191. data/test_support/etc/rvmrc +32 -0
  192. data/test_support/features/button_add_assets.feature +22 -0
  193. data/test_support/features/button_add_generic_content.feature +11 -0
  194. data/test_support/features/button_add_image.feature +11 -0
  195. data/test_support/features/button_add_mods_asset.feature +11 -0
  196. data/test_support/features/contributor_add.feature +39 -0
  197. data/test_support/features/file_assets_list.feature +32 -0
  198. data/test_support/features/file_upload.feature +40 -0
  199. data/test_support/features/home_page.feature +9 -0
  200. data/test_support/features/html_validity.feature +47 -0
  201. data/test_support/features/mods_asset_contributors_edit.feature +80 -0
  202. data/test_support/features/mods_asset_create.feature +12 -0
  203. data/test_support/features/mods_asset_edit.feature +33 -0
  204. data/test_support/features/mods_asset_edit_without_permission.feature +10 -0
  205. data/test_support/features/mods_asset_search_result.feature +13 -0
  206. data/test_support/features/mods_asset_show.feature +39 -0
  207. data/test_support/features/permissions_add.feature +15 -0
  208. data/test_support/features/permissions_edit.feature +63 -0
  209. data/test_support/features/step_definitions/catalog_index_steps.rb +14 -0
  210. data/test_support/features/step_definitions/create_asset_steps.rb +7 -0
  211. data/test_support/features/step_definitions/edit_metadata_steps.rb +73 -0
  212. data/test_support/features/step_definitions/file_list_steps.rb +28 -0
  213. data/test_support/features/step_definitions/hydra_metadata_steps.rb +3 -0
  214. data/test_support/features/step_definitions/hydra_steps.rb +8 -0
  215. data/test_support/features/step_definitions/inline_editable_edit_steps.rb +77 -0
  216. data/test_support/features/step_definitions/search_steps.rb +88 -0
  217. data/test_support/features/step_definitions/searching_steps.rb +22 -0
  218. data/test_support/features/step_definitions/show_document_steps.rb +85 -0
  219. data/test_support/features/step_definitions/user_steps.rb +36 -0
  220. data/test_support/features/step_definitions/web_steps.rb +219 -0
  221. data/test_support/features/support/env.rb +55 -0
  222. data/test_support/features/support/paths.rb +80 -0
  223. data/test_support/features/switch_users.feature +14 -0
  224. data/test_support/features/view_catalog_index.feature +18 -0
  225. data/test_support/fixtures/empty_file.txt +0 -0
  226. data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +1212 -0
  227. data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +4946 -0
  228. data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +234 -0
  229. data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +177 -0
  230. data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +170 -0
  231. data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +187 -0
  232. data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +676 -0
  233. data/test_support/fixtures/image.jp2 +0 -0
  234. data/test_support/fixtures/libra-oa_1.foxml.xml +2324 -0
  235. data/test_support/fixtures/libra-oa_2.foxml.xml +2422 -0
  236. data/test_support/spec/controllers/assets_controller_spec.rb +113 -0
  237. data/test_support/spec/controllers/catalog_controller_spec.rb +148 -0
  238. data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +62 -0
  239. data/test_support/spec/controllers/contributors_controller_spec.rb +47 -0
  240. data/test_support/spec/controllers/file_assets_controller_spec.rb +189 -0
  241. data/test_support/spec/controllers/hydra_controller_spec.rb +15 -0
  242. data/test_support/spec/controllers/permissions_controller_spec.rb +80 -0
  243. data/test_support/spec/controllers/user_sessions_controller_spec.rb +35 -0
  244. data/test_support/spec/generators/hydra-head_generator_spec.rb +14 -0
  245. data/test_support/spec/helpers/access_controls_enforcement_spec.rb +212 -0
  246. data/test_support/spec/helpers/access_controls_evaluation_spec.rb +35 -0
  247. data/test_support/spec/helpers/assets_controller_helper_spec.rb +71 -0
  248. data/test_support/spec/helpers/blacklight_helper_spec.rb +64 -0
  249. data/test_support/spec/helpers/file_assets_helper_spec.rb +107 -0
  250. data/test_support/spec/helpers/hydra-repository_controller_spec.rb +32 -0
  251. data/test_support/spec/helpers/hydra_assets_helper_spec.rb +195 -0
  252. data/test_support/spec/helpers/hydra_djatoka_helper_spec.rb +32 -0
  253. data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +215 -0
  254. data/test_support/spec/helpers/hydra_helper_spec.rb +73 -0
  255. data/test_support/spec/helpers/hydra_model_methods_spec.rb +95 -0
  256. data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +18 -0
  257. data/test_support/spec/helpers/javascript_includes_helper_spec.rb +43 -0
  258. data/test_support/spec/integration/file_asset_spec.rb +150 -0
  259. data/test_support/spec/lib/active_fedora_helper_spec.rb +56 -0
  260. data/test_support/spec/lib/catalog_spec.rb +16 -0
  261. data/test_support/spec/lib/common_mods_index_methods_spec.rb +28 -0
  262. data/test_support/spec/models/audio_asset_spec.rb +23 -0
  263. data/test_support/spec/models/file_asset_spec.rb +42 -0
  264. data/test_support/spec/models/generic_content_spec.rb +29 -0
  265. data/test_support/spec/models/generic_image_spec.rb +58 -0
  266. data/test_support/spec/models/hydra_rights_metadata_spec.rb +162 -0
  267. data/test_support/spec/models/image_asset_spec.rb +23 -0
  268. data/test_support/spec/models/mods_asset_spec.rb +29 -0
  269. data/test_support/spec/models/role_mapper_spec.rb +22 -0
  270. data/test_support/spec/models/user_spec.rb +52 -0
  271. data/test_support/spec/models/video_asset_spec.rb +23 -0
  272. data/test_support/spec/rcov.opts +3 -0
  273. data/test_support/spec/spec.opts +4 -0
  274. data/test_support/spec/spec_helper.rb +44 -0
  275. data/test_support/spec/support/matchers/helper_matcher.rb +14 -0
  276. data/test_support/spec/support/matchers/solr_matchers.rb +60 -0
  277. data/test_support/spec/unit/hydra-head-engine_spec.rb +8 -0
  278. data/test_support/spec/unit/hydra-head_spec.rb +8 -0
  279. data/test_support/spec/utilities/hydra_testing_server_spec.rb +49 -0
  280. data/test_support/spec/views/uploader.html.erb_spec.rb +30 -0
  281. data/vendor/cache/RedCloth-4.2.3.gem +0 -0
  282. data/vendor/cache/abstract-1.0.0.gem +0 -0
  283. data/vendor/cache/actionmailer-3.0.9.gem +0 -0
  284. data/vendor/cache/actionpack-3.0.9.gem +0 -0
  285. data/vendor/cache/active-fedora-2.3.3.gem +0 -0
  286. data/vendor/cache/activemodel-3.0.9.gem +0 -0
  287. data/vendor/cache/activerecord-3.0.9.gem +0 -0
  288. data/vendor/cache/activeresource-3.0.9.gem +0 -0
  289. data/vendor/cache/activesupport-3.0.9.gem +0 -0
  290. data/vendor/cache/arel-2.0.10.gem +0 -0
  291. data/vendor/cache/blacklight-3.0.0.gem +0 -0
  292. data/vendor/cache/block_helpers-0.3.3.gem +0 -0
  293. data/vendor/cache/builder-2.1.2.gem +0 -0
  294. data/vendor/cache/capybara-1.0.0.gem +0 -0
  295. data/vendor/cache/childprocess-0.2.0.gem +0 -0
  296. data/vendor/cache/columnize-0.3.4.gem +0 -0
  297. data/vendor/cache/crack-0.1.8.gem +0 -0
  298. data/vendor/cache/cucumber-1.0.2.gem +0 -0
  299. data/vendor/cache/cucumber-rails-1.0.2.gem +0 -0
  300. data/vendor/cache/curb-0.7.15.gem +0 -0
  301. data/vendor/cache/daemons-1.1.4.gem +0 -0
  302. data/vendor/cache/database_cleaner-0.6.7.gem +0 -0
  303. data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
  304. data/vendor/cache/equivalent-xml-0.2.7.gem +0 -0
  305. data/vendor/cache/erubis-2.6.6.gem +0 -0
  306. data/vendor/cache/facets-2.8.4.gem +0 -0
  307. data/vendor/cache/factory_girl-1.3.3.gem +0 -0
  308. data/vendor/cache/fastercsv-1.5.4.gem +0 -0
  309. data/vendor/cache/ffi-1.0.9.gem +0 -0
  310. data/vendor/cache/gherkin-2.4.5.gem +0 -0
  311. data/vendor/cache/haml-3.1.2.gem +0 -0
  312. data/vendor/cache/httparty-0.7.8.gem +0 -0
  313. data/vendor/cache/i18n-0.5.0.gem +0 -0
  314. data/vendor/cache/jettywrapper-0.0.10.gem +0 -0
  315. data/vendor/cache/json-1.5.3.gem +0 -0
  316. data/vendor/cache/json_pure-1.5.3.gem +0 -0
  317. data/vendor/cache/kaminari-0.12.4.gem +0 -0
  318. data/vendor/cache/launchy-2.0.3.gem +0 -0
  319. data/vendor/cache/linecache-0.46.gem +0 -0
  320. data/vendor/cache/logger-1.2.8.gem +0 -0
  321. data/vendor/cache/mail-2.2.19.gem +0 -0
  322. data/vendor/cache/marc-0.4.3.gem +0 -0
  323. data/vendor/cache/mediashelf-loggable-0.4.2.gem +0 -0
  324. data/vendor/cache/mime-types-1.16.gem +0 -0
  325. data/vendor/cache/mocha-0.9.12.gem +0 -0
  326. data/vendor/cache/multipart-post-1.1.2.gem +0 -0
  327. data/vendor/cache/nokogiri-1.5.0.gem +0 -0
  328. data/vendor/cache/om-1.2.5.gem +0 -0
  329. data/vendor/cache/polyglot-0.3.1.gem +0 -0
  330. data/vendor/cache/rack-1.2.3.gem +0 -0
  331. data/vendor/cache/rack-mount-0.6.14.gem +0 -0
  332. data/vendor/cache/rack-test-0.5.7.gem +0 -0
  333. data/vendor/cache/rails-3.0.9.gem +0 -0
  334. data/vendor/cache/railties-3.0.9.gem +0 -0
  335. data/vendor/cache/rake-0.9.2.gem +0 -0
  336. data/vendor/cache/rbx-require-relative-0.0.5.gem +0 -0
  337. data/vendor/cache/rcov-0.9.9.gem +0 -0
  338. data/vendor/cache/rdoc-3.8.gem +0 -0
  339. data/vendor/cache/rsolr-1.0.2.gem +0 -0
  340. data/vendor/cache/rsolr-ext-1.0.3.gem +0 -0
  341. data/vendor/cache/rspec-2.6.0.gem +0 -0
  342. data/vendor/cache/rspec-core-2.6.4.gem +0 -0
  343. data/vendor/cache/rspec-expectations-2.6.0.gem +0 -0
  344. data/vendor/cache/rspec-mocks-2.6.0.gem +0 -0
  345. data/vendor/cache/rspec-rails-2.6.1.gem +0 -0
  346. data/vendor/cache/ruby-debug-0.10.4.gem +0 -0
  347. data/vendor/cache/ruby-debug-base-0.10.4.gem +0 -0
  348. data/vendor/cache/rubyzip-0.9.4.gem +0 -0
  349. data/vendor/cache/sanitize-2.0.3.gem +0 -0
  350. data/vendor/cache/selenium-webdriver-0.2.2.gem +0 -0
  351. data/vendor/cache/solr-ruby-0.0.8.gem +0 -0
  352. data/vendor/cache/solrizer-1.1.0.gem +0 -0
  353. data/vendor/cache/solrizer-fedora-1.1.0.gem +0 -0
  354. data/vendor/cache/sqlite3-ruby-1.2.5.gem +0 -0
  355. data/vendor/cache/stomp-1.1.9.gem +0 -0
  356. data/vendor/cache/term-ansicolor-1.0.5.gem +0 -0
  357. data/vendor/cache/thor-0.14.6.gem +0 -0
  358. data/vendor/cache/treetop-1.4.9.gem +0 -0
  359. data/vendor/cache/trollop-1.16.2.gem +0 -0
  360. data/vendor/cache/tzinfo-0.3.29.gem +0 -0
  361. data/vendor/cache/unicode-0.4.0.gem +0 -0
  362. data/vendor/cache/will_paginate-2.3.15.gem +0 -0
  363. data/vendor/cache/xml-simple-1.1.0.gem +0 -0
  364. data/vendor/cache/xpath-0.1.4.gem +0 -0
  365. data/vendor/cache/yard-0.7.2.gem +0 -0
  366. metadata +1110 -0
@@ -0,0 +1,82 @@
1
+ <%- stylesheet_links << ["progressBox", {:plugin=>"hydra-head", :media=>"all"}] %>
2
+
3
+ <%- @ds_desc_metadata = @document_fedora.datastreams["descMetadata"] %>
4
+ <%- @ds_rights_metadata = @document_fedora.datastreams["rightsMetadata"] %>
5
+ <%- author_entries = @ds_desc_metadata.find_by_terms_and_value('//oxns:name[@type="personal" and contains(oxns:role, "Author") and string-length(oxns:namePart[@type="family"]) > 0 ]') %>
6
+ <%- title_values = @ds_desc_metadata.term_values(:title_info, :main_title) %>
7
+ <%- license_values = @ds_rights_metadata.term_values(:copyright, :license) %>
8
+ <%- journal_title_values = @ds_desc_metadata.term_values(:journal,:title_info,:main_title) %>
9
+
10
+ <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
11
+ <input name="_method" type="hidden" value="put" />
12
+
13
+ <input class="content_type" type="hidden" name="content_type" value="mods_asset" />
14
+
15
+ <fieldset id="contributors_fields">
16
+ <legend>Authors
17
+ <small>Required</small>
18
+ <label>An individual or organizational author of work.</label>
19
+ </legend>
20
+ <div id="contributors">
21
+ <%= render "contributors/index" %>
22
+ </div>
23
+ </fieldset>
24
+
25
+ <fieldset id="title_fieldset">
26
+ <legend>Title<small>Required</small></legend>
27
+ <%= fedora_text_field(@document_fedora,"descMetadata", [:title_info, :main_title], :multiple=>false).html_safe %>
28
+ </fieldset>
29
+
30
+ <fieldset id="license_fieldset">
31
+ <legend>License
32
+ <label>The license outlines the Library's use of your work while acknowledging that you, or the current copyright owner, will continue to be the rights holder.</label>
33
+ </legend>
34
+ </fieldset>
35
+
36
+
37
+ <%= render :partial=>"mods_assets/edit_journal", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:journal) %>
38
+
39
+ <fieldset id="abstract_fieldset">
40
+ <legend>Abstract
41
+ <label>Provide the abstract of the work, or if none exists, a short summary.</label></legend>
42
+ <%= fedora_text_area(@document_fedora,"descMetadata", [:abstract], :multiple=>false).html_safe %>
43
+ </fieldset>
44
+
45
+ <fieldset id="peer_reviewed_fieldset">
46
+ <legend>Peer Reviewed</legend>
47
+ <%= fedora_checkbox(@document_fedora, "descMetadata", [:peer_reviewed], :default_values=>{:checked=>"peer reviewed",:unchecked=>""}).html_safe %>
48
+ <label>This work has undergone a peer review process</label>
49
+ </fieldset>
50
+
51
+ <fieldset id="notes_fieldset">
52
+ <legend>Notes
53
+ <label>Any additional notes or comments about the work.</label>
54
+ </legend>
55
+
56
+ <%= fedora_text_area(@document_fedora,"descMetadata", [:note], :multiple=>false).html_safe %>
57
+ </fieldset>
58
+
59
+ <fieldset id="keywords_fieldset">
60
+ <legend>Keywords
61
+ <label>Add keywords to describe the work.</label>
62
+ </legend>
63
+ <%= fedora_text_field(@document_fedora,"descMetadata", [:subject, :topic], :multiple=>true).html_safe %>
64
+ <%= fedora_text_field_insert_link "descMetadata", [:subject, :topic] %>
65
+ </fieldset>
66
+
67
+
68
+ <fieldset id="embargo_fieldset">
69
+ <legend>Release Date
70
+ <label>Choose when to make your work's files available.</label>
71
+ </legend>
72
+ <%= fedora_text_field(@document_fedora, "rightsMetadata", [:embargo, :embargo_release_date], :multiple => false).html_safe %>
73
+ </fieldset>
74
+
75
+ <input name="_method" type="hidden" value="put" />
76
+ <%= submit_tag 'Save Description', {:id => "saveDescription"} %>
77
+ </form>
78
+
79
+ <%= render :partial => "shared/delete_asset_confirmation", :locals => {:pid => params[:id], :title => (get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first.empty? ? "this article" : "'" << get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first << "'") } %>
80
+ <div id="deleteAsset">
81
+ <%= delete_asset_link(params[:id], "article").html_safe %>
82
+ </div>
@@ -0,0 +1,72 @@
1
+ <% journal = edit_journal %>
2
+ <% journal_counter = edit_journal_counter %>
3
+ <% base_id = "journal_#{journal_counter}" %>
4
+ <li>
5
+ <fieldset id="citation_fieldset">
6
+ <legend>Article Citation</legend>
7
+ <ul>
8
+ <li id="pbJournalTitle">
9
+ <fieldset id="journal_title_fieldset">
10
+ <legend>Journal Title<small>Required</small></legend>
11
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter}, :title_info, :main_title], :multiple=>false).html_safe %>
12
+ </fieldset>
13
+ </li>
14
+
15
+ <li id="pbCitation">
16
+ <fieldset id="citation_details_fieldset">
17
+ <dl class="journal citation" id="<%= base_id %>">
18
+ <dd class="multi_inline citation">
19
+ <ul>
20
+ <li class="citation_volume">
21
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter},:issue,:volume], "Volume").html_safe %>
22
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:volume], :multiple=>false).html_safe %>
23
+ </li>
24
+ <li class="citation_issue">
25
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter},:issue,:level], "(Issue)").html_safe %>
26
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:level], :multiple=>false).html_safe %>
27
+ </li>
28
+ <li class="start_page">
29
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter},:issue,:start_page], "Start Page").html_safe %>
30
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:start_page], :multiple=>false).html_safe %>
31
+ </li>
32
+ <li class="end_page">
33
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter},:issue,:end_page], "End Page").html_safe %>
34
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:end_page], :multiple=>false).html_safe %>
35
+ </li>
36
+ </ul>
37
+ </dd>
38
+ </dl>
39
+ </fieldset>
40
+ </li>
41
+
42
+ <li id="pbPublisher">
43
+ <fieldset id="publisher_fieldset">
44
+ <legend>Publisher</legend>
45
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter},:origin_info, :publisher], :multiple=>false).html_safe %>
46
+ </fieldset>
47
+ </li>
48
+
49
+ <li id="pbISBN">
50
+ <fieldset id="isbn_fieldset">
51
+ <legend>ISSN</legend>
52
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter}, :issn], :multiple=>false).html_safe %>
53
+ </fieldset>
54
+ </li>
55
+
56
+
57
+ <li id="pbPublicationDate">
58
+ <fieldset id="publication_date_fieldset">
59
+ <legend>Publication Date</legend>
60
+ <%= fedora_text_field(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:publication_date], :multiple=>false).html_safe %>
61
+ </fieldset>
62
+ </li>
63
+
64
+ <li id="pbPublicationURL">
65
+ <fieldset id="publication_url_fieldset">
66
+ <legend>Publication URL</legend>
67
+ <label>Provide the full URL to any published version of the work.</label>
68
+ <%= fedora_text_field(@document_fedora,"descMetadata", [:location, :url], :multiple=>false).html_safe %>
69
+ </fieldset>
70
+ </li>
71
+ </ul>
72
+ </li>
@@ -0,0 +1 @@
1
+ <%= render :partial => "mods_assets/index_table", :locals => {:document => document, :counter => counter } %>
@@ -0,0 +1,37 @@
1
+ <div id="title_div" style="float:left;width:300px;"><h2><%= counter + 1 %>. <%= link_to_document(document, :label => Blacklight.config[:show][:heading].to_sym, :counter => (counter + 1 + @response.params[:start].to_i)) %></h2></div>
2
+ <div id="type_div" style="float:right;"><%= (document.get(:medium_t) || document_type(document)).gsub("Hydrangea","") %></div>
3
+ <div id="content_div" style="float:left;">
4
+ <dl id="index_list">
5
+ <dt>Author(s):</dt>
6
+ <dd>
7
+ <%= author_list(document).join(" ") %>
8
+ </dd>
9
+ <dt>Published:</dt>
10
+ <dd>
11
+ <%= journal_info(document) %>
12
+ </dd>
13
+ <dt>Abstract:</dt>
14
+ <dd>
15
+ <%= short_abstract(document) %>
16
+ </dd>
17
+ <dt>Files:</dt>
18
+ <dd>
19
+ <%-
20
+ file_count = get_file_asset_count(document)
21
+ file_desc = get_file_asset_description(document)
22
+ file_desc.concat('.') unless file_desc[-1] == '.'
23
+ -%>
24
+ <% if file_count > 0 %>
25
+ <%= file_desc %>
26
+ <%= file_count %> file<%= file_count > 1 ? "s" : "" %>.
27
+ [<%= link_to("see all", catalog_path(document[:id], :files=>true)) %>]
28
+ <% else %>
29
+ No files.
30
+ <% end %>
31
+ </dd>
32
+ <dt>Admin:</dt>
33
+ <dd>
34
+ <%= admin_info(document) %>
35
+ </dd>
36
+ </dl>
37
+ </div>
@@ -0,0 +1,7 @@
1
+ <tr class="document <%= cycle("even","odd") %>">
2
+ <td class="document_title"><%= link_to_document(document, :label => :mods_0_title_info_0_main_title_t, :counter => (counter + 1 + @response.params[:start].to_i)) %></td>
3
+ <td class="document_author"><% author = get_person_from_role(document, "author") %><%= author.nil? ? "n/a" : [author[:last], author[:first]].join(", ") %></td>
4
+ <td class="document_work"><%= document.fetch(:journal_title_info_main_title_t, nil) %></td>
5
+ <td class="document_date"><%= format_date(DateTime.parse(document.fetch(:system_create_dt, "")).to_time) %></td>
6
+ <td class="document_files"><%= get_file_asset_count(document) %></td>
7
+ </tr>
@@ -0,0 +1,82 @@
1
+ <%- stylesheet_links << "progressBox" %>
2
+ <%- @ds_desc_metadata = @document_fedora.datastreams["descMetadata"] %>
3
+ <%- author_entries = @ds_desc_metadata.find_by_terms_and_value('//oxns:name[@type="personal" and contains(oxns:role, "Author") and string-length(oxns:namePart[@type="family"]) > 0 ]') %>
4
+ <%- title_values = @ds_desc_metadata.term_values(:title_info, :main_title) %>
5
+ <ol>
6
+ <% if !title_values.empty? && !title_values.first.empty? %>
7
+ <li id="pbTitleProvided" class="progressItem progressItemChecked">
8
+ Title provided <span class="progressBoxInvisibleStatus">- Done</span>
9
+ </li>
10
+ <% else %>
11
+ <li id="pbTitleProvided" class="progressItem">
12
+ Title provided <span class="progressBoxInvisibleStatus">- Not done</span>
13
+ </li>
14
+ <% end %>
15
+
16
+ <% if !author_entries.empty? %>
17
+ <li id="pbAuthorProvided" class="progressItem progressItemChecked">
18
+ One or more Author provided <span class="progressBoxInvisibleStatus">- Done</span>
19
+ </li>
20
+ <% else %>
21
+ <li id="pbAuthorProvided" class="progressItem">
22
+ One or more Author provided <span class="progressBoxInvisibleStatus">- Not done</span>
23
+ </li>
24
+ <% end %>
25
+
26
+ <% if !@document_fedora.parts(:response_format=>:id_array).empty? %>
27
+ <li id="pbFileUploaded" class="progressItem progressItemChecked">
28
+ One or more Files uploaded <span class="progressBoxInvisibleStatus">- Done</span>
29
+ </li>
30
+ <% else %>
31
+ <li id="pbFileUploaded" class="progressItem">
32
+ One or more Files uploaded <span class="progressBoxInvisibleStatus">- Not done</span>
33
+ </li>
34
+ <% end %>
35
+
36
+
37
+ <% if @document_fedora.submitted_for_release? %>
38
+ <li id="submitToRegistrarDiv" class="noIndent">
39
+ <hr size="1" />
40
+ <!-- <p class="progressItem progressItemChecked bold">Released</p> -->
41
+ <!-- <div class="progressInfoBox"><%#= formatTimestamp(@ds_properties.submit_date_values.first) %></div> -->
42
+ <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
43
+ <input name="_method" type="hidden" value="put" />
44
+ <div>
45
+ <p class="progressItem progressItemChecked bold">
46
+ <%= fedora_field_label("properties", [:release_to], "Released to") %>
47
+ <%= fedora_select(@document_fedora, "properties", [:release_to], :choices => {"Public" => "public", "UVa Only"=>"registered"}) %>
48
+ <!-- Careful! Submitting this hidden input will release the article. -->
49
+ <%= tag(:input, :type=>"hidden", :name=>"asset[properties][released][0]", :value=>"true")%>
50
+ </p>
51
+ </div>
52
+ </form>
53
+ <hr size="1" />
54
+ <div id="deleteAsset">
55
+ <%= delete_asset_link(params[:id], "article") %>
56
+ </div>
57
+ </li>
58
+ <% else %>
59
+ <li class="progressBoxSubmit noIndent" id="submitToRegistrarDiv">
60
+ <hr size="1" />
61
+ <form id="document_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
62
+ <input name="_method" type="hidden" value="put" />
63
+ <div>
64
+ <%= fedora_field_label("properties", [:release_to], "Release to") %>
65
+ <%= fedora_select(@document_fedora, "properties", [:release_to], :choices => {"Public" => "public", "UVa Only"=>"registered"}) %>
66
+ <!-- Careful! Submitting this hidden input will release the article. -->
67
+ <%= tag(:input, :type=>"hidden", :name=>"asset[properties][released][0]", :value=>"true")%>
68
+ <% if @document_fedora.ready_to_release? %>
69
+ <%= button_to 'Release for UVa Library Circulation', {},{:id => "submitForRelease"} %>
70
+ <% else %>
71
+ <%= button_to 'Release for UVa Library Circulation', {},{:id => "submitForRelease", :disabled => "disabled"} %>
72
+ <% end %>
73
+ </div>
74
+ </form>
75
+ <hr size="1" />
76
+ <div id="deleteAsset">
77
+ <%= delete_asset_link(params[:id], "article") %>
78
+ </div>
79
+ </li>
80
+ <% end %>
81
+
82
+ </ol>
@@ -0,0 +1,44 @@
1
+
2
+ <div class="document_viewer" id="cover_container">
3
+
4
+ <h1>
5
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first.empty? %>
6
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first %>
7
+ <% else %>
8
+ <%= params[:id] %>
9
+ <% end %>
10
+ </h1>
11
+
12
+ <%= render :partial => 'mods_assets/show_description' %>
13
+
14
+
15
+ <% unless @document_fedora.file_objects(:response_format=>:solr).hits.empty? %>
16
+ <fieldset><legend>Files</legend>
17
+ <div class="uploads" id="<%= format_pid(params[:id]) %>">
18
+ <table id="file_assets" class="multipleEdit">
19
+ <tr>
20
+ <th>File Name</th>
21
+ <th>Size</th>
22
+ <th>Uploaded</th>
23
+ </tr>
24
+
25
+ <% @document_fedora.file_objects(:response_format=>:solr).each do |result| %>
26
+ <tr class="file_asset" >
27
+ <td>
28
+ <%= link_to result[solr_name("title", :text)], file_asset_path(result["id"]) %>
29
+ </td>
30
+ <td>
31
+ <%= result[solr_name("extent", :text)] %>
32
+ </td>
33
+ <td>
34
+ <% dt = DateTime.parse(result[ solr_name("system_create", :date)] ) %>
35
+ <%= format_date dt %>
36
+ </td>
37
+ </tr>
38
+ <% end %>
39
+ </table>
40
+ </div>
41
+ </fieldset>
42
+ <% end %>
43
+
44
+ </div>
@@ -0,0 +1,44 @@
1
+ <div id="contributors_list">
2
+ <ol>
3
+ <%= render :partial=>"contributors/show_person", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:person) %>
4
+ <%= render :partial=>"contributors/show_organization", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:organization) %>
5
+ <%= render :partial=>"contributors/show_conference", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:conference) %>
6
+ </ol>
7
+ </div>
8
+
9
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => 0}, :title_info, :main_title]).first.empty? %>
10
+ <fieldset><legend>Published</legend>
11
+ <div id="journal" class="browse_value">
12
+ <%= render :partial=>"mods_assets/show_journal", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:journal) %>
13
+ </div>
14
+ </fieldset>
15
+ <% end %>
16
+
17
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [:subject, :topic]).first.empty? %>
18
+ <fieldset><legend>Keywords</legend>
19
+ <div class="browse_value">
20
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [:subject, :topic]).join(', ') %>
21
+ </div>
22
+ </fieldset>
23
+ <% end %>
24
+
25
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [:abstract]).first.empty? %>
26
+ <fieldset><legend>Abstract</legend>
27
+ <div id="abstract" class="browse_value">
28
+ <%= Sanitize.clean( RedCloth.new(get_values_from_datastream(@document_fedora,"descMetadata", [:abstract]).first, [:sanitize_html]).to_html, Sanitize::Config::BASIC).html_safe %>
29
+ </div>
30
+ </fieldset>
31
+ <% end %>
32
+
33
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [:subject, :topic]).first.empty? %>
34
+ <fieldset><legend>License</legend>
35
+ <div class="browse_value">
36
+ <ol>
37
+ <%# unless get_values_from_datastream(@document_fedora, "rightsMetadata", [:copyright, :uvalicense]).first.match('no') %>
38
+ <li>UVA Libra Contributor's License</li>
39
+ <%# end %>
40
+ </ol>
41
+ </div>
42
+ </fieldset>
43
+ <% end %>
44
+
@@ -0,0 +1,42 @@
1
+ <% journal = show_journal %>
2
+ <% journal_counter = show_journal_counter %>
3
+ <% base_id = "journal_#{journal_counter}" %>
4
+
5
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter}, :title_info, :main_title]).first.empty? %>
6
+
7
+ <div class="journal">
8
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter}, :title_info, :main_title]).first.strip %><% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:publication_date]).first.empty? -%>, <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:publication_date]) %>
9
+ <% end %>
10
+ </div>
11
+ <% end %>
12
+
13
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:origin_info, :publisher]).first.empty? %>
14
+ <div class="publisher">
15
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:origin_info, :publisher]) %>
16
+ </div>
17
+ <% end %>
18
+
19
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter}, :issn]).first.empty? %>
20
+ <div class="issn">
21
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter}, :issn], "ISSN:") %>
22
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter}, :issn]) %>
23
+ </div>
24
+ <% end %>
25
+
26
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:start_page]).first.empty? %>
27
+ <div class="citation">
28
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter},:issue,:start_page], "Pages:") %>
29
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:start_page]) %>
30
+ <% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:end_page]).first.empty? %>
31
+ - <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:end_page]) %>
32
+ <% end %>
33
+ </div>
34
+ <% end %>
35
+ <% journal_issue_values = get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:level]).inspect %>
36
+ <% unless journal_issue_values.empty? || journal_issue_values.first.empty? %>
37
+ <div class="issue">
38
+ <%= fedora_field_label("descMetadata", [{:journal => journal_counter},:issue,:level], "Issue:") %>
39
+ <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:journal => journal_counter},:issue,:level]) %>
40
+ </div>
41
+ <% end %>
42
+
@@ -0,0 +1,14 @@
1
+ <div>
2
+ <dl class="defList">
3
+ <% if editor? %>
4
+ <h3>Group</h3>
5
+ <%= get_data_with_label(document, "Discover Access:", 'discover_access_group_t', :default=>"private") %>
6
+ <%= get_data_with_label(document, "Read & Download Access:", 'read_access_group_t', :default=>"private") %>
7
+ <%= get_data_with_label(document, "Edit & Upload Access:", 'edit_access_group_t', :default=>"private") %>
8
+ <h3>Individual</h3>
9
+ <%= get_data_with_label(document, "Discover Access:", 'discover_access_t', :default=>"private") %>
10
+ <%= get_data_with_label(document, "Read & Download Access:", 'read_access_t', :default=>"private") %>
11
+ <%= get_data_with_label(document, "Edit & Upload Access:", 'edit_access_t', :default=>"private") %>
12
+ <% end %>
13
+ </dl>
14
+ </div>
@@ -0,0 +1,35 @@
1
+ <%# -# ie. asset[access_person][researcher1] %>
2
+ <% unless defined?(person_id) %>
3
+ <% person = edit_person_permissions %>
4
+ <% person_id = person.text %>
5
+ <% end %>
6
+ <%#
7
+ -# Don't allow a user to change his own permissions.
8
+ -# Currently, just don't render the user's own permissions
9
+ -# In the future, we should show current_user's permissions and just disable the ability to modify
10
+ %>
11
+
12
+ <% if person_id != current_user.login %>
13
+ <% field_name = "#{person_id}_access" %>
14
+ <% choices = [{"No Access" => "none"},{"Discover" => "discover"}, {"Read & Download" => "read"}, {"Edit & Upload" => "edit"}] %>
15
+ <% current_permissions = @document_fedora.datastreams_in_memory["rightsMetadata"].permissions({"person"=>person_id}) %>
16
+
17
+ <dt>
18
+ <label for="<%= field_name %>">
19
+ <%= person_id %>
20
+ </label>
21
+ </dt>
22
+ <dd>
23
+ <select id="<%= field_name %>" name="permission[person][<%=h person_id %>]">
24
+ <% choices.each do |choice| %>
25
+ <% choice_label = choice.keys.first.html_safe %>
26
+ <% choice_name = choice.values.first %>
27
+
28
+ <option value="<%= choice_name %>" selected="<%= current_permissions == choice_name %>">
29
+ <%= choice_label %>
30
+ </option>
31
+ <% end %>
32
+ </select>
33
+ </dd>
34
+
35
+ <% end %>