curation_concerns 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +2 -0
- data/.travis.yml +18 -0
- data/Gemfile +31 -0
- data/LICENSE.txt +15 -0
- data/README.md +46 -0
- data/RELEASING.md +2 -0
- data/Rakefile +26 -0
- data/VERSION +1 -0
- data/app/assets/images/default.png +0 -0
- data/app/assets/images/nope.png +0 -0
- data/app/assets/javascripts/.gitkeep +0 -0
- data/app/assets/javascripts/curation_concerns/.gitkeep +0 -0
- data/app/assets/javascripts/curation_concerns/application.js +18 -0
- data/app/assets/javascripts/curation_concerns/browse_everything_implement.js +7 -0
- data/app/assets/javascripts/curation_concerns/curation_concerns.js +28 -0
- data/app/assets/javascripts/curation_concerns/embargoes.js +17 -0
- data/app/assets/javascripts/curation_concerns/facet_mine.js +22 -0
- data/app/assets/javascripts/curation_concerns/help_modal.js +36 -0
- data/app/assets/javascripts/curation_concerns/link_groups.js.coffee +123 -0
- data/app/assets/javascripts/curation_concerns/link_users.js.coffee +126 -0
- data/app/assets/javascripts/curation_concerns/proxy_rights.js.coffee +95 -0
- data/app/assets/javascripts/curation_concerns/proxy_submission.js +23 -0
- data/app/assets/javascripts/curation_concerns/select_works.js.coffee +20 -0
- data/app/assets/javascripts/modernizr.js +3 -0
- data/app/assets/stylesheets/curation_concerns/_curation_concerns.scss +9 -0
- data/app/assets/stylesheets/curation_concerns/_global-variables.scss +5 -0
- data/app/assets/stylesheets/curation_concerns/_modules.scss +13 -0
- data/app/assets/stylesheets/curation_concerns/_positioning.scss +138 -0
- data/app/assets/stylesheets/curation_concerns/_theme.scss +46 -0
- data/app/assets/stylesheets/curation_concerns/_typography.scss +137 -0
- data/app/assets/stylesheets/curation_concerns/_variables_bootstrap.scss +7 -0
- data/app/assets/stylesheets/curation_concerns/downloads.scss +3 -0
- data/app/assets/stylesheets/curation_concerns/help_requests.scss +3 -0
- data/app/assets/stylesheets/curation_concerns/modules/accessibility.scss +50 -0
- data/app/assets/stylesheets/curation_concerns/modules/accordion.scss +33 -0
- data/app/assets/stylesheets/curation_concerns/modules/attributes.scss +31 -0
- data/app/assets/stylesheets/curation_concerns/modules/classify_work.scss +100 -0
- data/app/assets/stylesheets/curation_concerns/modules/embargoes.scss +15 -0
- data/app/assets/stylesheets/curation_concerns/modules/emphatic_action_area.scss +14 -0
- data/app/assets/stylesheets/curation_concerns/modules/forms.scss +116 -0
- data/app/assets/stylesheets/curation_concerns/modules/multi_value_fields.scss +52 -0
- data/app/assets/stylesheets/curation_concerns/modules/pagination.scss +4 -0
- data/app/assets/stylesheets/curation_concerns/modules/search_results.scss +55 -0
- data/app/assets/stylesheets/curation_concerns/modules/site_actions.scss +53 -0
- data/app/assets/stylesheets/curation_concerns/modules/site_search.scss +46 -0
- data/app/controllers/catalog_controller.rb +3 -0
- data/app/controllers/collections_controller.rb +3 -0
- data/app/controllers/concerns/curation_concerns/application_controller_behavior.rb +28 -0
- data/app/controllers/concerns/curation_concerns/catalog_controller.rb +321 -0
- data/app/controllers/concerns/curation_concerns/collections_controller_behavior.rb +76 -0
- data/app/controllers/concerns/curation_concerns/curation_concern_controller.rb +125 -0
- data/app/controllers/concerns/curation_concerns/download_behavior.rb +60 -0
- data/app/controllers/concerns/curation_concerns/embargoes_controller_behavior.rb +44 -0
- data/app/controllers/concerns/curation_concerns/generic_files_controller_behavior.rb +149 -0
- data/app/controllers/concerns/curation_concerns/leases_controller_behavior.rb +36 -0
- data/app/controllers/concerns/curation_concerns/manages_embargoes.rb +26 -0
- data/app/controllers/concerns/curation_concerns/parent_container.rb +33 -0
- data/app/controllers/concerns/curation_concerns/themed_layout_controller.rb +31 -0
- data/app/controllers/concerns/curation_concerns/without_namespace.rb +15 -0
- data/app/controllers/curation_concerns/application_controller.rb +7 -0
- data/app/controllers/curation_concerns/classify_concerns_controller.rb +35 -0
- data/app/controllers/curation_concerns/generic_files_controller.rb +13 -0
- data/app/controllers/curation_concerns/permissions_controller.rb +19 -0
- data/app/controllers/downloads_controller.rb +4 -0
- data/app/controllers/embargoes_controller.rb +5 -0
- data/app/controllers/leases_controller.rb +5 -0
- data/app/controllers/registrations_controller.rb +20 -0
- data/app/controllers/sessions_controller.rb +4 -0
- data/app/datastreams/curation_concerns/generic_work_rdf_properties.rb +57 -0
- data/app/datastreams/generic_work_metadata.rb +3 -0
- data/app/forms/curation_concerns/forms/collection_edit_form.rb +17 -0
- data/app/forms/curation_concerns/forms/generic_file_edit_form.rb +15 -0
- data/app/forms/curation_concerns/forms/generic_work_edit_form.rb +9 -0
- data/app/helpers/curation_concerns/ability_helper.rb +46 -0
- data/app/helpers/curation_concerns/attribute_helper.rb +67 -0
- data/app/helpers/curation_concerns/catalog_helper.rb +38 -0
- data/app/helpers/curation_concerns/collections_helper.rb +63 -0
- data/app/helpers/curation_concerns/embargo_helper.rb +17 -0
- data/app/helpers/curation_concerns/generic_file_helper.rb +19 -0
- data/app/helpers/curation_concerns/lease_helper.rb +18 -0
- data/app/helpers/curation_concerns/main_app_helpers.rb +13 -0
- data/app/helpers/curation_concerns/render_constraints_helper.rb +42 -0
- data/app/helpers/curation_concerns/search_paths_helper.rb +13 -0
- data/app/helpers/curation_concerns/thumbnail_helper.rb +11 -0
- data/app/helpers/curation_concerns/title_helper.rb +23 -0
- data/app/helpers/curation_concerns/url_helper.rb +29 -0
- data/app/presenters/curation_concerns/collection_presenter.rb +40 -0
- data/app/presenters/curation_concerns/generic_file_presenter.rb +14 -0
- data/app/presenters/curation_concerns/generic_work_presenter.rb +13 -0
- data/app/search_builders/curation_concerns/search_builder.rb +49 -0
- data/app/services/curation_concerns/curation_concern.rb +14 -0
- data/app/services/curation_concerns/embargo_service.rb +26 -0
- data/app/services/curation_concerns/lease_service.rb +23 -0
- data/app/views/catalog/_action_menu_partials/_collection.html.erb +27 -0
- data/app/views/catalog/_action_menu_partials/_default.html.erb +27 -0
- data/app/views/catalog/_document.html.erb +3 -0
- data/app/views/catalog/_document_list.html.erb +5 -0
- data/app/views/catalog/_home_text.html.erb +8 -0
- data/app/views/catalog/_index_default.html.erb +17 -0
- data/app/views/catalog/_index_header_list_default.html.erb +8 -0
- data/app/views/catalog/_navbar.html.erb +12 -0
- data/app/views/catalog/_show_partials/_default.html.erb +22 -0
- data/app/views/catalog/_show_partials/_default_details.html.erb +15 -0
- data/app/views/catalog/_show_partials/_facets.html.erb +52 -0
- data/app/views/catalog/index.html.erb +47 -0
- data/app/views/collections/_add_to_collection_modal.html.erb +15 -0
- data/app/views/collections/_batch_edits_actions.html.erb +3 -0
- data/app/views/collections/_button_for_creating_empty_collection.html.erb +3 -0
- data/app/views/collections/_collection.html.erb +1 -0
- data/app/views/collections/_dashboard_document_list.html.erb +6 -0
- data/app/views/collections/_document_list.html.erb +7 -0
- data/app/views/collections/_edit_actions.html.erb +5 -0
- data/app/views/collections/_edit_descriptions.html.erb +20 -0
- data/app/views/collections/_form.html.erb +26 -0
- data/app/views/collections/_form_additional_information.html.erb +6 -0
- data/app/views/collections/_form_for_select_collection.html.erb +34 -0
- data/app/views/collections/_form_permission.html.erb +36 -0
- data/app/views/collections/_form_representative_image.html.erb +13 -0
- data/app/views/collections/_form_required_information.html.erb +11 -0
- data/app/views/collections/_form_to_add_member.html.erb +21 -0
- data/app/views/collections/_identifier_and_action.html.erb +15 -0
- data/app/views/collections/_media_display.html.erb +1 -0
- data/app/views/collections/_paginate.html.erb +6 -0
- data/app/views/collections/_search_collection_dashboard_form.html.erb +10 -0
- data/app/views/collections/_show_actions.html.erb +8 -0
- data/app/views/collections/_show_descriptions.html.erb +10 -0
- data/app/views/collections/_show_fields.html.erb +0 -0
- data/app/views/collections/_single_item_action_fields.html.erb +6 -0
- data/app/views/collections/_sort_and_per_page.html.erb +29 -0
- data/app/views/collections/_view_type_group.html.erb +13 -0
- data/app/views/collections/edit.html.erb +17 -0
- data/app/views/collections/show.html.erb +24 -0
- data/app/views/curation_concerns/base/_attributes.html.erb +25 -0
- data/app/views/curation_concerns/base/_collections.html.erb +26 -0
- data/app/views/curation_concerns/base/_form.html.erb +25 -0
- data/app/views/curation_concerns/base/_form_additional_information.html.erb +7 -0
- data/app/views/curation_concerns/base/_form_content_license.html.erb +16 -0
- data/app/views/curation_concerns/base/_form_descriptive_fields.erb +11 -0
- data/app/views/curation_concerns/base/_form_editors.html.erb +15 -0
- data/app/views/curation_concerns/base/_form_files_and_links.html.erb +23 -0
- data/app/views/curation_concerns/base/_form_permission.html.erb +52 -0
- data/app/views/curation_concerns/base/_form_permission_embargo.html.erb +6 -0
- data/app/views/curation_concerns/base/_form_permission_lease.html.erb +6 -0
- data/app/views/curation_concerns/base/_form_permission_under_embargo.html.erb +16 -0
- data/app/views/curation_concerns/base/_form_permission_under_lease.html.erb +18 -0
- data/app/views/curation_concerns/base/_form_representative_image.html.erb +13 -0
- data/app/views/curation_concerns/base/_form_required_information.html.erb +11 -0
- data/app/views/curation_concerns/base/_form_supplementary_fields.html.erb +15 -0
- data/app/views/curation_concerns/base/_legally_binding_text.html.erb +33 -0
- data/app/views/curation_concerns/base/_related_files.html.erb +24 -0
- data/app/views/curation_concerns/base/_representative_media.html.erb +8 -0
- data/app/views/curation_concerns/base/edit.html.erb +13 -0
- data/app/views/curation_concerns/base/new.html.erb +12 -0
- data/app/views/curation_concerns/base/show.html.erb +21 -0
- data/app/views/curation_concerns/base/unauthorized.html.erb +3 -0
- data/app/views/curation_concerns/classify_concerns/new.html.erb +25 -0
- data/app/views/curation_concerns/collections/_form_additional_information.html.erb +6 -0
- data/app/views/curation_concerns/generic_files/_actions.html.erb +16 -0
- data/app/views/curation_concerns/generic_files/_form.html.erb +35 -0
- data/app/views/curation_concerns/generic_files/_generic_file.html.erb +12 -0
- data/app/views/curation_concerns/generic_files/_media_display.html.erb +19 -0
- data/app/views/curation_concerns/generic_files/edit.html.erb +5 -0
- data/app/views/curation_concerns/generic_files/jq_upload.json.jbuilder +8 -0
- data/app/views/curation_concerns/generic_files/show.html.erb +15 -0
- data/app/views/curation_concerns/permissions/confirm.html.erb +21 -0
- data/app/views/embargoes/_embargo_history.html.erb +7 -0
- data/app/views/embargoes/_list_active_embargoes.html.erb +16 -0
- data/app/views/embargoes/_list_deactivated_embargoes.html.erb +10 -0
- data/app/views/embargoes/_list_expired_active_embargoes.html.erb +44 -0
- data/app/views/embargoes/edit.html.erb +43 -0
- data/app/views/embargoes/index.html.erb +18 -0
- data/app/views/layouts/boilerplate.html.erb +22 -0
- data/app/views/layouts/curation_concerns/1_column.html.erb +11 -0
- data/app/views/layouts/curation_concerns/catalog.html.erb +37 -0
- data/app/views/layouts/curation_concerns.html.erb +22 -0
- data/app/views/leases/_lease_history.html.erb +7 -0
- data/app/views/leases/_list_active_leases.html.erb +16 -0
- data/app/views/leases/_list_deactivated_leases.html.erb +4 -0
- data/app/views/leases/_list_expired_active_leases.html.erb +38 -0
- data/app/views/leases/edit.html.erb +43 -0
- data/app/views/leases/index.html.erb +18 -0
- data/app/views/shared/_add_content.html.erb +32 -0
- data/app/views/shared/_brand_bar.html.erb +10 -0
- data/app/views/shared/_flash_message.html.erb +17 -0
- data/app/views/shared/_footer.html.erb +10 -0
- data/app/views/shared/_ga.html.erb +6 -0
- data/app/views/shared/_header.html.erb +12 -0
- data/app/views/shared/_my_actions.html.erb +21 -0
- data/app/views/shared/_site_actions.html.erb +7 -0
- data/app/views/shared/_site_search.html.erb +12 -0
- data/app/views/shared/_title_bar.html.erb +16 -0
- data/app/workers/visibility_copy_worker.rb +30 -0
- data/config/initializers/simple_form.rb +31 -0
- data/config/locales/curation_concerns.en.yml +96 -0
- data/config/routes.rb +4 -0
- data/curation_concerns-models/.gitignore +17 -0
- data/curation_concerns-models/Gemfile +4 -0
- data/curation_concerns-models/LICENSE.md +177 -0
- data/curation_concerns-models/README.md +42 -0
- data/curation_concerns-models/Rakefile +1 -0
- data/curation_concerns-models/app/actors/concerns/curation_concerns/manages_embargoes_actor.rb +99 -0
- data/curation_concerns-models/app/actors/curation_concerns/base_actor.rb +90 -0
- data/curation_concerns-models/app/actors/curation_concerns/generic_file_actor.rb +150 -0
- data/curation_concerns-models/app/actors/curation_concerns/work_actor_behavior.rb +88 -0
- data/curation_concerns-models/app/jobs/active_fedora_id_based_job.rb +22 -0
- data/curation_concerns-models/app/jobs/active_fedora_pid_based_job.rb +6 -0
- data/curation_concerns-models/app/jobs/audit_job.rb +58 -0
- data/curation_concerns-models/app/jobs/characterize_job.rb +11 -0
- data/curation_concerns-models/app/jobs/copy_permissions_job.rb +24 -0
- data/curation_concerns-models/app/jobs/create_derivatives_job.rb +15 -0
- data/curation_concerns-models/app/jobs/import_url_job.rb +56 -0
- data/curation_concerns-models/app/jobs/ingest_local_file_job.rb +48 -0
- data/curation_concerns-models/app/jobs/resolrize_job.rb +9 -0
- data/curation_concerns-models/app/models/checksum_audit_log.rb +21 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/ability.rb +34 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/basic_metadata.rb +87 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/collection_behavior.rb +47 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/belongs_to_works.rb +53 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/characterization.rb +89 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/content.rb +8 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/export.rb +343 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/full_text_indexing.rb +12 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/indexing.rb +14 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file/versions.rb +16 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file.rb +5 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_file_behavior.rb +44 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/generic_work_behavior.rb +38 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/has_representative.rb +14 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/human_readable_type.rb +23 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/permissions/readable.rb +19 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/permissions/writable.rb +75 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/permissions.rb +7 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/serializers.rb +15 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/solr_document_behavior.rb +135 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/user.rb +65 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/with_basic_metadata.rb +98 -0
- data/curation_concerns-models/app/models/concerns/curation_concerns/with_generic_files.rb +29 -0
- data/curation_concerns-models/app/models/curation_concerns/classify_concern.rb +47 -0
- data/curation_concerns-models/app/models/curation_concerns/quick_classification_query.rb +31 -0
- data/curation_concerns-models/app/models/datastreams/fits_datastream.rb +148 -0
- data/curation_concerns-models/app/models/version_committer.rb +2 -0
- data/curation_concerns-models/app/services/curation_concerns/characterization_service.rb +71 -0
- data/curation_concerns-models/app/services/curation_concerns/full_text_extraction_service.rb +38 -0
- data/curation_concerns-models/app/services/curation_concerns/generic_file_audit_service.rb +85 -0
- data/curation_concerns-models/app/services/curation_concerns/generic_file_indexing_service.rb +14 -0
- data/curation_concerns-models/app/services/curation_concerns/generic_work_indexing_service.rb +16 -0
- data/curation_concerns-models/app/services/curation_concerns/noid.rb +23 -0
- data/curation_concerns-models/app/services/curation_concerns/repository_audit_service.rb +9 -0
- data/curation_concerns-models/app/services/curation_concerns/versioning_service.rb +27 -0
- data/curation_concerns-models/config/locales/curation_concerns.en.yml +6 -0
- data/curation_concerns-models/curation_concerns-models.gemspec +34 -0
- data/curation_concerns-models/lib/curation_concerns/messages.rb +66 -0
- data/curation_concerns-models/lib/curation_concerns/models/engine.rb +61 -0
- data/curation_concerns-models/lib/curation_concerns/models/resque.rb +36 -0
- data/curation_concerns-models/lib/curation_concerns/models/utils.rb +22 -0
- data/curation_concerns-models/lib/curation_concerns/models/version.rb +5 -0
- data/curation_concerns-models/lib/curation_concerns/models.rb +32 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/abstract_migration_generator.rb +30 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/clamav_generator.rb +19 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/fulltext_generator.rb +28 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/install_generator.rb +70 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/app/models/collection.rb +4 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/app/models/generic_file.rb +4 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/clamav.rb +1 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/curation_concerns.rb +123 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/mime_types.rb +6 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/redis.yml +9 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/redis_config.rb +32 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/resque-pool.yml +1 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/resque_admin.rb +10 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/config/resque_config.rb +5 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/migrations/create_checksum_audit_logs.rb +19 -0
- data/curation_concerns-models/lib/generators/curation_concerns/models/templates/migrations/create_version_committers.rb +15 -0
- data/curation_concerns-models/lib/tasks/curation_concerns-models_tasks.rake +75 -0
- data/curation_concerns-models/lib/tasks/migrate.rake +13 -0
- data/curation_concerns-models/lib/tasks/resque.rake +13 -0
- data/curation_concerns-models/lib/tasks/solr_reindex.rake +8 -0
- data/curation_concerns.gemspec +46 -0
- data/lib/curation_concerns/configuration.rb +74 -0
- data/lib/curation_concerns/controller_resource.rb +10 -0
- data/lib/curation_concerns/engine.rb +20 -0
- data/lib/curation_concerns/rails/routes.rb +76 -0
- data/lib/curation_concerns/spec_support.rb +10 -0
- data/lib/curation_concerns/version.rb +3 -0
- data/lib/curation_concerns.rb +8 -0
- data/lib/generators/curation_concerns/install_generator.rb +103 -0
- data/lib/generators/curation_concerns/templates/curation_concerns.css.scss +3 -0
- data/lib/generators/curation_concerns/templates/curation_concerns.js +1 -0
- data/lib/generators/curation_concerns/templates/curation_concerns_config.rb +2 -0
- data/lib/generators/curation_concerns/templates/curation_concerns_helper.rb +4 -0
- data/lib/generators/curation_concerns/work/USAGE +19 -0
- data/lib/generators/curation_concerns/work/templates/README +13 -0
- data/lib/generators/curation_concerns/work/templates/actor.rb.erb +7 -0
- data/lib/generators/curation_concerns/work/templates/actor_spec.rb.erb +9 -0
- data/lib/generators/curation_concerns/work/templates/controller.rb.erb +7 -0
- data/lib/generators/curation_concerns/work/templates/controller_spec.rb.erb +9 -0
- data/lib/generators/curation_concerns/work/templates/model.rb.erb +7 -0
- data/lib/generators/curation_concerns/work/templates/model_spec.rb.erb +9 -0
- data/lib/generators/curation_concerns/work/work_generator.rb +78 -0
- data/solr_conf/conf/solrconfig.xml +223 -0
- data/spec/abilities/collection_abilities_spec.rb +48 -0
- data/spec/abilities/generic_file_abilities_spec.rb +62 -0
- data/spec/abilities/generic_work_abilities_spec.rb +58 -0
- data/spec/actors/curation_concerns/generic_file_actor_spec.rb +116 -0
- data/spec/actors/curation_concerns/manages_embargoes_actor_spec.rb +95 -0
- data/spec/actors/curation_concerns/work_actor_spec.rb +203 -0
- data/spec/controllers/catalog_controller_spec.rb +115 -0
- data/spec/controllers/curation_concerns/classify_concerns_controller_spec.rb +43 -0
- data/spec/controllers/curation_concerns/collections_controller_spec.rb +171 -0
- data/spec/controllers/curation_concerns/generic_files_controller_spec.rb +251 -0
- data/spec/controllers/curation_concerns/generic_works_controller_spec.rb +167 -0
- data/spec/controllers/curation_concerns/permissions_controller_spec.rb +29 -0
- data/spec/controllers/downloads_controller_spec.rb +51 -0
- data/spec/controllers/embargoes_controller_spec.rb +114 -0
- data/spec/controllers/leases_controller_spec.rb +94 -0
- data/spec/factories/collections.rb +15 -0
- data/spec/factories/create_curation_concern.rb +3 -0
- data/spec/factories/generic_files.rb +31 -0
- data/spec/factories/generic_works.rb +54 -0
- data/spec/factories/users.rb +28 -0
- data/spec/features/add_file_spec.rb +30 -0
- data/spec/features/collection_spec.rb +222 -0
- data/spec/features/create_work_spec.rb +43 -0
- data/spec/features/embargo_spec.rb +51 -0
- data/spec/features/lease_spec.rb +49 -0
- data/spec/features/update_file_spec.rb +32 -0
- data/spec/features/work_generator_spec.rb +58 -0
- data/spec/fixtures/Example.ogg +0 -0
- data/spec/fixtures/charter.docx +0 -0
- data/spec/fixtures/countdown.avi +0 -0
- data/spec/fixtures/curation_concerns_generic_stub.txt +1 -0
- data/spec/fixtures/files/image.png +0 -0
- data/spec/fixtures/image.jp2 +0 -0
- data/spec/fixtures/image.jpg +0 -0
- data/spec/fixtures/piano_note.wav +0 -0
- data/spec/fixtures/sample_mpeg4.mp4 +0 -0
- data/spec/fixtures/small_file.txt +1 -0
- data/spec/fixtures/spoken-text.m4a +0 -0
- data/spec/fixtures/test4.pdf +0 -0
- data/spec/fixtures/test5.mp3 +0 -0
- data/spec/fixtures/world.png +0 -0
- data/spec/forms/collection_edit_form_spec.rb +20 -0
- data/spec/forms/generic_file_edit_form_spec.rb +33 -0
- data/spec/helpers/catalog_helper_spec.rb +58 -0
- data/spec/helpers/configuration_helper_spec.rb +13 -0
- data/spec/helpers/curation_concerns/.keep +0 -0
- data/spec/helpers/curation_concerns/collections_helper_spec.rb +49 -0
- data/spec/helpers/render_constraints_helper_spec.rb +19 -0
- data/spec/helpers/thumbnail_helper_spec.rb +21 -0
- data/spec/helpers/url_helper_spec.rb +22 -0
- data/spec/jobs/active_fedora_id_based_job_spec.rb +14 -0
- data/spec/jobs/audit_job_spec.rb +53 -0
- data/spec/jobs/characterize_job_spec.rb +23 -0
- data/spec/jobs/copy_permissions_job_spec.rb +49 -0
- data/spec/jobs/create_derivatives_job_spec.rb +23 -0
- data/spec/jobs/curation_concerns_resque_queue_spec.rb +49 -0
- data/spec/jobs/import_url_job_spec.rb +45 -0
- data/spec/jobs/ingest_local_file_job_spec.rb +25 -0
- data/spec/lib/curation_concerns/messages_spec.rb +70 -0
- data/spec/lib/curation_concerns/readable_permissions_spec.rb +56 -0
- data/spec/lib/curation_concerns/writable_permissions_spec.rb +16 -0
- data/spec/matchers/metadata_field_matchers.rb +28 -0
- data/spec/matchers/response_matchers.rb +7 -0
- data/spec/matchers.rb +24 -0
- data/spec/models/checksum_audit_log_spec.rb +66 -0
- data/spec/models/curation_concerns/collection_behavior_spec.rb +107 -0
- data/spec/models/curation_concerns/generic_file/derivatives_spec.rb +88 -0
- data/spec/models/curation_concerns/generic_work_behavior_spec.rb +35 -0
- data/spec/models/fits_datastream_spec.rb +127 -0
- data/spec/models/generic_file_spec.rb +619 -0
- data/spec/models/generic_work_spec.rb +43 -0
- data/spec/models/user_spec.rb +23 -0
- data/spec/presenters/curation_concerns/collection_presenter_spec.rb +34 -0
- data/spec/presenters/curation_concerns/generic_file_presenter_spec.rb +16 -0
- data/spec/routing/curation_concerns/routes_spec.rb +36 -0
- data/spec/routing/route_spec.rb +86 -0
- data/spec/services/characterization_service_spec.rb +30 -0
- data/spec/services/embargo_service_spec.rb +38 -0
- data/spec/services/full_text_extraction_service_spec.rb +5 -0
- data/spec/services/generic_file_audit_service_spec.rb +71 -0
- data/spec/services/generic_file_indexing_service_spec.rb +57 -0
- data/spec/services/generic_work_indexing_service_spec.rb +18 -0
- data/spec/services/lease_service_spec.rb +53 -0
- data/spec/services/repository_audit_service_spec.rb +18 -0
- data/spec/services/versioning_service_spec.rb +32 -0
- data/spec/spec_helper.rb +94 -0
- data/spec/support/controllers/engine_helpers.rb +7 -0
- data/spec/support/curation_concerns/factory_helpers.rb +14 -0
- data/spec/support/features/fixture_file_upload.rb +14 -0
- data/spec/support/features/session_helpers.rb +41 -0
- data/spec/support/features.rb +19 -0
- data/spec/support/shared/shared_examples_has_dc_metadata.rb +17 -0
- data/spec/support/shared/shared_examples_is_embargoable.rb +8 -0
- data/spec/support/shared/shared_examples_with_access_rights.rb +63 -0
- data/spec/tasks/rake_spec.rb +24 -0
- data/spec/test_app_templates/Gemfile.extra +1 -0
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +55 -0
- data/spec/views/catalog/index.html.erb_spec.rb +59 -0
- data/spec/views/curation_concerns/base/_attributes.html.erb_spec.rb +25 -0
- data/spec/views/curation_concerns/base/show.html.erb_spec.rb +29 -0
- data/spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb +33 -0
- data/spec/views/shared/_add_content.html.erb_spec.rb +42 -0
- data/spec/views/shared/_my_actions.html.erb_spec.rb +23 -0
- data/spec/workers/visibility_copy_worker_spec.rb +70 -0
- data/tasks/jetty.rake +15 -0
- data/tasks/release.rake +93 -0
- data/vendor/assets/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/vendor/assets/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/vendor/assets/javascripts/handlebars.js +2278 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.autocomplete.js +602 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.core.js +356 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.effect-highlight.js +50 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.effect.js +1276 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.menu.js +610 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.position.js +498 -0
- data/vendor/assets/javascripts/jquery-ui-1.9.2/jquery.ui.widget.js +528 -0
- data/vendor/assets/javascripts/jquery.tokeninput.js +1061 -0
- data/vendor/assets/stylesheets/jquery-ui-lightness.css +474 -0
- data/vendor/assets/stylesheets/token-input-facebook.css +122 -0
- data/vendor/assets/stylesheets/token-input-mac.css +204 -0
- data/vendor/assets/stylesheets/token-input.css +127 -0
- metadata +888 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
class CurationConcerns::SearchBuilder < Hydra::SearchBuilder
|
2
|
+
include BlacklightAdvancedSearch::AdvancedSearchBuilder
|
3
|
+
include Hydra::Collections::SearchBehaviors
|
4
|
+
|
5
|
+
def only_generic_files_and_curation_concerns(solr_parameters)
|
6
|
+
solr_parameters[:fq] ||= []
|
7
|
+
types_to_include = CurationConcerns.configuration.registered_curation_concern_types.dup
|
8
|
+
types_to_include << "Collection"
|
9
|
+
formatted_type_names = types_to_include.map{|class_name| "\"#{class_name}\""}.join(" ")
|
10
|
+
|
11
|
+
solr_parameters[:fq] << "#{Solrizer.solr_name("has_model", :symbol)}:(#{formatted_type_names})"
|
12
|
+
|
13
|
+
# CurationConcerns.configuration.registered_curation_concern_types.each do |curation_concern_class_name|
|
14
|
+
# solr_parameters[:fq] << "#{Solrizer.solr_name("has_model", :symbol)}:(\"GenericFile\" \"Collection\")"
|
15
|
+
# end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Override Hydra::AccessControlsEnforcement (or Hydra::PolicyAwareAccessControlsEnforcement)
|
19
|
+
# Allows admin users to see everything (don't apply any gated_discovery_filters for those users)
|
20
|
+
def gated_discovery_filters(permission_types = discovery_permissions, ability = current_ability)
|
21
|
+
return [] if ability.current_user.groups.include? 'admin'
|
22
|
+
super
|
23
|
+
end
|
24
|
+
|
25
|
+
# show only files with edit permissions in lib/hydra/access_controls_enforcement.rb apply_gated_discovery
|
26
|
+
def discovery_permissions
|
27
|
+
return ["edit"] if blacklight_params[:works] == 'mine'
|
28
|
+
super
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# This is included as part of blacklight search solr params logic
|
33
|
+
def filter_models(solr_parameters)
|
34
|
+
solr_parameters[:fq] ||= []
|
35
|
+
solr_parameters[:fq] << '(' + (work_clauses + collection_clauses).join(' OR ') + ')'
|
36
|
+
end
|
37
|
+
|
38
|
+
def work_clauses
|
39
|
+
return [] if blacklight_params.has_key?(:f) && Array(blacklight_params[:f][:generic_type_sim]).include?('Collection')
|
40
|
+
CurationConcerns.configuration.registered_curation_concern_types.map(&:constantize).map do |klass|
|
41
|
+
ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: klass.to_class_uri)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def collection_clauses
|
46
|
+
return [] if blacklight_params.has_key?(:f) && Array(blacklight_params[:f][:generic_type_sim]).include?('Work')
|
47
|
+
[ActiveFedora::SolrQueryBuilder.construct_query_for_rel(has_model: ::Collection.to_class_uri)]
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module CurationConcerns
|
2
|
+
module CurationConcern
|
3
|
+
|
4
|
+
def self.actor(curation_concern, *args)
|
5
|
+
actor_identifier = curation_concern.class.to_s.split('::').last
|
6
|
+
klass = "CurationConcerns::#{actor_identifier}Actor".constantize
|
7
|
+
klass.new(curation_concern, *args)
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.attach_file_to_generic_file(generic_file, user, file_to_attach)
|
11
|
+
CurationConcerns::GenericFileActor.new(generic_file, user).create_content(file_to_attach)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module CurationConcerns
|
2
|
+
module EmbargoService
|
3
|
+
class << self
|
4
|
+
#
|
5
|
+
# Methods for Querying Repository to find Embargoed Objects
|
6
|
+
#
|
7
|
+
|
8
|
+
# Returns all assets with embargo release date set to a date in the past
|
9
|
+
def assets_with_expired_embargoes
|
10
|
+
ActiveFedora::Base.where('embargo_release_date_dtsi:[* TO NOW]')
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns all assets with embargo release date set
|
14
|
+
# (assumes that when lease visibility is applied to assets
|
15
|
+
# whose leases have expired, the lease expiration date will be removed from its metadata)
|
16
|
+
def assets_under_embargo
|
17
|
+
ActiveFedora::Base.where('embargo_release_date_dtsi:*')
|
18
|
+
end
|
19
|
+
|
20
|
+
# Returns all assets that have had embargoes deactivated in the past.
|
21
|
+
def assets_with_deactivated_embargoes
|
22
|
+
ActiveFedora::Base.where('embargo_history_ssim:*')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module CurationConcerns
|
2
|
+
module LeaseService
|
3
|
+
class << self
|
4
|
+
# Returns all assets with lease expiration date set to a date in the past
|
5
|
+
def assets_with_expired_leases
|
6
|
+
ActiveFedora::Base.where('lease_expiration_date_dtsi:[* TO NOW]')
|
7
|
+
end
|
8
|
+
|
9
|
+
# Returns all assets with lease expiration date set
|
10
|
+
# (assumes that when lease visibility is applied to assets
|
11
|
+
# whose leases have expired, the lease expiration date will be removed from its metadata)
|
12
|
+
def assets_under_lease
|
13
|
+
ActiveFedora::Base.where('lease_expiration_date_dtsi:*')
|
14
|
+
end
|
15
|
+
|
16
|
+
# Returns all assets that have had embargoes deactivated in the past.
|
17
|
+
def assets_with_deactivated_leases
|
18
|
+
ActiveFedora::Base.where('lease_history_ssim:*')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="btn-group">
|
2
|
+
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" href="#">Select an action <span class="caret"></span></button>
|
3
|
+
<ul class="dropdown-menu">
|
4
|
+
<% if can? :edit, document %>
|
5
|
+
<li>
|
6
|
+
<%= link_to [collections, :edit, document], class: 'itemicon itemedit' do %><i class="glyphicon glyphicon-pencil"></i> Edit <%= document.human_readable_type %>
|
7
|
+
<% end %>
|
8
|
+
</li>
|
9
|
+
<li>
|
10
|
+
<% if @collection # We're on the view page for @collection. -%>
|
11
|
+
<%= button_for_remove_from_collection(document) %>
|
12
|
+
<% else %>
|
13
|
+
<%= link_to [collections, document], class: 'itemicon itemtrash', title: 'Delete Collection', method: :delete, data: {
|
14
|
+
confirm: "Deleting a collection from #{t('sufia.product_name')} is permanent. Click OK to delete this collection from #{t('sufia.product_name')}, or Cancel to cancel this operation" } do %>
|
15
|
+
<i class="glyphicon glyphicon-trash"></i> Delete <%= document.human_readable_type %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
</li>
|
19
|
+
<% end %>
|
20
|
+
<% if can? :collect, document %>
|
21
|
+
<li>
|
22
|
+
<%= link_to_select_collection document %>
|
23
|
+
</li>
|
24
|
+
<% end %>
|
25
|
+
</ul>
|
26
|
+
<%= render 'collections/add_to_collection_modal', collectible: document if can? :collect, document %>
|
27
|
+
</div>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<div class="btn-group">
|
2
|
+
<button class="btn btn-default btn-small dropdown-toggle" data-toggle="dropdown" href="#">Select an action <span class="caret"></span></button>
|
3
|
+
<ul class="dropdown-menu">
|
4
|
+
<% if can? :edit, document %>
|
5
|
+
<li>
|
6
|
+
<%= link_to [:edit, :curation_concerns, document], class: 'itemicon itemedit' do %><i class="glyphicon glyphicon-pencil"></i> Edit <%= document.human_readable_type %>
|
7
|
+
<% end %>
|
8
|
+
</li>
|
9
|
+
<li>
|
10
|
+
<% if @collection # We're on the view page for @collection. -%>
|
11
|
+
<%= link_to_remove_from_collection(document) %>
|
12
|
+
<% else %>
|
13
|
+
<%= link_to [:curation_concerns, document], class: 'itemicon itemtrash', title: 'Delete Collection', method: :delete, data: {
|
14
|
+
confirm: "Deleting a collection from #{t('curation_concerns.product_name')} is permanent. Click OK to delete this collection from #{t('curation_concerns.product_name')}, or Cancel to cancel this operation" } do %>
|
15
|
+
<i class="glyphicon glyphicon-trash"></i> Delete <%= document.human_readable_type %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
</li>
|
19
|
+
<% end %>
|
20
|
+
<% if can? :collect, document %>
|
21
|
+
<li>
|
22
|
+
<%= link_to_select_collection document %>
|
23
|
+
</li>
|
24
|
+
<% end %>
|
25
|
+
</ul>
|
26
|
+
<%= render 'collections/add_to_collection_modal', collectible: document if can? :collect, document %>
|
27
|
+
</div>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<li id="document_<%= document.to_param %>" class="document <%= render_document_class document %>" itemscope itemtype="<%= document.itemtype %>">
|
2
|
+
<%= render_document_partials document, blacklight_config.view_config(document_index_view_type).partials, document_counter: document_counter %>
|
3
|
+
</li>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<h3 id="document-list-heading" class="accessible-hidden">List of files deposited in <%= t('curation_concerns.product_name') %> that match your search criteria</h3>
|
2
|
+
<ol id="documents" class="container-fluid search-results-list" start="<%= document_counter_with_offset(0) %>" aria-labeled-by="document-list-heading">
|
3
|
+
<%= render documents, as: :document %>
|
4
|
+
</ul>
|
5
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p>
|
2
|
+
<%=t('curation_concerns.product_name') %> is a secure repository service enabling the
|
3
|
+
<%=t('curation_concerns.institution.name') %> community to share its research and scholarly
|
4
|
+
work with a worldwide audience. Faculty, staff, and students can use
|
5
|
+
<%=t('curation_concerns.product_name') %> to collect their work in one location and create a
|
6
|
+
durable and citeable record of their papers, presentations, publications, data
|
7
|
+
sets, or other scholarly creations.
|
8
|
+
</p>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<%#= render_document_partial document, 'thumbnail', document_counter: generic_file_counter %>
|
3
|
+
<dl class="document-metadata dl-invert dl-horizontal">
|
4
|
+
|
5
|
+
<% index_fields(document).each do |solr_fname, field| -%>
|
6
|
+
<% if should_render_index_field? document, field %>
|
7
|
+
<dt class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_label document, :field => solr_fname %></dt>
|
8
|
+
<dd class="blacklight-<%= solr_fname.parameterize %>"><%= render_index_field_value document, :field => solr_fname %></dd>
|
9
|
+
<% end -%>
|
10
|
+
<% end -%>
|
11
|
+
|
12
|
+
</dl>
|
13
|
+
|
14
|
+
<div class="search-result-actions">
|
15
|
+
<%= render_document_partial document, 'action_menu' %>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% # header bar for doc items in index view -%>
|
2
|
+
<div class="documentHeader">
|
3
|
+
<h4 class="index_title">
|
4
|
+
<% counter = document_counter_with_offset(document_counter) %>
|
5
|
+
<%= link_to_document document, document_show_link_field(document), counter: counter %>
|
6
|
+
</h4>
|
7
|
+
|
8
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<nav class="navbar navbar-default" role="navigation">
|
2
|
+
<div class="container-fluid">
|
3
|
+
<div class="collapse navbar-collapse" id="type-tabs">
|
4
|
+
<ul class="nav navbar-nav">
|
5
|
+
<%= all_type_tab %>
|
6
|
+
<%= type_tab 'Works', 'Work' %>
|
7
|
+
<%= type_tab 'Collections', 'Collection' %>
|
8
|
+
</ul>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
</nav>
|
12
|
+
|
@@ -0,0 +1,22 @@
|
|
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
|
+
<dt>ID: </dt>
|
7
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"id") %></dd>
|
8
|
+
<dt>Download:</dt>
|
9
|
+
<dd id="downloads">
|
10
|
+
<ul>
|
11
|
+
<% %>
|
12
|
+
</ul>
|
13
|
+
</dd>
|
14
|
+
<dt>Copyright: </dt>
|
15
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"rights_t") %></dd>
|
16
|
+
</dl>
|
17
|
+
</div>
|
18
|
+
<div class="<%= params[:action]%>_details">
|
19
|
+
<%= render :partial => "#{params[:controller]}/_#{params[:action]}_partials/default_details", :locals => {:document => document}%>
|
20
|
+
</div>
|
21
|
+
|
22
|
+
<%= async_load_tag(hydra_asset_downloads_path(params[:id]), 'downloads') %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%# default partial to display solr document fields in catalog show view -%>
|
2
|
+
<div>
|
3
|
+
<dl class="defList">
|
4
|
+
<dt>Date: </dt>
|
5
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
|
6
|
+
<dt>Title: </dt>
|
7
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"title_t") %></dd>
|
8
|
+
<dt>Document Type: </dt>
|
9
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"medium_t") %></dd>
|
10
|
+
<dt>Location: </dt>
|
11
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"location_t") %></dd>
|
12
|
+
<dt>Date: </dt>
|
13
|
+
<dd><%= render_document_show_field_value(:document=>document, :field=>"date_t") %></dd>
|
14
|
+
</dl>
|
15
|
+
</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,47 @@
|
|
1
|
+
<% provide :page_title, "#{application_name} Search Results" %>
|
2
|
+
<% provide :page_class, 'search' %>
|
3
|
+
<% provide :page_header do %>
|
4
|
+
<%= render 'navbar' %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% provide :sidebar do %>
|
8
|
+
<%= render 'search_sidebar' %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div id="content">
|
12
|
+
|
13
|
+
<% unless has_search_parameters? %>
|
14
|
+
<%# if there are no input/search related params, display the "home" partial -%>
|
15
|
+
<%= render 'home' %>
|
16
|
+
<% else %>
|
17
|
+
|
18
|
+
<h2 class="sr-only top-content-title"><%= t('blacklight.search.search_results_header') %></h2>
|
19
|
+
|
20
|
+
<% @page_title = t('blacklight.search.title', :application_name => application_name) %>
|
21
|
+
|
22
|
+
|
23
|
+
<% provide(:head) do -%>
|
24
|
+
<%= render_opensearch_response_metadata %>
|
25
|
+
<%= auto_discovery_link_tag(:rss, url_for(params.merge(:format => 'rss')), :title => t('blacklight.search.rss_feed') ) %>
|
26
|
+
<%= auto_discovery_link_tag(:atom, url_for(params.merge(:format => 'atom')), :title => t('blacklight.search.atom_feed') ) %>
|
27
|
+
<% end -%>
|
28
|
+
|
29
|
+
|
30
|
+
<%= render 'search_header' %>
|
31
|
+
|
32
|
+
<h2 class="sr-only"><%= t('blacklight.search.search_results') %></h2>
|
33
|
+
|
34
|
+
<%- if @response.empty? %>
|
35
|
+
<%= render "zero_results" %>
|
36
|
+
<%- elsif render_grouped_response? %>
|
37
|
+
<%= render_grouped_document_index %>
|
38
|
+
<%- else %>
|
39
|
+
<%= render_document_index %>
|
40
|
+
<%- end %>
|
41
|
+
|
42
|
+
<%= render 'results_pagination' %>
|
43
|
+
|
44
|
+
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% modal_id = collection_modal_id(collectible) %>
|
2
|
+
<% modal_title_id = "#{modal_id}-title" %>
|
3
|
+
|
4
|
+
<div class="modal fade" id="<%= modal_id %>">
|
5
|
+
<div class="modal-dialog">
|
6
|
+
<div class="modal-content">
|
7
|
+
<div class="modal-header">
|
8
|
+
<h4 id="<% modal_title_id %>" class="modal-title">Add <%= collectible %> to one of your collections:</h4>
|
9
|
+
</div>
|
10
|
+
<div class="unpadded modal-body">
|
11
|
+
<%= render 'collections/form_to_add_member', collectible: collectible, fieldset_class: 'with-side-padding with-top-padding', select_label_id: modal_title_id %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<li data-behavior="batch-edit-select-none" data-state="on"><a href="#"><i class="icon-ok"></i> Select None</a></li>
|
2
|
+
<li data-behavior="batch-edit-select-page" data-state="off"><a href="#"><i class=""></i> Select Current Page</a></li>
|
3
|
+
<li><%= button_for_remove_selected_from_collection @collection %></li>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= render 'document', document: collection, document_counter: collection_counter %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<% @document_list = documents %>
|
2
|
+
<% @batch_size_on_other_page = 0 %>
|
3
|
+
<% @all_checked = false %>
|
4
|
+
<% @max_batch_size = 100 %>
|
5
|
+
<% @user = current_user %>
|
6
|
+
<%= render partial:'dashboard/_index_partials/default_group', locals:{ documents: documents, docs:documents } %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%# This mimics the generic_files/descriptions partial & re-uses some of its sub-partials %>
|
2
|
+
<div id="descriptions_display" class="tab-pane active">
|
3
|
+
<%= form_for collection, url: collections.collection_path, html: {multipart: true, class: 'form-horizontal'} do |f| %>
|
4
|
+
<%= hidden_field_tag('redirect_tab', 'descriptions') %>
|
5
|
+
<h2 class="non lower">Descriptions <small class="pull-right"><span class="error">*</span> indicates required fields</small> </h2>
|
6
|
+
<div class="well">
|
7
|
+
|
8
|
+
<% (collection.terms_for_editing).each do |term| %>
|
9
|
+
<%= render partial: "generic_files/field_form", locals: { generic_file: collection, f: f, render_req: true, key: term } %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
</div><!-- /well -->
|
13
|
+
<div class="row">
|
14
|
+
<div class="form-actions">
|
15
|
+
<%= f.button '<i class="icon-save"></i> Save Descriptions'.html_safe, type: 'submit', class: 'btn-primary',
|
16
|
+
onclick: "confirmation_needed = false;", id: "upload_submit", name: "update_descriptions" %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%= simple_form_for [collections, @collection] do |f| %>
|
2
|
+
|
3
|
+
<% if f.error_notification -%>
|
4
|
+
<div class="alert alert-danger fade in">
|
5
|
+
<strong>Wait don't go!</strong> There was a problem with your submission. Please review the errors below:
|
6
|
+
<a class="close" data-dismiss="alert" href="#">×</a>
|
7
|
+
</div>
|
8
|
+
<% end -%>
|
9
|
+
|
10
|
+
<%= render 'form_descriptive_fields', curation_concern: @collection, f: f %>
|
11
|
+
<%= render 'form_permission', f: f %>
|
12
|
+
|
13
|
+
<%= render "form_representative_image", curation_concern: @collection, f: f %>
|
14
|
+
|
15
|
+
<div class="row">
|
16
|
+
<div class="col-md-12 form-actions">
|
17
|
+
<%= f.submit class: 'btn btn-primary require-contributor-agreement' %>
|
18
|
+
<%- if @collection.new_record? -%>
|
19
|
+
<%= link_to 'Cancel', main_app.root_path, class: 'btn btn-link' %>
|
20
|
+
<%- else -%>
|
21
|
+
<%= link_to 'Cancel', collections.collection_path(@collection), class: 'btn btn-link' %>
|
22
|
+
<%- end -%>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<% end %>
|
@@ -0,0 +1,6 @@
|
|
1
|
+
<fieldset class="optional prompt">
|
2
|
+
<legend>Additional Information</legend>
|
3
|
+
<%= f.input :subject, as: :multi_value, input_html: { class: 'form-control' } %>
|
4
|
+
<%= f.input :publisher, as: :multi_value, input_html: { class: 'form-control' } %>
|
5
|
+
<%= f.input :language, as: :multi_value, input_html: { class: 'form-control' } %>
|
6
|
+
</fieldset>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<div class="modal fade" id="collection-list-container">
|
2
|
+
<div class="modal-dialog">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="modal-header">
|
5
|
+
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
6
|
+
<h4 class="modal-title">Add to collection</h4>
|
7
|
+
</div>
|
8
|
+
<div class="modal-body">
|
9
|
+
<% if user_collections.blank? %>
|
10
|
+
<em> You do not have access to any existing collections. You may create a new collection.</em><br><br><br><br>
|
11
|
+
<% else %>
|
12
|
+
Select the collection to add your files to:
|
13
|
+
<div class="collection-list">
|
14
|
+
<ul>
|
15
|
+
<% user_collections.sort! { |c1,c2| c1['date_modified_dtsi'] <=> c2['date_modified_dtsi'] } %>
|
16
|
+
<% user_collections.each do |collection| %>
|
17
|
+
<li> <%= radio_button_tag(:id, collection.id, true, class: "collection-selector") %><%= label_tag(:collection, collection.title) %> </li>
|
18
|
+
<% end %>
|
19
|
+
</ul>
|
20
|
+
</div><!-- collection-list -->
|
21
|
+
<% end %> <!-- else -->
|
22
|
+
</div>
|
23
|
+
<div class="modal-footer">
|
24
|
+
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
25
|
+
<% if user_collections.blank? %>
|
26
|
+
<%= button_for_create_collection %>
|
27
|
+
<% else %>
|
28
|
+
<%= button_for_update_collection %>
|
29
|
+
<%= button_for_create_collection "Add to new Collection" %>
|
30
|
+
<% end %>
|
31
|
+
</div>
|
32
|
+
</div><!-- /.modal-content -->
|
33
|
+
</div><!-- /.modal-dialog -->
|
34
|
+
</div><!-- /.modal -->
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<div id="set-access-controls">
|
2
|
+
<fieldset>
|
3
|
+
<legend>
|
4
|
+
Access Rights
|
5
|
+
<small>Who should be able to view your collection?</small>
|
6
|
+
</legend>
|
7
|
+
|
8
|
+
<section class="help-block">
|
9
|
+
<p>
|
10
|
+
<strong>Please note</strong>, making something visible to the world (i.e.
|
11
|
+
marking this as <span class="label label-success">Open Access</span>) may be
|
12
|
+
viewed as publishing which could impact your ability to:
|
13
|
+
</p>
|
14
|
+
<ul>
|
15
|
+
<li>patent your work</li>
|
16
|
+
<li>publish your work in a journal</li>
|
17
|
+
</ul>
|
18
|
+
</section>
|
19
|
+
|
20
|
+
<div class="form-group">
|
21
|
+
<label class="radio">
|
22
|
+
<input type="radio" id="visibility_open" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC %>" <% if @collection.open_access? %> checked="true"<% end %>/>
|
23
|
+
<span class="label label-success">Open Access</span> Visible to the world.
|
24
|
+
</label>
|
25
|
+
<label class="radio">
|
26
|
+
<input type="radio" id="visibility_registered" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED %>" <% if @collection.authenticated_only_access? %> checked="true"<% end %> />
|
27
|
+
<span class="label label-info"><%=t('sufia.institution_name') %></span> Visible to all <%=t('sufia.institution_name') %> users.
|
28
|
+
</label>
|
29
|
+
<label class="radio">
|
30
|
+
<input type="radio" id="visibility_restricted" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE%>" <% if @collection.private_access? %> checked="true"<% end %>/>
|
31
|
+
<span class="label label-danger">Private</span> Only visible to you and your delegates.
|
32
|
+
</label>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
</fieldset>
|
36
|
+
</div>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% if curation_concern.persisted? && curation_concern.members.present? %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-12">
|
4
|
+
<fieldset id="representative-image">
|
5
|
+
<legend>
|
6
|
+
Assign a Thumbnail
|
7
|
+
</legend>
|
8
|
+
<p>Select the file whose thumbnail should represent this <%= curation_concern.human_readable_type %>.</p>
|
9
|
+
<%= f.select( :representative, Hash[ curation_concern.members.map { |m| m.generic_files}.flatten.map {|file| [file.title.first, file.id] } ],{}, { class: 'form-control' } ) %>
|
10
|
+
</fieldset>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<fieldset class="required">
|
2
|
+
<legend>Required Information</legend>
|
3
|
+
|
4
|
+
<%= f.input :title %>
|
5
|
+
|
6
|
+
<%= f.input :creator, as: :multi_value %>
|
7
|
+
|
8
|
+
<%= f.input :contributor, as: :multi_value, input_html: { class: 'form-control' } %>
|
9
|
+
|
10
|
+
<%= f.input :description, as: :text, input_html: { rows: '14' } %>
|
11
|
+
</fieldset>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% fieldset_class ||= '' %>
|
2
|
+
<% select_label_id ||= '' %>
|
3
|
+
|
4
|
+
<%= form_tag collections.collections_path, method: :put do %>
|
5
|
+
<fieldset class="required <%= fieldset_class %>">
|
6
|
+
<%= hidden_field_tag 'collection[members]', 'add' %>
|
7
|
+
<%= hidden_field_tag 'batch_document_ids[]', collectible.id %>
|
8
|
+
|
9
|
+
<div class="form-group collection_id">
|
10
|
+
<div class="controls">
|
11
|
+
<%= select_tag :id, collection_options_for_select(collectible), prompt: 'Make a Selection',
|
12
|
+
class: 'form-control', :'aria-labelledby' => select_label_id %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
</fieldset>
|
17
|
+
<div class="form-actions with-side-padding with-footroom">
|
18
|
+
<%= submit_tag "Add to collection", class: 'btn btn-primary' %>
|
19
|
+
<%= link_to 'Cancel', root_path, class: 'btn btn-default', data: { dismiss: 'modal' } %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="row identifier-and-action">
|
2
|
+
<div class="col-md-2 list-number">
|
3
|
+
<%= document_counter_with_offset(counter) if defined?(counter) %>
|
4
|
+
<%= render partial: 'catalog/_index_partials/type_display', locals: {document: document} %>
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="col-md-6 search-result-link">
|
8
|
+
<%= link_to_document document, label: document_show_link_field(document), counter: counter %>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<div class="col-md-4 search-result-actions">
|
12
|
+
<%= render 'collections/action_menu', document: document %>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="<%= collections.collection_path %>" target="_new"><img src="Other.png" alt="No preview available" width="338" /></a>
|