hydra-head 3.0.0pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +71 -0
- data/.gitmodules +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +257 -0
- data/README.textile +150 -0
- data/README_RAILS3_CHANGES.textile +42 -0
- data/Rakefile +5 -0
- data/TESTING.textile +85 -0
- data/app/controllers/assets_controller.rb +117 -0
- data/app/controllers/contributors_controller.rb +54 -0
- data/app/controllers/file_assets_controller.rb +152 -0
- data/app/controllers/permissions_controller.rb +137 -0
- data/app/controllers/user_sessions_controller.rb +14 -0
- data/app/helpers/article_metadata_helper.rb +80 -0
- data/app/helpers/blacklight_helper.rb +192 -0
- data/app/helpers/downloads_helper.rb +19 -0
- data/app/helpers/generic_content_objects_helper.rb +16 -0
- data/app/helpers/hydra_assets_helper.rb +75 -0
- data/app/helpers/hydra_djatoka_helper.rb +23 -0
- data/app/helpers/hydra_fedora_metadata_helper.rb +365 -0
- data/app/helpers/hydra_helper.rb +155 -0
- data/app/helpers/hydra_uploader_helper.rb +18 -0
- data/app/helpers/inline_editable_metadata_helper.rb +15 -0
- data/app/helpers/javascript_includes_helper.rb +93 -0
- data/app/helpers/release_process_helper.rb +32 -0
- data/app/models/audio_asset.rb +8 -0
- data/app/models/file_asset.rb +111 -0
- data/app/models/generic_content.rb +21 -0
- data/app/models/generic_image.rb +62 -0
- data/app/models/image_asset.rb +8 -0
- data/app/models/mods_asset.rb +6 -0
- data/app/models/role_mapper.rb +22 -0
- data/app/models/superuser.rb +6 -0
- data/app/models/video_asset.rb +8 -0
- data/app/views/_add_assets_links.html.erb +13 -0
- data/app/views/_brown_sidebar.html +15 -0
- data/app/views/_user_util_links.html.erb +31 -0
- data/app/views/catalog/_citation.html.erb +11 -0
- data/app/views/catalog/_constraints_element.html.erb +34 -0
- data/app/views/catalog/_delete_partials/_default.html.erb +29 -0
- data/app/views/catalog/_document_list.html.erb +11 -0
- data/app/views/catalog/_edit_partials/_default.html.erb +64 -0
- data/app/views/catalog/_edit_partials/_default_details.html.erb +15 -0
- data/app/views/catalog/_email_form.html.erb +9 -0
- data/app/views/catalog/_facets.html.erb +37 -0
- data/app/views/catalog/_flash_msg.html.erb +17 -0
- data/app/views/catalog/_home.html.erb +6 -0
- data/app/views/catalog/_home_text.html.erb +10 -0
- data/app/views/catalog/_index_partials/_default.html.erb +20 -0
- data/app/views/catalog/_index_partials/_default_details.html.erb +11 -0
- data/app/views/catalog/_index_partials/_default_group.html.erb +15 -0
- data/app/views/catalog/_search_form.html.erb +12 -0
- data/app/views/catalog/_show_partials/_default.html.erb +23 -0
- data/app/views/catalog/_show_partials/_default_details.html.erb +12 -0
- data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
- data/app/views/catalog/_sms_form.html.erb +21 -0
- data/app/views/catalog/_sort_and_per_page.html.erb +22 -0
- data/app/views/catalog/_uva_tabs.html.erb +10 -0
- data/app/views/catalog/about.html.erb +0 -0
- data/app/views/catalog/show.html.erb +48 -0
- data/app/views/contributors/_add_contributor_split_button.html.erb +10 -0
- data/app/views/contributors/_edit_conference.html.erb +29 -0
- data/app/views/contributors/_edit_organization.html.erb +29 -0
- data/app/views/contributors/_edit_person.html.erb +42 -0
- data/app/views/contributors/_index.html.erb +12 -0
- data/app/views/contributors/_new.html.erb +10 -0
- data/app/views/contributors/_show_conference.html.erb +22 -0
- data/app/views/contributors/_show_organization.html.erb +29 -0
- data/app/views/contributors/_show_person.html.erb +17 -0
- data/app/views/contributors/new.html.erb +13 -0
- data/app/views/downloads/index.html.erb +1 -0
- data/app/views/file_assets/_deletable_result.html.erb +5 -0
- data/app/views/file_assets/_index.html.erb +15 -0
- data/app/views/file_assets/_new.html.erb +2 -0
- data/app/views/file_assets/_result.html.erb +16 -0
- data/app/views/file_assets/index.html.erb +5 -0
- data/app/views/fluid_infusion/_uploader.html.erb +81 -0
- data/app/views/fluid_infusion/_uploader_generic_content_objects.js.erb +38 -0
- data/app/views/fluid_infusion/_uploader_js.erb +45 -0
- data/app/views/generic_content_objects/_edit_description.html.erb +50 -0
- data/app/views/generic_content_objects/_new.html.erb +0 -0
- data/app/views/generic_content_objects/_show_description.html.erb +68 -0
- data/app/views/generic_content_objects/contributors/_edit_conference.html.erb +29 -0
- data/app/views/generic_content_objects/contributors/_edit_organization.html.erb +29 -0
- data/app/views/generic_content_objects/contributors/_edit_person.html.erb +37 -0
- data/app/views/generic_content_objects/contributors/_new.html.erb +10 -0
- data/app/views/generic_content_objects/contributors/_show_conference.html.erb +22 -0
- data/app/views/generic_content_objects/contributors/_show_organization.html.erb +22 -0
- data/app/views/generic_content_objects/contributors/_show_person.html.erb +38 -0
- data/app/views/generic_contents/_edit.html.erb +59 -0
- data/app/views/generic_contents/_index.html.erb +23 -0
- data/app/views/generic_contents/_show.html.erb +18 -0
- data/app/views/generic_contents/_show_content.html.erb +4 -0
- data/app/views/generic_images/_edit.html.erb +59 -0
- data/app/views/generic_images/_index.html.erb +24 -0
- data/app/views/generic_images/_show.html.erb +18 -0
- data/app/views/generic_images/_show_all.html.erb +14 -0
- data/app/views/generic_images/_show_content.html.erb +7 -0
- data/app/views/layouts/application.html.erb +57 -0
- data/app/views/layouts/hydra-head.html.erb +12 -0
- data/app/views/mods_assets/_edit.html.erb +49 -0
- data/app/views/mods_assets/_edit_description.html.erb +82 -0
- data/app/views/mods_assets/_edit_journal.html.erb +72 -0
- data/app/views/mods_assets/_index.html.erb +1 -0
- data/app/views/mods_assets/_index_list.html.erb +37 -0
- data/app/views/mods_assets/_index_table.html.erb +7 -0
- data/app/views/mods_assets/_progress_box.html.erb +82 -0
- data/app/views/mods_assets/_show.html.erb +44 -0
- data/app/views/mods_assets/_show_description.html.erb +44 -0
- data/app/views/mods_assets/_show_journal.html.erb +42 -0
- data/app/views/mods_assets/_show_permissions.html.erb +14 -0
- data/app/views/permissions/_edit_person_permissions.html.erb +35 -0
- data/app/views/permissions/_index.html.erb +55 -0
- data/app/views/permissions/_new.html.erb +18 -0
- data/app/views/permissions/index.html.erb +1 -0
- data/app/views/permissions/new.html.erb +1 -0
- data/app/views/shared/_delete_asset_confirmation.html.erb +17 -0
- data/app/views/user_sessions/_login_form.html.erb +10 -0
- data/app/views/user_sessions/logged_out.html.erb +1 -0
- data/config/routes.rb +12 -0
- data/fedora_conf/conf/fedora.fcfg +1021 -0
- data/hydra-head.gemspec +70 -0
- data/lib/application_controller.rb +25 -0
- data/lib/application_helper.rb +2 -0
- data/lib/engine.rb +30 -0
- data/lib/generators/hydra/head_generator.rb +152 -0
- data/lib/generators/hydra/templates/config/fedora.yml +17 -0
- data/lib/generators/hydra/templates/config/initializers/blacklight_config.rb +246 -0
- data/lib/generators/hydra/templates/config/initializers/fedora_config.rb +23 -0
- data/lib/generators/hydra/templates/config/initializers/hydra_config.rb +29 -0
- data/lib/generators/hydra/templates/config/role_map_cucumber.yml +10 -0
- data/lib/generators/hydra/templates/config/role_map_development.yml +12 -0
- data/lib/generators/hydra/templates/config/role_map_production.yml +2 -0
- data/lib/generators/hydra/templates/config/role_map_test.yml +15 -0
- data/lib/generators/hydra/templates/config/solr.yml +10 -0
- data/lib/generators/hydra/templates/config/solr_mappings.yml +22 -0
- data/lib/generators/hydra/templates/fedora_conf/conf/fedora.fcfg +1021 -0
- data/lib/generators/hydra/templates/migrations/add_user_attributes_table.rb +15 -0
- data/lib/generators/hydra/templates/migrations/create_superusers.rb +12 -0
- data/lib/generators/hydra/templates/solr_conf/conf/schema.xml +118 -0
- data/lib/generators/hydra/templates/solr_conf/conf/solrconfig.xml +332 -0
- data/lib/generators/hydra/templates/solr_conf/solr.xml +35 -0
- data/lib/hydra-head.rb +29 -0
- data/lib/hydra-head/engine.rb +9 -0
- data/lib/hydra-head/routes.rb +87 -0
- data/lib/hydra-head/version.rb +4 -0
- data/lib/hydra.rb +22 -0
- data/lib/hydra/access_controls_enforcement.rb +236 -0
- data/lib/hydra/access_controls_evaluation.rb +97 -0
- data/lib/hydra/assets_controller_helper.rb +144 -0
- data/lib/hydra/catalog.rb +64 -0
- data/lib/hydra/common_mods_index_methods.rb +42 -0
- data/lib/hydra/controller.rb +7 -0
- data/lib/hydra/file_assets_helper.rb +144 -0
- data/lib/hydra/fixtures.rb +43 -0
- data/lib/hydra/generic_content.rb +113 -0
- data/lib/hydra/generic_image.rb +100 -0
- data/lib/hydra/image.rb +177 -0
- data/lib/hydra/model_methods.rb +95 -0
- data/lib/hydra/model_mixins.rb +2 -0
- data/lib/hydra/model_mixins/common_metadata.rb +24 -0
- data/lib/hydra/model_mixins/mods_object.rb +16 -0
- data/lib/hydra/mods_article.rb +505 -0
- data/lib/hydra/mods_dataset.rb +165 -0
- data/lib/hydra/mods_generic_content.rb +494 -0
- data/lib/hydra/mods_image.rb +494 -0
- data/lib/hydra/repository_controller.rb +102 -0
- data/lib/hydra/rights_metadata.rb +189 -0
- data/lib/hydra/superuser_attributes.rb +12 -0
- data/lib/hydra/testing_server.rb +183 -0
- data/lib/hydra/user.rb +22 -0
- data/lib/mediashelf/active_fedora_helper.rb +72 -0
- data/lib/railties/all_tests.rake +23 -0
- data/lib/railties/hydra-fixtures.rake +184 -0
- data/lib/railties/hydra_jetty.rake +79 -0
- data/lib/railties/hyhead_cucumber.rake +127 -0
- data/lib/railties/hyhead_rspec.rake +137 -0
- data/lib/stanford/searchworks_helper.rb +1338 -0
- data/lib/stanford/solr_helper.rb +108 -0
- data/lib/uva/mods_index_methods.rb +24 -0
- data/solr_conf/conf/schema.xml +122 -0
- data/solr_conf/conf/solrconfig.xml +332 -0
- data/solr_conf/solr.xml +35 -0
- data/tasks/hydra-head-fixtures.rake +54 -0
- data/tasks/hydra-head.rake +247 -0
- data/tasks/hydra_jetty.rake +79 -0
- data/tasks/replicator.rake +27 -0
- data/tasks/solrizer-fedora.rake +53 -0
- data/tasks/solrizer.rake +13 -0
- data/test_support/etc/Gemfile +29 -0
- data/test_support/etc/rvmrc +32 -0
- data/test_support/features/button_add_assets.feature +22 -0
- data/test_support/features/button_add_generic_content.feature +11 -0
- data/test_support/features/button_add_image.feature +11 -0
- data/test_support/features/button_add_mods_asset.feature +11 -0
- data/test_support/features/contributor_add.feature +39 -0
- data/test_support/features/file_assets_list.feature +32 -0
- data/test_support/features/file_upload.feature +40 -0
- data/test_support/features/home_page.feature +9 -0
- data/test_support/features/html_validity.feature +47 -0
- data/test_support/features/mods_asset_contributors_edit.feature +80 -0
- data/test_support/features/mods_asset_create.feature +12 -0
- data/test_support/features/mods_asset_edit.feature +33 -0
- data/test_support/features/mods_asset_edit_without_permission.feature +10 -0
- data/test_support/features/mods_asset_search_result.feature +13 -0
- data/test_support/features/mods_asset_show.feature +39 -0
- data/test_support/features/permissions_add.feature +15 -0
- data/test_support/features/permissions_edit.feature +63 -0
- data/test_support/features/step_definitions/catalog_index_steps.rb +14 -0
- data/test_support/features/step_definitions/create_asset_steps.rb +7 -0
- data/test_support/features/step_definitions/edit_metadata_steps.rb +73 -0
- data/test_support/features/step_definitions/file_list_steps.rb +28 -0
- data/test_support/features/step_definitions/hydra_metadata_steps.rb +3 -0
- data/test_support/features/step_definitions/hydra_steps.rb +8 -0
- data/test_support/features/step_definitions/inline_editable_edit_steps.rb +77 -0
- data/test_support/features/step_definitions/search_steps.rb +88 -0
- data/test_support/features/step_definitions/searching_steps.rb +22 -0
- data/test_support/features/step_definitions/show_document_steps.rb +85 -0
- data/test_support/features/step_definitions/user_steps.rb +36 -0
- data/test_support/features/step_definitions/web_steps.rb +219 -0
- data/test_support/features/support/env.rb +55 -0
- data/test_support/features/support/paths.rb +80 -0
- data/test_support/features/switch_users.feature +14 -0
- data/test_support/features/view_catalog_index.feature +18 -0
- data/test_support/fixtures/empty_file.txt +0 -0
- data/test_support/fixtures/hydrangea_fixture_archivist_only_mods_article.foxml.xml +1212 -0
- data/test_support/fixtures/hydrangea_fixture_file_asset1.foxml.xml +4946 -0
- data/test_support/fixtures/hydrangea_fixture_mods_article1.foxml.xml +234 -0
- data/test_support/fixtures/hydrangea_fixture_mods_article2.foxml.xml +177 -0
- data/test_support/fixtures/hydrangea_fixture_mods_article3.foxml.xml +170 -0
- data/test_support/fixtures/hydrangea_fixture_mods_dataset1.foxml.xml +187 -0
- data/test_support/fixtures/hydrangea_fixture_uploaded_svg1.foxml.xml +676 -0
- data/test_support/fixtures/image.jp2 +0 -0
- data/test_support/fixtures/libra-oa_1.foxml.xml +2324 -0
- data/test_support/fixtures/libra-oa_2.foxml.xml +2422 -0
- data/test_support/spec/controllers/assets_controller_spec.rb +113 -0
- data/test_support/spec/controllers/catalog_controller_spec.rb +148 -0
- data/test_support/spec/controllers/catalog_controller_viewing_context_spec.rb +62 -0
- data/test_support/spec/controllers/contributors_controller_spec.rb +47 -0
- data/test_support/spec/controllers/file_assets_controller_spec.rb +189 -0
- data/test_support/spec/controllers/hydra_controller_spec.rb +15 -0
- data/test_support/spec/controllers/permissions_controller_spec.rb +80 -0
- data/test_support/spec/controllers/user_sessions_controller_spec.rb +35 -0
- data/test_support/spec/generators/hydra-head_generator_spec.rb +14 -0
- data/test_support/spec/helpers/access_controls_enforcement_spec.rb +212 -0
- data/test_support/spec/helpers/access_controls_evaluation_spec.rb +35 -0
- data/test_support/spec/helpers/assets_controller_helper_spec.rb +71 -0
- data/test_support/spec/helpers/blacklight_helper_spec.rb +64 -0
- data/test_support/spec/helpers/file_assets_helper_spec.rb +107 -0
- data/test_support/spec/helpers/hydra-repository_controller_spec.rb +32 -0
- data/test_support/spec/helpers/hydra_assets_helper_spec.rb +195 -0
- data/test_support/spec/helpers/hydra_djatoka_helper_spec.rb +32 -0
- data/test_support/spec/helpers/hydra_fedora_metadata_helper_spec.rb +215 -0
- data/test_support/spec/helpers/hydra_helper_spec.rb +73 -0
- data/test_support/spec/helpers/hydra_model_methods_spec.rb +95 -0
- data/test_support/spec/helpers/hydra_uploader_helper_spec.rb +18 -0
- data/test_support/spec/helpers/javascript_includes_helper_spec.rb +43 -0
- data/test_support/spec/integration/file_asset_spec.rb +150 -0
- data/test_support/spec/lib/active_fedora_helper_spec.rb +56 -0
- data/test_support/spec/lib/catalog_spec.rb +16 -0
- data/test_support/spec/lib/common_mods_index_methods_spec.rb +28 -0
- data/test_support/spec/models/audio_asset_spec.rb +23 -0
- data/test_support/spec/models/file_asset_spec.rb +42 -0
- data/test_support/spec/models/generic_content_spec.rb +29 -0
- data/test_support/spec/models/generic_image_spec.rb +58 -0
- data/test_support/spec/models/hydra_rights_metadata_spec.rb +162 -0
- data/test_support/spec/models/image_asset_spec.rb +23 -0
- data/test_support/spec/models/mods_asset_spec.rb +29 -0
- data/test_support/spec/models/role_mapper_spec.rb +22 -0
- data/test_support/spec/models/user_spec.rb +52 -0
- data/test_support/spec/models/video_asset_spec.rb +23 -0
- data/test_support/spec/rcov.opts +3 -0
- data/test_support/spec/spec.opts +4 -0
- data/test_support/spec/spec_helper.rb +44 -0
- data/test_support/spec/support/matchers/helper_matcher.rb +14 -0
- data/test_support/spec/support/matchers/solr_matchers.rb +60 -0
- data/test_support/spec/unit/hydra-head-engine_spec.rb +8 -0
- data/test_support/spec/unit/hydra-head_spec.rb +8 -0
- data/test_support/spec/utilities/hydra_testing_server_spec.rb +49 -0
- data/test_support/spec/views/uploader.html.erb_spec.rb +30 -0
- data/vendor/cache/RedCloth-4.2.3.gem +0 -0
- data/vendor/cache/abstract-1.0.0.gem +0 -0
- data/vendor/cache/actionmailer-3.0.9.gem +0 -0
- data/vendor/cache/actionpack-3.0.9.gem +0 -0
- data/vendor/cache/active-fedora-2.3.3.gem +0 -0
- data/vendor/cache/activemodel-3.0.9.gem +0 -0
- data/vendor/cache/activerecord-3.0.9.gem +0 -0
- data/vendor/cache/activeresource-3.0.9.gem +0 -0
- data/vendor/cache/activesupport-3.0.9.gem +0 -0
- data/vendor/cache/arel-2.0.10.gem +0 -0
- data/vendor/cache/blacklight-3.0.0.gem +0 -0
- data/vendor/cache/block_helpers-0.3.3.gem +0 -0
- data/vendor/cache/builder-2.1.2.gem +0 -0
- data/vendor/cache/capybara-1.0.0.gem +0 -0
- data/vendor/cache/childprocess-0.2.0.gem +0 -0
- data/vendor/cache/columnize-0.3.4.gem +0 -0
- data/vendor/cache/crack-0.1.8.gem +0 -0
- data/vendor/cache/cucumber-1.0.2.gem +0 -0
- data/vendor/cache/cucumber-rails-1.0.2.gem +0 -0
- data/vendor/cache/curb-0.7.15.gem +0 -0
- data/vendor/cache/daemons-1.1.4.gem +0 -0
- data/vendor/cache/database_cleaner-0.6.7.gem +0 -0
- data/vendor/cache/diff-lcs-1.1.2.gem +0 -0
- data/vendor/cache/equivalent-xml-0.2.7.gem +0 -0
- data/vendor/cache/erubis-2.6.6.gem +0 -0
- data/vendor/cache/facets-2.8.4.gem +0 -0
- data/vendor/cache/factory_girl-1.3.3.gem +0 -0
- data/vendor/cache/fastercsv-1.5.4.gem +0 -0
- data/vendor/cache/ffi-1.0.9.gem +0 -0
- data/vendor/cache/gherkin-2.4.5.gem +0 -0
- data/vendor/cache/haml-3.1.2.gem +0 -0
- data/vendor/cache/httparty-0.7.8.gem +0 -0
- data/vendor/cache/i18n-0.5.0.gem +0 -0
- data/vendor/cache/jettywrapper-0.0.10.gem +0 -0
- data/vendor/cache/json-1.5.3.gem +0 -0
- data/vendor/cache/json_pure-1.5.3.gem +0 -0
- data/vendor/cache/kaminari-0.12.4.gem +0 -0
- data/vendor/cache/launchy-2.0.3.gem +0 -0
- data/vendor/cache/linecache-0.46.gem +0 -0
- data/vendor/cache/logger-1.2.8.gem +0 -0
- data/vendor/cache/mail-2.2.19.gem +0 -0
- data/vendor/cache/marc-0.4.3.gem +0 -0
- data/vendor/cache/mediashelf-loggable-0.4.2.gem +0 -0
- data/vendor/cache/mime-types-1.16.gem +0 -0
- data/vendor/cache/mocha-0.9.12.gem +0 -0
- data/vendor/cache/multipart-post-1.1.2.gem +0 -0
- data/vendor/cache/nokogiri-1.5.0.gem +0 -0
- data/vendor/cache/om-1.2.5.gem +0 -0
- data/vendor/cache/polyglot-0.3.1.gem +0 -0
- data/vendor/cache/rack-1.2.3.gem +0 -0
- data/vendor/cache/rack-mount-0.6.14.gem +0 -0
- data/vendor/cache/rack-test-0.5.7.gem +0 -0
- data/vendor/cache/rails-3.0.9.gem +0 -0
- data/vendor/cache/railties-3.0.9.gem +0 -0
- data/vendor/cache/rake-0.9.2.gem +0 -0
- data/vendor/cache/rbx-require-relative-0.0.5.gem +0 -0
- data/vendor/cache/rcov-0.9.9.gem +0 -0
- data/vendor/cache/rdoc-3.8.gem +0 -0
- data/vendor/cache/rsolr-1.0.2.gem +0 -0
- data/vendor/cache/rsolr-ext-1.0.3.gem +0 -0
- data/vendor/cache/rspec-2.6.0.gem +0 -0
- data/vendor/cache/rspec-core-2.6.4.gem +0 -0
- data/vendor/cache/rspec-expectations-2.6.0.gem +0 -0
- data/vendor/cache/rspec-mocks-2.6.0.gem +0 -0
- data/vendor/cache/rspec-rails-2.6.1.gem +0 -0
- data/vendor/cache/ruby-debug-0.10.4.gem +0 -0
- data/vendor/cache/ruby-debug-base-0.10.4.gem +0 -0
- data/vendor/cache/rubyzip-0.9.4.gem +0 -0
- data/vendor/cache/sanitize-2.0.3.gem +0 -0
- data/vendor/cache/selenium-webdriver-0.2.2.gem +0 -0
- data/vendor/cache/solr-ruby-0.0.8.gem +0 -0
- data/vendor/cache/solrizer-1.1.0.gem +0 -0
- data/vendor/cache/solrizer-fedora-1.1.0.gem +0 -0
- data/vendor/cache/sqlite3-ruby-1.2.5.gem +0 -0
- data/vendor/cache/stomp-1.1.9.gem +0 -0
- data/vendor/cache/term-ansicolor-1.0.5.gem +0 -0
- data/vendor/cache/thor-0.14.6.gem +0 -0
- data/vendor/cache/treetop-1.4.9.gem +0 -0
- data/vendor/cache/trollop-1.16.2.gem +0 -0
- data/vendor/cache/tzinfo-0.3.29.gem +0 -0
- data/vendor/cache/unicode-0.4.0.gem +0 -0
- data/vendor/cache/will_paginate-2.3.15.gem +0 -0
- data/vendor/cache/xml-simple-1.1.0.gem +0 -0
- data/vendor/cache/xpath-0.1.4.gem +0 -0
- data/vendor/cache/yard-0.7.2.gem +0 -0
- metadata +1110 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
<% person = show_person %>
|
2
|
+
<% person_counter = show_person_counter %>
|
3
|
+
<% person_name = "#{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :first_name])} #{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :last_name])}" %>
|
4
|
+
<% base_id = "person_#{person_counter}" %>
|
5
|
+
<% unless ( get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name]).first.empty? || get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name]).first.empty? ) %>
|
6
|
+
<li id="person_<%= person_counter %>">
|
7
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :role]).first.strip.empty? %>
|
8
|
+
<span class="contributor_role"><%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :role, :text]) %></span>
|
9
|
+
<% end %>
|
10
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name]).first.empty? %>
|
11
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name]).first.strip %>
|
12
|
+
<% end %>
|
13
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name]).first.empty? %>
|
14
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name]).first.strip %><% end %><% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution]).first.empty? %>, <%= get_values_from_datastream(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution]) %>
|
15
|
+
<% end %>
|
16
|
+
</li>
|
17
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# See code comments on ContributorsController.new to understand what this view does %>
|
2
|
+
<%- if params.has_key?(:contributor_type) %>
|
3
|
+
<%- ct = params[:contributor_type] %>
|
4
|
+
<%# Calculating the new index so all field values (ie first name & last name) will be added to one contributor with that index %>
|
5
|
+
<%- new_contributor_index = @document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(ct.to_sym).length %>
|
6
|
+
<form id="add_contributor" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset", :id=>params[:asset_id]) %>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
|
7
|
+
<input name="_method" type="hidden" value="put" />
|
8
|
+
<%= render :partial=>"contributors/edit_#{ct}.html", :locals=>{"edit_#{ct}".to_sym =>{}, "edit_#{ct}_counter".to_sym =>new_contributor_index} %>
|
9
|
+
<%= submit_tag "Add #{ct.capitalize}", {:id => "addContributor"} %>
|
10
|
+
</form>
|
11
|
+
<%- else %>
|
12
|
+
<%= render :partial=>"contributors/new.html" %>
|
13
|
+
<%- end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= list_downloadables(@datastreams, @mime_types) %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<% if deletable_result["is_part_of_s"] && deletable_result["is_part_of_s"].length == 1 && deletable_result["is_part_of_s"][0].match(/#{@container.pid}$/) %>
|
2
|
+
<li>
|
3
|
+
<%= deletable_result["id"] + " (" + deletable_result[solr_name("title", :text)].first + ")" %>
|
4
|
+
</li>
|
5
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% unless file_assets.hits.empty? %>
|
2
|
+
<table class='multipleEdit' id='file_assets'>
|
3
|
+
<tr>
|
4
|
+
<th>File</th>
|
5
|
+
<th></th>
|
6
|
+
</tr>
|
7
|
+
<%= render :partial=>'file_assets/result', :collection=> file_assets.hits %>
|
8
|
+
</table>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% if !@document.nil? && editor? %>
|
12
|
+
<div id='uploader'>
|
13
|
+
<%= render :partial=>"file_assets/new"%>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<tr class="file_asset" id ="<%= format_pid(result["id"]) %>" >
|
2
|
+
<td>
|
3
|
+
<%= link_to result[solr_name("title", :text)], file_asset_path(result["id"]) %>
|
4
|
+
</td>
|
5
|
+
<td>
|
6
|
+
|
7
|
+
<% if editor? %>
|
8
|
+
<% if @container.nil? %>
|
9
|
+
<% file_asset_url = file_asset_path(result["id"]) %>
|
10
|
+
<% else %>
|
11
|
+
<% file_asset_url = asset_file_asset_path(@container.pid, result["id"]) %>
|
12
|
+
<% end %>
|
13
|
+
<%= delete_asset_link(result["id"], result["active_fedora_model_s"].first ).html_safe %>
|
14
|
+
<% end %>
|
15
|
+
</td>
|
16
|
+
</tr>
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<%- stylesheet_links << ['../infusion/framework/fss/css/fss-layout.css', {:plugin=>"fluid-infusion"}] %>
|
2
|
+
<%- field_tag_options = defined?(uploader_options) ? uploader_options : {} %>
|
3
|
+
<%- container_content_type_param = defined?(container_content_type) ? "?container_content_type=#{container_content_type}" : "" %>
|
4
|
+
<div id="uploader-contents">
|
5
|
+
|
6
|
+
<!-- This form will be progressively enhanced by the Fluid Uploader component. -->
|
7
|
+
<form method="post" enctype="multipart/form-data" class="fl-uploader fl-progEnhance-basic" action="<%=h upload_url %>">
|
8
|
+
<input type="hidden" name="container_id" value="<%=h container_id %>"/>
|
9
|
+
<%= hidden_field_tag("container_content_type", container_content_type) if defined?(container_content_type) %>
|
10
|
+
<p>Browse to upload a file.</p>
|
11
|
+
<!-- <input name="Filedata-orig" type="file" /> -->
|
12
|
+
<%= file_field_tag "Filedata", field_tag_options %>
|
13
|
+
<div><input type="submit" value="Upload File"/></div>
|
14
|
+
</form>
|
15
|
+
|
16
|
+
<!-- This is the markup for the Fluid Uploader component itself. -->
|
17
|
+
<form class="flc-uploader fl-uploader fl-progEnhance-enhanced" action="<%=h upload_url %>" method="get" enctype="multipart/form-data">
|
18
|
+
|
19
|
+
<!-- The file queue -->
|
20
|
+
<div class="fl-uploader-queue-wrapper">
|
21
|
+
|
22
|
+
<!-- Scrollable view -->
|
23
|
+
<div class="flc-scroller fl-scroller">
|
24
|
+
<div class="fl-scroller-inner">
|
25
|
+
<table cellspacing="0" class="flc-uploader-queue fl-uploader-queue" summary="Queue of files to upload.">
|
26
|
+
<tbody>
|
27
|
+
<!-- Rows will be rendered in here. -->
|
28
|
+
|
29
|
+
<!-- Template markup for the file queue rows -->
|
30
|
+
<tr class="flc-uploader-file-tmplt flc-uploader-file fl-uploader-hidden-templates">
|
31
|
+
<th class="flc-uploader-file-name fl-uploader-file-name" scope="row">File Name Placeholder</th>
|
32
|
+
|
33
|
+
|
34
|
+
<td class="flc-uploader-file-size fl-uploader-file-size">0 KB</td>
|
35
|
+
<td class="fl-uploader-file-actions">
|
36
|
+
<button type="button" class="flc-uploader-file-action fl-uploader-file-action" title="Remove File" tabindex="-1">
|
37
|
+
<span class="fl-uploader-button-text fl-uploader-hidden">Remove file from queue</span>
|
38
|
+
</button>
|
39
|
+
</td>
|
40
|
+
</tr>
|
41
|
+
|
42
|
+
<!-- Template for the file error info rows -->
|
43
|
+
<tr class="flc-uploader-file-error-tmplt fl-uploader-file-error fl-uploader-hidden-templates">
|
44
|
+
<td colspan="3" class="flc-uploader-file-error"></td>
|
45
|
+
</tr>
|
46
|
+
</tbody>
|
47
|
+
</table>
|
48
|
+
<div class="flc-uploader-file-progressor-tmplt fl-uploader-file-progress"><span class="fl-uploader-file-progress-text fl-uploader-hidden">76%</span></div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div class="flc-uploader-browse-instructions fl-uploader-browse-instructions"></div>
|
53
|
+
|
54
|
+
<!-- Foot of the queue -->
|
55
|
+
<div class="flc-uploader-queue-footer fl-uploader-queue-footer">
|
56
|
+
<table cellspacing="0" cellpadding="0" summary="Status of file queue.">
|
57
|
+
|
58
|
+
<tr>
|
59
|
+
<td class="flc-uploader-total-progress-text">
|
60
|
+
<!-- Total: <span class="fl-uploader-totalFiles">0</span> files
|
61
|
+
(<span class="fl-uploader-totalBytes">0 KB</span>) -->
|
62
|
+
</td>
|
63
|
+
<td class=".fl-uploader-footer-buttons" align="right" >
|
64
|
+
<a href="#" class="flc-uploader-button-browse fl-uploader-browse">Add Files</a>
|
65
|
+
</td>
|
66
|
+
</tr>
|
67
|
+
|
68
|
+
</table>
|
69
|
+
<div class="flc-uploader-total-progress fl-uploader-total-progress-okay"> </div>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<!-- Action buttons -->
|
75
|
+
<div class="fl-uploader-btns">
|
76
|
+
<button type="button" class="flc-uploader-button-pause fl-uploader-pause fl-uploader-hidden">Stop Upload</button><button type="button" class="flc-uploader-button-upload fl-uploader-upload fl-uploader-button-default fl-uploader-dim ui-button ui-widget ui-state-default" disabled="disabled">Upload</button>
|
77
|
+
</div>
|
78
|
+
</form>
|
79
|
+
|
80
|
+
</div>
|
81
|
+
<div style="clear:both;"></div>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
|
3
|
+
|
4
|
+
var myUploader = fluid.progressiveEnhanceableUploader(".flc-uploader", ".fl-progEnhance-basic", {
|
5
|
+
uploadManager: {
|
6
|
+
type: "fluid.swfUploadManager",
|
7
|
+
|
8
|
+
options: {
|
9
|
+
// Set the uploadURL to the URL for posting files to your server.
|
10
|
+
uploadURL: "<%= generic_content_object_path(:container_id => params[:id], :only_path => false) %>",
|
11
|
+
|
12
|
+
// This option points to the location of the SWFUpload Flash object that ships with Fluid Infusion.
|
13
|
+
flashURL: "<%= image_path("../infusion/lib/swfupload/flash/swfupload.swf", :plugin=>"fluid-infusion") %>"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
|
17
|
+
listeners: {
|
18
|
+
onFileSuccess: function (file, serverData){
|
19
|
+
},
|
20
|
+
|
21
|
+
afterUploadComplete: function () {
|
22
|
+
// first check to see if the file queue is empty and there haven't been any errors
|
23
|
+
if (myUploader.uploadManager.queue.getReadyFiles().length === 0 && myUploader.uploadManager.queue.getErroredFiles().length === 0) {
|
24
|
+
//async_load('<%= "/generic_content_objects/#{params[:container_id]}/content"%>', '#uploads');
|
25
|
+
$("#file_assets .editable-container").hydraTextField();
|
26
|
+
}
|
27
|
+
}
|
28
|
+
},
|
29
|
+
|
30
|
+
decorators: {
|
31
|
+
type: "fluid.swfUploadSetupDecorator",
|
32
|
+
options: {
|
33
|
+
// This option points to the location of the Browse Files button used with Flash 10 clients.
|
34
|
+
flashButtonImageURL: "<%= image_path("../infusion/components/uploader/images/browse.png", :plugin=>"fluid-infusion") %>"
|
35
|
+
}
|
36
|
+
}
|
37
|
+
});
|
38
|
+
</script>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var myUploader = fluid.progressiveEnhanceableUploader(".flc-uploader", ".fl-progEnhance-basic", {
|
3
|
+
uploadManager: {
|
4
|
+
type: "fluid.swfUploadManager",
|
5
|
+
|
6
|
+
options: {
|
7
|
+
// Set the uploadURL to the URL for posting files to your server.
|
8
|
+
uploadURL: "<%= file_assets_path(:container_id=> params[:container_id], :only_path => false) %>",
|
9
|
+
|
10
|
+
// This option points to the location of the SWFUpload Flash object that ships with Fluid Infusion.
|
11
|
+
flashURL: "<%= image_path("../infusion/lib/swfupload/flash/swfupload.swf", :plugin=>"fluid-infusion") %>"
|
12
|
+
}
|
13
|
+
},
|
14
|
+
|
15
|
+
listeners: {
|
16
|
+
|
17
|
+
onFileStart: function(file){
|
18
|
+
myUploader.uploadManager.swfUploader.addPostParam("asset[descMetadata][type][0]", $('#asset_descMetadata_type').val());
|
19
|
+
myUploader.uploadManager.swfUploader.addPostParam("asset[descMetadata][description][0]", $('#asset_descMetadata_description').val());
|
20
|
+
},
|
21
|
+
|
22
|
+
onFileSuccess: function (file, serverData){},
|
23
|
+
|
24
|
+
afterUploadComplete: function () {
|
25
|
+
|
26
|
+
// first check to see if the file queue is empty and there haven't been any errors
|
27
|
+
if (myUploader.uploadManager.queue.getReadyFiles().length === 0 && myUploader.uploadManager.queue.getErroredFiles().length === 0) {
|
28
|
+
// Custom for UVA Libra -- triggers update of File Uploaded indicator in progress box
|
29
|
+
//$.fn.hydraProgressBox.checkUncheckProgress('pbFileUploaded', true);
|
30
|
+
async_load('<%= "/assets/#{params[:container_id]}/file_assets"%>', '#uploads');
|
31
|
+
$("#file_assets .editable-container").hydraTextField();
|
32
|
+
}
|
33
|
+
|
34
|
+
}
|
35
|
+
},
|
36
|
+
|
37
|
+
decorators: {
|
38
|
+
type: "fluid.swfUploadSetupDecorator",
|
39
|
+
options: {
|
40
|
+
// This option points to the location of the Browse Files button used with Flash 10 clients.
|
41
|
+
flashButtonImageURL: "<%= image_path("../infusion/components/uploader/images/browse.png", :plugin=>"fluid-infusion") %>"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
});
|
45
|
+
</script>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<form id="descriptive_metadata" action="<%= url_for(:action=>"update", :controller=>"assets", :content_type=>"mods_asset")%>" method="post" data-resourceType="mods_asset" accept-charset="utf-8">
|
2
|
+
<input type="hidden" name="_method" value="put"/>
|
3
|
+
<fieldset id="title_fields">
|
4
|
+
<legend>Title</legend>
|
5
|
+
<input class="content_type" type="hidden" name="content_type" value="mods_asset" />
|
6
|
+
<dl>
|
7
|
+
<dt>
|
8
|
+
<%= fedora_field_label("descMetadata", [:title_info, :main_title], "Title:").html_safe %>
|
9
|
+
</dt>
|
10
|
+
<dd class="title">
|
11
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [:title_info, :main_title], :multiple=>false).html_safe %>
|
12
|
+
</dd>
|
13
|
+
<dt>
|
14
|
+
<%= fedora_field_label("descMetadata", [:title_info, :language], "Language:").html_safe %>
|
15
|
+
</dt>
|
16
|
+
<dd class="language">
|
17
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [:title_info, :language], :multiple=>false).html_safe %>
|
18
|
+
</dd>
|
19
|
+
</dl>
|
20
|
+
</fieldset>
|
21
|
+
<fieldset id="contributor_fields">
|
22
|
+
<legend>Contributors</legend>
|
23
|
+
<%= render :partial => "contributors/index" %>
|
24
|
+
</fieldset>
|
25
|
+
|
26
|
+
<fieldset id="abstract_fields">
|
27
|
+
<legend>Abstract</legend>
|
28
|
+
<dl>
|
29
|
+
<dt>
|
30
|
+
<%= fedora_field_label("descMetadata", [:abstract], "Abstract:").html_safe %>
|
31
|
+
</dt>
|
32
|
+
<dd class="abstract">
|
33
|
+
<%= fedora_text_area(@document_fedora,"descMetadata", [:abstract], :multiple=>false).html_safe %>
|
34
|
+
</dd>
|
35
|
+
</dl>
|
36
|
+
</fieldset>
|
37
|
+
<fieldset id="topic_fields">
|
38
|
+
<legend>Topics</legend>
|
39
|
+
<dl>
|
40
|
+
<dt>
|
41
|
+
<%= fedora_field_label("descMetadata", [:subject, :topic], "Topic(s):").html_safe %>
|
42
|
+
<%= fedora_text_field_insert_link "descMetadata", [:subject, :topic] %>
|
43
|
+
</dt>
|
44
|
+
<dd id="topic_tag" class="topic_tag">
|
45
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [:subject, :topic], :multiple=>true).html_safe %>
|
46
|
+
</dd>
|
47
|
+
</dl>
|
48
|
+
</fieldset>
|
49
|
+
<%= submit_tag 'Save Description', {:id => "submitDescription"} %>
|
50
|
+
</form>
|
File without changes
|
@@ -0,0 +1,68 @@
|
|
1
|
+
<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">
|
2
|
+
|
3
|
+
<%= render :partial => "#{content_type}s/show_content" %>
|
4
|
+
|
5
|
+
<fieldset id="title_fields">
|
6
|
+
<legend>Title</legend>
|
7
|
+
<dl>
|
8
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]).first.empty? %>
|
9
|
+
<dt>
|
10
|
+
<%= fedora_field_label("descMetadata", [:title_info, :main_title], "Title:") %>
|
11
|
+
</dt>
|
12
|
+
<dd class="title">
|
13
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :main_title]) %>
|
14
|
+
</dd>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :language]).first.empty? %>
|
18
|
+
<dt>
|
19
|
+
<%= fedora_field_label("descMetadata", [:title_info, :language], "Language:") %>
|
20
|
+
</dt>
|
21
|
+
<dd class="language">
|
22
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [:title_info, :language]) %>
|
23
|
+
</dd>
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
</dl>
|
27
|
+
</fieldset>
|
28
|
+
|
29
|
+
|
30
|
+
<fieldset id="contributor_fields">
|
31
|
+
<legend>Contributors</legend>
|
32
|
+
<ol>
|
33
|
+
<%= render :partial=>"contributors/show_person", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:person) %>
|
34
|
+
<%= render :partial=>"contributors/show_organization", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:organization) %>
|
35
|
+
<%= render :partial=>"contributors/show_conference", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:conference) %>
|
36
|
+
</ol>
|
37
|
+
</fieldset>
|
38
|
+
|
39
|
+
|
40
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [:abstract]).first.empty? %>
|
41
|
+
<fieldset id="abstract_fields">
|
42
|
+
<legend>Abstract</legend>
|
43
|
+
<dl>
|
44
|
+
<dt>
|
45
|
+
<%= fedora_field_label("descMetadata", [:abstract], "Abstract:") %>
|
46
|
+
</dt>
|
47
|
+
<dd id="abstract">
|
48
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [:abstract]) %>
|
49
|
+
</dd>
|
50
|
+
</dl>
|
51
|
+
</fieldset>
|
52
|
+
<% end %>
|
53
|
+
|
54
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [:subject, :topic]).first.empty? %>
|
55
|
+
<fieldset id="topic_fields">
|
56
|
+
<legend>Topics</legend>
|
57
|
+
<dl>
|
58
|
+
<dt>
|
59
|
+
<%= fedora_field_label("descMetadata", [:subject, :topic], "Topic(s):") %>
|
60
|
+
</dt>
|
61
|
+
<dd id="topic_tag" class="topic_tag">
|
62
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [:subject, :topic]) %>
|
63
|
+
</dd>
|
64
|
+
</dl>
|
65
|
+
</fieldset>
|
66
|
+
<% end %>
|
67
|
+
|
68
|
+
</form>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<% conference = edit_conference %>
|
2
|
+
<% conference_counter = edit_conference_counter %>
|
3
|
+
<% conference_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:conference=>conference_counter}, :namePart]).first %>
|
4
|
+
<% base_id = "conference_#{conference_counter}" %>
|
5
|
+
<% if @document_fedora.class.respond_to?(:conference_relator_terms) %>
|
6
|
+
<% choices = @document_fedora.class.conference_relator_terms %>
|
7
|
+
<% else %>
|
8
|
+
<% choices = Hydra::ModsArticle.conference_relator_terms %>
|
9
|
+
<% end %>
|
10
|
+
<li>
|
11
|
+
<dl class="conference contributor" id="<%= base_id %>">
|
12
|
+
<dt>
|
13
|
+
<%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :role, :text], "Conference's Role:") %>
|
14
|
+
<%= fedora_select(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :role, :text], :choices=>choices.values.sort) %>
|
15
|
+
</dt>
|
16
|
+
<dd class="organization">
|
17
|
+
<ul>
|
18
|
+
<li>
|
19
|
+
<%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :namePart], "Conference:") %>
|
20
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart], :multiple=>false) %>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
<% if params[:action] == "edit" && !conference_name.empty? %>
|
24
|
+
<%= field_selectors_for("descMetadata", [{:person=>conference_counter}]) %>
|
25
|
+
<a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "conference", conference_counter) %>" title="Delete '<%= conference_name %>"> Delete</a>
|
26
|
+
<% end %>
|
27
|
+
</dd>
|
28
|
+
</dl>
|
29
|
+
</li>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<% organization = edit_organization %>
|
2
|
+
<% organization_counter = edit_organization_counter %>
|
3
|
+
<% organization_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:organization=>organization_counter}, :namePart]).first %>
|
4
|
+
<% base_id = "organization_#{organization_counter}" %>
|
5
|
+
<% if @document_fedora.class.respond_to?(:organization_relator_terms) %>
|
6
|
+
<% choices = @document_fedora.class.organization_relator_terms %>
|
7
|
+
<% else %>
|
8
|
+
<% choices = Hydra::ModsArticle.organization_relator_terms %>
|
9
|
+
<% end %>
|
10
|
+
<li>
|
11
|
+
<dl class="organization contributor" id="<%= base_id %>">
|
12
|
+
<dt>
|
13
|
+
<%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :role, :text], "Organization's Role:") %>
|
14
|
+
<%= fedora_select(@document_fedora,"descMetadata", [{:organization => organization_counter}, :role, :text], :choices=>choices.values.sort) %>
|
15
|
+
</dt>
|
16
|
+
<dd class="organization">
|
17
|
+
<ul>
|
18
|
+
<li>
|
19
|
+
<%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :namePart], "Organization:") %>
|
20
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart], :multiple=>false) %>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
<% if (params[:action] == "edit" && !organization_name.empty?) %>
|
24
|
+
<%= field_selectors_for("descMetadata", [{:person=>organization_counter}]) %>
|
25
|
+
<a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "organization", organization_counter) %>" title="Delete '<%= organization_name %>"> Delete</a>
|
26
|
+
<% end %>
|
27
|
+
</dd>
|
28
|
+
</dl>
|
29
|
+
</li>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<% person = edit_person %>
|
2
|
+
<% person_counter = edit_person_counter %>
|
3
|
+
<% person_name = "#{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :first_name])} #{get_values_from_datastream(@document_fedora,'descMetadata', [{:person=>person_counter}, :last_name])}" %>
|
4
|
+
<% base_id = "person_#{person_counter}" %>
|
5
|
+
<% if @document_fedora.class.respond_to?(:person_relator_terms) %>
|
6
|
+
<% choices = @document_fedora.class.person_relator_terms %>
|
7
|
+
<% else %>
|
8
|
+
<% choices = Hydra::ModsArticle.person_relator_terms %>
|
9
|
+
<% end %>
|
10
|
+
<li>
|
11
|
+
<dl class="person contributor" id="<%= base_id %>">
|
12
|
+
<dt>
|
13
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :role, :text], "Person's Role:") %>
|
14
|
+
<%= fedora_select(@document_fedora,"descMetadata", [{:person=>person_counter}, :role, :text], :choices=>choices.values.sort) %>
|
15
|
+
</dt>
|
16
|
+
<dd class="multi_inline person">
|
17
|
+
<ul>
|
18
|
+
<li class="name_first">
|
19
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :first_name], "First Name") %>
|
20
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name], :multiple=>false) %>
|
21
|
+
</li>
|
22
|
+
<li class="name_last">
|
23
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :last_name], "Last Name") %>
|
24
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name], :multiple=>false) %>
|
25
|
+
</li>
|
26
|
+
<li class="affiliation">
|
27
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :institution], "Institution") %>
|
28
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution], :multiple=>false) %>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
<% if ( (params[:action] == "edit" || params[:action] == "create") && !person_name.strip.empty? ) %>
|
32
|
+
<%= field_selectors_for("descMetadata", [{:person=>person_counter}]) %>
|
33
|
+
<a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "person", person_counter) %>" title="Delete '<%= person_name %>'"> Delete</a>
|
34
|
+
<% end %>
|
35
|
+
</dd>
|
36
|
+
</dl>
|
37
|
+
</li>
|