worthwhile 0.0.1.alpha → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.rspec +1 -0
- data/.travis.yml +19 -0
- data/Gemfile +7 -11
- data/README.md +8 -12
- data/Rakefile +17 -2
- data/app/actors/concerns/worthwhile/manages_embargoes_actor.rb +79 -0
- data/app/actors/curation_concern/base_actor.rb +68 -0
- data/app/actors/curation_concern/generic_file_actor.rb +40 -0
- data/app/actors/curation_concern/generic_work_actor.rb +92 -0
- data/app/actors/curation_concern/linked_resource_actor.rb +4 -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/modernizr.js +3 -0
- data/app/assets/javascripts/worthwhile/.gitkeep +0 -0
- data/app/assets/javascripts/worthwhile/accept_contributor_agreement.js +15 -0
- data/app/assets/javascripts/worthwhile/application.js +18 -0
- data/app/assets/javascripts/worthwhile/browse_everything_implement.js +7 -0
- data/app/assets/javascripts/worthwhile/embargoes.js +17 -0
- data/app/assets/javascripts/worthwhile/facet_mine.js +22 -0
- data/app/assets/javascripts/worthwhile/help_modal.js +36 -0
- data/app/assets/javascripts/worthwhile/link_groups.js.coffee +123 -0
- data/app/assets/javascripts/worthwhile/link_users.js.coffee +126 -0
- data/app/assets/javascripts/worthwhile/manage_repeating_fields.js +74 -0
- data/app/assets/javascripts/worthwhile/proxy_rights.js.coffee +95 -0
- data/app/assets/javascripts/worthwhile/proxy_submission.js +23 -0
- data/app/assets/javascripts/worthwhile/select_works.js.coffee +20 -0
- data/app/assets/javascripts/worthwhile/worthwhile.js +45 -0
- data/app/assets/stylesheets/worthwhile.css.scss +23 -0
- data/app/assets/stylesheets/worthwhile/_global-variables.css.scss +5 -0
- data/app/assets/stylesheets/worthwhile/_modules.css.scss +14 -0
- data/app/assets/stylesheets/worthwhile/_positioning.css.scss +138 -0
- data/app/assets/stylesheets/worthwhile/_theme.css.scss +46 -0
- data/app/assets/stylesheets/worthwhile/_typography.css.scss +142 -0
- data/app/assets/stylesheets/worthwhile/_variables_bootstrap.css.scss +7 -0
- data/app/assets/stylesheets/worthwhile/_worthwhile.css.scss +7 -0
- data/app/assets/stylesheets/worthwhile/downloads.css.scss +3 -0
- data/app/assets/stylesheets/worthwhile/help_requests.css.scss +3 -0
- data/app/assets/stylesheets/worthwhile/modules/accessibility.css.scss +50 -0
- data/app/assets/stylesheets/worthwhile/modules/accordion.css.scss +33 -0
- data/app/assets/stylesheets/worthwhile/modules/attributes.css.scss +26 -0
- data/app/assets/stylesheets/worthwhile/modules/classify_work.css.scss +100 -0
- data/app/assets/stylesheets/worthwhile/modules/collections.css.scss +42 -0
- data/app/assets/stylesheets/worthwhile/modules/embargoes.css.scss +15 -0
- data/app/assets/stylesheets/worthwhile/modules/emphatic_action_area.css.scss +14 -0
- data/app/assets/stylesheets/worthwhile/modules/forms.css.scss +116 -0
- data/app/assets/stylesheets/worthwhile/modules/multi_value_fields.css.scss +52 -0
- data/app/assets/stylesheets/worthwhile/modules/pagination.css.scss +4 -0
- data/app/assets/stylesheets/worthwhile/modules/search_results.css.scss +55 -0
- data/app/assets/stylesheets/worthwhile/modules/site_actions.css.scss +53 -0
- data/app/assets/stylesheets/worthwhile/modules/site_search.css.scss +46 -0
- data/app/controllers/catalog_controller.rb +3 -0
- data/app/controllers/collections_controller.rb +59 -0
- data/app/controllers/concerns/worthwhile/application_controller_behavior.rb +23 -0
- data/app/controllers/concerns/worthwhile/catalog_controller.rb +347 -0
- data/app/controllers/concerns/worthwhile/curation_concern_controller.rb +131 -0
- data/app/controllers/concerns/worthwhile/files_controller.rb +149 -0
- data/app/controllers/concerns/worthwhile/manages_embargoes.rb +22 -0
- data/app/controllers/concerns/worthwhile/parent_container.rb +31 -0
- data/app/controllers/concerns/worthwhile/themed_layout_controller.rb +31 -0
- data/app/controllers/concerns/worthwhile/without_namespace.rb +15 -0
- data/app/controllers/curation_concern/generic_files_controller.rb +6 -0
- data/app/controllers/curation_concern/generic_works_controller.rb +6 -0
- data/app/controllers/curation_concern/linked_resources_controller.rb +68 -0
- data/app/controllers/curation_concern/permissions_controller.rb +19 -0
- data/app/controllers/downloads_controller.rb +4 -0
- data/app/controllers/embargoes_controller.rb +44 -0
- data/app/controllers/leases_controller.rb +34 -0
- data/app/controllers/registrations_controller.rb +20 -0
- data/app/controllers/sessions_controller.rb +4 -0
- data/app/controllers/worthwhile/application_controller.rb +7 -0
- data/app/controllers/worthwhile/classify_concerns_controller.rb +35 -0
- data/app/datastreams/generic_work_metadata.rb +3 -0
- data/app/datastreams/worthwhile/generic_work_rdf_properties.rb +57 -0
- data/app/datastreams/worthwhile/properties_datastream.rb +28 -0
- data/app/helpers/curate/collections_helper.rb +133 -0
- data/app/helpers/worthwhile/ability_helper.rb +46 -0
- data/app/helpers/worthwhile/attribute_helper.rb +67 -0
- data/app/helpers/worthwhile/catalog_helper.rb +38 -0
- data/app/helpers/worthwhile/collections_helper.rb +19 -0
- data/app/helpers/worthwhile/embargo_helper.rb +17 -0
- data/app/helpers/worthwhile/generic_file_helper.rb +19 -0
- data/app/helpers/worthwhile/lease_helper.rb +18 -0
- data/app/helpers/worthwhile/main_app_helpers.rb +14 -0
- data/app/helpers/worthwhile/render_constraints_helper.rb +42 -0
- data/app/helpers/worthwhile/search_paths_helper.rb +13 -0
- data/app/helpers/worthwhile/thumbnail_helper.rb +11 -0
- data/app/helpers/worthwhile/title_helper.rb +23 -0
- data/app/helpers/worthwhile/url_helper.rb +16 -0
- data/app/inputs/multi_value_input.rb +72 -0
- data/app/models/collection.rb +15 -0
- data/app/models/concerns/curation_concern/collection_model.rb +62 -0
- data/app/models/concerns/curation_concern/curatable.rb +77 -0
- data/app/models/concerns/curation_concern/has_representative.rb +14 -0
- data/app/models/concerns/curation_concern/human_readable_type.rb +23 -0
- data/app/models/concerns/curation_concern/with_basic_metadata.rb +49 -0
- data/app/models/concerns/curation_concern/with_editors.rb +44 -0
- data/app/models/concerns/curation_concern/with_generic_files.rb +23 -0
- data/app/models/concerns/curation_concern/with_linked_resources.rb +21 -0
- data/app/models/concerns/curation_concern/work.rb +24 -0
- data/app/models/concerns/worthwhile/ability.rb +34 -0
- data/app/models/concerns/worthwhile/generic_file/versioned_content.rb +18 -0
- data/app/models/concerns/worthwhile/generic_file_base.rb +64 -0
- data/app/models/concerns/worthwhile/solr_document_behavior.rb +140 -0
- data/app/models/generic_work.rb +5 -0
- data/app/models/worthwhile/classify_concern.rb +47 -0
- data/app/models/worthwhile/content_version.rb +23 -0
- data/app/models/worthwhile/contributor_agreement.rb +23 -0
- data/app/models/worthwhile/generic_file.rb +5 -0
- data/app/models/worthwhile/linked_resource.rb +41 -0
- data/app/models/worthwhile/quick_classification_query.rb +31 -0
- data/app/services/worthwhile/curation_concern.rb +21 -0
- data/app/services/worthwhile/embargo_service.rb +26 -0
- data/app/services/worthwhile/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 +17 -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 +48 -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_for_select_collection.html.erb +34 -0
- data/app/views/collections/_form_permission.html.erb +36 -0
- data/app/views/collections/_form_required_information.html.erb +11 -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 +22 -0
- data/app/views/collections/new.html.erb +15 -0
- data/app/views/collections/show.html.erb +24 -0
- data/app/views/curate/collections/_add_to_collection_modal.html.erb +15 -0
- data/app/views/curate/collections/_button_remove_from_collection.html.erb +6 -0
- data/app/views/curate/collections/_form_to_add_member.html.erb +27 -0
- data/app/views/curate/collections/add_member_form.html.erb +6 -0
- data/app/views/curation_concern/base/_attributes.html.erb +25 -0
- data/app/views/curation_concern/base/_collections.html.erb +26 -0
- data/app/views/curation_concern/base/_form.html.erb +27 -0
- data/app/views/curation_concern/base/_form_additional_information.html.erb +9 -0
- data/app/views/curation_concern/base/_form_content_license.html.erb +16 -0
- data/app/views/curation_concern/base/_form_contributor_agreement.html.erb +29 -0
- data/app/views/curation_concern/base/_form_descriptive_fields.erb +23 -0
- data/app/views/curation_concern/base/_form_files_and_links.html.erb +29 -0
- data/app/views/curation_concern/base/_form_permission.html.erb +52 -0
- data/app/views/curation_concern/base/_form_permission_embargo.html.erb +6 -0
- data/app/views/curation_concern/base/_form_permission_lease.html.erb +6 -0
- data/app/views/curation_concern/base/_form_permission_under_embargo.html.erb +16 -0
- data/app/views/curation_concern/base/_form_permission_under_lease.html.erb +18 -0
- data/app/views/curation_concern/base/_form_representative_image.html.erb +13 -0
- data/app/views/curation_concern/base/_form_required_information.html.erb +11 -0
- data/app/views/curation_concern/base/_form_supplementary_fields.html.erb +15 -0
- data/app/views/curation_concern/base/_legally_binding_text.html.erb +33 -0
- data/app/views/curation_concern/base/_related_files.html.erb +24 -0
- data/app/views/curation_concern/base/_related_resources.html.erb +40 -0
- data/app/views/curation_concern/base/_representative_media.html.erb +8 -0
- data/app/views/curation_concern/base/edit.html.erb +15 -0
- data/app/views/curation_concern/base/new.html.erb +14 -0
- data/app/views/curation_concern/base/show.html.erb +32 -0
- data/app/views/curation_concern/base/unauthorized.html.erb +3 -0
- data/app/views/curation_concern/generic_files/_form.html.erb +35 -0
- data/app/views/curation_concern/generic_files/_media_display.html.erb +20 -0
- data/app/views/curation_concern/generic_files/edit.html.erb +5 -0
- data/app/views/curation_concern/generic_files/show.html.erb +15 -0
- data/app/views/curation_concern/generic_works/_generic_work.html.erb +3 -0
- data/app/views/curation_concern/linked_resources/_form.html.erb +11 -0
- data/app/views/curation_concern/linked_resources/edit.html.erb +5 -0
- data/app/views/curation_concern/linked_resources/new.html.erb +5 -0
- data/app/views/curation_concern/permissions/confirm.html.erb +13 -0
- data/app/views/curation_concern/worthwhile/generic_files/_actions.html.erb +16 -0
- data/app/views/curation_concern/worthwhile/generic_files/_generic_file.html.erb +12 -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/common_objects.html.erb +36 -0
- data/app/views/layouts/curate_nd.html.erb +33 -0
- data/app/views/layouts/curate_nd/1_column.html.erb +22 -0
- data/app/views/layouts/curate_nd/2_column.html.erb +26 -0
- data/app/views/layouts/curate_nd/catalog.html.erb +38 -0
- data/app/views/layouts/curate_nd/dashboard.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/views/worthwhile/classify_concerns/new.html.erb +27 -0
- data/app/workers/visibility_copy_worker.rb +29 -0
- data/config/initializers/simple_form.rb +31 -0
- data/config/locales/sufia.en.yml +26 -0
- data/config/locales/worthwhile.en.yml +68 -0
- data/config/routes.rb +4 -0
- data/lib/generators/worthwhile/install_generator.rb +74 -0
- data/lib/generators/worthwhile/templates/worthwhile.css.scss +3 -0
- data/lib/generators/worthwhile/templates/worthwhile.js +1 -0
- data/lib/generators/worthwhile/templates/worthwhile_config.rb +3 -0
- data/lib/generators/worthwhile/templates/worthwhile_helper.rb +4 -0
- data/lib/worthwhile.rb +3 -1
- data/lib/worthwhile/configuration.rb +74 -0
- data/lib/worthwhile/controller_resource.rb +10 -0
- data/lib/worthwhile/engine.rb +20 -0
- data/lib/worthwhile/rails/routes.rb +78 -0
- data/lib/worthwhile/spec_support.rb +10 -0
- data/lib/worthwhile/version.rb +1 -1
- data/spec/abilities/generic_file_abilities_spec.rb +62 -0
- data/spec/abilities/generic_work_abilities_spec.rb +58 -0
- data/spec/actors/curation_concern/generic_work_actor_spec.rb +215 -0
- data/spec/actors/curation_concern/linked_resource_actor_spec.rb +36 -0
- data/spec/actors/worthwile/manages_embargoes_actor_spec.rb +95 -0
- data/spec/controllers/catalog_controller_spec.rb +114 -0
- data/spec/controllers/collections_controller_spec.rb +216 -0
- data/spec/controllers/curation_concern/generic_files_controller_spec.rb +258 -0
- data/spec/controllers/curation_concern/generic_works_controller_spec.rb +171 -0
- data/spec/controllers/curation_concern/linked_resources_controller_spec.rb +123 -0
- data/spec/controllers/curation_concern/permissions_controller_spec.rb +29 -0
- data/spec/controllers/downloads_controller_spec.rb +53 -0
- data/spec/controllers/embargoes_controller_spec.rb +107 -0
- data/spec/controllers/leases_controller_spec.rb +95 -0
- data/spec/controllers/worthwhile/classify_concerns_controller_spec.rb +35 -0
- data/spec/factories/collections_factory.rb +21 -0
- data/spec/factories/create_curation_concern.rb +3 -0
- data/spec/factories/generic_files.rb +18 -0
- data/spec/factories/generic_works.rb +37 -0
- data/spec/factories/linked_resources_factory.rb +18 -0
- data/spec/factories/users.rb +15 -0
- data/spec/features/add_external_link_spec.rb +25 -0
- data/spec/features/add_file_spec.rb +28 -0
- data/spec/features/collection_spec.rb +238 -0
- data/spec/features/embargo_spec.rb +45 -0
- data/spec/features/lease_spec.rb +43 -0
- data/spec/features/update_file_spec.rb +28 -0
- data/spec/fixtures/files/image.png +0 -0
- data/spec/helpers/catalog_helper_spec.rb +58 -0
- data/spec/helpers/configuration_helper_spec.rb +13 -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 +19 -0
- data/spec/matchers.rb +24 -0
- data/spec/matchers/metadata_field_matchers.rb +28 -0
- data/spec/models/collection_spec.rb +136 -0
- data/spec/models/curation_concern/collection_model_spec.rb +50 -0
- data/spec/models/curation_concern/work_spec.rb +30 -0
- data/spec/models/generic_work_spec.rb +24 -0
- data/spec/models/worthwhile/content_version_spec.rb +27 -0
- data/spec/models/worthwhile/generic_file_spec.rb +77 -0
- data/spec/models/worthwhile/linked_resource_spec.rb +76 -0
- data/spec/routing/worthwhile/routes_spec.rb +23 -0
- data/spec/services/embargo_service_spec.rb +38 -0
- data/spec/services/lease_service_spec.rb +37 -0
- data/spec/spec_helper.rb +30 -5
- data/spec/support/controllers/engine_helpers.rb +7 -0
- data/spec/support/curation_concern/factory_helpers.rb +14 -0
- data/spec/support/features.rb +19 -0
- data/spec/support/features/fixture_file_upload.rb +14 -0
- data/spec/support/features/session_helpers.rb +41 -0
- data/spec/support/shared/shared_examples_has_dc_metadata.rb +17 -0
- data/spec/support/shared/shared_examples_is_a_curation_concern_model.rb +40 -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/test_app_templates/lib/generators/test_app_generator.rb +8 -29
- data/spec/views/curation_concern/base/_attributes.html.erb_spec.rb +25 -0
- data/spec/views/curation_concern/base/show.html.erb_spec.rb +25 -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 +68 -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
- data/worthwhile.gemspec +9 -3
- metadata +469 -9
@@ -0,0 +1,8 @@
|
|
1
|
+
<% if work.representative.present? && (gf = Worthwhile::GenericFile.load_instance_from_solr(work.representative)) %>
|
2
|
+
<%= render partial: 'curation_concern/generic_files/media_display', locals: {generic_file: gf, dom_class_name: 'representative_image'} %>
|
3
|
+
<% elsif work.representative.present? %>
|
4
|
+
<%= image_tag download_path(work.representative, {:datastream_id => 'thumbnail'}), class: 'representative_image' %>
|
5
|
+
<% else %>
|
6
|
+
<%= image_tag 'nope.png', class: "canonical-image" %>
|
7
|
+
<% end %>
|
8
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% content_for :page_title, curation_concern_page_title(curation_concern) %>
|
2
|
+
<% content_for :page_header do %>
|
3
|
+
|
4
|
+
<h2>Manage Your Work</h2>
|
5
|
+
<p>
|
6
|
+
You can enrich the metadata describing your work at any time.
|
7
|
+
The more complete the description the easier it will be to find by yourself and others.
|
8
|
+
</p>
|
9
|
+
<p>
|
10
|
+
Please consider releasing your <%=curation_concern.human_readable_type.downcase %> as an Open Access work.
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<%= render 'form' %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<% content_for :page_title, curation_concern_page_title(curation_concern) %>
|
2
|
+
<% content_for :page_header do %>
|
3
|
+
|
4
|
+
<h2>Describe Your <%= curation_concern.human_readable_type %></h2>
|
5
|
+
<p>
|
6
|
+
The more descriptive information you provide the better we can serve your needs.
|
7
|
+
</p>
|
8
|
+
<p>
|
9
|
+
Please consider releasing your <%= curation_concern.human_readable_type.downcase %> as an <span class="label label-success">Open Access</span> work.
|
10
|
+
</p>
|
11
|
+
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= render 'form' %>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% content_for :page_title, curation_concern_page_title(curation_concern) %>
|
2
|
+
<% content_for :page_header do %>
|
3
|
+
<h1><%= curation_concern %> <span class="human_readable_type">(<%= curation_concern.human_readable_type %>)</span></h1>
|
4
|
+
<% end %>
|
5
|
+
<%= render partial: 'representative_media', locals: {work: curation_concern} %>
|
6
|
+
|
7
|
+
<%= render 'attributes', curation_concern: curation_concern %>
|
8
|
+
|
9
|
+
<%= render 'related_files', curation_concern: curation_concern %>
|
10
|
+
<%= render 'related_resources', curation_concern: curation_concern %>
|
11
|
+
<%= render 'collections', curation_concern: curation_concern %>
|
12
|
+
|
13
|
+
<% collector = can?(:collect, curation_concern) %>
|
14
|
+
<% editor = can?(:edit, curation_concern) %>
|
15
|
+
|
16
|
+
<% if collector || editor %>
|
17
|
+
<% content_for :second_row do %>
|
18
|
+
<div class="form-actions">
|
19
|
+
<% if editor %>
|
20
|
+
<%= link_to "Edit This #{curation_concern.human_readable_type}", edit_polymorphic_path([:curation_concern, curation_concern]), class: 'btn btn-primary' %>
|
21
|
+
<%= link_to "Delete This #{curation_concern.human_readable_type}", [:curation_concern, curation_concern], class: 'btn btn-primary', data: { confirm: "Delete this #{curation_concern.human_readable_type}?" }, method: :delete %>
|
22
|
+
<%= link_to "Attach a File", new_curation_concern_generic_file_path(curation_concern), class: 'btn btn-primary' %>
|
23
|
+
<%= link_to "Add an External Link", new_curation_concern_linked_resource_path(curation_concern), class: 'btn btn-primary' %>
|
24
|
+
<% end %>
|
25
|
+
<% if collector %>
|
26
|
+
<%= render 'curate/collections/add_to_collection_modal', collectible: curation_concern %>
|
27
|
+
<%= link_to_select_collection curation_concern, class: 'btn btn-primary' %>
|
28
|
+
<% end %>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
31
|
+
<% end %>
|
32
|
+
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<%= simple_form_for [:curation_concern, curation_concern], html: { multipart: true } do |f| %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-6">
|
4
|
+
<fieldset class="required">
|
5
|
+
<legend>Your File’s Title</legend>
|
6
|
+
<span class="control-label">
|
7
|
+
<%= label_tag 'generic_file[title][]', 'Title', class: "string optional" %>
|
8
|
+
</span>
|
9
|
+
<%= text_field_tag 'generic_file[title][]', curation_concern.title.first, class: 'form-control' %>
|
10
|
+
</fieldset>
|
11
|
+
<fieldset class="required">
|
12
|
+
<legend>
|
13
|
+
Attach Your File
|
14
|
+
<small>A PDF copy is preferred.</small>
|
15
|
+
</legend>
|
16
|
+
<%= label_tag 'files[]', 'Upload a file' %>
|
17
|
+
<%= file_field_tag "files[]" %>
|
18
|
+
</fieldset>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="col-md-6">
|
22
|
+
<%= render "form_permission", curation_concern: curation_concern, f: f %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<div class="row">
|
27
|
+
<div class="col-md-12 form-actions">
|
28
|
+
<%= f.submit(
|
29
|
+
(curation_concern.persisted? ? "Update Attached File" : %(Attach to #{parent.human_readable_type})),
|
30
|
+
class: 'btn btn-primary'
|
31
|
+
) %>
|
32
|
+
<%= link_to 'Cancel', parent_path(parent), class: 'btn btn-link' %>
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
<% end %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!-- direct copy of sufia's app/views/generic_files/_media_display.html.erb -->
|
2
|
+
<% if generic_file.image? %>
|
3
|
+
<%= link_to image_tag(download_path(generic_file, datastream_id: 'thumbnail'),{class:"img-responsive", alt:"Download the full-sized image of #{generic_file.title.first}"})+"Download the full-sized image", download_path(generic_file), { target:"_new", title:"Download the full-sized image"}%>
|
4
|
+
<% elsif generic_file.video? %>
|
5
|
+
<video controls="controls" class="video-js vjs-default-skin" data-setup="{}" preload="auto">
|
6
|
+
<source src="<%= download_path(generic_file, datastream_id: 'webm') %>" type="video/webm" />
|
7
|
+
<source src="<%= download_path(generic_file, datastream_id: 'mp4') %>" type="video/mp4" />
|
8
|
+
Your browser does not support the video tag.
|
9
|
+
</video>
|
10
|
+
<% elsif generic_file.audio? %>
|
11
|
+
<audio controls="controls" class="audiojs" preload="auto">
|
12
|
+
<source src="<%= download_path(generic_file, datastream_id: 'ogg') %>" type="audio/ogg" />
|
13
|
+
<source src="<%= download_path(generic_file, datastream_id: 'mp3') %>" type="audio/mpeg" />
|
14
|
+
Your browser does not support the audio tag.
|
15
|
+
</audio>
|
16
|
+
<% elsif generic_file.pdf?%>
|
17
|
+
<%= link_to image_tag(download_path(generic_file, datastream_id: 'thumbnail'),{class:"img-responsive", alt:"Download the full-sized PDF of #{generic_file.title.first}"})+"Download the full-sized PDF", download_path(generic_file), { target:"_new", title:"Download the full-sized PDF"}%>
|
18
|
+
<% else %>
|
19
|
+
<%= link_to image_tag("default.png", {alt:"No preview available", class:"img-responsive"}), download_path(generic_file), { target:"_new", title:"Download the document"} %>
|
20
|
+
<% end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% content_for :page_title, curation_concern_page_title(curation_concern) %>
|
2
|
+
<% content_for :page_header do %>
|
3
|
+
<h1>File Details</h1>
|
4
|
+
<% end %>
|
5
|
+
<%= render partial: 'media_display', locals: {generic_file: curation_concern, dom_class_name: 'representative_image'} %>
|
6
|
+
<%= render "attributes", curation_concern: curation_concern %>
|
7
|
+
|
8
|
+
<div class="form-actions">
|
9
|
+
<%= link_to "Download this File", download_path(curation_concern), class: 'btn btn-primary' %>
|
10
|
+
<% if can? :edit, curation_concern %>
|
11
|
+
<%= link_to "Edit this File", edit_polymorphic_path([:curation_concern, curation_concern]), class: 'btn btn-primary' %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= link_to "Back to #{parent.human_readable_type}", parent_path(parent), class: 'btn btn-primary' %>
|
15
|
+
</div>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= simple_form_for [:curation_concern, curation_concern] do |f| %>
|
2
|
+
<fieldset class="required">
|
3
|
+
<%= f.input :url, label: "External link", input_html: {class: 'input-xlarge'} %>
|
4
|
+
<%= f.input :title, input_html: {class: 'input-xlarge'} %>
|
5
|
+
</fieldset>
|
6
|
+
<%= f.submit(
|
7
|
+
(curation_concern.persisted? ? "Update External Link" : %(Add External Link to #{parent.human_readable_type})),
|
8
|
+
class: 'btn btn-primary'
|
9
|
+
) %>
|
10
|
+
<%= link_to 'Cancel', catalog_index_path, class: 'btn btn-link' %>
|
11
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div class="panel panel-default permissions-confirm">
|
2
|
+
<div class="panel-heading">
|
3
|
+
<h4>Apply changes to contents?<h4>
|
4
|
+
</div>
|
5
|
+
<div class="panel-body">
|
6
|
+
<p>You've changed the permissions on this <%= curation_concern.human_readable_type %>, <i><%= curation_concern.title %></i>, making it visible to <b><%= visibility_badge(curation_concern.visibility) %></b>.</p>
|
7
|
+
<p>Would you like change all of the files within the <%= curation_concern.human_readable_type %> to <b><%= visibility_badge(curation_concern.visibility) %></b> as well?</p>
|
8
|
+
</div>
|
9
|
+
<div class="form-actions panel-footer">
|
10
|
+
<%= button_to "Yes please.", copy_curation_concern_permission_path(curation_concern), class: 'btn btn-primary' %>
|
11
|
+
<%= link_to "No. I'll update it manually.", polymorphic_path([:curation_concern, curation_concern]), class: 'btn' %>
|
12
|
+
</div>
|
13
|
+
</div>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% if can?(:edit, generic_file) %>
|
2
|
+
<%= link_to( 'Edit', edit_polymorphic_path([:curation_concern, generic_file]),
|
3
|
+
{ class: 'btn btn-default', title: "Edit #{generic_file}" }) %>
|
4
|
+
<%= link_to( 'Rollback', versions_curation_concern_generic_file_path(generic_file),
|
5
|
+
{ class: 'btn btn-default', title: "Rollback to previous version" }) %>
|
6
|
+
<% end %>
|
7
|
+
<% if can?(:destroy, generic_file) %>
|
8
|
+
<%= link_to( 'Delete', polymorphic_path([:curation_concern, generic_file]),
|
9
|
+
class: 'btn btn-default', method: :delete, title: "Delete #{generic_file}",
|
10
|
+
data: {confirm: "Deleting #{generic_file} from #{t('sufia.product_name')} is permanent. Click OK to delete this from #{t('sufia.product_name')}, or Cancel to cancel this operation"}
|
11
|
+
)%>
|
12
|
+
<% end %>
|
13
|
+
<% if can?(:read, generic_file) %>
|
14
|
+
<%= link_to 'Download', download_path(generic_file),
|
15
|
+
class: 'btn btn-default', title: "Download #{generic_file.to_s.inspect}", target: "_blank" %>
|
16
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<tr class="<%= dom_class(generic_file) %> attributes">
|
2
|
+
<td>
|
3
|
+
<%= render_thumbnail_tag generic_file %>
|
4
|
+
</td>
|
5
|
+
<td class="attribute filename"><%= link_to(generic_file_link_name(generic_file), curation_concern_generic_file_path(generic_file)) %></td>
|
6
|
+
<td class="attribute date_uploaded"><%= generic_file.date_uploaded %></td>
|
7
|
+
<td class="attribute permission"><%= permission_badge_for(generic_file) %></td>
|
8
|
+
<td>
|
9
|
+
<%= render 'curation_concern/worthwhile/generic_files/actions', generic_file: generic_file %>
|
10
|
+
</td>
|
11
|
+
</tr>
|
12
|
+
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<table class="embargoes table">
|
2
|
+
<tbody>
|
3
|
+
<tr>
|
4
|
+
<th>Type of Work</th><th>Title</th><th>Current Visibility</th><th>Embargo Release Date</th><th>Visibility will Change to</th>
|
5
|
+
</tr>
|
6
|
+
<% assets_under_embargo.each do |curation_concern| %>
|
7
|
+
<tr>
|
8
|
+
<td class="human-readable-type"><%= curation_concern.human_readable_type %></td>
|
9
|
+
<td class="title"><%= link_to curation_concern, edit_embargo_path(curation_concern) %></td>
|
10
|
+
<td class="current-visibility"><%= visibility_badge(curation_concern.visibility) %></td>
|
11
|
+
<td class="embargo-release-date"><%= curation_concern.embargo_release_date %></td>
|
12
|
+
<td class="visibility-after-embargo"><%= visibility_badge(curation_concern.visibility_after_embargo) %></td>
|
13
|
+
</tr>
|
14
|
+
<% end %>
|
15
|
+
</tbody>
|
16
|
+
</table>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% assets_with_deactivated_embargoes.each do |curation_concern| %>
|
2
|
+
<%= link_to curation_concern, edit_embargo_path(curation_concern) %> <%= visibility_badge(curation_concern.visibility) %>
|
3
|
+
<ul>
|
4
|
+
<% curation_concern.embargo_history.each do |entry| %>
|
5
|
+
<% unless entry.empty? %>
|
6
|
+
<li><%= entry %></li>
|
7
|
+
<% end %>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
<% end %>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<% if assets_with_expired_embargoes.empty? %>
|
2
|
+
<table class="embargoes table">
|
3
|
+
<tbody>
|
4
|
+
<tr>
|
5
|
+
<th>Type of Work</th><th>Title</th><th>Current Visibility</th><th>Embargo Release Date</th><th>Visibility will Change to</th>
|
6
|
+
</tr>
|
7
|
+
<tr>
|
8
|
+
<td colspan="5" style='text-align:center'><p>There are no expired embargoes in effect at this time.</p> </td>
|
9
|
+
</tr>
|
10
|
+
</tbody>
|
11
|
+
</table>
|
12
|
+
|
13
|
+
<% else %>
|
14
|
+
|
15
|
+
<%= form_tag embargoes_path, method: :patch do %>
|
16
|
+
<%= submit_tag 'Deactivate Embargoes for Selected', class: 'btn btn-primary' %>
|
17
|
+
<table class="embargoes table">
|
18
|
+
<thead>
|
19
|
+
<tr>
|
20
|
+
<th></th><th>Type of Work</th><th>Title</th><th>Current Visibility</th><th>Embargo Release Date</th><th>Visibility will Change to</th><th></th>
|
21
|
+
</tr>
|
22
|
+
</thead>
|
23
|
+
<tbody>
|
24
|
+
<% assets_with_expired_embargoes.each_with_index do |curation_concern, i| %>
|
25
|
+
<tr>
|
26
|
+
<td><%= button_for_add_to_batch curation_concern%></td>
|
27
|
+
<td class="human-readable-type"><%= curation_concern.human_readable_type %></td>
|
28
|
+
<td class="title"><%= link_to curation_concern, edit_embargo_path(curation_concern) %></td>
|
29
|
+
<td class="current-visibility"><%= visibility_badge(curation_concern.visibility) %></td>
|
30
|
+
<td class="embargo-release-date"><%= curation_concern.embargo_release_date %></td>
|
31
|
+
<td class="visibility-after-embargo"><%= visibility_badge(curation_concern.visibility_after_embargo) %></td>
|
32
|
+
<td class="actions"><%= link_to 'Deactivate Embargo', embargo_path(curation_concern), method: :delete, class: 'btn btn-primary' %></td>
|
33
|
+
</tr>
|
34
|
+
<tr data-behavior="extra" data-id="<%= curation_concern.id %>" class="extra-embargo-info">
|
35
|
+
<td></td>
|
36
|
+
<td colspan=5>
|
37
|
+
<%= check_box_tag "embargoes[#{i}][copy_visibility]", curation_concern.id, true %> Change all files within <%= curation_concern %> to <%= visibility_badge(curation_concern.visibility_after_embargo) %>?</td>
|
38
|
+
</tr>
|
39
|
+
<% end %>
|
40
|
+
</tbody>
|
41
|
+
</table>
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
<% end %>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<% content_for :page_header do %>
|
2
|
+
<h1>Manage Embargoes for <%= curation_concern %><span class="human_readable_type">(<%= curation_concern.human_readable_type %>)</span></h1>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<h2>Current Embargo</h2>
|
6
|
+
<%= simple_form_for [:curation_concern, curation_concern] do |f| %>
|
7
|
+
<fieldset id="set-access-controls">
|
8
|
+
<section class="help-block">
|
9
|
+
<p>
|
10
|
+
<% if curation_concern.embargo_release_date %>
|
11
|
+
<strong>This work is under embargo.</strong>
|
12
|
+
<% else %>
|
13
|
+
<strong>This work is not currently under embargo.</strong> If you would like to apply and embargo, provide the information here.
|
14
|
+
<% end %>
|
15
|
+
</p>
|
16
|
+
</section>
|
17
|
+
|
18
|
+
<div class="form-group">
|
19
|
+
<input type="hidden" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_EMBARGO %>" />
|
20
|
+
<%= render "curation_concern/base/form_permission_embargo", curation_concern: curation_concern, f: f %>
|
21
|
+
</div>
|
22
|
+
</fieldset>
|
23
|
+
|
24
|
+
<div class="row">
|
25
|
+
<div class="col-md-12 form-actions">
|
26
|
+
<% if curation_concern.embargo_release_date %>
|
27
|
+
<%= f.submit "Update Embargo", class: 'btn btn-primary' %>
|
28
|
+
<%= link_to "Deactivate Embargo", embargo_path(curation_concern), :method => :delete, class: 'btn btn-danger' %>
|
29
|
+
<% else %>
|
30
|
+
<%= f.submit "Apply Embargo", class: 'btn btn-primary' %>
|
31
|
+
<% end %>
|
32
|
+
<%= link_to 'Cancel and manage all embargoes', embargoes_path, class: 'btn btn-default' %>
|
33
|
+
<%= link_to "Return to editing this #{curation_concern.human_readable_type}", edit_polymorphic_path([:curation_concern, curation_concern]), class: 'btn btn-default' %>
|
34
|
+
</div>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<h2>Past Embargoes</h2>
|
39
|
+
<% if curation_concern.embargo_history.empty? %>
|
40
|
+
This <%= curation_concern.human_readable_type %> has never had embargoes applied to it.
|
41
|
+
<% else %>
|
42
|
+
<%= render partial:"embargo_history" %>
|
43
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<h1>Manage Embargoes</h1>
|
2
|
+
|
3
|
+
<ul class="nav nav-tabs">
|
4
|
+
<li class="active"><a href="#active" data-toggle="tab">All Active Embargoes</a></li>
|
5
|
+
<li><a href="#expired" data-toggle="tab">Expired Active Embargoes</a></li>
|
6
|
+
<li><a href="#deactivated" data-toggle="tab">Deactivated Embargoes</a></li>
|
7
|
+
</ul>
|
8
|
+
<div class="tab-content">
|
9
|
+
<div class="tab-pane active" id="active">
|
10
|
+
<%= render "list_active_embargoes" %>
|
11
|
+
</div>
|
12
|
+
<div class="tab-pane" id="expired">
|
13
|
+
<%= render "list_expired_active_embargoes" %>
|
14
|
+
</div>
|
15
|
+
<div class="tab-pane" id="deactivated">
|
16
|
+
<%= render "list_deactivated_embargoes" %>
|
17
|
+
</div>
|
18
|
+
</div>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
3
|
+
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
4
|
+
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
|
5
|
+
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
|
6
|
+
<head>
|
7
|
+
<meta charset="utf-8">
|
8
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
9
|
+
<title><%= content_for?(:page_title) ? yield(:page_title) : default_page_title %></title>
|
10
|
+
<meta name="viewport" content="width=device-width">
|
11
|
+
<%= csrf_meta_tag %>
|
12
|
+
<%= stylesheet_link_tag 'application' %>
|
13
|
+
<%= javascript_include_tag 'application' %>
|
14
|
+
<%= render partial: 'shared/ga', formats: [:html] %>
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
|
18
|
+
<%= content_for?(:body) ? yield(:body) : yield %>
|
19
|
+
|
20
|
+
<%= render 'shared/ajax_modal' %>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
<% content_for :layout_name, 'common_objects, ' %>
|
2
|
+
<% content_for :body do %>
|
3
|
+
|
4
|
+
<header id="banner" role="banner">
|
5
|
+
<hgroup>
|
6
|
+
<div id="brand-bar-wrapper">
|
7
|
+
<%= render 'shared/brand_bar' %>
|
8
|
+
</div>
|
9
|
+
</hgroup>
|
10
|
+
</header>
|
11
|
+
|
12
|
+
<div id="main" role="main" class="container <%= yield(:page_class) if content_for?(:page_class)%>">
|
13
|
+
<% if content_for?(:page_header) %>
|
14
|
+
<div class="row">
|
15
|
+
<div class="col-md-12 main-header">
|
16
|
+
<%= yield(:page_header) %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
<div class="row">
|
21
|
+
<div class="<%= content_for?(:main_column_class) ? yield(:main_column_class) : "col-md-12" %>">
|
22
|
+
<%= yield %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<% if content_for?(:second_row) %>
|
26
|
+
<div class="row">
|
27
|
+
<div class="col-md-12">
|
28
|
+
<%= yield(:second_row) %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<%= render :template => 'layouts/boilerplate' %>
|