hyrax 2.1.0.beta1 → 2.1.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -49
- data/.rubocop_fixme.yml +1 -0
- data/.travis.yml +1 -1
- data/Gemfile +3 -3
- data/README.md +4 -2
- data/app/actors/hyrax/actors/file_set_actor.rb +0 -1
- data/app/actors/hyrax/actors/interpret_visibility_actor.rb +1 -3
- data/app/actors/hyrax/actors/model_actor.rb +4 -0
- data/app/assets/javascripts/hyrax.js +1 -1
- data/app/assets/javascripts/hyrax/app.js.erb +1 -1
- data/app/assets/javascripts/hyrax/authority_select.es6 +15 -7
- data/app/assets/javascripts/hyrax/collections.js +188 -9
- data/app/assets/javascripts/hyrax/content_blocks.js +13 -1
- data/app/assets/javascripts/hyrax/editor.es6 +2 -1
- data/app/assets/javascripts/hyrax/proxy_rights.js +2 -2
- data/app/assets/javascripts/hyrax/turbolinks_events.js +5 -0
- data/app/assets/stylesheets/hyrax/_accessibility.scss +21 -0
- data/app/assets/stylesheets/hyrax/_catalog.scss +21 -16
- data/app/assets/stylesheets/hyrax/_collections.scss +48 -7
- data/app/assets/stylesheets/hyrax/_modal.scss +4 -0
- data/app/assets/stylesheets/hyrax/_settings.scss +1 -1
- data/app/assets/stylesheets/hyrax/dashboard.scss +0 -1
- data/app/controllers/concerns/hyrax/breadcrumbs.rb +3 -1
- data/app/controllers/concerns/hyrax/embargoes_controller_behavior.rb +17 -1
- data/app/controllers/concerns/hyrax/leases_controller_behavior.rb +10 -0
- data/app/controllers/concerns/hyrax/local_file_downloads_controller_behavior.rb +86 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +14 -11
- data/app/controllers/hyrax/admin/collection_types_controller.rb +11 -1
- data/app/controllers/hyrax/api/items_controller.rb +2 -6
- data/app/controllers/hyrax/batch_edits_controller.rb +6 -0
- data/app/controllers/hyrax/batch_uploads_controller.rb +1 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -7
- data/app/controllers/hyrax/dashboard/profiles_controller.rb +2 -0
- data/app/controllers/hyrax/dashboard_controller.rb +2 -2
- data/app/controllers/hyrax/depositors_controller.rb +19 -0
- data/app/controllers/hyrax/downloads_controller.rb +3 -4
- data/app/controllers/hyrax/embargoes_controller.rb +2 -0
- data/app/controllers/hyrax/file_sets_controller.rb +12 -0
- data/app/controllers/hyrax/leases_controller.rb +2 -0
- data/app/controllers/hyrax/my/works_controller.rb +9 -0
- data/app/controllers/hyrax/my_controller.rb +0 -1
- data/app/controllers/hyrax/transfers_controller.rb +1 -3
- data/app/controllers/hyrax/users_controller.rb +1 -3
- data/app/forms/hyrax/forms/admin/collection_type_form.rb +1 -1
- data/app/forms/hyrax/forms/permission_template_form.rb +1 -4
- data/app/forms/hyrax/forms/work_form.rb +1 -3
- data/app/helpers/hyrax/citations_behaviors/common_behavior.rb +1 -3
- data/app/helpers/hyrax/citations_behaviors/formatters/chicago_formatter.rb +1 -5
- data/app/helpers/hyrax/collections_helper.rb +7 -4
- data/app/helpers/hyrax/file_set_helper.rb +0 -1
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +0 -1
- data/app/helpers/hyrax/trophy_helper.rb +0 -1
- data/app/indexers/hyrax/admin_set_indexer.rb +2 -0
- data/app/inputs/multi_value_select_input.rb +1 -3
- data/app/jobs/attach_files_to_work_job.rb +5 -1
- data/app/jobs/import_url_job.rb +9 -8
- data/app/models/admin_set.rb +1 -5
- data/app/models/concerns/hyrax/ability.rb +3 -4
- data/app/models/concerns/hyrax/collection_behavior.rb +0 -4
- data/app/models/concerns/hyrax/collection_nesting.rb +12 -0
- data/app/models/concerns/hyrax/suppressible.rb +1 -5
- data/app/models/featured_work_list.rb +1 -3
- data/app/models/hyrax/collection_type.rb +3 -2
- data/app/models/hyrax/permission_template_access.rb +6 -4
- data/app/models/proxy_deposit_request.rb +1 -1
- data/app/presenters/hyrax/collection_presenter.rb +0 -24
- data/app/presenters/hyrax/displays_image.rb +1 -1
- data/app/presenters/hyrax/file_set_presenter.rb +1 -1
- data/app/presenters/hyrax/menu_presenter.rb +1 -1
- data/app/presenters/hyrax/work_show_presenter.rb +15 -10
- data/app/search_builders/hyrax/abstract_type_relation.rb +2 -1
- data/app/search_builders/hyrax/collection_member_search_builder.rb +1 -1
- data/app/search_builders/hyrax/dashboard/collections_search_builder.rb +3 -1
- data/app/search_builders/hyrax/parent_collection_search_builder.rb +2 -2
- data/app/services/hyrax/admin_set_create_service.rb +1 -3
- data/app/services/hyrax/analytics.rb +1 -3
- data/app/services/hyrax/collection_member_service.rb +6 -5
- data/app/services/hyrax/collection_types/create_service.rb +37 -10
- data/app/services/hyrax/collections/permissions_create_service.rb +1 -3
- data/app/services/hyrax/collections/permissions_service.rb +6 -4
- data/app/views/catalog/_index_header_list_collection.html.erb +1 -1
- data/app/views/catalog/_index_header_list_default.html.erb +1 -1
- data/app/views/catalog/_index_list_default.html.erb +6 -10
- data/app/views/catalog/_search_form.html.erb +10 -11
- data/app/views/catalog/_thumbnail_list_collection.html.erb +1 -1
- data/app/views/catalog/_thumbnail_list_default.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form_participant_table.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form_participants.html.erb +1 -1
- data/app/views/hyrax/admin/admin_sets/_form_visibility.html.erb +3 -3
- data/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb +2 -2
- data/app/views/hyrax/admin/admin_sets/index.html.erb +1 -1
- data/app/views/hyrax/admin/appearances/show.html.erb +4 -4
- data/app/views/hyrax/admin/collection_types/_form_settings.html.erb +3 -2
- data/app/views/hyrax/admin/collection_types/index.html.erb +2 -2
- data/app/views/hyrax/admin/features/index.html.erb +2 -4
- data/app/views/hyrax/admin/stats/_date_form.html.erb +3 -3
- data/app/views/hyrax/admin/stats/_top_data.html.erb +1 -1
- data/app/views/hyrax/admin/stats/show.html.erb +1 -1
- data/app/views/hyrax/admin/workflows/index.html.erb +0 -1
- data/app/views/hyrax/base/_file_manager_actions.html.erb +2 -2
- data/app/views/hyrax/base/_file_manager_member.html.erb +1 -1
- data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -2
- data/app/views/hyrax/base/_form_files.html.erb +3 -3
- data/app/views/hyrax/base/_form_member_of_collections.html.erb +1 -2
- data/app/views/hyrax/base/_form_progress.html.erb +3 -3
- data/app/views/hyrax/base/_form_relationships.html.erb +2 -3
- data/app/views/hyrax/base/_form_representative.html.erb +0 -1
- data/app/views/hyrax/base/_form_share.html.erb +1 -3
- data/app/views/hyrax/base/_form_thumbnail.html.erb +0 -1
- data/app/views/hyrax/base/_form_visibility_component.html.erb +6 -6
- data/app/views/hyrax/base/_relationships_parent_rows.html.erb +3 -1
- data/app/views/hyrax/base/_representative_media.html.erb +1 -1
- data/app/views/hyrax/base/_share_with.html.erb +3 -3
- data/app/views/hyrax/base/_show_actions.html.erb +14 -1
- data/app/views/hyrax/base/_social_media.html.erb +5 -5
- data/app/views/hyrax/base/_work_title.erb +3 -1
- data/app/views/hyrax/base/_workflow_actions.html.erb +1 -1
- data/app/views/hyrax/base/inspect_work.html.erb +1 -1
- data/app/views/hyrax/base/show.html.erb +2 -2
- data/app/views/hyrax/batch_edits/_check_all.html.erb +2 -2
- data/app/views/hyrax/batch_edits/edit.html.erb +47 -44
- data/app/views/hyrax/batch_select/_add_button.html.erb +2 -2
- data/app/views/hyrax/citations/work.html.erb +3 -3
- data/app/views/hyrax/collections/_collection.html.erb +1 -1
- data/app/views/hyrax/collections/_default_group.html.erb +1 -1
- data/app/views/hyrax/collections/_list_collections.html.erb +2 -2
- data/app/views/hyrax/collections/_list_works.html.erb +1 -1
- data/app/views/hyrax/collections/_show_descriptions.html.erb +6 -6
- data/app/views/hyrax/collections/_show_document_list_row.html.erb +2 -2
- data/app/views/hyrax/collections/_show_parent_collections.html.erb +11 -38
- data/app/views/hyrax/collections/_sort_and_per_page.html.erb +13 -13
- data/app/views/hyrax/collections/_subcollection_list.html.erb +1 -1
- data/app/views/hyrax/collections/_view_type_group.html.erb +1 -1
- data/app/views/hyrax/collections/show.html.erb +122 -122
- data/app/views/hyrax/content_blocks/_form.html.erb +13 -12
- data/app/views/hyrax/content_blocks/_modal_content_block.html.erb +15 -0
- data/app/views/hyrax/dashboard/_index_partials/_proxy_rights.html.erb +25 -19
- data/app/views/hyrax/dashboard/_sidebar.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_button_for_remove_selected_from_collection.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_collection_title.html.erb +16 -16
- data/app/views/hyrax/dashboard/collections/_form.html.erb +3 -1
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +11 -11
- data/app/views/hyrax/dashboard/collections/_form_default_group_delt.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form_discovery.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +4 -4
- data/app/views/hyrax/dashboard/collections/_form_share.html.erb +51 -44
- data/app/views/hyrax/dashboard/collections/_form_share_table.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +4 -4
- data/app/views/hyrax/dashboard/collections/_list_works.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_modal_remove_from_collection.html.erb +10 -5
- data/app/views/hyrax/dashboard/collections/_modal_remove_sub_collection.html.erb +10 -5
- data/app/views/hyrax/dashboard/collections/_show_actions.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_show_document_list_row.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb +10 -5
- data/app/views/hyrax/dashboard/collections/_show_parent_collections.html.erb +11 -34
- data/app/views/hyrax/dashboard/collections/_sort_and_per_page.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_subcollection_list.html.erb +23 -17
- data/app/views/hyrax/dashboard/collections/show.html.erb +6 -6
- data/app/views/hyrax/dashboard/profiles/_edit_primary.html.erb +0 -4
- data/app/views/hyrax/dashboard/profiles/_trophy_edit.html.erb +16 -14
- data/app/views/hyrax/dashboard/profiles/show.html.erb +6 -0
- data/app/views/hyrax/dashboard/show_admin.html.erb +19 -3
- data/app/views/hyrax/dashboard/sidebar/_activity.html.erb +6 -0
- data/app/views/hyrax/dashboard/works/_list_works.html.erb +1 -1
- data/app/views/hyrax/depositors/index.html.erb +13 -0
- data/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +1 -1
- data/app/views/hyrax/embargoes/edit.html.erb +47 -35
- data/app/views/hyrax/embargoes/index.html.erb +6 -7
- data/app/views/hyrax/file_sets/_actions.html.erb +6 -2
- data/app/views/hyrax/file_sets/_extra_fields_modal.html.erb +3 -3
- data/app/views/hyrax/file_sets/_groups_description.html.erb +0 -1
- data/app/views/hyrax/file_sets/_permission_form.html.erb +3 -3
- data/app/views/hyrax/file_sets/edit.html.erb +24 -20
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +23 -6
- data/app/views/hyrax/file_sets/media_display/_default.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +23 -6
- data/app/views/hyrax/leases/_list_expired_active_leases.html.erb +1 -1
- data/app/views/hyrax/leases/edit.html.erb +47 -35
- data/app/views/hyrax/leases/index.html.erb +6 -6
- data/app/views/hyrax/my/_collection_action_menu.html.erb +1 -1
- data/app/views/hyrax/my/_facet_limit.html.erb +1 -2
- data/app/views/hyrax/my/_facet_pagination.html.erb +6 -6
- data/app/views/hyrax/my/_facet_pivot.html.erb +1 -1
- data/app/views/hyrax/my/_results_pagination.html.erb +1 -1
- data/app/views/hyrax/my/collections/_facets.html.erb +1 -1
- data/app/views/hyrax/my/collections/_list_collections.html.erb +5 -5
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +3 -2
- data/app/views/hyrax/my/collections/_modal_add_to_collection.html.erb +3 -1
- data/app/views/hyrax/my/collections/_modal_add_to_collection_permission_deny.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +2 -2
- data/app/views/hyrax/my/collections/_modal_delete_collection.html.erb +1 -2
- data/app/views/hyrax/my/collections/_modal_delete_deny.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_delete_selected_collections.html.erb +2 -2
- data/app/views/hyrax/my/collections/_tabs.html.erb +2 -2
- data/app/views/hyrax/my/collections/index.html.erb +7 -3
- data/app/views/hyrax/my/facet.html.erb +1 -1
- data/app/views/hyrax/my/index.html.erb +6 -2
- data/app/views/hyrax/my/works/_facets.html.erb +1 -1
- data/app/views/hyrax/my/works/_list_works.html.erb +1 -1
- data/app/views/hyrax/my/works/_tabs.html.erb +2 -2
- data/app/views/hyrax/my/works/index.html.erb +6 -2
- data/app/views/hyrax/notifications/_notifications.html.erb +1 -1
- data/app/views/hyrax/pages/_form.html.erb +12 -12
- data/app/views/hyrax/pages/show.html.erb +1 -1
- data/app/views/hyrax/single_use_links_viewer/show.html.erb +1 -1
- data/app/views/hyrax/stats/file.html.erb +6 -2
- data/app/views/hyrax/stats/work.html.erb +6 -2
- data/app/views/hyrax/transfers/_received.html.erb +6 -6
- data/app/views/hyrax/transfers/_sent.html.erb +2 -2
- data/app/views/hyrax/transfers/new.html.erb +0 -1
- data/app/views/hyrax/users/_activity_log.html.erb +2 -2
- data/app/views/hyrax/users/_profile_tabs.html.erb +1 -1
- data/app/views/hyrax/users/_search_form.html.erb +1 -1
- data/app/views/hyrax/users/_user.html.erb +0 -1
- data/app/views/hyrax/users/index.html.erb +1 -1
- data/app/views/kaminari/blacklight_compact/_paginator.html.erb +1 -2
- data/app/views/layouts/_head_tag_content.html.erb +2 -2
- data/app/views/layouts/error.html.erb +1 -1
- data/app/views/layouts/hyrax.html.erb +6 -3
- data/app/views/layouts/hyrax/dashboard.html.erb +6 -3
- data/app/views/records/show_fields/_based_near.html.erb +0 -1
- data/app/views/records/show_fields/_contributor.html.erb +0 -1
- data/app/views/records/show_fields/_date_created.html.erb +0 -1
- data/app/views/records/show_fields/_description.html.erb +1 -1
- data/app/views/records/show_fields/_identifier.html.erb +0 -1
- data/app/views/records/show_fields/_language.html.erb +0 -1
- data/app/views/records/show_fields/_publisher.html.erb +0 -1
- data/app/views/records/show_fields/_related_url.html.erb +0 -1
- data/app/views/records/show_fields/_resource_type.html.erb +0 -1
- data/app/views/records/show_fields/_subject.html.erb +0 -1
- data/app/views/shared/_citations.html.erb +17 -17
- data/app/views/shared/_select_work_type_modal.html.erb +2 -2
- data/config/locales/hyrax.de.yml +198 -189
- data/config/locales/hyrax.en.yml +21 -14
- data/config/locales/hyrax.es.yml +9 -0
- data/config/locales/hyrax.fr.yml +9 -0
- data/config/locales/hyrax.it.yml +9 -0
- data/config/locales/hyrax.pt-BR.yml +9 -0
- data/config/locales/hyrax.zh.yml +9 -0
- data/config/routes.rb +1 -0
- data/hyrax.gemspec +7 -18
- data/lib/generators/hyrax/models_generator.rb +0 -1
- data/lib/generators/hyrax/templates/db/migrate/20180302200051_add_branding_to_collection_type.rb.erb +5 -0
- data/lib/generators/hyrax/work/templates/feature_spec.rb.erb +1 -1
- data/lib/hyrax/configuration.rb +2 -4
- data/lib/hyrax/engine.rb +22 -4
- data/lib/hyrax/version.rb +1 -1
- data/spec/actors/hyrax/actors/lease_actor_spec.rb +16 -0
- data/spec/controllers/hyrax/admin/appearances_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/collection_types_controller_spec.rb +2 -0
- data/spec/controllers/hyrax/admin/features_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/workflow_roles_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/workflows_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/batch_edits_controller_spec.rb +14 -1
- data/spec/controllers/hyrax/batch_uploads_controller_spec.rb +2 -2
- data/spec/controllers/hyrax/citations_controller_spec.rb +4 -2
- data/spec/controllers/hyrax/collections_controller_spec.rb +32 -4
- data/spec/controllers/hyrax/content_blocks_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +11 -6
- data/spec/controllers/hyrax/depositors_controller_spec.rb +11 -0
- data/spec/controllers/hyrax/downloads_controller_spec.rb +42 -0
- data/spec/controllers/hyrax/embargoes_controller_spec.rb +40 -1
- data/spec/controllers/hyrax/file_sets_controller_spec.rb +10 -2
- data/spec/controllers/hyrax/generic_works_controller_spec.rb +38 -6
- data/spec/controllers/hyrax/leases_controller_spec.rb +11 -0
- data/spec/controllers/hyrax/my/collections_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/my/works_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/pages_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/stats_controller_spec.rb +2 -0
- data/spec/controllers/hyrax/transfers_controller_spec.rb +1 -1
- data/spec/factories/collection_types.rb +10 -1
- data/spec/factories/collections.rb +5 -3
- data/spec/factories/collections_factory.rb +3 -3
- data/spec/factories/file_sets.rb +2 -6
- data/spec/factories/generic_works.rb +68 -4
- data/spec/factory_tests/collections_factory_spec.rb +2 -1
- data/spec/features/batch_create_spec.rb +60 -0
- data/spec/features/batch_edit_spec.rb +1 -0
- data/spec/features/browse_dashboard_works_spec.rb +1 -0
- data/spec/features/collection_multi_membership_spec.rb +9 -6
- data/spec/features/collection_spec.rb +1 -1
- data/spec/features/collection_type_spec.rb +49 -1
- data/spec/features/create_work_admin_spec.rb +2 -2
- data/spec/features/create_work_spec.rb +1 -0
- data/spec/features/dashboard/all_works.rb +10 -2
- data/spec/features/dashboard/collection_spec.rb +38 -17
- data/spec/features/dashboard/display_admin_dashboard_spec.rb +29 -0
- data/spec/features/dashboard/display_dashboard_spec.rb +1 -1
- data/spec/features/edit_content_block_admin_spec.rb +45 -0
- data/spec/features/edit_work_spec.rb +40 -2
- data/spec/features/ownership_transfer_spec.rb +1 -0
- data/spec/features/proxy_spec.rb +2 -2
- data/spec/features/search_spec.rb +2 -5
- data/spec/features/work_show_spec.rb +14 -4
- data/spec/forms/hyrax/forms/admin/collection_type_form_spec.rb +1 -0
- data/spec/forms/hyrax/forms/collection_form_spec.rb +1 -1
- data/spec/helpers/hyrax/ability_helper_spec.rb +2 -2
- data/spec/helpers/hyrax/collections_helper_spec.rb +12 -4
- data/spec/javascripts/authority_select_spec.js +1 -1
- data/spec/javascripts/settings_spec.js +1 -0
- data/spec/jobs/attach_files_to_work_job_spec.rb +13 -0
- data/spec/jobs/import_url_job_spec.rb +14 -0
- data/spec/models/collection_spec.rb +1 -0
- data/spec/models/concerns/hyrax/collection_nesting_spec.rb +16 -0
- data/spec/models/hyrax/collection_type_spec.rb +1 -0
- data/spec/presenters/hyrax/collection_presenter_spec.rb +1 -100
- data/spec/presenters/hyrax/file_set_presenter_spec.rb +17 -2
- data/spec/presenters/hyrax/menu_presenter_spec.rb +6 -0
- data/spec/presenters/hyrax/work_show_presenter_spec.rb +15 -3
- data/spec/search_builders/hyrax/abstract_type_relation_spec.rb +18 -0
- data/spec/search_builders/hyrax/dashboard/collections_search_builder_spec.rb +30 -19
- data/spec/search_builders/hyrax/parent_collection_search_builder_spec.rb +15 -0
- data/spec/services/hyrax/collection_member_service_spec.rb +10 -19
- data/spec/services/hyrax/collection_types/create_service_spec.rb +35 -2
- data/spec/services/hyrax/collections/collection_member_service_spec.rb +1 -1
- data/spec/services/hyrax/qa_select_service_spec.rb +0 -1
- data/spec/support/selectors.rb +15 -0
- data/spec/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb_spec.rb +2 -0
- data/spec/views/hyrax/admin/collection_types/_form_settings.html.erb_spec.rb +1 -0
- data/spec/views/hyrax/admin/stats/show.html.erb_spec.rb +9 -0
- data/spec/views/hyrax/base/_attributes.html.erb_spec.rb +1 -1
- data/spec/views/hyrax/base/_relationships.html.erb_spec.rb +13 -1
- data/spec/views/hyrax/base/_show_actions.html.erb_spec.rb +10 -0
- data/spec/views/hyrax/base/show.html.erb_spec.rb +8 -0
- data/spec/views/hyrax/collections/_show_parent_collections.html.erb_spec.rb +3 -53
- data/spec/views/hyrax/dashboard/_sidebar.html.erb_spec.rb +22 -0
- data/spec/views/hyrax/dashboard/collections/_form_share.erb_spec.rb +2 -1
- data/spec/views/hyrax/dashboard/collections/_show_actions.html.erb_spec.rb +13 -0
- data/spec/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb_spec.rb +26 -8
- data/spec/views/hyrax/dashboard/collections/_show_parent_collections.html.erb_spec.rb +7 -43
- data/spec/views/hyrax/dashboard/collections/_subcollection_list.html.erb_spec.rb +13 -1
- data/spec/views/hyrax/dashboard/collections/show.html.erb_spec.rb +1 -0
- data/spec/views/hyrax/dashboard/profiles/_trophy_edit.html.erb_spec.rb +36 -0
- data/spec/views/hyrax/dashboard/profiles/edit.html.erb_spec.rb +0 -38
- data/spec/views/hyrax/dashboard/profiles/show.html.erb_spec.rb +37 -0
- data/spec/views/hyrax/depositors/index.html.erb_spec.rb +13 -0
- data/spec/views/hyrax/file_sets/_actions.html.erb_spec.rb +15 -0
- data/spec/views/hyrax/file_sets/media_display/_audio.html.erb_spec.rb +29 -0
- data/spec/views/hyrax/file_sets/media_display/_default.html.erb_spec.rb +1 -1
- data/spec/views/hyrax/file_sets/media_display/_video.html.erb_spec.rb +29 -0
- data/spec/views/hyrax/my/collections/_list_collections.html.erb_spec.rb +6 -2
- data/tasks/hyrax_dev.rake +1 -3
- data/template.rb +1 -1
- metadata +49 -41
- data/app/assets/javascripts/hyrax/collections_forms.js +0 -108
@@ -1,13 +1,14 @@
|
|
1
|
+
<%= render "modal_content_block" %>
|
1
2
|
<div class="panel panel-default tabs">
|
2
3
|
<ul class="nav nav-tabs" role="tablist">
|
3
4
|
<li class="active">
|
4
|
-
<a href="#announcement_text" role="tab" data-toggle="tab"><%= t(:'hyrax.content_blocks.tabs.announcement_text') %></a>
|
5
|
+
<a href="#announcement_text" role="tab" data-toggle="tab" class="show-confirm"><%= t(:'hyrax.content_blocks.tabs.announcement_text') %></a>
|
5
6
|
</li>
|
6
7
|
<li>
|
7
|
-
<a href="#marketing" role="tab" data-toggle="tab"><%= t(:'hyrax.content_blocks.tabs.marketing_text') %></a>
|
8
|
+
<a href="#marketing" role="tab" data-toggle="tab" class="show-confirm"><%= t(:'hyrax.content_blocks.tabs.marketing_text') %></a>
|
8
9
|
</li>
|
9
10
|
<li>
|
10
|
-
<a href="#researcher" role="tab" data-toggle="tab"><%= t(:'hyrax.content_blocks.tabs.featured_researcher') %></a>
|
11
|
+
<a href="#researcher" role="tab" data-toggle="tab" class="show-confirm"><%= t(:'hyrax.content_blocks.tabs.featured_researcher') %></a>
|
11
12
|
</li>
|
12
13
|
</ul>
|
13
14
|
<div class="tab-content">
|
@@ -16,13 +17,13 @@
|
|
16
17
|
<%= simple_form_for ContentBlock.for(:announcement), url: hyrax.content_block_path(ContentBlock.for(:announcement)) do |f| %>
|
17
18
|
<div class="panel-body">
|
18
19
|
<div class="field form-group">
|
19
|
-
<%= f.label :announcement %><br
|
20
|
+
<%= f.label :announcement %><br />
|
20
21
|
<%= f.text_area :announcement, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %>
|
21
22
|
</div>
|
22
23
|
</div>
|
23
24
|
<div class="panel-footer">
|
24
|
-
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right'%>
|
25
|
-
<%= f.button :submit, class: 'btn btn-primary pull-right'%>
|
25
|
+
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right' %>
|
26
|
+
<%= f.button :submit, class: 'btn btn-primary pull-right' %>
|
26
27
|
</div>
|
27
28
|
<% end %>
|
28
29
|
</div>
|
@@ -32,13 +33,13 @@
|
|
32
33
|
<%= simple_form_for ContentBlock.for(:marketing), url: hyrax.content_block_path(ContentBlock.for(:marketing)) do |f| %>
|
33
34
|
<div class="panel-body">
|
34
35
|
<div class="field form-group">
|
35
|
-
<%= f.label :marketing %><br
|
36
|
+
<%= f.label :marketing %><br />
|
36
37
|
<%= f.text_area :marketing, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %>
|
37
38
|
</div>
|
38
39
|
</div>
|
39
40
|
<div class="panel-footer">
|
40
|
-
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right'%>
|
41
|
-
<%= f.button :submit, class: 'btn btn-primary pull-right'%>
|
41
|
+
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right' %>
|
42
|
+
<%= f.button :submit, class: 'btn btn-primary pull-right' %>
|
42
43
|
</div>
|
43
44
|
<% end %>
|
44
45
|
</div>
|
@@ -48,13 +49,13 @@
|
|
48
49
|
<%= simple_form_for ContentBlock.for(:researcher), url: hyrax.content_block_path(ContentBlock.for(:researcher)) do |f| %>
|
49
50
|
<div class="panel-body">
|
50
51
|
<div class="field form-group">
|
51
|
-
<%= f.label :researcher %><br
|
52
|
+
<%= f.label :researcher %><br />
|
52
53
|
<%= f.text_area :researcher, value: f.object.value, class: 'form-control tinymce', rows: 20, cols: 120 %>
|
53
54
|
</div>
|
54
55
|
</div>
|
55
56
|
<div class="panel-footer">
|
56
|
-
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right'%>
|
57
|
-
<%= f.button :submit, class: 'btn btn-primary pull-right'%>
|
57
|
+
<%= link_to t(:'hyrax.content_blocks.cancel'), hyrax.admin_admin_sets_path, class: 'btn btn-default pull-right' %>
|
58
|
+
<%= f.button :submit, class: 'btn btn-primary pull-right' %>
|
58
59
|
</div>
|
59
60
|
<% end %>
|
60
61
|
</div>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<div class="modal fade" id="change-tab-content-block" tabindex="-1" role="dialog">
|
2
|
+
<div class="modal-dialog" role="document">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="delete-collection-form">
|
5
|
+
<div class="modal-body">
|
6
|
+
<%= t(:'hyrax.content_blocks.change_tab_message') %>
|
7
|
+
</div>
|
8
|
+
<div class="modal-footer">
|
9
|
+
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t('helpers.action.cancel') %></button>
|
10
|
+
<%= link_to 'OK', hyrax.edit_content_blocks_path, class: 'btn btn-default', id: "change-tab-btn" %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
@@ -1,24 +1,30 @@
|
|
1
1
|
<div class="clearfix proxy-rights">
|
2
|
-
<div class="row">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<%= hidden_field_tag :user, nil, data: { grantor: current_user.to_param } %>
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-12">
|
4
|
+
<p><%= t('hyrax.dashboard.proxy_help') %></p>
|
5
|
+
</div>
|
7
6
|
</div>
|
7
|
+
<div class="row">
|
8
|
+
<div class="col-xs-6 proxy-search">
|
9
|
+
<h4><%= t("hyrax.dashboard.authorize_proxies") %></h4>
|
10
|
+
<label class="sr-only" for="user"><%= t("hyrax.dashboard.proxy_user") %></label>
|
11
|
+
<%= hidden_field_tag :user, nil, data: { grantor: current_user.to_param } %>
|
12
|
+
<%= hidden_field_tag :delete_button_label, nil, data: { label: I18n.t('hyrax.dashboard.proxy_delete') } %>
|
13
|
+
</div>
|
8
14
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
15
|
+
<div class="col-xs-6">
|
16
|
+
<h4><%= t("hyrax.dashboard.current_proxies") %></h4>
|
17
|
+
<table class="table table-condensed table-striped" id="authorizedProxies">
|
18
|
+
<tbody>
|
19
|
+
<% user.can_receive_deposits_from.each do |depositor| %>
|
20
|
+
<tr><td class="depositor-name"><%= depositor.name %></td>
|
21
|
+
<td><%= link_to(I18n.t('hyrax.dashboard.proxy_delete'), hyrax.user_depositor_path(user, depositor),
|
22
|
+
method: :delete,
|
23
|
+
class: "remove-proxy-button btn btn-danger") %>
|
24
|
+
</td></tr>
|
25
|
+
<% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
</div>
|
22
29
|
</div>
|
23
30
|
</div>
|
24
|
-
</div>
|
data/app/views/hyrax/dashboard/collections/_button_for_remove_selected_from_collection.html.erb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<%# button for removing a batch from a collection %>
|
2
|
-
<%# collection -- collection to be updated
|
2
|
+
<%# collection -- collection to be updated %>
|
3
3
|
<%# label -- button label %>
|
4
4
|
<%= form_for collection, url: hyrax.dashboard_collection_path(collection.id), method: :put do |f| %>
|
5
5
|
<%= f.hidden_field :members, :value => "remove" %>
|
@@ -6,20 +6,20 @@
|
|
6
6
|
data-colls-hash="<%= presenter.available_parent_collections(scope: controller) %>"
|
7
7
|
data-post-url="<%= hyrax.dashboard_create_nest_collection_within_path(id) %>"
|
8
8
|
data-post-delete-url="<%= hyrax.dashboard_collection_path(id) %>">
|
9
|
-
|
10
|
-
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
<
|
19
|
-
<%=
|
20
|
-
</
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
9
|
+
|
10
|
+
<div class="collection-title-row-content">
|
11
|
+
<h3 class="collection-title">
|
12
|
+
<% # List multiple titles %>
|
13
|
+
<% presenter.title.each_with_index do |title, index| %>
|
14
|
+
<span><%= title %></span>
|
15
|
+
<% end %>
|
16
|
+
</h3>
|
17
|
+
<%= presenter.permission_badge %>
|
18
|
+
<span class="label label-success">
|
19
|
+
<%= presenter.collection_type_badge %>
|
20
|
+
</span>
|
21
|
+
</div>
|
22
|
+
<div class="collection-title-row-content">
|
23
|
+
<%= render 'show_actions', presenter: presenter %>
|
24
|
+
</div>
|
25
25
|
</section>
|
@@ -4,9 +4,11 @@
|
|
4
4
|
<a href="#description" role="tab" data-toggle="tab"><%= t('.tabs.description') %></a>
|
5
5
|
</li>
|
6
6
|
<% if @form.persisted? %>
|
7
|
+
<% if @collection.brandable? %>
|
7
8
|
<li>
|
8
9
|
<a href="#branding" role="tab" data-toggle="tab"><%= t('.tabs.branding') %></a>
|
9
10
|
</li>
|
11
|
+
<% end %>
|
10
12
|
<% if @collection.discoverable? %>
|
11
13
|
<li>
|
12
14
|
<a href="#discovery" role="tab" data-toggle="tab"><%= t('.tabs.discovery') %></a>
|
@@ -60,7 +62,7 @@
|
|
60
62
|
<% end %>
|
61
63
|
<% if params[:batch_document_ids].present? %>
|
62
64
|
<% params[:batch_document_ids].each do |batch_item| %>
|
63
|
-
<input type="hidden" name="batch_document_ids[]" value="<%= batch_item %>"/>
|
65
|
+
<input type="hidden" name="batch_document_ids[]" value="<%= batch_item %>" />
|
64
66
|
<% end %>
|
65
67
|
<% end %>
|
66
68
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
<div id="fileupload">
|
8
8
|
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
9
|
-
<noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>"
|
9
|
+
<noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>" /></noscript>
|
10
10
|
<!-- The table listing the files available for upload/download -->
|
11
11
|
|
12
12
|
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<span class="btn btn-success fileinput-button">
|
17
17
|
<span class="glyphicon glyphicon-plus"></span>
|
18
18
|
<span>Choose File</span>
|
19
|
-
<input type="file" name="files[]" single
|
19
|
+
<input type="file" name="files[]" single />
|
20
20
|
</span>
|
21
21
|
</div> <!-- end col-xs-4 -->
|
22
22
|
|
@@ -40,12 +40,12 @@
|
|
40
40
|
<div class="col-sm-3">
|
41
41
|
<span class="name">
|
42
42
|
<span><%= f.object.banner_info[:file] %></span>
|
43
|
-
<input type="hidden" name="banner_unchanged" value="true"
|
43
|
+
<input type="hidden" name="banner_unchanged" value="true" />
|
44
44
|
</span>
|
45
45
|
</div>
|
46
46
|
|
47
47
|
<div class="col-sm-2">
|
48
|
-
<button class="btn btn-danger delete branding-banner-remove" data-type="DELETE" data-url="/" onclick=$("#banner").remove()
|
48
|
+
<button class="btn btn-danger delete branding-banner-remove" data-type="DELETE" data-url="/" onclick=$("#banner").remove();>
|
49
49
|
<span class="glyphicon glyphicon-remove"></span>
|
50
50
|
<span class="controls-remove-text">Remove</span>
|
51
51
|
<span class="sr-only">
|
@@ -57,7 +57,7 @@
|
|
57
57
|
</div> <!-- row branding-banner-row -->
|
58
58
|
|
59
59
|
<% if f.object.banner_info[:relative_path] %>
|
60
|
-
<div class="banner-image"
|
60
|
+
<div class="banner-image">
|
61
61
|
<i><%= image_tag(f.object.banner_info[:relative_path],
|
62
62
|
size: "800x100",
|
63
63
|
alt: "Unable to display banner: #{f.object.banner_info[:file]}") %></i>
|
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
<div id="fileuploadlogo">
|
85
85
|
<!-- Redirect browsers with JavaScript disabled to the origin page -->
|
86
|
-
<noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>"
|
86
|
+
<noscript><input type="hidden" name="redirect" value="<%= main_app.root_path %>" /></noscript>
|
87
87
|
<!-- The table listing the files available for upload/download -->
|
88
88
|
|
89
89
|
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
|
@@ -93,7 +93,7 @@
|
|
93
93
|
<span class="btn btn-success fileinput-button">
|
94
94
|
<span class="glyphicon glyphicon-plus"></span>
|
95
95
|
<span>Choose File</span>
|
96
|
-
<input type="file" name="files[]" single
|
96
|
+
<input type="file" name="files[]" single />
|
97
97
|
</span>
|
98
98
|
</div> <!-- end col-xs-4 -->
|
99
99
|
|
@@ -117,21 +117,21 @@
|
|
117
117
|
<div class="col-sm-3">
|
118
118
|
<span class="name">
|
119
119
|
<span><%= linfo[:file] %></span>
|
120
|
-
<input type="hidden" name="logo_files[]" value="<%= linfo[:full_path] %>"
|
120
|
+
<input type="hidden" name="logo_files[]" value="<%= linfo[:full_path] %>" />
|
121
121
|
</span>
|
122
122
|
</div>
|
123
123
|
|
124
124
|
<div class="col-sm-4 branding-logo-input">
|
125
125
|
<label for="linkurl_<%= i %>">Link URL:
|
126
|
-
<input id="linkurl_<%= i %>" class="branding-logo-input" type="text" name="linkurl[]" value="<%= linfo[:linkurl] %>"
|
126
|
+
<input id="linkurl_<%= i %>" class="branding-logo-input" type="text" name="linkurl[]" value="<%= linfo[:linkurl] %>" /><input />
|
127
127
|
</label>
|
128
128
|
<label for="alttext_<%= i %>">Alt Text:
|
129
|
-
<input id="alttext_<%= i %>" class="branding-logo-input" type="text" name="alttext[]" value="<%= linfo[:alttext] %>"
|
129
|
+
<input id="alttext_<%= i %>" class="branding-logo-input" type="text" name="alttext[]" value="<%= linfo[:alttext] %>" /><input />
|
130
130
|
</label>
|
131
131
|
</div>
|
132
132
|
|
133
133
|
<div class="col-sm-2">
|
134
|
-
<button class="btn btn-danger delete branding-logo-remove" data-type="DELETE" data-url="/" onclick=$("#logorow_<%= i %>").remove()
|
134
|
+
<button class="btn btn-danger delete branding-logo-remove" data-type="DELETE" data-url="/" onclick=$("#logorow_<%= i %>").remove();>
|
135
135
|
<span class="glyphicon glyphicon-remove"></span>
|
136
136
|
<span class="controls-remove-text">Remove</span>
|
137
137
|
<span class="sr-only">
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<tr>
|
8
8
|
<th class="check-all"><label for="check_all" class="sr-only"><%= t("hyrax.dashboard.my.sr.check_all_label") %></label><%= render_check_all %></th>
|
9
9
|
<th><%= t("hyrax.dashboard.my.heading.title") %></th>
|
10
|
-
<th class="sorts-dash"><i id="<%= CatalogController.uploaded_field %>" class="<%= params[:sort] == "#{CatalogController.uploaded_field} desc" ? 'caret' : params[:sort] == "#{CatalogController.uploaded_field} asc" ? 'caret up' : ''%>"></i><%= t("hyrax.dashboard.my.heading.date_uploaded") %></th>
|
10
|
+
<th class="sorts-dash"><i id="<%= CatalogController.uploaded_field %>" class="<%= params[:sort] == "#{CatalogController.uploaded_field} desc" ? 'caret' : params[:sort] == "#{CatalogController.uploaded_field} asc" ? 'caret up' : '' %>"></i><%= t("hyrax.dashboard.my.heading.date_uploaded") %></th>
|
11
11
|
<th><%= t("hyrax.dashboard.my.heading.visibility") %></th>
|
12
12
|
<th><%= t("hyrax.dashboard.my.heading.action") %></th>
|
13
13
|
</tr>
|
@@ -5,13 +5,13 @@
|
|
5
5
|
|
6
6
|
<div class="form-group">
|
7
7
|
<label class="radio">
|
8
|
-
<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
|
8
|
+
<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 %> /><strong><%= t('hyrax.visibility.open.text') %></strong> - <%= t('hyrax.visibility.open.note_html') %>
|
9
9
|
</label>
|
10
10
|
<label class="radio">
|
11
11
|
<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 %> /><strong><%= t('hyrax.visibility.authenticated.text', institution: institution_name) %></strong> - <%= t('hyrax.visibility.authenticated.note_html', institution: institution_name) %>
|
12
12
|
</label>
|
13
13
|
<label class="radio">
|
14
|
-
<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
|
14
|
+
<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 %> /><strong><%= t('hyrax.visibility.restricted.text') %></strong>- <%= t('hyrax.visibility.restricted.note_html') %>
|
15
15
|
</label>
|
16
16
|
</div>
|
17
17
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div role="dialog" class="modal collection-list-modal fade" id="collection-list-container" tabindex="-1" aria-labelledby="col_add_title"
|
1
|
+
<div role="dialog" class="modal collection-list-modal fade" id="collection-list-container" tabindex="-1" aria-labelledby="col_add_title">
|
2
2
|
<div class="modal-dialog">
|
3
3
|
<div class="modal-content">
|
4
4
|
<div class="modal-header">
|
@@ -7,13 +7,13 @@
|
|
7
7
|
</div>
|
8
8
|
<div class="modal-body">
|
9
9
|
<% if user_collections.blank? %>
|
10
|
-
<em> <%= t("hyrax.collection.select_form.no_collections") %></em><br
|
10
|
+
<em> <%= t("hyrax.collection.select_form.no_collections") %></em><br /><br /><br /><br />
|
11
11
|
<% else %>
|
12
12
|
<div class="collection-list">
|
13
13
|
<fieldset>
|
14
14
|
<legend><%= t("hyrax.collection.select_form.select_heading") %></legend>
|
15
15
|
<ul>
|
16
|
-
<% user_collections.sort { |c1,c2| c2[CatalogController.uploaded_field] <=> c1[CatalogController.uploaded_field] }.each_with_index do |collection,index|
|
16
|
+
<% user_collections.sort { |c1,c2| c2[CatalogController.uploaded_field] <=> c1[CatalogController.uploaded_field] }.each_with_index do |collection,index| %>
|
17
17
|
<li>
|
18
18
|
<% selected = (collection.id == @add_works_to_collection) || (@add_works_to_collection.blank? && index == 0) %>
|
19
19
|
<%= radio_button_tag(:id, collection.id, selected, class: "collection-selector") %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<% end %> <!-- else -->
|
27
27
|
</div>
|
28
28
|
<div class="modal-footer">
|
29
|
-
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("hyrax.collection.select_form.close")%></button>
|
29
|
+
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("hyrax.collection.select_form.close") %></button>
|
30
30
|
<% if user_collections.blank? %>
|
31
31
|
<%= render 'hyrax/dashboard/collections/button_create_collection', label: t("hyrax.collection.select_form.create") %>
|
32
32
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
<% access_options = options_for_select([['Manager', 'manage'], ['Depositor', 'deposit'], ['Viewer', 'view']]) %>
|
2
|
+
|
1
3
|
<div id="participants" class="tab-pane">
|
2
4
|
<div class="panel panel-default labels edit-sharing-tab">
|
3
5
|
<div class="panel-body">
|
@@ -6,64 +8,69 @@
|
|
6
8
|
<p><%= t('.note') %></p>
|
7
9
|
<h3><%= t('.add_sharing') %></h3>
|
8
10
|
|
9
|
-
|
11
|
+
<!-- Add group form -->
|
12
|
+
<div class="form-add-sharing-wrapper" data-id="<%= @form.id %>">
|
13
|
+
<%= simple_form_for @form.permission_template,
|
14
|
+
url: [hyrax, :dashboard, @form, :permission_template],
|
15
|
+
html: { id: 'group-participants-form' } do |f| %>
|
16
|
+
<div class="clearfix spacer">
|
17
|
+
<%= f.fields_for 'access_grants_attributes',
|
18
|
+
f.object.access_grants.build(agent_type: 'group'),
|
19
|
+
index: 0 do |builder| %>
|
20
|
+
|
21
|
+
<div class="form-inline add-sharing-form">
|
22
|
+
<label class="col-md-2 col-xs-4 control-label"><%= t('.add_group') %>:</label>
|
23
|
+
<div class="col-md-10 col-xs-8 form-group">
|
24
|
+
<%= builder.hidden_field :agent_type %>
|
25
|
+
<%= builder.text_field :agent_id,
|
26
|
+
placeholder: "Search for a group...",
|
27
|
+
class: 'form-control search-input' %>
|
28
|
+
as
|
29
|
+
<%= builder.select :access,
|
30
|
+
access_options,
|
31
|
+
{ prompt: "Select a role..." },
|
32
|
+
class: 'form-control' %>
|
33
|
+
|
34
|
+
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button' %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
38
|
+
</div>
|
39
|
+
<% end %>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<!-- Add user form -->
|
43
|
+
<div class="form-add-sharing-wrapper" data-id="<%= @form.id %>">
|
44
|
+
<%= simple_form_for @form.permission_template,
|
45
|
+
url: [hyrax, :dashboard, @form, :permission_template],
|
46
|
+
html: { id: 'user-participants-form' } do |f| %>
|
47
|
+
<div class="clearfix spacer">
|
10
48
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<div class="clearfix spacer">
|
15
|
-
<%= f.fields_for 'access_grants_attributes',
|
16
|
-
f.object.access_grants.build(agent_type: 'group'),
|
17
|
-
index: 0 do |builder| %>
|
49
|
+
<%= f.fields_for 'access_grants_attributes',
|
50
|
+
f.object.access_grants.build(agent_type: 'user'),
|
51
|
+
index: 0 do |builder| %>
|
18
52
|
|
19
|
-
<div class="form-inline add-
|
20
|
-
<label class="col-md-2 col-xs-4 control-label"><%= t('.
|
53
|
+
<div class="form-inline add-users">
|
54
|
+
<label class="col-md-2 col-xs-4 control-label"><%= t('.add_user') %>:</label>
|
21
55
|
<div class="col-md-10 col-xs-8 form-group">
|
22
56
|
<%= builder.hidden_field :agent_type %>
|
23
57
|
<%= builder.text_field :agent_id,
|
24
|
-
placeholder: "Search for a
|
25
|
-
class: 'form-control search-input' %>
|
58
|
+
placeholder: "Search for a user..." %>
|
26
59
|
as
|
27
60
|
<%= builder.select :access,
|
28
61
|
access_options,
|
29
62
|
{ prompt: "Select a role..." },
|
30
63
|
class: 'form-control' %>
|
31
64
|
|
32
|
-
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info' %>
|
65
|
+
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button' %>
|
33
66
|
</div>
|
34
67
|
</div>
|
35
|
-
|
36
|
-
</div>
|
37
|
-
<% end %>
|
38
|
-
|
39
|
-
<%= simple_form_for @form.permission_template,
|
40
|
-
url: [hyrax, :dashboard, @form, :permission_template],
|
41
|
-
html: { id: 'user-participants-form' } do |f| %>
|
42
|
-
<div class="clearfix spacer">
|
43
|
-
|
44
|
-
<%= f.fields_for 'access_grants_attributes',
|
45
|
-
f.object.access_grants.build(agent_type: 'user'),
|
46
|
-
index: 0 do |builder| %>
|
47
|
-
|
48
|
-
<div class="form-inline add-users">
|
49
|
-
<label class="col-md-2 col-xs-4 control-label"><%= t('.add_user') %>:</label>
|
50
|
-
<div class="col-md-10 col-xs-8 form-group">
|
51
|
-
<%= builder.hidden_field :agent_type %>
|
52
|
-
<%= builder.text_field :agent_id,
|
53
|
-
placeholder: "Search for a user..." %>
|
54
|
-
as
|
55
|
-
<%= builder.select :access,
|
56
|
-
access_options,
|
57
|
-
{ prompt: "Select a role..." },
|
58
|
-
class: 'form-control' %>
|
59
|
-
|
60
|
-
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info' %>
|
61
|
-
</div>
|
68
|
+
<% end %>
|
62
69
|
</div>
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<p class="help-block"><%= t('hyrax.admin.admin_sets.form.note')%></p>
|
70
|
+
<% end %>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
<p class="help-block"><%= t('hyrax.admin.admin_sets.form.note') %></p>
|
67
74
|
</section>
|
68
75
|
|
69
76
|
<section class="section-collection-sharing">
|