hyrax 2.1.0.beta2 → 2.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODE_OF_CONDUCT.md +5 -5
- data/.github/CONTRIBUTING.md +2 -2
- data/.rubocop.yml +1 -0
- data/.rubocop_fixme.yml +2 -0
- data/Gemfile +1 -0
- data/README.md +3 -2
- data/app/actors/hyrax/actors/collections_membership_actor.rb +3 -0
- data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +4 -3
- data/app/actors/hyrax/actors/default_admin_set_actor.rb +9 -6
- data/app/assets/javascripts/hyrax.js +3 -0
- data/app/assets/javascripts/hyrax/app.js.erb +14 -0
- data/app/assets/javascripts/hyrax/batch_edit.js +2 -1
- data/app/assets/javascripts/hyrax/collection_types.es6 +97 -36
- data/app/assets/javascripts/hyrax/collections.js +15 -49
- data/app/assets/javascripts/hyrax/collections_utils.es6 +116 -0
- data/app/assets/javascripts/hyrax/collections_v2.es6 +57 -0
- data/app/assets/javascripts/hyrax/content_blocks.js +1 -13
- data/app/assets/javascripts/hyrax/nav_safety.js +41 -0
- data/app/assets/javascripts/hyrax/turbolinks_events.js +3 -0
- data/app/assets/stylesheets/hyrax/_collection_types.scss +46 -2
- data/app/assets/stylesheets/hyrax/_work-show.scss +6 -9
- data/app/assets/stylesheets/hyrax/dashboard.scss +2 -0
- data/app/assets/stylesheets/hyrax/sidebar.scss +4 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +10 -2
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +2 -9
- data/app/controllers/hyrax/admin/collection_types_controller.rb +1 -1
- data/app/controllers/hyrax/batch_edits_controller.rb +30 -4
- data/app/controllers/hyrax/dashboard/collection_members_controller.rb +1 -0
- data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -1
- data/app/controllers/hyrax/downloads_controller.rb +7 -1
- data/app/forms/hyrax/forms/admin/collection_type_form.rb +1 -1
- data/app/indexers/hyrax/repository_reindexer.rb +1 -1
- data/app/jobs/attach_files_to_work_job.rb +8 -4
- data/app/jobs/import_url_job.rb +11 -5
- data/app/models/admin_set.rb +25 -3
- data/app/models/concerns/hyrax/collection_behavior.rb +23 -11
- data/app/models/concerns/hyrax/collection_nesting.rb +22 -3
- data/app/models/hyrax/permission_template_access.rb +7 -4
- data/app/presenters/hyrax/admin_set_presenter.rb +21 -0
- data/app/presenters/hyrax/collection_presenter.rb +23 -1
- data/app/presenters/hyrax/dashboard/user_presenter.rb +4 -0
- data/app/presenters/hyrax/presents_attributes.rb +6 -2
- data/app/presenters/hyrax/work_show_presenter.rb +4 -0
- data/app/renderers/hyrax/renderers/attribute_renderer.rb +14 -0
- data/app/services/hyrax/adapters/nesting_index_adapter.rb +19 -39
- data/app/services/hyrax/admin_set_create_service.rb +1 -1
- data/app/services/hyrax/collection_types/create_service.rb +4 -0
- data/app/services/hyrax/collections/migration_service.rb +25 -2
- data/app/services/hyrax/collections/nested_collection_persistence_service.rb +8 -3
- data/app/services/hyrax/collections/nested_collection_query_service.rb +3 -3
- data/app/services/hyrax/default_middleware_stack.rb +3 -3
- data/app/services/hyrax/multiple_membership_checker.rb +4 -2
- data/app/views/catalog/_index_header_list_collection.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +0 -4
- data/app/views/hyrax/admin/admin_sets/_show_actions.html.erb +27 -0
- data/app/views/hyrax/admin/admin_sets/show.html.erb +1 -25
- data/app/views/hyrax/admin/collection_types/_form.html.erb +17 -6
- data/app/views/hyrax/admin/collection_types/_form_appearance.html.erb +5 -0
- data/app/views/hyrax/admin/collection_types/_form_participant_table.html.erb +1 -1
- data/app/views/hyrax/admin/collection_types/_form_participants.html.erb +56 -52
- data/app/views/hyrax/admin/collection_types/edit.html.erb +9 -7
- data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
- data/app/views/hyrax/base/_attribute_rows.html.erb +15 -14
- data/app/views/hyrax/base/_form.html.erb +1 -0
- data/app/views/hyrax/base/_form_collections_error.html.erb +1 -0
- data/app/views/hyrax/base/_items.html.erb +3 -2
- data/app/views/hyrax/base/_metadata.html.erb +5 -7
- data/app/views/hyrax/base/_relationships.html.erb +3 -5
- data/app/views/hyrax/base/_relationships_parent_row.html.erb +4 -5
- data/app/views/hyrax/base/_relationships_parent_rows.html.erb +2 -1
- data/app/views/hyrax/base/_show_actions.html.erb +11 -1
- data/app/views/hyrax/batch_edits/edit.html.erb +57 -17
- data/app/views/hyrax/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/collections/show.html.erb +1 -1
- data/app/views/hyrax/content_blocks/_form.html.erb +8 -7
- data/app/views/hyrax/dashboard/_index_partials/_current_proxy_rights.html.erb +17 -0
- data/app/views/hyrax/dashboard/collections/_collection_title.html.erb +1 -3
- data/app/views/hyrax/dashboard/collections/_default_group.html.erb +30 -0
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form_share.html.erb +2 -2
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +13 -2
- data/app/views/hyrax/dashboard/show_user.html.erb +10 -9
- data/app/views/hyrax/my/collections/_list_collections.html.erb +10 -3
- data/app/views/hyrax/my/collections/_modal_add_subcollection.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_add_to_collection.html.erb +1 -1
- data/app/views/hyrax/my/collections/_modal_delete_collections_deny.html.erb +14 -0
- data/app/views/hyrax/my/collections/index.html.erb +1 -0
- data/app/views/shared/_nav_safety_modal.html.erb +12 -0
- data/config/features.rb +4 -0
- data/config/initializers/samvera-nesting_indexer_initializer.rb +1 -0
- data/config/locales/hyrax.de.yml +26 -11
- data/config/locales/hyrax.en.yml +21 -6
- data/config/locales/hyrax.es.yml +17 -2
- data/config/locales/hyrax.fr.yml +17 -2
- data/config/locales/hyrax.it.yml +17 -2
- data/config/locales/hyrax.pt-BR.yml +17 -2
- data/config/locales/hyrax.zh.yml +17 -2
- data/config/locales/simple_form.en.yml +6 -27
- data/hyrax.gemspec +2 -2
- data/lib/generators/hyrax/assets_generator.rb +4 -0
- data/lib/generators/hyrax/install_generator.rb +10 -0
- data/lib/generators/hyrax/templates/app/assets/images/unauthorized.png +0 -0
- data/lib/generators/hyrax/templates/config/locales/hyrax.en.yml +6 -5
- data/lib/generators/hyrax/templates/config/tinymce.yml +12 -7
- data/lib/generators/hyrax/templates/db/migrate/20180406202557_add_badge_color_to_collection_types.rb.erb +5 -0
- data/lib/hyrax/configuration.rb +1 -1
- data/lib/hyrax/version.rb +1 -1
- data/spec/actors/hyrax/actors/collections_membership_actor_spec.rb +24 -0
- data/spec/actors/hyrax/actors/create_with_remote_files_actor_spec.rb +19 -1
- data/spec/actors/hyrax/actors/default_admin_set_actor_spec.rb +41 -8
- data/spec/actors/hyrax/actors/file_set_actor_spec.rb +4 -12
- data/spec/actors/hyrax/actors/generic_work_actor_spec.rb +3 -7
- data/spec/controllers/hyrax/admin/strategies_controller_spec.rb +13 -2
- data/spec/controllers/hyrax/batch_edits_controller_spec.rb +83 -8
- data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +3 -0
- data/spec/controllers/hyrax/downloads_controller_spec.rb +26 -5
- data/spec/controllers/hyrax/file_sets_controller_spec.rb +3 -6
- data/spec/controllers/hyrax/generic_works_controller_json_spec.rb +4 -4
- data/spec/controllers/hyrax/generic_works_controller_spec.rb +3 -23
- data/spec/controllers/hyrax/transfers_controller_spec.rb +1 -1
- data/spec/factories/admin_sets_lw.rb +215 -0
- data/spec/factories/collections.rb +10 -10
- data/spec/factory_tests/adminsets_factory_spec.rb +132 -0
- data/spec/factory_tests/collections_factory_spec.rb +3 -3
- data/spec/features/batch_create_spec.rb +5 -8
- data/spec/features/batch_edit_spec.rb +49 -2
- data/spec/features/collection_multi_membership_spec.rb +29 -14
- data/spec/features/collection_type_spec.rb +9 -2
- data/spec/features/create_work_admin_spec.rb +1 -1
- data/spec/features/create_work_spec.rb +1 -1
- data/spec/features/dashboard/collection_spec.rb +16 -12
- data/spec/features/edit_content_block_admin_spec.rb +29 -12
- data/spec/features/embargo_spec.rb +55 -0
- data/spec/features/proxy_spec.rb +3 -1
- data/spec/features/work_show_spec.rb +20 -4
- data/spec/forms/hyrax/forms/admin/collection_type_form_spec.rb +1 -0
- data/spec/indexers/hyrax/repository_reindexer_spec.rb +1 -1
- data/spec/jobs/attach_files_to_work_job_spec.rb +15 -3
- data/spec/jobs/batch_create_job_spec.rb +6 -6
- data/spec/jobs/create_work_job_spec.rb +1 -1
- data/spec/models/admin_set_spec.rb +10 -8
- data/spec/models/collection_spec.rb +1 -1
- data/spec/models/concerns/hyrax/collection_nesting_spec.rb +6 -3
- data/spec/models/flipflop_spec.rb +8 -0
- data/spec/models/hyrax/work_behavior_spec.rb +1 -1
- data/spec/presenters/hyrax/admin_set_presenter_spec.rb +70 -0
- data/spec/presenters/hyrax/collection_presenter_spec.rb +66 -0
- data/spec/renderers/hyrax/renderers/attribute_renderer_spec.rb +19 -0
- data/spec/services/hyrax/adapters/nesting_index_adapter_spec.rb +31 -21
- data/spec/services/hyrax/collection_types/create_service_spec.rb +7 -4
- data/spec/services/hyrax/collections/migration_service_spec.rb +204 -17
- data/spec/services/hyrax/collections/nested_collection_persistence_service_spec.rb +1 -1
- data/spec/services/hyrax/collections/permissions_create_service_spec.rb +1 -1
- data/spec/services/hyrax/collections/permissions_service_spec.rb +4 -0
- data/spec/services/hyrax/default_middleware_stack_spec.rb +1 -1
- data/spec/services/hyrax/multiple_membership_checker_spec.rb +4 -4
- data/spec/services/hyrax/workflow/grant_edit_to_depositor_spec.rb +1 -1
- data/spec/services/hyrax/workflow/grant_read_to_depositor_spec.rb +1 -1
- data/spec/services/hyrax/workflow/revoke_edit_from_depositor_spec.rb +1 -1
- data/spec/spec_helper.rb +35 -2
- data/spec/support/features/batch_edit_actions.rb +1 -1
- data/spec/support/selectors.rb +15 -0
- data/spec/views/hyrax/admin/admin_sets/_show_actions.html.erb_spec.rb +66 -0
- data/spec/views/hyrax/admin/admin_sets/show.html.erb_spec.rb +5 -34
- data/spec/views/hyrax/admin/collection_types/_form.html.erb_spec.rb +3 -1
- data/spec/views/hyrax/admin/collection_types/_form_appearance.html.erb_spec.rb +22 -0
- data/spec/views/hyrax/admin/collection_types/_form_participants.html.erb_spec.rb +11 -3
- data/spec/views/hyrax/base/_items.html.erb_spec.rb +46 -0
- data/spec/views/hyrax/base/_relationships.html.erb_spec.rb +1 -1
- data/spec/views/hyrax/base/_show_actions.html.erb_spec.rb +4 -2
- data/spec/views/hyrax/dashboard/collections/_default_group.html.erb_spec.rb +43 -0
- data/spec/views/hyrax/dashboard/collections/_list_collections.html.erb_spec.rb +51 -0
- data/spec/views/hyrax/dashboard/collections/show.html.erb_spec.rb +1 -0
- data/spec/views/hyrax/dashboard/show_user_spec.rb +5 -2
- data/spec/views/hyrax/my/collections/_list_collections.html.erb_spec.rb +2 -0
- data/template.rb +1 -1
- metadata +30 -13
- data/app/views/hyrax/content_blocks/_modal_content_block.html.erb +0 -15
@@ -1,10 +1,12 @@
|
|
1
|
-
|
2
|
-
<% provide :
|
3
|
-
|
4
|
-
|
1
|
+
<div class="collection-types-wrapper">
|
2
|
+
<% provide :page_title, construct_page_title( t('.header') ) %>
|
3
|
+
<% provide :page_header do %>
|
4
|
+
<h1><span class="fa fa-folder-open"></span> <%= t('.header') %>: <%= @form.title %></h1>
|
5
|
+
<% end %>
|
5
6
|
|
6
|
-
<div class="row">
|
7
|
-
|
8
|
-
|
7
|
+
<div class="row">
|
8
|
+
<div class="col-md-12">
|
9
|
+
<%= render 'form' %>
|
10
|
+
</div>
|
9
11
|
</div>
|
10
12
|
</div>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<div class="panel-body">
|
17
17
|
<p><%= t('.description') %></p>
|
18
18
|
|
19
|
-
<p><a class="collapse-header" data-toggle="collapse" href="#collapseAbout" aria-expanded="false" aria-controls="collapseAbout"><%= t('.more_toggle_header_html') %></a></p>
|
19
|
+
<p><a class="collapse-header" data-toggle="collapse" href="#collapseAbout" aria-expanded="false" aria-controls="collapseAbout" data-expand-text="<%= t('helpers.action.more')%>" data-collapse-text="<%= t('helpers.action.less')%>"><%= t('.more_toggle_header_html') %></a></p>
|
20
20
|
<div id="collapseAbout" class="collapse">
|
21
21
|
<%= t('.more_toggle_content_html') %>
|
22
22
|
</div>
|
@@ -1,14 +1,15 @@
|
|
1
|
-
<%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified')) %>
|
2
|
-
<%= presenter.attribute_to_html(:creator, render_as: :faceted) %>
|
3
|
-
<%= presenter.attribute_to_html(:contributor, render_as: :faceted) %>
|
4
|
-
<%= presenter.attribute_to_html(:subject, render_as: :faceted) %>
|
5
|
-
<%= presenter.attribute_to_html(:publisher, render_as: :faceted) %>
|
6
|
-
<%= presenter.attribute_to_html(:language, render_as: :faceted) %>
|
7
|
-
<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim') %>
|
8
|
-
<%= presenter.attribute_to_html(:keyword, render_as: :faceted) %>
|
9
|
-
<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim') %>
|
10
|
-
<%= presenter.attribute_to_html(:based_near_label) %>
|
11
|
-
<%= presenter.attribute_to_html(:related_url, render_as: :external_link) %>
|
12
|
-
<%= presenter.attribute_to_html(:resource_type, render_as: :faceted) %>
|
13
|
-
<%= presenter.attribute_to_html(:source) %>
|
14
|
-
<%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement) %>
|
1
|
+
<%= presenter.attribute_to_html(:date_modified, label: t('hyrax.base.show.last_modified'), html_dl: true) %>
|
2
|
+
<%= presenter.attribute_to_html(:creator, render_as: :faceted, html_dl: true) %>
|
3
|
+
<%= presenter.attribute_to_html(:contributor, render_as: :faceted, html_dl: true) %>
|
4
|
+
<%= presenter.attribute_to_html(:subject, render_as: :faceted, html_dl: true) %>
|
5
|
+
<%= presenter.attribute_to_html(:publisher, render_as: :faceted, html_dl: true) %>
|
6
|
+
<%= presenter.attribute_to_html(:language, render_as: :faceted, html_dl: true) %>
|
7
|
+
<%= presenter.attribute_to_html(:identifier, render_as: :linked, search_field: 'identifier_tesim', html_dl: true) %>
|
8
|
+
<%= presenter.attribute_to_html(:keyword, render_as: :faceted, html_dl: true) %>
|
9
|
+
<%= presenter.attribute_to_html(:date_created, render_as: :linked, search_field: 'date_created_tesim', html_dl: true) %>
|
10
|
+
<%= presenter.attribute_to_html(:based_near_label, html_dl: true) %>
|
11
|
+
<%= presenter.attribute_to_html(:related_url, render_as: :external_link, html_dl: true) %>
|
12
|
+
<%= presenter.attribute_to_html(:resource_type, render_as: :faceted, html_dl: true) %>
|
13
|
+
<%= presenter.attribute_to_html(:source, html_dl: true) %>
|
14
|
+
<%= presenter.attribute_to_html(:rights_statement, render_as: :rights_statement, html_dl: true) %>
|
15
|
+
|
@@ -10,6 +10,7 @@
|
|
10
10
|
<%= f.object.errors.full_messages_for(:base).send(SimpleForm.error_method) %>
|
11
11
|
<%= render 'form_in_works_error', f: f %>
|
12
12
|
<%= render 'form_ordered_members_error', f: f %>
|
13
|
+
<%= render 'form_collections_error', f: f %>
|
13
14
|
<%= render 'form_visibility_error', f: f %>
|
14
15
|
</div>
|
15
16
|
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= f.full_error(:collections) %>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<h2><%= t('.header') %></h2>
|
2
|
-
<%
|
2
|
+
<% members = Flipflop.hide_private_files? ? presenter.exclude_unauthorized_file_sets : presenter.member_presenters %>
|
3
|
+
<% if members.present? %>
|
3
4
|
<table class="table table-striped related-files">
|
4
5
|
<thead>
|
5
6
|
<tr>
|
@@ -11,7 +12,7 @@
|
|
11
12
|
</tr>
|
12
13
|
</thead>
|
13
14
|
<tbody>
|
14
|
-
<%= render partial: 'member', collection:
|
15
|
+
<%= render partial: 'member', collection: members %>
|
15
16
|
</tbody>
|
16
17
|
</table>
|
17
18
|
<% elsif can? :edit, presenter.id %>
|
@@ -1,8 +1,6 @@
|
|
1
|
-
<
|
2
|
-
<tbody>
|
1
|
+
<dl class="work-show <%= dom_class(presenter) %>" <%= presenter.microdata_type_to_html %>>
|
3
2
|
<%= render 'attribute_rows', presenter: presenter %>
|
4
|
-
<%= presenter.attribute_to_html(:embargo_release_date, render_as: :date) %>
|
5
|
-
<%= presenter.attribute_to_html(:lease_expiration_date, render_as: :date) %>
|
6
|
-
<%= presenter.attribute_to_html(:license, render_as: :license) %>
|
7
|
-
|
8
|
-
</table>
|
3
|
+
<%= presenter.attribute_to_html(:embargo_release_date, render_as: :date, html_dl: true) %>
|
4
|
+
<%= presenter.attribute_to_html(:lease_expiration_date, render_as: :date, html_dl: true) %>
|
5
|
+
<%= presenter.attribute_to_html(:license, render_as: :license, html_dl: true) %>
|
6
|
+
</dl>
|
@@ -1,6 +1,4 @@
|
|
1
1
|
<h2><%= t('.header') %></h2>
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
</tbody>
|
6
|
-
</table>
|
2
|
+
<dl class="work-show">
|
3
|
+
<%= render 'relationships_parent_rows', presenter: presenter %>
|
4
|
+
</dl>
|
@@ -1,6 +1,5 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
<td>
|
1
|
+
<dt> <%= t(".label", type: type.humanize) %> </dt>
|
2
|
+
<dd>
|
4
3
|
<% if items.blank? %>
|
5
4
|
<p><%= t('.empty', type: type.humanize) %></p>
|
6
5
|
<% else %>
|
@@ -12,5 +11,5 @@
|
|
12
11
|
<% end %>
|
13
12
|
</ul>
|
14
13
|
<% end %>
|
15
|
-
</
|
16
|
-
|
14
|
+
</dd>
|
15
|
+
|
@@ -13,6 +13,12 @@
|
|
13
13
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
14
14
|
Attach Child <span class="caret"></span>
|
15
15
|
</button>
|
16
|
+
|
17
|
+
<input type="checkbox" style="display:none" name="batch_document_ids[]" id="batch_document_<%= presenter.id %>" value="<%= presenter.id %>" class="batch_document_selector" checked="checked" />
|
18
|
+
<%= button_tag t('hyrax.dashboard.my.action.add_to_collection'),
|
19
|
+
class: 'btn btn-default submits-batches submits-batches-add',
|
20
|
+
data: { toggle: "modal", target: "#collection-list-container" } %>
|
21
|
+
|
16
22
|
<ul class="dropdown-menu">
|
17
23
|
<% presenter.valid_child_concerns.each do |concern| %>
|
18
24
|
<li>
|
@@ -32,7 +38,11 @@
|
|
32
38
|
data: { behavior: 'unfeature' },
|
33
39
|
class: presenter.display_feature_link? ? 'btn btn-default collapse' : 'btn btn-default' %>
|
34
40
|
<% end %>
|
41
|
+
</div>
|
35
42
|
|
36
43
|
<!-- COinS hook for Zotero -->
|
37
44
|
<span class="Z3988" title="<%= export_as_openurl_ctx_kev(presenter) %>"></span>
|
38
|
-
|
45
|
+
<!-- Render Modals -->
|
46
|
+
<%= render 'hyrax/dashboard/collections/form_for_select_collection', user_collections: @user_collections %>
|
47
|
+
|
48
|
+
|
@@ -50,25 +50,65 @@
|
|
50
50
|
</div><!-- #descriptions_display -->
|
51
51
|
|
52
52
|
<div id="permissions_display" class="tab-pane">
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
53
|
+
<div class="row">
|
54
|
+
<%= simple_form_for @form,
|
55
|
+
url: hyrax.batch_edits_path,
|
56
|
+
method: :put,
|
57
|
+
remote: true,
|
58
|
+
builder: Hyrax::FormBuilder,
|
59
|
+
html: { id: "form_permissions_visibility", class: "ajax-form"},
|
60
|
+
data: { 'param-key' => @form.model_name.param_key } do |f| %>
|
61
|
+
<div class="col-xs-12 col-sm-4">
|
62
|
+
<a class="accordion-toggle grey glyphicon-chevron-right-helper collapsed" data-toggle="collapse" href="#collapse_permissions_visibility" id="expand_link_permissions_visibility">
|
63
|
+
<%= f.input_label "Visibility" %> <span class="chevron"></span>
|
64
|
+
</a>
|
65
|
+
</div>
|
66
|
+
<div id="collapse_permissions_visibility" class="collapse scrolly col-xs-12 col-sm-7">
|
67
|
+
<%= hidden_field_tag('update_type', 'update') %>
|
68
|
+
<%= hidden_field_tag('key', 'permissions') %>
|
69
|
+
<%= render "hyrax/base/form_permission", f: f %>
|
63
70
|
|
64
|
-
|
65
|
-
|
71
|
+
<% @form.batch_document_ids.each do |batch_id| %>
|
72
|
+
<%= hidden_field_tag "batch_document_ids[]", batch_id %>
|
73
|
+
<% end %>
|
74
|
+
<div>
|
75
|
+
<%= f.submit "Save changes", class: 'btn btn-primary field-save', id: "permissions_visibility_save" %>
|
76
|
+
<a class="btn btn-default" data-toggle="collapse" data-parent="#row_permissions_visibility" href="#collapse_permissions_visibility">Cancel </a>
|
77
|
+
<div class="status fleft"></div>
|
78
|
+
</div>
|
79
|
+
</div>
|
66
80
|
<% end %>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
81
|
+
</div>
|
82
|
+
|
83
|
+
<div class="row">
|
84
|
+
<%= simple_form_for @form,
|
85
|
+
url: hyrax.batch_edits_path,
|
86
|
+
method: :put,
|
87
|
+
remote: true,
|
88
|
+
builder: Hyrax::FormBuilder,
|
89
|
+
html: { id: "form_permissions", class: "ajax-form"},
|
90
|
+
data: { 'param-key' => @form.model_name.param_key } do |f| %>
|
91
|
+
<div class="col-xs-12 col-sm-4">
|
92
|
+
<a class="accordion-toggle grey glyphicon-chevron-right-helper collapsed" data-toggle="collapse" href="#collapse_permissions_sharing" id="expand_link_permissions_sharing">
|
93
|
+
<%= f.input_label "Sharing" %> <span class="chevron"></span>
|
94
|
+
</a>
|
95
|
+
</div>
|
96
|
+
<div id="collapse_permissions_sharing" class="collapse scrolly col-xs-12 col-sm-7">
|
97
|
+
<%= hidden_field_tag('update_type', 'update') %>
|
98
|
+
<%= hidden_field_tag('key', 'permissions') %>
|
99
|
+
<%= render "hyrax/base/form_share", f: f %>
|
100
|
+
|
101
|
+
<% @form.batch_document_ids.each do |batch_id| %>
|
102
|
+
<%= hidden_field_tag "batch_document_ids[]", batch_id %>
|
103
|
+
<% end %>
|
104
|
+
<div>
|
105
|
+
<%= f.submit "Save changes", class: 'btn btn-primary field-save', id: "permissions_sharing_save" %>
|
106
|
+
<a class="btn btn-default" data-toggle="collapse" data-parent="#row_permissions_sharing" href="#collapse_permissions_sharing">Cancel </a>
|
107
|
+
<div class="status fleft"></div>
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<% end %>
|
111
|
+
</div>
|
72
112
|
</div>
|
73
113
|
</div> <!-- .tab-content -->
|
74
114
|
</div>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
</div>
|
20
20
|
</td>
|
21
21
|
<td class="collection_type">
|
22
|
-
|
22
|
+
<%= collection_presenter.collection_type_badge %>
|
23
23
|
</td>
|
24
24
|
<td class="text-center date"><%= collection_presenter.modified_date.try(:to_formatted_s, :standard) %> </td>
|
25
25
|
<td class="text-center">
|
@@ -1,20 +1,20 @@
|
|
1
|
-
<%= render "
|
1
|
+
<%= render "shared/nav_safety_modal" %>
|
2
2
|
<div class="panel panel-default tabs">
|
3
3
|
<ul class="nav nav-tabs" role="tablist">
|
4
4
|
<li class="active">
|
5
|
-
<a href="#announcement_text" role="tab" data-toggle="tab" class="
|
5
|
+
<a href="#announcement_text" role="tab" data-toggle="tab" class="nav-safety-confirm"><%= t(:'hyrax.content_blocks.tabs.announcement_text') %></a>
|
6
6
|
</li>
|
7
7
|
<li>
|
8
|
-
<a href="#marketing" role="tab" data-toggle="tab" class="
|
8
|
+
<a href="#marketing" role="tab" data-toggle="tab" class="nav-safety-confirm"><%= t(:'hyrax.content_blocks.tabs.marketing_text') %></a>
|
9
9
|
</li>
|
10
10
|
<li>
|
11
|
-
<a href="#researcher" role="tab" data-toggle="tab" class="
|
11
|
+
<a href="#researcher" role="tab" data-toggle="tab" class="nav-safety-confirm"><%= t(:'hyrax.content_blocks.tabs.featured_researcher') %></a>
|
12
12
|
</li>
|
13
13
|
</ul>
|
14
14
|
<div class="tab-content">
|
15
15
|
<div id="announcement_text" class="tab-pane active">
|
16
16
|
<div class="panel panel-default labels">
|
17
|
-
<%= simple_form_for ContentBlock.for(:announcement), url: hyrax.content_block_path(ContentBlock.for(:announcement)) do |f| %>
|
17
|
+
<%= simple_form_for ContentBlock.for(:announcement), url: hyrax.content_block_path(ContentBlock.for(:announcement)), html: {class: 'nav-safety'} do |f| %>
|
18
18
|
<div class="panel-body">
|
19
19
|
<div class="field form-group">
|
20
20
|
<%= f.label :announcement %><br />
|
@@ -30,7 +30,7 @@
|
|
30
30
|
</div>
|
31
31
|
<div id="marketing" class="tab-pane">
|
32
32
|
<div class="panel panel-default labels">
|
33
|
-
<%= simple_form_for ContentBlock.for(:marketing), url: hyrax.content_block_path(ContentBlock.for(:marketing)) do |f| %>
|
33
|
+
<%= simple_form_for ContentBlock.for(:marketing), url: hyrax.content_block_path(ContentBlock.for(:marketing)), html: {class: 'nav-safety'} do |f| %>
|
34
34
|
<div class="panel-body">
|
35
35
|
<div class="field form-group">
|
36
36
|
<%= f.label :marketing %><br />
|
@@ -46,7 +46,7 @@
|
|
46
46
|
</div>
|
47
47
|
<div id="researcher" class="tab-pane">
|
48
48
|
<div class="panel panel-default labels">
|
49
|
-
<%= simple_form_for ContentBlock.for(:researcher), url: hyrax.content_block_path(ContentBlock.for(:researcher)) do |f| %>
|
49
|
+
<%= simple_form_for ContentBlock.for(:researcher), url: hyrax.content_block_path(ContentBlock.for(:researcher)), html: {class: 'nav-safety'} do |f| %>
|
50
50
|
<div class="panel-body">
|
51
51
|
<div class="field form-group">
|
52
52
|
<%= f.label :researcher %><br />
|
@@ -62,3 +62,4 @@
|
|
62
62
|
</div>
|
63
63
|
</div>
|
64
64
|
</div>
|
65
|
+
<%= tinymce :content_block %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="clearfix proxy-rights">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-xs-6">
|
4
|
+
<table class="table table-condensed table-striped" id="authorizedProxies">
|
5
|
+
<tbody>
|
6
|
+
<% if user.can_receive_deposits_from.count == 0 %>
|
7
|
+
<%= t('hyrax.dashboard.no_proxies') %>
|
8
|
+
<% else %>
|
9
|
+
<% user.can_receive_deposits_from.each do |depositor| %>
|
10
|
+
<tr><td class="depositor-name"><%= depositor.name %></td></tr>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
|
+
</tbody>
|
14
|
+
</table>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -15,9 +15,7 @@
|
|
15
15
|
<% end %>
|
16
16
|
</h3>
|
17
17
|
<%= presenter.permission_badge %>
|
18
|
-
|
19
|
-
<%= presenter.collection_type_badge %>
|
20
|
-
</span>
|
18
|
+
<%= presenter.collection_type_badge %>
|
21
19
|
</div>
|
22
20
|
<div class="collection-title-row-content">
|
23
21
|
<%= render 'show_actions', presenter: presenter %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<table id="collections-list-table" class="table table-striped collections-list-table">
|
2
|
+
<caption class="sr-only"><%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %></caption>
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th class="check-all">
|
6
|
+
<label for="check_all" class="sr-only"><%= t("hyrax.dashboard.my.sr.check_all_label") %></label>
|
7
|
+
<input type="checkbox" name="check_all" id="check_all" value="yes" />
|
8
|
+
</th>
|
9
|
+
<th><%= t("hyrax.dashboard.my.heading.title") %></th>
|
10
|
+
<% if !current_ability.admin? %>
|
11
|
+
<th><%= t("hyrax.dashboard.my.heading.access") %></th>
|
12
|
+
<% end %>
|
13
|
+
<th><%= t("hyrax.dashboard.my.heading.type") %></th>
|
14
|
+
<th><%= t("hyrax.dashboard.my.heading.visibility") %></th>
|
15
|
+
<th><%= t("hyrax.dashboard.my.heading.items") %></th>
|
16
|
+
<th><%= t("hyrax.dashboard.my.heading.last_modified") %></th>
|
17
|
+
<th><%= t("hyrax.dashboard.my.heading.action") %></th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody>
|
21
|
+
<% docs.each_with_index do |document, counter| %>
|
22
|
+
<% collection_presenter = if document.admin_set?
|
23
|
+
Hyrax::AdminSetPresenter.new(document, current_ability, nil)
|
24
|
+
else
|
25
|
+
Hyrax::CollectionPresenter.new(document, current_ability, nil)
|
26
|
+
end %>
|
27
|
+
<%= render 'list_collections', collection_presenter: collection_presenter, counter: counter, is_admin_set: document.admin_set? %>
|
28
|
+
<% end %>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
@@ -123,10 +123,10 @@
|
|
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] %>" />
|
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] %>" />
|
130
130
|
</label>
|
131
131
|
</div>
|
132
132
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div role="dialog" class="modal collection-list-modal fade" id="collection-list-container" tabindex="-1" aria-labelledby="col_add_title">
|
2
|
-
<div class="modal-dialog">
|
2
|
+
<div class="modal-dialog text-left">
|
3
3
|
<div class="modal-content">
|
4
4
|
<div class="modal-header">
|
5
5
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
{ prompt: "Select a role..." },
|
32
32
|
class: 'form-control' %>
|
33
33
|
|
34
|
-
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button' %>
|
34
|
+
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button', :disabled => true %>
|
35
35
|
</div>
|
36
36
|
</div>
|
37
37
|
<% end %>
|
@@ -62,7 +62,7 @@
|
|
62
62
|
{ prompt: "Select a role..." },
|
63
63
|
class: 'form-control' %>
|
64
64
|
|
65
|
-
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button' %>
|
65
|
+
<%= f.submit t('helpers.submit.hyrax_permission_template_access.create'), class: 'btn btn-info edit-collection-add-sharing-button', :disabled => true %>
|
66
66
|
</div>
|
67
67
|
</div>
|
68
68
|
<% end %>
|
@@ -1,3 +1,4 @@
|
|
1
|
+
<% # used by All and Managed Collections tabs %>
|
1
2
|
<% id = collection_presenter.id %>
|
2
3
|
<tr id="document_<%= id %>"
|
3
4
|
data-id="<%= id %>"
|
@@ -5,7 +6,14 @@
|
|
5
6
|
data-post-url="<%= hyrax.dashboard_create_nest_collection_within_path(id) %>"
|
6
7
|
data-post-delete-url="<%= is_admin_set ? hyrax.admin_admin_set_path(id) : hyrax.dashboard_collection_path(id) %>">
|
7
8
|
|
8
|
-
<td
|
9
|
+
<td>
|
10
|
+
<% if collection_presenter.allow_batch? %>
|
11
|
+
<input type="checkbox" name="batch_document_ids[]" id="batch_document_<%= id %>" value="<%= id %>" class="batch_document_selector"
|
12
|
+
data-hasaccess="<%= (can?(:edit, collection_presenter.solr_document)) %>" />
|
13
|
+
<% else %>
|
14
|
+
<input type="checkbox" class="disabled" disabled=true />
|
15
|
+
<% end %>
|
16
|
+
</td>
|
9
17
|
<td>
|
10
18
|
<div class="thumbnail-title-wrapper">
|
11
19
|
<div class="thumbnail-wrapper">
|
@@ -46,8 +54,11 @@
|
|
46
54
|
</div>
|
47
55
|
</div>
|
48
56
|
</td>
|
57
|
+
<% if !current_ability.admin? %>
|
58
|
+
<td><%= collection_presenter.managed_access %></td>
|
59
|
+
<% end %>
|
49
60
|
<td class="collection_type">
|
50
|
-
|
61
|
+
<%= collection_presenter.collection_type_badge %>
|
51
62
|
</td>
|
52
63
|
<td><%= collection_presenter.permission_badge %> </td>
|
53
64
|
<td><%= collection_presenter.total_viewable_items %></td>
|