sufia 7.2.0 → 7.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +2 -0
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +1 -2
- data/.travis.yml +0 -1
- data/Gemfile +2 -1
- data/README.md +23 -106
- data/app/actors/sufia/apply_permission_template_actor.rb +19 -0
- data/app/actors/sufia/create_with_remote_files_actor.rb +2 -2
- data/app/actors/sufia/default_admin_set_actor.rb +42 -0
- data/app/actors/sufia/interpret_visibility_actor.rb +115 -0
- data/app/assets/images/collection.png +0 -0
- data/app/assets/javascripts/sufia.js +6 -0
- data/app/assets/javascripts/sufia/admin/admin_set/participants.es6 +9 -0
- data/app/assets/javascripts/sufia/admin/admin_set/visibility.es6 +134 -0
- data/app/assets/javascripts/sufia/admin/admin_set_controls.es6 +11 -0
- data/app/assets/javascripts/sufia/app.js +27 -5
- data/app/assets/javascripts/sufia/autocomplete.es6 +15 -0
- data/app/assets/javascripts/sufia/autocomplete/work.es6 +29 -0
- data/app/assets/javascripts/sufia/dashboard_actions.js +2 -4
- data/app/assets/javascripts/sufia/save_work/save_work_control.es6 +14 -2
- data/app/assets/javascripts/sufia/save_work/uploaded_files.es6 +7 -2
- data/app/assets/javascripts/sufia/save_work/visibility_component.es6 +245 -4
- data/app/assets/javascripts/sufia/select_work_type.es6 +38 -0
- data/app/assets/javascripts/sufia/workflow_actions_affix.js +14 -0
- data/app/assets/stylesheets/sufia/_dashboard.scss +50 -29
- data/app/assets/stylesheets/sufia/_footer.scss +30 -0
- data/app/assets/stylesheets/sufia/_header.scss +3 -4
- data/app/assets/stylesheets/sufia/_home-page.scss +10 -8
- data/app/assets/stylesheets/sufia/_select_work_type.scss +43 -0
- data/app/assets/stylesheets/sufia/_sufia.scss +4 -1
- data/app/assets/stylesheets/sufia/_variables.scss +3 -0
- data/app/assets/stylesheets/sufia/admin.scss +66 -169
- data/app/assets/stylesheets/sufia/blacklight_gallery.scss +17 -0
- data/app/authorities/qa/authorities/find_works.rb +15 -0
- data/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb +2 -1
- data/app/controllers/concerns/sufia/batch_uploads_controller_behavior.rb +26 -13
- data/app/controllers/concerns/sufia/collections_controller_behavior.rb +25 -0
- data/app/controllers/concerns/sufia/controller.rb +8 -0
- data/app/controllers/concerns/sufia/deny_access_override_behavior.rb +1 -1
- data/app/controllers/concerns/sufia/file_sets_controller_behavior.rb +5 -14
- data/app/controllers/concerns/sufia/homepage_controller_behavior.rb +2 -0
- data/app/controllers/concerns/sufia/users_controller_behavior.rb +18 -7
- data/app/controllers/concerns/sufia/works_controller_behavior.rb +13 -10
- data/app/controllers/my/collections_controller.rb +5 -0
- data/app/controllers/my/shares_controller.rb +5 -0
- data/app/controllers/my/works_controller.rb +5 -0
- data/app/controllers/stats_controller.rb +1 -1
- data/app/controllers/sufia/admin/admin_sets_controller.rb +20 -2
- data/app/controllers/sufia/admin/permission_template_accesses_controller.rb +15 -0
- data/app/controllers/sufia/admin/permission_templates_controller.rb +29 -0
- data/app/controllers/sufia/admin_controller.rb +2 -0
- data/app/controllers/sufia/trophies_controller.rb +0 -2
- data/app/forms/sufia/forms/admin_set_form.rb +19 -0
- data/app/forms/sufia/forms/batch_edit_form.rb +16 -6
- data/app/forms/sufia/forms/batch_upload_form.rb +3 -2
- data/app/forms/sufia/forms/permission_template_form.rb +115 -0
- data/app/forms/sufia/forms/work_form.rb +6 -0
- data/app/helpers/batch_edits_helper.rb +1 -1
- data/app/helpers/sufia/citations_behavior.rb +0 -5
- data/app/helpers/sufia/citations_behaviors/formatters.rb +0 -1
- data/app/helpers/sufia/sufia_helper_behavior.rb +38 -6
- data/app/indexers/sufia/collection_indexer.rb +6 -0
- data/app/jobs/batch_create_job.rb +7 -15
- data/app/models/batch_upload_item.rb +2 -0
- data/app/models/concerns/sufia/ability.rb +12 -1
- data/app/models/sufia/permission_template.rb +102 -0
- data/app/models/sufia/permission_template_access.rb +18 -0
- data/app/presenters/sufia/admin_set_presenter.rb +1 -1
- data/app/presenters/sufia/model_icon.rb +7 -0
- data/app/presenters/sufia/select_type_list_presenter.rb +37 -0
- data/app/presenters/sufia/select_type_presenter.rb +35 -0
- data/app/presenters/sufia/work_show_presenter.rb +0 -2
- data/app/search_builders/collection_search_builder.rb +0 -2
- data/app/search_builders/sufia/admin_set_search_builder.rb +24 -0
- data/app/search_builders/sufia/catalog_search_builder.rb +10 -4
- data/app/search_builders/sufia/find_works_search_builder.rb +44 -0
- data/app/search_builders/sufia/my_search_builder_behavior.rb +0 -4
- data/app/search_builders/sufia/my_works_search_builder.rb +1 -1
- data/app/services/sufia/actor_factory.rb +6 -2
- data/app/services/sufia/admin_set_create_service.rb +22 -0
- data/app/services/sufia/admin_set_service.rb +46 -16
- data/app/services/sufia/collection_thumbnail_path_service.rb +10 -0
- data/app/services/sufia/workflow/abstract_notification.rb +39 -0
- data/app/services/sufia/workflow/changes_required_notification.rb +22 -0
- data/app/services/sufia/workflow/complete_notification.rb +22 -0
- data/app/services/sufia/workflow/pending_review_notification.rb +21 -0
- data/app/services/sufia/workflow/workflow_by_admin_set_strategy.rb +15 -0
- data/app/views/_masthead.html.erb +4 -4
- data/app/views/_toolbar.html.erb +31 -9
- data/app/views/_user_util_links.html.erb +7 -7
- data/app/views/batch_edits/edit.html.erb +24 -12
- data/app/views/catalog/_thumbnail_list_collection.html.erb +1 -1
- data/app/views/collections/_form.html.erb +2 -2
- data/app/views/collections/_media_display.html.erb +1 -1
- data/app/views/curation_concerns/base/_find_work_widget.html.erb +16 -0
- data/app/views/curation_concerns/base/_form.html.erb +6 -0
- data/app/views/curation_concerns/base/_form_child_work_relationships.html.erb +1 -1
- data/app/views/curation_concerns/base/_form_metadata.html.erb +1 -1
- data/app/views/curation_concerns/base/_form_parent_work_relationships.html.erb +43 -0
- data/app/views/curation_concerns/base/_form_progress.html.erb +7 -4
- data/app/views/curation_concerns/base/_form_relationships.html.erb +6 -6
- data/app/views/curation_concerns/base/_form_share.html.erb +1 -2
- data/app/views/curation_concerns/base/_guts4form.html.erb +1 -1
- data/app/views/curation_concerns/base/_social_media.html.erb +1 -1
- data/app/views/curation_concerns/base/_workflow_actions_widget.erb +3 -0
- data/app/views/curation_concerns/base/edit.html.erb +1 -1
- data/app/views/curation_concerns/base/new.html.erb +1 -1
- data/app/views/curation_concerns/base/show.html.erb +4 -1
- data/app/views/curation_concerns/file_sets/_show_actions.html.erb +0 -3
- data/app/views/dashboard/_create_work_action.html.erb +20 -0
- data/app/views/dashboard/_index_partials/_heading_actions.html.erb +9 -22
- data/app/views/layouts/admin.html.erb +8 -68
- data/app/views/layouts/curation_concerns/1_column.html.erb +4 -31
- data/app/views/layouts/homepage.html.erb +15 -45
- data/app/views/layouts/sufia-dashboard.html.erb +1 -36
- data/app/views/layouts/sufia.html.erb +49 -0
- data/app/views/my/_document_list.html.erb +1 -1
- data/app/views/my/_facet_limit.html.erb +2 -2
- data/app/views/my/_index_partials/_default_group.html.erb +10 -10
- data/app/views/my/_index_partials/_list_collections.html.erb +1 -1
- data/app/views/my/_sort_and_per_page.html.erb +8 -8
- data/app/views/records/edit_fields/_rights.html.erb +0 -1
- data/app/views/shared/_footer.html.erb +1 -1
- data/app/views/shared/_select_work_type_modal.html.erb +34 -0
- data/app/views/sufia/admin/_collections.html.erb +31 -0
- data/app/views/sufia/admin/_sidebar.html.erb +35 -23
- data/app/views/sufia/admin/admin_sets/_form.html.erb +38 -15
- data/app/views/sufia/admin/admin_sets/_form_metadata.html.erb +2 -0
- data/app/views/sufia/admin/admin_sets/_form_participant_table.html.erb +21 -0
- data/app/views/sufia/admin/admin_sets/_form_participants.html.erb +68 -0
- data/app/views/sufia/admin/admin_sets/_form_visibility.html.erb +58 -0
- data/app/views/sufia/admin/admin_sets/index.html.erb +29 -33
- data/app/views/sufia/admin/admin_sets/show.html.erb +3 -0
- data/app/views/sufia/admin/show.html.erb +22 -19
- data/app/views/sufia/batch_uploads/_form.html.erb +2 -1
- data/app/views/sufia/homepage/index.html.erb +11 -3
- data/app/views/sufia/uploads/_js_templates.html.erb +15 -11
- data/app/views/users/_user_row.html.erb +10 -0
- data/app/views/users/index.html.erb +1 -12
- data/config/features.rb +2 -0
- data/config/locales/sufia.en.yml +122 -37
- data/config/routes.rb +4 -1
- data/db/migrate/20161021175854_create_permission_template.rb +11 -0
- data/db/migrate/20161021180154_create_permission_template_access.rb +11 -0
- data/db/migrate/20161116222307_add_release_to_permission_templates.rb +6 -0
- data/lib/generators/sufia/install_generator.rb +12 -3
- data/lib/generators/sufia/templates/catalog_controller.rb +3 -13
- data/lib/generators/sufia/templates/workflow.json.erb +65 -0
- data/lib/generators/sufia/upgrade700_generator.rb +1 -1
- data/lib/generators/sufia/work/templates/locale.en.yml.erb +37 -0
- data/lib/generators/sufia/{work_generator.rb → work/work_generator.rb} +25 -5
- data/lib/sufia.rb +0 -1
- data/lib/sufia/engine.rb +7 -0
- data/lib/sufia/move_all_works_to_admin_set.rb +8 -0
- data/lib/sufia/version.rb +1 -1
- data/lib/tasks/migrate.rake +8 -0
- data/spec/actors/sufia/apply_permission_template_actor_spec.rb +64 -0
- data/spec/actors/sufia/create_with_remote_files_actor_spec.rb +8 -0
- data/spec/actors/sufia/default_admin_set_actor_spec.rb +43 -0
- data/spec/actors/sufia/interpret_visibility_actor_spec.rb +266 -0
- data/spec/authorities/qa/authorities/find_works_spec.rb +55 -0
- data/spec/controllers/batch_edits_controller_spec.rb +1 -6
- data/spec/controllers/citations_controller_spec.rb +49 -10
- data/spec/controllers/collections_controller_spec.rb +39 -0
- data/spec/controllers/curation_concerns/generic_works_controller_spec.rb +22 -1
- data/spec/controllers/dashboard_controller_spec.rb +0 -8
- data/spec/controllers/depositors_controller_spec.rb +2 -2
- data/spec/controllers/downloads_controller_spec.rb +2 -2
- data/spec/controllers/my/collections_controller_spec.rb +5 -0
- data/spec/controllers/my/shares_controller_spec.rb +5 -0
- data/spec/controllers/my/works_controller_spec.rb +5 -0
- data/spec/controllers/stats_controller_spec.rb +1 -1
- data/spec/controllers/sufia/admin/admin_sets_controller_spec.rb +33 -5
- data/spec/controllers/sufia/admin/permission_template_accesses_controller_spec.rb +36 -0
- data/spec/controllers/sufia/admin/permission_templates_controller_spec.rb +46 -0
- data/spec/controllers/sufia/admin_controller_spec.rb +6 -0
- data/spec/controllers/sufia/batch_uploads_controller_spec.rb +40 -42
- data/spec/controllers/sufia/homepage_controller_spec.rb +14 -0
- data/spec/controllers/sufia/trophies_controller_spec.rb +17 -4
- data/spec/controllers/users_controller_spec.rb +13 -4
- data/spec/factories/permission_template_accesses.rb +5 -0
- data/spec/factories/permission_templates.rb +5 -0
- data/spec/factories/sipity_entities.rb +7 -0
- data/spec/factories/users.rb +4 -0
- data/spec/factories/workflow_states.rb +6 -0
- data/spec/factories/workflows.rb +5 -0
- data/spec/features/admin_admin_set_spec.rb +6 -4
- data/spec/features/batch_edit_spec.rb +0 -1
- data/spec/features/collection_spec.rb +4 -4
- data/spec/features/edit_work_spec.rb +1 -0
- data/spec/features/work_show_spec.rb +10 -0
- data/spec/forms/sufia/forms/admin_set_form_spec.rb +2 -1
- data/spec/forms/sufia/forms/batch_edit_form_spec.rb +30 -0
- data/spec/forms/sufia/forms/permission_template_form_spec.rb +196 -0
- data/spec/forms/sufia/forms/work_form_spec.rb +35 -1
- data/spec/helpers/batch_edits_helper_spec.rb +4 -4
- data/spec/helpers/blacklight_helper_spec.rb +1 -1
- data/spec/helpers/sufia_helper_spec.rb +39 -7
- data/spec/indexers/sufia/collection_indexer_spec.rb +12 -0
- data/spec/javascripts/autocomplete_spec.js.coffee +46 -6
- data/spec/javascripts/visibility_component_spec.js +491 -0
- data/spec/jobs/batch_create_job_spec.rb +27 -28
- data/spec/lib/sufia/arkivo_spec.rb +14 -0
- data/spec/lib/sufia/controlled_vocabulary/importer/downloader_spec.rb +31 -0
- data/spec/lib/sufia/move_all_works_to_admin_set_spec.rb +13 -0
- data/spec/lib/sufia/zotero_spec.rb +8 -0
- data/spec/models/sufia/ability_spec.rb +54 -14
- data/spec/models/sufia/permission_template_spec.rb +144 -0
- data/spec/models/sufia/user_usage_stats_spec.rb +8 -2
- data/spec/presenters/sufia/homepage_presenter_spec.rb +1 -1
- data/spec/presenters/sufia/select_type_list_presenter_spec.rb +26 -0
- data/spec/presenters/sufia/select_type_presenter_spec.rb +21 -0
- data/spec/search_builder/sufia/admin_set_search_builder_spec.rb +57 -0
- data/spec/search_builder/sufia/catalog_search_builder_spec.rb +40 -14
- data/spec/search_builder/sufia/find_works_search_builder_spec.rb +60 -0
- data/spec/search_builder/sufia/my_shares_search_builder_spec.rb +4 -1
- data/spec/search_builder/sufia/single_admin_set_search_builder_spec.rb +5 -1
- data/spec/services/sufia/actor_factory_spec.rb +13 -5
- data/spec/services/sufia/admin_set_create_service_spec.rb +27 -0
- data/spec/services/sufia/admin_set_service_spec.rb +104 -17
- data/spec/services/sufia/workflow/changes_required_notification_spec.rb +32 -0
- data/spec/services/sufia/workflow/complete_notification_spec.rb +32 -0
- data/spec/services/sufia/workflow/pending_review_notification_spec.rb +31 -0
- data/spec/services/sufia/workflow/workflow_by_admin_set_strategy_spec.rb +22 -0
- data/spec/spec_helper.rb +24 -5
- data/spec/support/proxies.rb +1 -1
- data/spec/test_app_templates/lib/generators/test_app_generator.rb +4 -0
- data/spec/views/_toolbar.html.erb_spec.rb +23 -6
- data/spec/views/batch_edits/edit.html.erb_spec.rb +7 -1
- data/spec/views/collections/_form_for_select_collection.html.erb_spec.rb +1 -3
- data/spec/views/curation_concerns/base/_find_work_widget.html.erb_spec.rb +22 -0
- data/spec/views/curation_concerns/base/_form.html.erb_spec.rb +7 -0
- data/spec/views/curation_concerns/base/_form_child_work_relationships.html.erb_spec.rb +1 -0
- data/spec/views/curation_concerns/base/_form_parent_work_relationships.html.erb_spec.rb +114 -0
- data/spec/views/curation_concerns/base/_form_progress.html.erb_spec.rb +3 -2
- data/spec/views/curation_concerns/base/_social_media.html.erb_spec.rb +1 -1
- data/spec/views/curation_concerns/base/edit.html.erb_spec.rb +1 -1
- data/spec/views/curation_concerns/base/show.html.erb_spec.rb +5 -1
- data/spec/views/curation_concerns/file_sets/_show_actions.html.erb_spec.rb +2 -2
- data/spec/views/dashboard/create_work_action.html.erb_spec.rb +27 -0
- data/spec/views/dashboard/index_spec.rb +7 -2
- data/spec/views/my/_sort_and_per_page.html.erb_spec.rb +33 -0
- data/spec/views/shared/select_work_type_modal.html.erb_spec.rb +32 -0
- data/spec/views/sufia/admin/admin_sets/_form.html.erb_spec.rb +18 -0
- data/spec/views/sufia/admin/admin_sets/_form_participants.html.erb_spec.rb +13 -0
- data/spec/views/sufia/admin/admin_sets/_form_visibility.html.erb_spec.rb +23 -0
- data/spec/views/sufia/batch_uploads/_form.html.erb_spec.rb +2 -12
- data/spec/views/sufia/homepage/index.html.erb_spec.rb +29 -8
- data/sufia.gemspec +5 -6
- data/tasks/sufia-dev.rake +6 -10
- data/template.rb +15 -0
- metadata +140 -28
- data/app/assets/stylesheets/sufia/widgets.css +0 -288
- data/app/helpers/sufia/citations_behaviors/formatters/endnote_formatter.rb +0 -49
- data/app/models/domain_term.rb +0 -4
- data/app/views/citations/file.html.erb +0 -0
- data/app/views/records/_rights_modal.html.erb +0 -1
- data/db/migrate/20160328222160_create_local_authorities.rb +0 -50
@@ -11,6 +11,9 @@
|
|
11
11
|
<%= link_to sufia.edit_admin_admin_set_path(@presenter), class: 'btn btn-primary' do %>
|
12
12
|
<span class="fa fa-edit"></span> <%= t(:'helpers.action.edit') %>
|
13
13
|
<% end %>
|
14
|
+
<%= link_to sufia.admin_admin_set_path(@presenter), class: 'btn btn-danger', data: { confirm: t('.confirm_delete'), method: :delete } do %>
|
15
|
+
<span class="fa fa-remove"></span> <%= t(:'helpers.action.delete') %>
|
16
|
+
<% end %>
|
14
17
|
</div>
|
15
18
|
</div>
|
16
19
|
|
@@ -1,36 +1,39 @@
|
|
1
|
-
<!-- START WIDGETS -->
|
2
1
|
<div class="row">
|
3
2
|
<div class="col-md-3">
|
4
|
-
<div class="
|
5
|
-
<div class="
|
6
|
-
<div class="
|
7
|
-
|
3
|
+
<div class="panel panel-default">
|
4
|
+
<div class="panel-heading"><div class="h3 panel-title text-center"><%= t('.registered_users') %></div></div>
|
5
|
+
<div class="panel-body text-center">
|
6
|
+
Current
|
7
|
+
<div class="h3"><%= @presenter.user_count %></div>
|
8
|
+
</div>
|
8
9
|
</div>
|
9
10
|
</div>
|
10
11
|
|
11
12
|
<div class="col-md-3">
|
12
|
-
<div class="
|
13
|
-
<div class="
|
14
|
-
<div class="
|
15
|
-
|
13
|
+
<div class="panel panel-default">
|
14
|
+
<div class="panel-heading"><div class="h3 panel-title text-center"><%= t('.total_visitors') %></div></div>
|
15
|
+
<div class="panel-body text-center">Past 30 days
|
16
|
+
<div class="h3">n/a</div>
|
17
|
+
</div>
|
16
18
|
</div>
|
17
19
|
</div>
|
18
20
|
|
19
21
|
<div class="col-md-3">
|
20
|
-
<div class="
|
21
|
-
<div class="
|
22
|
-
<div class="
|
23
|
-
|
22
|
+
<div class="panel panel-default">
|
23
|
+
<div class="panel-heading"><div class="h3 panel-title text-center"><%= t('.returning_visitors') %></div></div>
|
24
|
+
<div class="panel-body text-center">Past 30 days
|
25
|
+
<div class="h3">n/a</div>
|
26
|
+
</div>
|
24
27
|
</div>
|
25
28
|
</div>
|
26
29
|
|
27
|
-
|
28
30
|
<div class="col-md-3">
|
29
|
-
<div class="
|
30
|
-
<div class="
|
31
|
-
<div class="
|
32
|
-
|
31
|
+
<div class="panel panel-default">
|
32
|
+
<div class="panel-heading"><div class="h3 panel-title text-center"><%= t('.new_visitors') %></div></div>
|
33
|
+
<div class="panel-body text-center">Past 30 days
|
34
|
+
<div class="h3">n/a</div>
|
35
|
+
</div>
|
33
36
|
</div>
|
34
37
|
</div>
|
35
38
|
</div>
|
36
|
-
|
39
|
+
<%= render 'collections' %>
|
@@ -1,10 +1,11 @@
|
|
1
1
|
<%= simple_form_for [sufia, @form], html: { multipart: true } do |f| %>
|
2
2
|
<% content_for :files_tab do %>
|
3
3
|
<p class="switch-upload-type">To create a single work for all the files, go to <%= link_to "New Work", [:new, Sufia.primary_work_type.model_name.singular_route_key] %></p>
|
4
|
-
|
4
|
+
<p class="instructions"><%= t("sufia.batch_uploads.files.instructions") %></p>
|
5
5
|
<% end %>
|
6
6
|
<%= render 'curation_concerns/base/guts4form', f: f, tabs: %w[files metadata relationships share] do %>
|
7
7
|
<% end %>
|
8
|
+
<%= f.hidden_field :payload_concern, value: @form.payload_concern %>
|
8
9
|
<% end %>
|
9
10
|
|
10
11
|
<script type="text/javascript">
|
@@ -3,9 +3,17 @@
|
|
3
3
|
<% if @presenter.display_share_button? %>
|
4
4
|
<div class="home_share_work row">
|
5
5
|
<div class="col-sm-12 text-center">
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
<% if signed_in? %>
|
7
|
+
<%= link_to '#',
|
8
|
+
class: "btn btn-primary btn-lg",
|
9
|
+
data: { behavior: 'select-work', target: '#worktypes-to-create', 'create-type' => 'single' } do %>
|
10
|
+
<i class="glyphicon glyphicon-upload"></i> <%= t('sufia.share_button') %>
|
11
|
+
<% end %>
|
12
|
+
<% else %>
|
13
|
+
<%= link_to sufia.dashboard_index_path,
|
14
|
+
class: "btn btn-primary btn-lg" do %>
|
15
|
+
<i class="glyphicon glyphicon-upload"></i> <%= t('sufia.share_button') %>
|
16
|
+
<% end %>
|
9
17
|
<% end %>
|
10
18
|
<p><a href="/terms/">Terms of Use</a></p>
|
11
19
|
</div>
|
@@ -33,10 +33,19 @@
|
|
33
33
|
|
34
34
|
<!-- function used by the following template -->
|
35
35
|
<script type="text/javascript">
|
36
|
-
function setAllResourceTypes() {
|
37
|
-
var firstResourceType = $(".
|
36
|
+
function setAllResourceTypes(resourceTypeId) {
|
37
|
+
var firstResourceType = $("#resource_type_" + resourceTypeId.toString())[0];
|
38
|
+
var selected_options = [];
|
39
|
+
for (var i = 0; i < firstResourceType.length; i++) {
|
40
|
+
if (firstResourceType.options[i].selected) {
|
41
|
+
selected_options.push(firstResourceType.options[i].value);
|
42
|
+
}
|
43
|
+
}
|
38
44
|
$(".resource_type_dropdown").each(function(index, element) {
|
39
|
-
|
45
|
+
for(var i=0; i< this.length; i++) {
|
46
|
+
this.options[i].selected =
|
47
|
+
$.inArray(this.options[i].value, selected_options) > -1 ? true : false;
|
48
|
+
}
|
40
49
|
});
|
41
50
|
}
|
42
51
|
</script>
|
@@ -71,15 +80,10 @@
|
|
71
80
|
</div>
|
72
81
|
<label for="resource_type_{%=file.id%}" class="col-sm-5 control-label">Resource Type</label>
|
73
82
|
<div class="col-sm-7">
|
74
|
-
<select class="form-control resource_type_dropdown" name="resource_type[{%=file.id%}]" id="resource_type_{%=file.id%}" value="{%=file.name%}">
|
75
|
-
|
76
|
-
<option value="<%= type[0] %>"><%= type[1] %></option>
|
77
|
-
<% end %>
|
83
|
+
<select class="form-control resource_type_dropdown" multiple="multiple" size="6" name="resource_type[{%=file.id%}][]" id="resource_type_{%=file.id%}" value="{%=file.name%}">
|
84
|
+
<%= options_for_select(ResourceTypesService.select_options) %>
|
78
85
|
</select>
|
79
|
-
|
80
|
-
{% if (i == 0) { %}
|
81
|
-
<button class="btn pull-right resource_type_button" onClick="setAllResourceTypes(); return false;">Set all to this Resource Type</button>
|
82
|
-
{% } %}
|
86
|
+
<button class="btn pull-right resource_type_button" onClick="setAllResourceTypes({%= file.id %}); return false;">Set all to this Resource Type</button>
|
83
87
|
</div>
|
84
88
|
</div>
|
85
89
|
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<tr>
|
2
|
+
<td><%= link_to sufia.profile_path(user) do %>
|
3
|
+
<%= image_tag(user.avatar.url(:thumb), width: 30) if user.avatar.file %>
|
4
|
+
<% end %>
|
5
|
+
</td>
|
6
|
+
<td><%= link_to user.name, sufia.profile_path(user) %></td>
|
7
|
+
<td><%= link_to user.user_key, sufia.profile_path(user) %></td>
|
8
|
+
<td><%= user.department %></td>
|
9
|
+
<td><%= number_of_works(user) %></td>
|
10
|
+
</tr>
|
@@ -13,18 +13,7 @@
|
|
13
13
|
</tr>
|
14
14
|
</thead>
|
15
15
|
<tbody>
|
16
|
-
|
17
|
-
<tr>
|
18
|
-
<td><%= link_to sufia.profile_path(user) do %>
|
19
|
-
<%= image_tag(user.avatar.url(:thumb), width: 30) if user.avatar.file %>
|
20
|
-
<% end %>
|
21
|
-
</td>
|
22
|
-
<td><%= link_to user.name, sufia.profile_path(user) %></td>
|
23
|
-
<td><%= link_to user.user_key, sufia.profile_path(user) %></td>
|
24
|
-
<td><%= user.department %></td>
|
25
|
-
<td><%= number_of_works(user) %></td>
|
26
|
-
</tr>
|
27
|
-
<% end %>
|
16
|
+
<%= render partial: 'user_row', collection: @users, as: :user %>
|
28
17
|
</tbody>
|
29
18
|
</table>
|
30
19
|
<div class="pager">
|
data/config/features.rb
CHANGED
@@ -4,6 +4,8 @@ Flipflop.configure do
|
|
4
4
|
strategy :active_record, class: Sufia::Feature
|
5
5
|
strategy :default
|
6
6
|
|
7
|
+
# Note, if this is deactivated, a default admin set will be created and all
|
8
|
+
# works will be assigned to it when they are created.
|
7
9
|
feature :assign_admin_set,
|
8
10
|
default: true,
|
9
11
|
description: "Ability to assign uploaded items to an admin set"
|
data/config/locales/sufia.en.yml
CHANGED
@@ -10,6 +10,9 @@ en:
|
|
10
10
|
contact: "Contact"
|
11
11
|
product_name: "Sufia"
|
12
12
|
product_twitter_handle: "@HydraSphere"
|
13
|
+
icons:
|
14
|
+
collection: 'fa fa-cubes'
|
15
|
+
default: 'fa fa-cube'
|
13
16
|
institution_name: "Institution Name"
|
14
17
|
institution_name_full: "The Institution Name"
|
15
18
|
sort_label: "Sort the listing of items"
|
@@ -48,6 +51,10 @@ en:
|
|
48
51
|
button:
|
49
52
|
html: '<span class="glyphicon glyphicon-search"></span> Go'
|
50
53
|
text: "Search"
|
54
|
+
select_type:
|
55
|
+
name: "Work"
|
56
|
+
description: "General purpose worktype"
|
57
|
+
icon_class : 'fa fa-file-text-o'
|
51
58
|
upload:
|
52
59
|
my_computer:
|
53
60
|
sr_tab_label: "Access Files from"
|
@@ -104,14 +111,26 @@ en:
|
|
104
111
|
shares: "Shares"
|
105
112
|
works:
|
106
113
|
menu: "Works"
|
107
|
-
new: "New"
|
114
|
+
new: "New Work"
|
108
115
|
my: "My Works"
|
109
116
|
batch: "Batch Create"
|
110
117
|
collections:
|
111
118
|
menu: "Collections"
|
112
119
|
my: "My Collections"
|
113
120
|
new: "New Collection"
|
121
|
+
notifications: "Notifications"
|
122
|
+
profile:
|
123
|
+
sr_action: "View"
|
124
|
+
sr_target: "profile"
|
125
|
+
view: "View Profile"
|
126
|
+
edit: "Edit Profile"
|
127
|
+
logout: "Logout"
|
128
|
+
login: "Login"
|
114
129
|
dashboard:
|
130
|
+
heading_actions:
|
131
|
+
close: "Close"
|
132
|
+
create_work: "Create work"
|
133
|
+
select_type_of_work: "Select type of work"
|
115
134
|
title: "My Dashboard"
|
116
135
|
view_collections: "View Collections"
|
117
136
|
create_collection: "Create Collection"
|
@@ -219,14 +238,12 @@ en:
|
|
219
238
|
title: "Filename will be the default title. Please provide a more meaningful title, and filenames will still be preserved by the system."
|
220
239
|
resource_type: "You may select multiple types to apply to all files"
|
221
240
|
works:
|
222
|
-
|
223
|
-
header: Add New
|
224
|
-
in_collections: This Work in Collections
|
225
|
-
in_this_work: Other Works in this Work
|
226
|
-
in_other_works: This Work in Other Works
|
241
|
+
create:
|
242
|
+
header: "Add New %{type}"
|
227
243
|
after_create_html: "Your files are being processed by %{application_name} in the background. The metadata and access controls you specified are being applied. Files will be marked <span class=\"label label-danger\" title=\"Private\">Private</span> until this process is complete (shouldn't take too long, hang in there!). You may need to refresh this page to see these updates."
|
228
244
|
edit:
|
229
|
-
|
245
|
+
breadcrumb: 'Edit'
|
246
|
+
form:
|
230
247
|
in_collections: This Work in Collections
|
231
248
|
in_this_work: Other Works in this Work
|
232
249
|
in_other_works: This Work in Other Works
|
@@ -236,8 +253,10 @@ en:
|
|
236
253
|
files: "Files"
|
237
254
|
relationships: "Relationships"
|
238
255
|
share: "Share"
|
256
|
+
update:
|
257
|
+
header: Edit Work
|
239
258
|
progress:
|
240
|
-
header: Save Work
|
259
|
+
header: "Save Work"
|
241
260
|
show:
|
242
261
|
no_preview: No preview available
|
243
262
|
batch_uploads:
|
@@ -265,13 +284,14 @@ en:
|
|
265
284
|
label: "Delete"
|
266
285
|
desc: "Delete this collection"
|
267
286
|
confirmation: "Delete this collection?"
|
287
|
+
document_list:
|
288
|
+
edit: "Edit"
|
289
|
+
no_visible_works: "The collection is either empty or does not contain items to which you have access."
|
268
290
|
edit:
|
269
291
|
manage_items: "Manage Items in this Collection"
|
292
|
+
form:
|
270
293
|
description: "Descriptions"
|
271
294
|
additional_fields: "Additional fields"
|
272
|
-
document_list:
|
273
|
-
edit: "Edit"
|
274
|
-
no_visible_works: "The collection is either empty or does not contain items to which you have access."
|
275
295
|
select_form:
|
276
296
|
title: "Add to collection"
|
277
297
|
no_collections: "You do not have access to any existing collections. You may create a new collection."
|
@@ -290,8 +310,6 @@ en:
|
|
290
310
|
browse_view: "Browse View"
|
291
311
|
show:
|
292
312
|
download: "Download the file"
|
293
|
-
work:
|
294
|
-
browse_view: "Browse View"
|
295
313
|
footer:
|
296
314
|
copyright_html: "<strong>Copyright © 2016 Project Hydra</strong> Licensed under the Apache License, Version 2.0"
|
297
315
|
admin:
|
@@ -300,13 +318,85 @@ en:
|
|
300
318
|
header: "Edit Administrative Set"
|
301
319
|
new:
|
302
320
|
header: "Create New Administrative Set"
|
321
|
+
delete:
|
322
|
+
notification: "Administrative set successfully deleted"
|
323
|
+
form:
|
324
|
+
tabs:
|
325
|
+
description: "Description"
|
326
|
+
participants: "Participants"
|
327
|
+
visibility: "Release and Visibility"
|
328
|
+
form_participants:
|
329
|
+
add_group: "Add group:"
|
330
|
+
add_user: "Add user:"
|
331
|
+
add_participants: "Add Participants"
|
332
|
+
current_participants: "Current Participants"
|
333
|
+
form_participant_table:
|
334
|
+
managers:
|
335
|
+
title: "Managers"
|
336
|
+
help: "Managers of this administrative set can edit the set metadata, participants, and release and visibility settings. Managers can also edit work metadata, add to or remove files from a work, and add new works to the set."
|
337
|
+
agent_name: "Managers of This Set"
|
338
|
+
type: "Type"
|
339
|
+
action: "Action"
|
340
|
+
remove: "Remove"
|
341
|
+
depositors:
|
342
|
+
title: "Depositors"
|
343
|
+
help: "Depositors can add new works to this administrative set."
|
344
|
+
agent_name: "Depositors of This Set"
|
345
|
+
type: "Type"
|
346
|
+
action: "Action"
|
347
|
+
remove: "Remove"
|
348
|
+
viewers:
|
349
|
+
title: "Viewers"
|
350
|
+
help: "Viewers of this administrative set can view works in the set regardless of the visibility settings applied to the work. For example, viewers can view works in this set even if the works are currently embargoed or restricted."
|
351
|
+
agent_name: "Viewers of This Set"
|
352
|
+
type: "Type"
|
353
|
+
action: "Action"
|
354
|
+
remove: "Remove"
|
355
|
+
form_visibility:
|
356
|
+
page_description: "Release and visibility settings control when works added to this set are made available for discovery and download and who can discover and download them."
|
357
|
+
release:
|
358
|
+
title: "Release"
|
359
|
+
description: "You can impose a delay (embargo) before works in this administrative set are released for discovery and download."
|
360
|
+
no_delay: "No delay -- release all works as soon as they are deposited"
|
361
|
+
varies:
|
362
|
+
description: "Varies -- depositors can set the release date for an individual work:"
|
363
|
+
between: "Between \"now\" and"
|
364
|
+
embargo:
|
365
|
+
select: "Select embargo period.."
|
366
|
+
6mos: "6 months after deposit"
|
367
|
+
1yr: "1 year after deposit"
|
368
|
+
2yrs: "2 years after deposit"
|
369
|
+
3yrs: "3 years after deposit"
|
370
|
+
fixed: "Fixed -- delay release of all works until"
|
371
|
+
visibility:
|
372
|
+
title: "Visibility"
|
373
|
+
description: "After its release date, works in this set can be discovered and downloaded by:"
|
374
|
+
everyone: "Everyone -- all works in this set will be public"
|
375
|
+
varies: "Varies -- default is public, but depositors can restrict the visibility of individual works"
|
376
|
+
institution: "Institution -- all works will be visible only to authenticated users of this institution"
|
377
|
+
restricted: "Restricted -- all works will be visible only to repository managers and managers and reviewers of this administrative set"
|
378
|
+
cancel: "Cancel"
|
303
379
|
show:
|
304
380
|
header: "Administrative Set"
|
305
381
|
item_list_header: "Works in This Set"
|
382
|
+
confirm_delete: "Are you sure you wish to delete this Administrative Set? This action cannot be undone."
|
383
|
+
collections:
|
384
|
+
collection: "Collection"
|
385
|
+
subtitle: "Recent collection activity"
|
386
|
+
title: "Collections"
|
387
|
+
works: "Works"
|
388
|
+
show:
|
389
|
+
registered_users: "Registered users"
|
390
|
+
total_visitors: "Total Visitors"
|
391
|
+
returning_visitors: "Returning Visitors"
|
392
|
+
new_visitors: "New Visitors"
|
306
393
|
sidebar:
|
307
394
|
admin_sets: "Administrative Sets"
|
308
395
|
settings: "Settings"
|
309
396
|
statistics: "Statistics"
|
397
|
+
workflow: "Workflows"
|
398
|
+
workflow_review: "Review"
|
399
|
+
workflow_roles: "Roles"
|
310
400
|
stats:
|
311
401
|
registered: "Registered"
|
312
402
|
deposited_form:
|
@@ -323,7 +413,9 @@ en:
|
|
323
413
|
|
324
414
|
simple_form:
|
325
415
|
labels:
|
326
|
-
|
416
|
+
collection:
|
417
|
+
total_items: "Total Items"
|
418
|
+
size: "Size"
|
327
419
|
based_near: "Location"
|
328
420
|
description: "Abstract or Summary"
|
329
421
|
keyword: "Keyword"
|
@@ -332,27 +424,7 @@ en:
|
|
332
424
|
files: "Upload a new version of this file from your computer"
|
333
425
|
collection_ids: "Add as member of collection"
|
334
426
|
admin_set_id: "Add as member of administrative set"
|
335
|
-
collection:
|
336
|
-
total_items: "Total Items"
|
337
|
-
size: "Size"
|
338
|
-
<<: *work_labels
|
339
|
-
|
340
427
|
hints:
|
341
|
-
generic_work:
|
342
|
-
resource: "Pre-defined categories to describe the type of content being uploaded, such as "article" or "dataset." More than one type may be selected."
|
343
|
-
title: "A name to aid in identifying a work."
|
344
|
-
keyword: "Words or phrases you select to describe what the work is about. These are used to search for content."
|
345
|
-
subject: "Headings or index terms describing what the work is about; these do need to conform to an existing vocabulary."
|
346
|
-
creator: "The person or group responsible for the work. Usually this is the author of the content. Personal names should be entered with the last name first, e.g. "Smith, John."."
|
347
|
-
related_url: "A link to a website or other specific content (audio, video, PDF document) related to the work. An example is the URL of a research project from which the work was derived."
|
348
|
-
based_near: "A place name related to the work, such as its site of publication, or the city, state, or country the work contents are about. Calls upon the <a href='http://www.geonames.org'>GeoNames web service</a>."
|
349
|
-
contributor: "A person or group you want to recognize for playing a role in the creation of the work, but not the primary role."
|
350
|
-
date_created: "The date on which the work was generated."
|
351
|
-
description: "Free-text notes about the work. Examples include abstracts of a paper or citation information for a journal article."
|
352
|
-
identifier: "A unique handle identifying the work. An example would be a DOI for a journal article, or an ISBN or OCLC number for a book."
|
353
|
-
language: "The language of the work's content."
|
354
|
-
publisher: "The person or group making the work available. Generally this is the institution."
|
355
|
-
rights: "Licensing and distribution information governing access to the work. Select from the provided drop-down list."
|
356
428
|
collection:
|
357
429
|
resource_type: "Pre-defined categories to describe the type of content being uploaded, such as "article" or "dataset." More than one type may be selected."
|
358
430
|
title: "A name to aid in identifying a collection."
|
@@ -379,6 +451,8 @@ en:
|
|
379
451
|
relationships_parent_row_empty:
|
380
452
|
label: "In %{type}:"
|
381
453
|
empty: "There are no %{type} relationships."
|
454
|
+
show:
|
455
|
+
last_modified: "Last modified: %{value}"
|
382
456
|
metadata:
|
383
457
|
header: Descriptions
|
384
458
|
attribute_name_label: Attribute Name
|
@@ -387,6 +461,10 @@ en:
|
|
387
461
|
local_upload: Add Local Files
|
388
462
|
external_upload: Cloud Providers
|
389
463
|
dropzone: "Drop files here."
|
464
|
+
form_progress:
|
465
|
+
requirements: Requirements
|
466
|
+
required_descriptions: Describe your work
|
467
|
+
required_files: Add files
|
390
468
|
items:
|
391
469
|
header: Items
|
392
470
|
thumbnail: Thumbnail
|
@@ -406,7 +484,7 @@ en:
|
|
406
484
|
groups_description:
|
407
485
|
description_html: >
|
408
486
|
The list of groups in the drop-down marked "Select a group" is a list of User Managed Groups that
|
409
|
-
you are a member of. You may select a specific group and assign an access level for a file
|
487
|
+
you are a member of. You may select a specific group and assign an access level for a file
|
410
488
|
within %{application_name}, similarly to adding user access levels.
|
411
489
|
visibility:
|
412
490
|
open:
|
@@ -420,7 +498,7 @@ en:
|
|
420
498
|
private:
|
421
499
|
label_html: Private
|
422
500
|
single_use_links:
|
423
|
-
copy:
|
501
|
+
copy:
|
424
502
|
button: Copy
|
425
503
|
blacklight:
|
426
504
|
search:
|
@@ -430,14 +508,21 @@ en:
|
|
430
508
|
contributor: Contributors
|
431
509
|
keyword: Keyword
|
432
510
|
|
433
|
-
|
434
511
|
helpers:
|
435
512
|
action:
|
436
513
|
admin_set:
|
437
514
|
new: "Create new administrative set"
|
438
515
|
cancel: "Cancel"
|
516
|
+
delete: "Delete"
|
439
517
|
edit: "Edit"
|
440
518
|
submit:
|
441
519
|
admin_set:
|
442
520
|
create: 'Save'
|
443
521
|
update: 'Save'
|
522
|
+
sufia_permission_template:
|
523
|
+
create: 'Save'
|
524
|
+
update: 'Save'
|
525
|
+
sufia_permission_template_access:
|
526
|
+
create: 'Add'
|
527
|
+
create: 'Save'
|
528
|
+
update: 'Save'
|