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,20 @@
|
|
1
|
+
<tr class="document <%= cycle("even","odd") %>">
|
2
|
+
<td>
|
3
|
+
<%= link_to_document(document, :label => Blacklight.config[:show][:heading].to_sym, :counter => (counter + 1 + @response.params[:start].to_i)) %>
|
4
|
+
</td>
|
5
|
+
<td>
|
6
|
+
|
7
|
+
</td>
|
8
|
+
<td>
|
9
|
+
<%= DateTime.parse(document.fetch(:system_create_dt,nil)).to_time %>
|
10
|
+
</td>
|
11
|
+
<td>
|
12
|
+
<%= (document.fetch(:medium_t,nil) || document_type(document)).gsub("Hydrangea","") %>
|
13
|
+
</td>
|
14
|
+
<td>
|
15
|
+
<%= get_file_asset_count(document)%>
|
16
|
+
</td>
|
17
|
+
<td>
|
18
|
+
Created
|
19
|
+
</td>
|
20
|
+
</tr>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# default partial to display solr document fields in catalog index view -%>
|
2
|
+
<dl class="defList">
|
3
|
+
<%#= get_relevance_bar(document[:score],"Relevance:") %>
|
4
|
+
<%= get_data_with_label(document, "Date:", 'date_t') %>
|
5
|
+
<%= get_data_with_label(document, "Title:", 'title_t') %>
|
6
|
+
<%= get_data_with_label(document, "Document Type:", 'medium_t') %>
|
7
|
+
<%= get_data_with_label(document, "Location:", 'location_t') %>
|
8
|
+
<% callnums = get_callnum(document) %>
|
9
|
+
<%= get_suppl_urls(document) %>
|
10
|
+
<%= show_formats(document['format']) %>
|
11
|
+
</dl>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
<table>
|
3
|
+
<% unless params[:display_type] == 'list' %>
|
4
|
+
<tr>
|
5
|
+
<th class="title">Title</th>
|
6
|
+
<th class="creator">Author</th>
|
7
|
+
<th class="journal">Work</th>
|
8
|
+
<th class="deposited">Deposited</th>
|
9
|
+
<th class="files">Files</th>
|
10
|
+
</tr>
|
11
|
+
<% end %>
|
12
|
+
<% docs.each_with_index do |document,counter| %>
|
13
|
+
<%= render_document_partial document, 'index', :counter => counter %>
|
14
|
+
<% end %>
|
15
|
+
</table>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<div id="search" class="search">
|
2
|
+
<%= form_tag catalog_index_path, :method => :get do %>
|
3
|
+
<h2 class="search"><%= label_tag(:q, "Search ") %></h2>
|
4
|
+
<%= text_field_tag :q, params[:q], :class => "q" %>
|
5
|
+
|
6
|
+
<%= search_as_hidden_fields(:omit_keys => [:q, :search_field, :qt]) %>
|
7
|
+
|
8
|
+
<%= image_submit_tag('search_button.png', :plugin=>"hydra-head", :id => "submit", :alt=>"Search") %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<hr/>
|
12
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%# default partial to display solr document fields in catalog show view -%>
|
2
|
+
|
3
|
+
|
4
|
+
<div class="document_viewer" id="cover_container">
|
5
|
+
<dl class="defList">
|
6
|
+
<%= get_data_with_label(document, "ID:", 'id') %>
|
7
|
+
<dt>Download:</dt>
|
8
|
+
<dd id="downloads">
|
9
|
+
<ul>
|
10
|
+
<% %>
|
11
|
+
</ul>
|
12
|
+
</dd>
|
13
|
+
<%= get_data_with_label(document, "Copyright:", 'rights_t') %>
|
14
|
+
</dl>
|
15
|
+
</div>
|
16
|
+
<div class="<%= params[:action]%>_details">
|
17
|
+
<%= render :partial => "#{params[:controller]}/_#{params[:action]}_partials/default_details", :locals => {:document => document}%>
|
18
|
+
</div>
|
19
|
+
<% sidebar_items << capture do %>
|
20
|
+
<%#= render :partial=>"catalog/_show_partials/facets", :locals=>{:document=>document, :facets_display_heading => "This document refers to:"} %>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<%= async_load_tag(asset_downloads_path(params[:id]), 'downloads') %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%# default partial to display solr document fields in catalog show view -%>
|
2
|
+
<div>
|
3
|
+
<dl class="defList">
|
4
|
+
<%= get_data_with_label(document, "Title:", 'title_t') %>
|
5
|
+
<%= get_data_with_label(document, "Author:", 'creator_t') %>
|
6
|
+
<%= get_textile_data_with_label(document, "Links:", 'relation_t') %>
|
7
|
+
<%= show_formats(document['format']) %>
|
8
|
+
|
9
|
+
<%= get_data_with_label(document, "Date:", 'date_t') %>
|
10
|
+
<%= get_data_with_label(document, "Type:", 'medium_t') %>
|
11
|
+
</dl>
|
12
|
+
</div>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<% facets_display_heading ||= "" %>
|
2
|
+
<% # main container for facets/limits menu -%>
|
3
|
+
<div id="facets">
|
4
|
+
<h2><%=h facets_display_heading %></h2>
|
5
|
+
<% facet_field_names.each do |solr_fname| %>
|
6
|
+
<div>
|
7
|
+
<% display_facet = @response.facets.detect {|f| f.name == solr_fname} -%>
|
8
|
+
<%#- raise solr_fname.inspect unless display_facet -%>
|
9
|
+
<% if display_facet && display_facet.items.length > 0 %>
|
10
|
+
<h3 class="facet_selected"><%= facet_field_labels[solr_fname] -%></h3>
|
11
|
+
<ul>
|
12
|
+
<% item_counter = 0 %>
|
13
|
+
<% display_facet.items.each do |item| -%>
|
14
|
+
<% if item.hits > 0 %>
|
15
|
+
<% facet_count_for_value = facet_value_hits(@facet_lookup, solr_fname, item.value) %>
|
16
|
+
<% if facet_in_params? solr_fname, item.value %>
|
17
|
+
<li>
|
18
|
+
<span class="selected"><%= h(item.value) %> (<%= format_num facet_count_for_value %>)</span>
|
19
|
+
<% link_options = remove_facet_params(solr_fname, item.value, params).merge!Hash["controller" => "catalog", :action=> "index"] %>
|
20
|
+
[<%= link_to 'remove', url_for(link_options), :class=>'remove' %>]
|
21
|
+
</li>
|
22
|
+
<% else %>
|
23
|
+
<%- if item_counter > Blacklight.config[:facet_more_num]-1 -%>
|
24
|
+
<li class="more">
|
25
|
+
<%- else -%>
|
26
|
+
<li>
|
27
|
+
<%- end -%>
|
28
|
+
<% link_options = add_facet_params(solr_fname, item.value).merge!Hash["controller" => "catalog", :action=> "index"] %>
|
29
|
+
<%= link_to h(item.value), url_for(link_options) %> (<%= format_num facet_count_for_value %>)
|
30
|
+
</li>
|
31
|
+
<% end -%>
|
32
|
+
<% end -%>
|
33
|
+
<% item_counter += 1 %>
|
34
|
+
<% end %>
|
35
|
+
<%= display_facet.items.length > Blacklight.config[:facet_more_num] ? "<li class='more_li'><a href='' class='more_link' title='more #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}'>more<span class='off_screen'> #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}</span></a></li>" : "" %>
|
36
|
+
<%= display_facet.items.length > Blacklight.config[:facet_more_num] ? "<li class='less_li' style='display:none;'><a href='' class='more_link' title='less #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}'>less<span class='off_screen'> #{pluralize(2, facet_field_labels[solr_fname])[2..-1].downcase}</span></a></li>" : "" %>
|
37
|
+
</ul>
|
38
|
+
<% end %>
|
39
|
+
</div>
|
40
|
+
<% end %>
|
41
|
+
</div>
|
42
|
+
<script type="text/javascript">
|
43
|
+
$(".more").toggle();
|
44
|
+
$('.more_link').each(function(){
|
45
|
+
$(this).click(function(){
|
46
|
+
$(this).parent().parent().children("li.more").toggle();
|
47
|
+
$(this).parent().parent().children("li.more_li").toggle();
|
48
|
+
$(this).parent().parent().children("li.less_li").toggle();
|
49
|
+
return false;
|
50
|
+
});
|
51
|
+
});
|
52
|
+
</script>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% carriers =
|
2
|
+
{
|
3
|
+
'Please select your carrier' => '',
|
4
|
+
'AT&T' => 'att',
|
5
|
+
'Verizon' => 'verizon',
|
6
|
+
'T Mobile' => 'tmobile',
|
7
|
+
'Sprint' => 'sprint',
|
8
|
+
'Nextel' => 'nextel',
|
9
|
+
'Virgin Mobile' => 'vmobile',
|
10
|
+
'Alltel' => 'alltel',
|
11
|
+
'Cricket' => 'cricket'
|
12
|
+
}
|
13
|
+
%>
|
14
|
+
<h1>SMS This</h1>
|
15
|
+
<%= form_tag url_for(:action => 'send_email_record', :style => 'sms'), :id => 'sms_form', :method => :post do %>
|
16
|
+
<%= label_tag(:to, "Phone Number:") %><br/>
|
17
|
+
<%= text_field_tag :sms_to %><br/>
|
18
|
+
<%= label_tag(:carrier, "Carrier:") %><br/>
|
19
|
+
<%= select_tag(:carrier, options_for_select(carriers, '')) %><br/>
|
20
|
+
<%= submit_tag "Send" %>
|
21
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<div id="sortAndPerPage">
|
2
|
+
<% unless @response.response['numFound'] < 2 %>
|
3
|
+
<%= form_tag catalog_index_path, :method=>:get, :class=>'per_page' do %>
|
4
|
+
<%= label_tag(:per_page, "Show " + select_tag(:per_page, options_for_select(['10', '20', '50', '100'], h(params[:per_page])), :title => "Number of results to display per page", :onchange => 'this.form.submit()') + " per page") %>
|
5
|
+
|
6
|
+
<%= search_as_hidden_fields(:omit_keys => [:page, :per_page]) %>
|
7
|
+
|
8
|
+
<noscript><%= submit_tag 'update' %></noscript>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= form_tag catalog_index_path, :method=>:get, :class=>'sort', :id => "sort_form" do %>
|
12
|
+
<%= label_tag 'sort', 'Sort by' %>
|
13
|
+
<%= select_tag(:sort, options_for_select(sort_fields, h(params[:sort])), :onchange => 'this.form.submit()') %>
|
14
|
+
|
15
|
+
<%= search_as_hidden_fields(:omit_keys => [:page, :sort]) %>
|
16
|
+
|
17
|
+
<noscript><%= submit_tag 'sort results' %></noscript>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
|
21
|
+
|
22
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<ul>
|
2
|
+
<li>
|
3
|
+
<% display_class = (!params[:home_context] || params[:home_context]=='authors') ? 'class="selected"' : '' %>
|
4
|
+
<a <%= display_class %> href="/catalog?home_context=authors">Authors</a>
|
5
|
+
</li>
|
6
|
+
<li>
|
7
|
+
<% display_class = params[:home_context]=='journals' ? 'class="selected"' : '' %>
|
8
|
+
<a <%= display_class %> href="/catalog?home_context=journals">Journals</a>
|
9
|
+
</li>
|
10
|
+
</ul>
|
File without changes
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<%-
|
2
|
+
doc_title = (document_show_html_title.nil? || document_show_html_title.empty?) ? @document[:id] : document_show_html_title.first
|
3
|
+
@page_title = "#{doc_title} - #{application_name}"
|
4
|
+
-%>
|
5
|
+
<div id="showHead">
|
6
|
+
<div id="showUtils">
|
7
|
+
<div class="tools"><%= render :partial => 'show_tools' %></div>
|
8
|
+
<span class="back_to_cat"><%= link_back_to_catalog( :label=>'← Return to search results'.html_safe) %></span>
|
9
|
+
<% if @previous_document || @next_document %>
|
10
|
+
<div id="previousNextDocument">
|
11
|
+
<span class="previous"><%= link_to_previous_document(@previous_document) %></span>
|
12
|
+
<% end %>
|
13
|
+
<%- if session[:search][:counter].to_i > 0 -%>
|
14
|
+
<%= session[:search][:counter].to_i %> of <%= format_num(session[:search][:total]) %>
|
15
|
+
<%- end -%>
|
16
|
+
<% if @previous_document || @next_document %>
|
17
|
+
<span class="next"><%= link_to_next_document(@next_document)%></span>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% if editor? && controller.action_name != "delete" %>
|
23
|
+
<span class="edit-browse">
|
24
|
+
<%= edit_and_browse_links.html_safe %>
|
25
|
+
</span>
|
26
|
+
<% end -%>
|
27
|
+
<div id="document" class="<%= controller.action_name == "edit" ? "document_edit" : "document_show" %>">
|
28
|
+
<div id="<%= format_pid(@document[:id]) %>">
|
29
|
+
<h1><%= render_document_heading.html_safe %></h1>
|
30
|
+
<div class="document">
|
31
|
+
<%= render_document_partial @document, params["action"] %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
|
36
|
+
|
37
|
+
<%#= render :partial=>'solr_request' %>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="lightboxContent" id="citation" style="display:none;">
|
41
|
+
<%= render :partial => 'citation' %>
|
42
|
+
</div>
|
43
|
+
<div class="lightboxContent" id="email" style="display:none;">
|
44
|
+
<%= render :partial => 'email_form' %>
|
45
|
+
</div>
|
46
|
+
<div class="lightboxContent" id="sms" style="display:none;">
|
47
|
+
<%= render :partial => 'sms_form' %>
|
48
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%# This partial needs work -- needs to be progressively enhanceable AND work with JQuery UI Split Button #%>
|
2
|
+
<div id="add-contributor-box">
|
3
|
+
<input id="re-run-add-contributor-action" type="button" value="Add a researcher" style="display:none"/>
|
4
|
+
<button id="select-contributor-type" type="button" style="display:none">Select type of contributor to add</button>
|
5
|
+
<ul id="add-contributor-menu">
|
6
|
+
<li id="add_person"><%= link_to "Add a Person", new_asset_contributor_path(:asset_id=>params[:id], :contributor_type=>"person") %></li>
|
7
|
+
<li id="add_organization"><%= link_to "Add an Organization", new_asset_contributor_path(:asset_id=>params[:id], :contributor_type=>"organization") %></li>
|
8
|
+
<li id="add_conference"><%= link_to "Add a Conference", new_asset_contributor_path(:asset_id=>params[:id], :contributor_type=>"conference") %></li>
|
9
|
+
</ul>
|
10
|
+
</div>
|
@@ -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:").html_safe %>
|
14
|
+
<%= fedora_select(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :role, :text], :choices=>choices.values.sort).html_safe %>
|
15
|
+
</dt>
|
16
|
+
<dd class="organization">
|
17
|
+
<ul>
|
18
|
+
<li>
|
19
|
+
<%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :namePart], "Conference:").html_safe %>
|
20
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart], :multiple=>false).html_safe %>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
<% if params[:action] == "edit" && !conference_name.empty? %>
|
24
|
+
<%= field_selectors_for("descMetadata", [{:person=>conference_counter}]).html_safe %>
|
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
|
+
|
11
|
+
<dl class="organization contributor" id="<%= base_id %>">
|
12
|
+
<dd class="multi_inline organization">
|
13
|
+
<ul>
|
14
|
+
<li>
|
15
|
+
<%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :role, :text], "Organization's Role:").html_safe %>
|
16
|
+
<%= fedora_select(@document_fedora,"descMetadata", [{:organization => organization_counter}, :role, :text], :choices=>choices.values.sort).html_safe %>
|
17
|
+
</li>
|
18
|
+
<li>
|
19
|
+
<%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :namePart], "Organization").html_safe %>
|
20
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart], :multiple=>false).html_safe %>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
<% if (params[:action] == "edit" && !organization_name.empty?) %>
|
24
|
+
<%= field_selectors_for("descMetadata", [{:person=>organization_counter}]).html_safe %>
|
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
|
+
|
@@ -0,0 +1,42 @@
|
|
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
|
+
<dl class="person contributor" id="<%= base_id %>">
|
11
|
+
<dd class="multi_inline person">
|
12
|
+
<ul>
|
13
|
+
<%- if @document_fedora.datastreams["descMetadata"].class.terminology.has_term?(:person, :computing_id) %>
|
14
|
+
<li class="computing_id">
|
15
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :first_name], "Computing ID").html_safe %>
|
16
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :computing_id], :multiple=>false).html_safe %>
|
17
|
+
</li>
|
18
|
+
<%- end %>
|
19
|
+
<li class="name_first">
|
20
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :first_name], "First Name").html_safe %>
|
21
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :first_name], :multiple=>false).html_safe %>
|
22
|
+
</li>
|
23
|
+
<li class="name_last">
|
24
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :last_name], "Last Name").html_safe %>
|
25
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :last_name], :multiple=>false).html_safe %>
|
26
|
+
</li>
|
27
|
+
<li class="department">
|
28
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :description], "Department").html_safe %>
|
29
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :description], :multiple=>false).html_safe %>
|
30
|
+
</li>
|
31
|
+
<li class="affiliation">
|
32
|
+
<%= fedora_field_label("descMetadata", [{:person=>person_counter}, :institution], "Institution").html_safe %>
|
33
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:person=>person_counter}, :institution], :multiple=>false).html_safe %>
|
34
|
+
</li>
|
35
|
+
|
36
|
+
<% if ( (person_counter > 0) && (params[:action] == "edit" || params[:action] == "create") && !person_name.strip.empty? ) %>
|
37
|
+
<%= field_selectors_for("descMetadata", [{:person=>person_counter}]).html_safe %>
|
38
|
+
<a class="destructive destroy_contributor" href="<%= asset_contributor_path(@document_fedora.pid, "person", person_counter) %>" title="Delete '<%= person_name %>'"> Delete</a>
|
39
|
+
<% end %>
|
40
|
+
</ul>
|
41
|
+
</dd>
|
42
|
+
</dl>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%= render :partial=>"contributors/edit_person", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:person) %>
|
2
|
+
<%= link_to "Add a Person", new_asset_contributor_path(:asset_id=>params[:id], :contributor_type=>"person") %>
|
3
|
+
|
4
|
+
<%= render :partial=>"contributors/edit_organization", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:organization) %>
|
5
|
+
|
6
|
+
<%= link_to "Add an Organization", new_asset_contributor_path(:asset_id=>params[:id], :contributor_type=>"organization") %>
|
7
|
+
|
8
|
+
<%= render :partial=>"contributors/edit_conference", :collection=>@document_fedora.datastreams_in_memory["descMetadata"].find_by_terms(:organization) %>
|
9
|
+
|
10
|
+
<%= link_to "Add a Conference", new_asset_contributor_path(:asset_id=>params[:id], :contributor_type=>"conference") %>
|
11
|
+
|
12
|
+
<%#= render :partial => "contributors/add_contributor_split_button" %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<form id="new_contributor" action="<%=url_for(:action=>"create", :controller=>"contributors", :asset_id=>params[:asset_id]) %>" method="post">
|
2
|
+
<input class="content_type" type="hidden" name="content_type" value="generic_content" />
|
3
|
+
<label for="contributor_type">Contributor Type</label>
|
4
|
+
<select id="contributor_type" name="contributor_type">
|
5
|
+
<option value="person">Add a Person</option>
|
6
|
+
<option value="organization">Add an Organization</option>
|
7
|
+
<option value="conference">Add a Conference</option>
|
8
|
+
</select>
|
9
|
+
<input type="submit" value="Add Contributor" />
|
10
|
+
</form>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<% conference = show_conference %>
|
2
|
+
<% conference_counter = show_conference_counter %>
|
3
|
+
<% conference_name = get_values_from_datastream(@document_fedora,'descMetadata', [{:conference=>conference_counter}, :namePart]).first %>
|
4
|
+
<% base_id = "conference_#{conference_counter}" %>
|
5
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart]).first.empty? %>
|
6
|
+
<li>
|
7
|
+
<dl class="conference contributor" id="<%= base_id %>">
|
8
|
+
<dt>
|
9
|
+
<%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :role, :text], "Conference's Role:").html_safe %>
|
10
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :role, :text]) %>
|
11
|
+
</dt>
|
12
|
+
<dd class="organization">
|
13
|
+
<ul>
|
14
|
+
<li>
|
15
|
+
<%= fedora_field_label("descMetadata", [{:conference=>conference_counter}, :namePart], "Conference:").html_safe %>
|
16
|
+
<%= get_values_from_datastream(@document_fedora,"descMetadata", [{:conference=>conference_counter}, :namePart]) %>
|
17
|
+
</li>
|
18
|
+
</ul>
|
19
|
+
</dd>
|
20
|
+
</dl>
|
21
|
+
</li>
|
22
|
+
<% end %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<% organization = show_organization %>
|
2
|
+
<% organization_counter = show_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
|
+
<% unless get_values_from_datastream(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart]).first.empty? %>
|
11
|
+
<dl class="organization contributor" id="<%= base_id %>">
|
12
|
+
<dd class="multi_inline organization">
|
13
|
+
<ul>
|
14
|
+
<li>
|
15
|
+
<%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :role, :text], "Organization's Role:").html_safe %>
|
16
|
+
<%= fedora_select(@document_fedora,"descMetadata", [{:organization => organization_counter}, :role, :text], :choices=>choices.values.sort).html_safe %>
|
17
|
+
</li>
|
18
|
+
<li>
|
19
|
+
<%= fedora_field_label("descMetadata", [{:organization => organization_counter}, :namePart], "Organization").html_safe %>
|
20
|
+
<%= fedora_text_field(@document_fedora,"descMetadata", [{:organization => organization_counter}, :namePart], :multiple=>false).html_safe %>
|
21
|
+
</li>
|
22
|
+
</ul>
|
23
|
+
<% if (params[:action] == "edit" && !organization_name.empty?) %>
|
24
|
+
<%= field_selectors_for("descMetadata", [{:person=>organization_counter}]).html_safe %>
|
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
|
+
<% end %>
|