hyrax 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +1 -1
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
- data/.rubocop.yml +8 -1
- data/README.md +3 -11
- data/app/actors/hyrax/actors/file_set_actor.rb +6 -1
- data/app/assets/javascripts/hyrax.js +1 -1
- data/app/assets/javascripts/hyrax/editor.es6 +8 -0
- data/app/assets/javascripts/hyrax/save_work/save_work_control.es6 +20 -1
- data/app/assets/javascripts/hyrax/save_work/uploaded_files.es6 +1 -0
- data/app/assets/stylesheets/hyrax/_breadcrumbs.scss +25 -0
- data/app/assets/stylesheets/hyrax/_collections.scss +6 -0
- data/app/assets/stylesheets/hyrax/_file-listing.scss +5 -0
- data/app/assets/stylesheets/hyrax/_file_upload.scss +14 -0
- data/app/assets/stylesheets/hyrax/_form-progress.scss +6 -0
- data/app/assets/stylesheets/hyrax/_hyrax.scss +1 -1
- data/app/assets/stylesheets/hyrax/_styles.scss +6 -0
- data/app/assets/stylesheets/hyrax/dashboard.scss +4 -5
- data/app/builders/hyrax/bootstrap_breadcrumbs_builder.rb +10 -4
- data/app/controllers/concerns/hyrax/admin/stats_behavior.rb +25 -1
- data/app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb +6 -2
- data/app/controllers/concerns/hyrax/controller.rb +1 -1
- data/app/controllers/concerns/hyrax/deny_access_override_behavior.rb +1 -1
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +1 -1
- data/app/controllers/hyrax/admin/admin_sets_controller.rb +1 -1
- data/app/controllers/hyrax/dashboard/collections_controller.rb +2 -2
- data/app/controllers/hyrax/downloads_controller.rb +1 -1
- data/app/controllers/hyrax/featured_works_controller.rb +1 -5
- data/app/controllers/hyrax/homepage_controller.rb +1 -1
- data/app/controllers/hyrax/single_use_links_controller.rb +1 -1
- data/app/controllers/hyrax/transfers_controller.rb +1 -1
- data/app/controllers/hyrax/users_controller.rb +1 -0
- data/app/helpers/hyrax/citations_behaviors/publication_behavior.rb +2 -2
- data/app/helpers/hyrax/collections_helper.rb +1 -1
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +2 -2
- data/app/jobs/characterize_job.rb +1 -1
- data/app/jobs/fixity_check_job.rb +1 -1
- data/app/jobs/import_url_job.rb +12 -1
- data/app/models/checksum_audit_log.rb +1 -1
- data/app/models/concerns/hyrax/ability.rb +1 -1
- data/app/models/hyrax/collection_type.rb +1 -1
- data/app/models/hyrax/operation.rb +4 -6
- data/app/models/hyrax/permission_template_access.rb +5 -5
- data/app/models/sipity/entity.rb +1 -1
- data/app/presenters/hyrax/admin_set_presenter.rb +9 -2
- data/app/presenters/hyrax/admin_stats_presenter.rb +52 -6
- data/app/presenters/hyrax/inspect_work_presenter.rb +1 -1
- data/app/presenters/hyrax/workflow_presenter.rb +1 -1
- data/app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb +3 -5
- data/app/search_builders/hyrax/filter_suppressed_with_roles.rb +5 -1
- data/app/search_builders/hyrax/my/works_search_builder.rb +2 -1
- data/app/services/hyrax/collection_size_service.rb +12 -0
- data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -2
- data/app/services/hyrax/graph_exporter.rb +6 -1
- data/app/services/hyrax/license_service.rb +1 -9
- data/app/services/hyrax/qa_select_service.rb +28 -0
- data/app/services/hyrax/rights_statement_service.rb +1 -1
- data/app/services/hyrax/tolerant_select_service.rb +23 -0
- data/app/services/hyrax/workflow/permission_query.rb +1 -1
- data/app/services/hyrax/workflow/sipity_actions_generator.rb +1 -1
- data/app/strategies/hyrax/strategies/yaml_strategy.rb +1 -1
- data/app/views/_logo.html.erb +1 -1
- data/app/views/catalog/_search_form.html.erb +1 -1
- data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
- data/app/views/hyrax/admin/workflow_roles/index.html.erb +4 -2
- data/app/views/hyrax/admin/workflows/index.html.erb +1 -1
- data/app/views/hyrax/base/_form_files.html.erb +7 -7
- data/app/views/hyrax/base/_form_progress.html.erb +10 -5
- data/app/views/hyrax/base/_share_with.html.erb +3 -11
- data/app/views/hyrax/base/_show_actions.html.erb +1 -3
- data/app/views/hyrax/batch_edits/_check_all.html.erb +15 -7
- data/app/views/hyrax/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/_index_partials/_transfers.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_default_group.html.erb +7 -2
- data/app/views/hyrax/dashboard/collections/_edit_actions.html.erb +1 -2
- data/app/views/hyrax/dashboard/collections/_form.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +6 -6
- data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_show_actions.html.erb +1 -2
- data/app/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb +1 -2
- data/app/views/hyrax/dashboard/sidebar/_repository_content.html.erb +1 -2
- data/app/views/hyrax/dashboard/works/_default_group.html.erb +1 -1
- data/app/views/hyrax/file_sets/_actions.html.erb +1 -1
- data/app/views/hyrax/file_sets/_form.html.erb +3 -3
- data/app/views/hyrax/file_sets/_permission.html.erb +2 -2
- data/app/views/hyrax/file_sets/_permission_form.html.erb +10 -10
- data/app/views/hyrax/file_sets/_show_actions.html.erb +1 -4
- data/app/views/hyrax/file_sets/_single_use_links.html.erb +5 -0
- data/app/views/hyrax/file_sets/_versioning.html.erb +9 -7
- data/app/views/hyrax/file_sets/edit.html.erb +6 -6
- data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
- data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +0 -1
- data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +0 -1
- data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
- data/app/views/hyrax/my/collections/_default_group.html.erb +8 -3
- data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
- data/app/views/hyrax/my/works/_batch_actions.html.erb +1 -1
- data/app/views/hyrax/my/works/_tabs.html.erb +3 -3
- data/app/views/hyrax/single_use_links_viewer/show.html.erb +1 -1
- data/app/views/hyrax/uploads/_js_templates.html.erb +11 -11
- data/app/views/hyrax/uploads/_js_templates_branding.html.erb +2 -2
- data/app/views/layouts/_head_tag_content.html.erb +1 -1
- data/app/views/layouts/hyrax.html.erb +1 -1
- data/app/views/layouts/hyrax/dashboard.html.erb +1 -1
- data/app/views/records/edit_fields/_license.html.erb +1 -1
- data/app/views/records/edit_fields/_rights_statement.html.erb +2 -1
- data/config/features.rb +4 -0
- data/config/locales/hyrax.de.yml +1 -0
- data/config/locales/hyrax.en.yml +39 -1
- data/config/locales/hyrax.es.yml +1 -0
- data/config/locales/hyrax.fr.yml +1 -0
- data/config/locales/hyrax.it.yml +1 -0
- data/config/locales/hyrax.pt-BR.yml +1 -0
- data/config/locales/hyrax.zh.yml +1 -0
- data/hyrax.gemspec +5 -2
- data/lib/generators/hyrax/templates/mediated_deposit_workflow.json.erb +1 -0
- data/lib/hyrax.rb +7 -1
- data/lib/hyrax/arkivo/create_subscription_job.rb +1 -1
- data/lib/hyrax/redis_event_store.rb +1 -1
- data/lib/hyrax/resource_sync/change_list_writer.rb +2 -2
- data/lib/hyrax/version.rb +1 -1
- data/spec/actors/hyrax/actors/file_set_actor_spec.rb +1 -1
- data/spec/controllers/hyrax/admin/stats_controller_spec.rb +31 -1
- data/spec/controllers/hyrax/collections_controller_spec.rb +2 -2
- data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +2 -2
- data/spec/controllers/hyrax/generic_works_controller_spec.rb +19 -3
- data/spec/controllers/hyrax/homepage_controller_spec.rb +1 -1
- data/spec/controllers/hyrax/users_controller_spec.rb +58 -0
- data/spec/features/batch_create_spec.rb +1 -1
- data/spec/features/create_work_spec.rb +22 -2
- data/spec/features/dashboard/collection_spec.rb +3 -3
- data/spec/features/homepage_spec.rb +20 -4
- data/spec/javascripts/save_work_spec.js +50 -0
- data/spec/jobs/import_url_job_spec.rb +10 -8
- data/spec/lib/hyrax_spec.rb +9 -0
- data/spec/models/flipflop_spec.rb +8 -0
- data/spec/models/solr_document_spec.rb +2 -2
- data/spec/presenters/hyrax/admin_stats_presenter_spec.rb +73 -0
- data/spec/search_builders/hyrax/my/works_search_builder_spec.rb +0 -2
- data/spec/services/hyrax/graph_exporter_spec.rb +18 -0
- data/spec/services/hyrax/qa_select_service_spec.rb +40 -17
- data/spec/services/hyrax/tolerant_select_service_spec.rb +80 -0
- data/spec/support/fakes/fake_authority.rb +13 -0
- data/spec/support/logging_formatter.rb +1 -1
- data/spec/support/matchers/collection_type_property_matchers.rb +5 -5
- data/spec/views/hyrax/base/_form_progress.html.erb_spec.rb +11 -1
- data/spec/views/hyrax/file_sets/_show_actions.html.erb_spec.rb +0 -1
- data/spec/views/hyrax/file_sets/_single_use_links.html.erb_spec.rb +4 -0
- data/spec/views/hyrax/single_use_links_viewer/show.html.erb_spec.rb +0 -4
- data/template.rb +1 -1
- metadata +24 -11
- data/app/views/kaminari/blacklight_compact/_paginator.html.erb +0 -22
@@ -7,7 +7,8 @@ module Hyrax
|
|
7
7
|
# We remove the access controls filter, because some of the works a user has
|
8
8
|
# deposited may have gone through a workflow which has removed their ability
|
9
9
|
# to edit the work.
|
10
|
-
|
10
|
+
# We remove the active works filter, so a depositor can see submitted works in any state.
|
11
|
+
self.default_processor_chain -= [:only_active_works, :add_access_controls_to_solr_params]
|
11
12
|
|
12
13
|
def only_works?
|
13
14
|
true
|
@@ -1,5 +1,10 @@
|
|
1
1
|
# returns a list of solr documents for collections the item is a part of
|
2
2
|
module Hyrax
|
3
|
+
##
|
4
|
+
# @deprecated This class is broken for base Hyrax applications. Current users
|
5
|
+
# should call with extreme caution and consider a local implementation as
|
6
|
+
# an alternative.
|
7
|
+
# @see https://github.com/samvera/hyrax/issues/2801
|
3
8
|
class CollectionSizeService
|
4
9
|
include Blacklight::Configurable
|
5
10
|
include Blacklight::SearchHelper
|
@@ -13,6 +18,13 @@ module Hyrax
|
|
13
18
|
end
|
14
19
|
|
15
20
|
def initialize(collection)
|
21
|
+
Deprecation
|
22
|
+
.warn(self, 'CollectionSizeService has been deprecated for removal in ' \
|
23
|
+
'Hyrax 3.0. This class is broken for base Hyrax ' \
|
24
|
+
'applications. Current users should call with extreme ' \
|
25
|
+
'caution and consider a local implementation as an ' \
|
26
|
+
'alternative.')
|
27
|
+
|
16
28
|
@collection = collection
|
17
29
|
end
|
18
30
|
|
@@ -166,8 +166,8 @@ module Hyrax
|
|
166
166
|
child_depth = NestingAttributes.new(id: child.id, scope: scope).depth
|
167
167
|
nesting_depth = descendant_depth - child_depth + 1
|
168
168
|
|
169
|
-
|
170
|
-
1
|
169
|
+
# this should always be positive, but just being safe
|
170
|
+
nesting_depth.positive? ? nesting_depth : 1
|
171
171
|
end
|
172
172
|
private_class_method :child_nesting_depth
|
173
173
|
|
@@ -51,6 +51,8 @@ module Hyrax
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def subresource_replacer(resource_id, parent_klass)
|
54
|
+
return subject_replacer(parent_klass, resource_id) unless resource_id.include?('/')
|
55
|
+
|
54
56
|
parent_id, local = resource_id.split('/', 2)
|
55
57
|
|
56
58
|
if @visited_subresources.add?(resource_id)
|
@@ -73,7 +75,10 @@ module Hyrax
|
|
73
75
|
end
|
74
76
|
routes = Rails.application.routes.url_helpers
|
75
77
|
builder = ActionDispatch::Routing::PolymorphicRoutes::HelperMethodBuilder
|
76
|
-
|
78
|
+
resource_id = RDF::URI(resource_id)
|
79
|
+
new_uri = RDF::URI(builder.polymorphic_method(routes, route_key, nil, :url, id: resource_id.path, host: hostname, anchor: anchor))
|
80
|
+
new_uri.fragment = resource_id.fragment
|
81
|
+
new_uri
|
77
82
|
end
|
78
83
|
|
79
84
|
def object_replacer(id, _graph)
|
@@ -1,16 +1,8 @@
|
|
1
1
|
module Hyrax
|
2
2
|
# Provide select options for the license (dcterms:rights) field
|
3
3
|
class LicenseService < QaSelectService
|
4
|
-
def initialize
|
4
|
+
def initialize(_authority_name = nil)
|
5
5
|
super('licenses')
|
6
6
|
end
|
7
|
-
|
8
|
-
def include_current_value(value, _index, render_options, html_options)
|
9
|
-
unless value.blank? || active?(value)
|
10
|
-
html_options[:class] << ' force-select'
|
11
|
-
render_options += [[label(value), value]]
|
12
|
-
end
|
13
|
-
[render_options, html_options]
|
14
|
-
end
|
15
7
|
end
|
16
8
|
end
|
@@ -8,16 +8,23 @@ module Hyrax
|
|
8
8
|
@authority = Qa::Authorities::Local.subauthority_for(authority_name)
|
9
9
|
end
|
10
10
|
|
11
|
+
##
|
12
|
+
# @return [Array<String, #to_s>]
|
11
13
|
def select_all_options
|
12
14
|
authority.all.map do |element|
|
13
15
|
[element[:label], element[:id]]
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
19
|
+
# @return [Array<String, #to_s>]
|
17
20
|
def select_active_options
|
18
21
|
active_elements.map { |e| [e[:label], e[:id]] }
|
19
22
|
end
|
20
23
|
|
24
|
+
##
|
25
|
+
# @return [Boolean] whether the key is active
|
26
|
+
#
|
27
|
+
# @raise [KeyError] when the key has no `active:` status
|
21
28
|
def active?(id)
|
22
29
|
authority.find(id).fetch('active')
|
23
30
|
end
|
@@ -35,8 +42,29 @@ module Hyrax
|
|
35
42
|
authority.find(id).fetch('term', &block)
|
36
43
|
end
|
37
44
|
|
45
|
+
##
|
46
|
+
# @return [Enumerable<Hash>]
|
47
|
+
#
|
48
|
+
# @raise [KeyError] when no 'term' value is present for the id
|
38
49
|
def active_elements
|
39
50
|
authority.all.select { |e| e.fetch('active') }
|
40
51
|
end
|
52
|
+
|
53
|
+
##
|
54
|
+
# A helper for adding the current value to a form dropdown when
|
55
|
+
# @note this was extracted from LicenseService for more general use.
|
56
|
+
#
|
57
|
+
# @todo find a better home for this! This was initially inlined to the
|
58
|
+
# service from a helper module in
|
59
|
+
# https://github.com/samvera/curation_concerns/pull/986. It seems odd
|
60
|
+
# that this service knows about HTML rendering details. Maybe a factory
|
61
|
+
# is an appropriate next step?
|
62
|
+
def include_current_value(value, _index, render_options, html_options)
|
63
|
+
unless value.blank? || active?(value)
|
64
|
+
html_options[:class] << ' force-select'
|
65
|
+
render_options += [[label(value) { value }, value]]
|
66
|
+
end
|
67
|
+
[render_options, html_options]
|
68
|
+
end
|
41
69
|
end
|
42
70
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module Hyrax
|
3
|
+
##
|
4
|
+
# A more tolerant `QaSelectService`. This service treats terms with no
|
5
|
+
# `active:` property as active terms, instead of erroring with `eKeyError`.
|
6
|
+
class TolerantSelectService < QaSelectService
|
7
|
+
##
|
8
|
+
# @return [Boolean] indicates whether the term is active;
|
9
|
+
# false if the term is inactive or does not exist; defaults to true when
|
10
|
+
# no key is given
|
11
|
+
def active?(id)
|
12
|
+
authority.find(id)&.fetch('active', true)
|
13
|
+
end
|
14
|
+
|
15
|
+
##
|
16
|
+
# @return [Enumerable<Hash>]
|
17
|
+
#
|
18
|
+
# @raise [KeyError] when no 'term' value is present for the id
|
19
|
+
def active_elements
|
20
|
+
authority.all.select { |e| e.fetch('active', true) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -149,7 +149,7 @@ module Hyrax
|
|
149
149
|
def authorized_for_processing?(user:, entity:, action:)
|
150
150
|
action_name = PowerConverter.convert_to_sipity_action_name(action)
|
151
151
|
scope_permitted_workflow_actions_available_for_current_state(user: user, entity: entity)
|
152
|
-
.
|
152
|
+
.find_by(Sipity::WorkflowAction.arel_table[:name].eq(action_name)).present?
|
153
153
|
end
|
154
154
|
|
155
155
|
# @api public
|
@@ -66,7 +66,7 @@ module Hyrax
|
|
66
66
|
workflow.workflow_states.each do |state|
|
67
67
|
next if new_state_names.include?(state.name)
|
68
68
|
states_to_remove << state
|
69
|
-
states_that_cannot_be_destroyed << state if state.entities.count
|
69
|
+
states_that_cannot_be_destroyed << state if state.entities.count.positive? # Choosing count so we pre-warm the query
|
70
70
|
end
|
71
71
|
if states_that_cannot_be_destroyed.any?
|
72
72
|
exception_message = "Cannot delete one or more states because they have one or more entities associated with them."
|
data/app/views/_logo.html.erb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
<a id="logo" class="navbar-brand" href="<%= hyrax.root_path %>" data-no-turbolink="true">
|
2
|
-
<span class="glyphicon glyphicon-globe"></span>
|
2
|
+
<span class="glyphicon glyphicon-globe" role="img" aria-label="<%= application_name %>"></span>
|
3
3
|
<span class="institution_name"><%= application_name %></span>
|
4
4
|
</a>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<%= t('hyrax.search.button.html') %>
|
12
12
|
</button>
|
13
13
|
<% if current_user %>
|
14
|
-
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
|
14
|
+
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="false">
|
15
15
|
<span data-search-element="label"><%= t("hyrax.search.form.option.all.label_long", application_name: application_name) %></span>
|
16
16
|
<span class="caret"></span>
|
17
17
|
</button>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<tr>
|
35
35
|
<td><%= collection_type.title %></td>
|
36
36
|
<td>
|
37
|
-
<%= link_to hyrax.edit_admin_collection_type_path(collection_type), class: 'btn btn-primary btn-sm'
|
37
|
+
<%= link_to hyrax.edit_admin_collection_type_path(collection_type), class: 'btn btn-primary btn-sm' do %>
|
38
38
|
<%= t('helpers.action.edit') %>
|
39
39
|
<% end %>
|
40
40
|
<% unless collection_type.admin_set? || collection_type.user_collection? %>
|
@@ -26,15 +26,17 @@
|
|
26
26
|
<h2 class="panel-title h2"><%= t('.current_roles') %></h3>
|
27
27
|
</div>
|
28
28
|
<div class="panel-body">
|
29
|
-
<table class="table table-striped">
|
29
|
+
<table class="table table-striped datatable">
|
30
30
|
<thead>
|
31
|
+
<th><%= t('.header.name') %></th>
|
31
32
|
<th><%= t('.header.user') %></th>
|
32
33
|
<th><%= t('.header.roles') %></th>
|
33
34
|
</thead>
|
34
35
|
<tbody>
|
35
36
|
<% @presenter.users.each do |user| %>
|
36
37
|
<tr>
|
37
|
-
<td><%= user.
|
38
|
+
<td data-sort="<%= user.name %>"><%= user.name %></td>
|
39
|
+
<td data-sort="<%= user.user_key %>"><%= user.user_key %></td>
|
38
40
|
<% agent_presenter = @presenter.presenter_for(user) %>
|
39
41
|
<% if agent_presenter && agent_presenter.responsibilities_present? %>
|
40
42
|
<td>
|
@@ -13,17 +13,17 @@
|
|
13
13
|
<div class="row">
|
14
14
|
<div class="col-xs-12">
|
15
15
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
16
|
-
<
|
16
|
+
<button id="addfiles" class="btn btn-success fileinput-button">
|
17
17
|
<span class="glyphicon glyphicon-plus"></span>
|
18
18
|
<span>Add files...</span>
|
19
|
-
<input type="file" name="files[]" multiple />
|
20
|
-
</
|
19
|
+
<input type="file" name="files[]" tabindex="-1" aria-hidden="true" multiple />
|
20
|
+
</button>
|
21
21
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
22
|
-
<
|
22
|
+
<button id="addfolder" class="btn btn-success fileinput-button">
|
23
23
|
<span class="glyphicon glyphicon-plus"></span>
|
24
24
|
<span>Add folder...</span>
|
25
|
-
<input type="file" name="files[]" multiple directory webkitdirectory />
|
26
|
-
</
|
25
|
+
<input type="file" name="files[]" tabindex="-1" aria-hidden="true" multiple directory webkitdirectory />
|
26
|
+
</button>
|
27
27
|
<% if Hyrax.config.browse_everything? %>
|
28
28
|
<%= button_tag(type: 'button', class: 'btn btn-success', id: "browse-btn",
|
29
29
|
'data-toggle' => 'browse-everything', 'data-route' => browse_everything_engine.root_path,
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<%= t('hyrax.upload.browse_everything.browse_files_button') %>
|
33
33
|
<% end %>
|
34
34
|
<% end %>
|
35
|
-
<button type="reset" class="btn btn-warning cancel hidden">
|
35
|
+
<button type="reset" id="file-upload-cancel-btn" class="btn btn-warning cancel hidden">
|
36
36
|
<span class="glyphicon glyphicon-ban-circle"></span>
|
37
37
|
<span>Cancel upload</span>
|
38
38
|
</button>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<% if Hyrax.config.work_requires_files? %>
|
12
12
|
<li class="incomplete" id="required-files"><%= t('.required_files') %></li>
|
13
13
|
<% end %>
|
14
|
-
<% if Flipflop.active_deposit_agreement_acceptance? %>
|
14
|
+
<% if Flipflop.show_deposit_agreement? && Flipflop.active_deposit_agreement_acceptance? %>
|
15
15
|
<li class="incomplete" id="required-agreement"><%= t('.required_agreement') %></li>
|
16
16
|
<% end %>
|
17
17
|
</ul>
|
@@ -45,13 +45,18 @@
|
|
45
45
|
<% end %>
|
46
46
|
<% end %>
|
47
47
|
<br />
|
48
|
-
<% cancel_path = f.object.persisted? ? polymorphic_path([main_app, f.object]) : hyrax.my_works_path %>
|
49
|
-
<%= link_to t(:'helpers.action.cancel'),
|
50
|
-
cancel_path,
|
51
|
-
class: 'btn btn-default' %>
|
52
48
|
<%# TODO: If we start using ActionCable, we could listen for object updates and
|
53
49
|
alert the user that the object has changed by someone else %>
|
54
50
|
<%= f.input Hyrax::Actors::OptimisticLockValidator.version_field, as: :hidden if f.object.persisted? %>
|
55
51
|
<%= f.submit class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "with_files_submit", name: "save_with_files" %>
|
56
52
|
</div>
|
53
|
+
|
54
|
+
<%# Provide immediate feedback after the form is submitted while the subsequent page is loading %>
|
55
|
+
<div class="panel-footer hidden">
|
56
|
+
<div class="progress">
|
57
|
+
<div class="progress-bar progress-bar-striped progress-bar-complete active">
|
58
|
+
<span id="form-feedback" aria-live="assertive">Saving your work. This may take a few moments</span>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</div>
|
57
62
|
</aside>
|
@@ -1,14 +1,6 @@
|
|
1
|
-
<p
|
2
|
-
Enter a valid <%= t('hyrax.account_name') %>, one at a time, select the access level for that user and click
|
3
|
-
<button class='btn btn-xs btn-inverse' onclick='return false;'><i class='glyphicon glyphicon-plus'></i>Add</button>.
|
4
|
-
</p>
|
5
|
-
|
1
|
+
<p><%= t('.share_with_html', account_name: t('hyrax.account_name')) %></p>
|
6
2
|
<%= render 'hyrax/file_sets/groups_description' %>
|
7
|
-
|
8
|
-
<h5><b>Permission Definitions</b></h5>
|
3
|
+
<h5><b><%= t('.definition_heading') %></b></h5>
|
9
4
|
<p>
|
10
|
-
|
11
|
-
<%= application_name %>.<br />
|
12
|
-
<strong>Edit:</strong> this file (both contents and metadata) can be edited. You may only grant
|
13
|
-
this permission to <%= institution_name %> users and/or groups.
|
5
|
+
<%= t('.definitions_html', application_name: application_name, institution_name: institution_name) %>
|
14
6
|
</p>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="show-actions">
|
2
2
|
<% if Hyrax.config.analytics? %>
|
3
|
-
<%= link_to "Analytics", presenter.stats_path, id: 'stats', class: 'btn btn-default'
|
3
|
+
<%= link_to "Analytics", presenter.stats_path, id: 'stats', class: 'btn btn-default' %>
|
4
4
|
<% end %>
|
5
5
|
<% if presenter.editor? %>
|
6
6
|
<%= link_to "Edit", edit_polymorphic_path([main_app, presenter]), class: 'btn btn-default' %>
|
@@ -44,5 +44,3 @@
|
|
44
44
|
<span class="Z3988" title="<%= export_as_openurl_ctx_kev(presenter) %>"></span>
|
45
45
|
<!-- Render Modals -->
|
46
46
|
<%= render 'hyrax/dashboard/collections/form_for_select_collection', user_collections: @user_collections %>
|
47
|
-
|
48
|
-
|
@@ -1,9 +1,17 @@
|
|
1
1
|
<div class="dropdown batch_document_selector_all">
|
2
|
-
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
2
|
+
<label class="centerizer">
|
3
|
+
<%= check_box_tag 'check_all', 'yes', @all_checked, disabled: @disable_select_all %>
|
4
|
+
<span class="works-list-batch-checkbox-label-text">
|
5
|
+
<%= t("hyrax.dashboard.my.action.select") %>
|
6
|
+
</span>
|
7
|
+
<% if !@disable_select_all %>
|
8
|
+
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
9
|
+
<span class="sr-only">Select to access selection options</span>
|
10
|
+
<span class="caret"></span>
|
11
|
+
</a>
|
12
|
+
<ul class="dropdown-menu">
|
13
|
+
<%= render "batch_edits_actions" %>
|
14
|
+
</ul>
|
15
|
+
<% end %>
|
16
|
+
</label>
|
9
17
|
</div>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<td colspan="6">
|
38
38
|
<dl class="expanded-details row">
|
39
39
|
<dt class="col-xs-3 col-lg-2"><%= t("hyrax.dashboard.my.collection_list.description") %></dt>
|
40
|
-
<dd class="col-xs-9 col-lg-10"><%= collection_presenter.description
|
40
|
+
<dd class="col-xs-9 col-lg-10"><%= collection_presenter.description&.first %></dd>
|
41
41
|
<dt class="col-xs-3 col-lg-2"><%= t("hyrax.dashboard.my.collection_list.edit_access") %></dt>
|
42
42
|
<dd class="col-xs-9 col-lg-10">
|
43
43
|
<% if collection_presenter.edit_groups.present? %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<h4><%= t("hyrax.dashboard.transfers_sent") %></h4>
|
4
4
|
</div>
|
5
5
|
<div class="col-xs-12 col-sm-3 transfer_link">
|
6
|
-
<%= link_to hyrax.my_works_path
|
6
|
+
<%= link_to hyrax.my_works_path do %>
|
7
7
|
<%= t("hyrax.dashboard.transfer_works_link") %>
|
8
8
|
<% end %>
|
9
9
|
</div>
|
@@ -3,8 +3,13 @@
|
|
3
3
|
<thead>
|
4
4
|
<tr>
|
5
5
|
<th class="check-all">
|
6
|
-
<label for="check_all" class="sr-only"
|
7
|
-
|
6
|
+
<label for="check_all" class="sr-only"
|
7
|
+
><%= t("hyrax.dashboard.my.sr.check_all_label") %>
|
8
|
+
</label>
|
9
|
+
<label class="centerizer">
|
10
|
+
<input type="checkbox" class="check-all-checkbox" name="check_all" id="check_all" value="yes" />
|
11
|
+
<%= t("hyrax.dashboard.my.action.select") %>
|
12
|
+
</label>
|
8
13
|
</th>
|
9
14
|
<th><%= t("hyrax.dashboard.my.heading.title") %></th>
|
10
15
|
<% if !current_ability.admin? %>
|
@@ -3,6 +3,5 @@
|
|
3
3
|
<%= link_to t('hyrax.collection.actions.add_existing_works.label'),
|
4
4
|
hyrax.my_works_path(add_works_to_collection: @form.id),
|
5
5
|
title: t('hyrax.collection.actions.add_existing_works.desc'),
|
6
|
-
class: 'btn btn-default'
|
7
|
-
data: { turbolinks: false } %>
|
6
|
+
class: 'btn btn-default' %>
|
8
7
|
</div>
|
@@ -97,7 +97,7 @@
|
|
97
97
|
|
98
98
|
<div class="panel-footer">
|
99
99
|
<% if @collection.persisted? %>
|
100
|
-
<%= f.submit t(:'hyrax.collection.select_form.update'), class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "update_submit", name: "update_collection"
|
100
|
+
<%= f.submit t(:'hyrax.collection.select_form.update'), class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "update_submit", name: "update_collection" %>
|
101
101
|
<%= link_to t(:'helpers.action.cancel'), hyrax.dashboard_collection_path(@collection), class: 'btn btn-link' %>
|
102
102
|
<% else %>
|
103
103
|
<%= f.submit t(:'hyrax.collection.select_form.create'), class: 'btn btn-primary', onclick: "confirmation_needed = false;", id: "create_submit", name: "create_collection" %>
|
@@ -13,11 +13,11 @@
|
|
13
13
|
<div class="row fileupload-buttonbar">
|
14
14
|
<div class="col-xs-4">
|
15
15
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
16
|
-
<
|
16
|
+
<button 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 />
|
20
|
-
</
|
19
|
+
<input type="file" name="files[]" tabindex="-1" aria-hidden="true" single />
|
20
|
+
</button>
|
21
21
|
</div> <!-- end col-xs-4 -->
|
22
22
|
|
23
23
|
<!-- The global progress state -->
|
@@ -90,11 +90,11 @@
|
|
90
90
|
<div class="row fileupload-buttonbar">
|
91
91
|
<div class="col-xs-4">
|
92
92
|
<!-- The fileinput-button span is used to style the file input field as button -->
|
93
|
-
<
|
93
|
+
<button 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 />
|
97
|
-
</
|
96
|
+
<input type="file" name="files[]" tabindex="-1" aria-hidden="true" single />
|
97
|
+
</button>
|
98
98
|
</div> <!-- end col-xs-4 -->
|
99
99
|
|
100
100
|
<!-- The global progress state -->
|