hyrax 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. checksums.yaml +5 -5
  2. data/.github/ISSUE_TEMPLATE.md +1 -1
  3. data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
  4. data/.rubocop.yml +8 -1
  5. data/README.md +3 -11
  6. data/app/actors/hyrax/actors/file_set_actor.rb +6 -1
  7. data/app/assets/javascripts/hyrax.js +1 -1
  8. data/app/assets/javascripts/hyrax/editor.es6 +8 -0
  9. data/app/assets/javascripts/hyrax/save_work/save_work_control.es6 +20 -1
  10. data/app/assets/javascripts/hyrax/save_work/uploaded_files.es6 +1 -0
  11. data/app/assets/stylesheets/hyrax/_breadcrumbs.scss +25 -0
  12. data/app/assets/stylesheets/hyrax/_collections.scss +6 -0
  13. data/app/assets/stylesheets/hyrax/_file-listing.scss +5 -0
  14. data/app/assets/stylesheets/hyrax/_file_upload.scss +14 -0
  15. data/app/assets/stylesheets/hyrax/_form-progress.scss +6 -0
  16. data/app/assets/stylesheets/hyrax/_hyrax.scss +1 -1
  17. data/app/assets/stylesheets/hyrax/_styles.scss +6 -0
  18. data/app/assets/stylesheets/hyrax/dashboard.scss +4 -5
  19. data/app/builders/hyrax/bootstrap_breadcrumbs_builder.rb +10 -4
  20. data/app/controllers/concerns/hyrax/admin/stats_behavior.rb +25 -1
  21. data/app/controllers/concerns/hyrax/breadcrumbs_for_collections.rb +6 -2
  22. data/app/controllers/concerns/hyrax/controller.rb +1 -1
  23. data/app/controllers/concerns/hyrax/deny_access_override_behavior.rb +1 -1
  24. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +1 -1
  25. data/app/controllers/hyrax/admin/admin_sets_controller.rb +1 -1
  26. data/app/controllers/hyrax/dashboard/collections_controller.rb +2 -2
  27. data/app/controllers/hyrax/downloads_controller.rb +1 -1
  28. data/app/controllers/hyrax/featured_works_controller.rb +1 -5
  29. data/app/controllers/hyrax/homepage_controller.rb +1 -1
  30. data/app/controllers/hyrax/single_use_links_controller.rb +1 -1
  31. data/app/controllers/hyrax/transfers_controller.rb +1 -1
  32. data/app/controllers/hyrax/users_controller.rb +1 -0
  33. data/app/helpers/hyrax/citations_behaviors/publication_behavior.rb +2 -2
  34. data/app/helpers/hyrax/collections_helper.rb +1 -1
  35. data/app/helpers/hyrax/hyrax_helper_behavior.rb +2 -2
  36. data/app/jobs/characterize_job.rb +1 -1
  37. data/app/jobs/fixity_check_job.rb +1 -1
  38. data/app/jobs/import_url_job.rb +12 -1
  39. data/app/models/checksum_audit_log.rb +1 -1
  40. data/app/models/concerns/hyrax/ability.rb +1 -1
  41. data/app/models/hyrax/collection_type.rb +1 -1
  42. data/app/models/hyrax/operation.rb +4 -6
  43. data/app/models/hyrax/permission_template_access.rb +5 -5
  44. data/app/models/sipity/entity.rb +1 -1
  45. data/app/presenters/hyrax/admin_set_presenter.rb +9 -2
  46. data/app/presenters/hyrax/admin_stats_presenter.rb +52 -6
  47. data/app/presenters/hyrax/inspect_work_presenter.rb +1 -1
  48. data/app/presenters/hyrax/workflow_presenter.rb +1 -1
  49. data/app/search_builders/hyrax/dashboard/nested_collections_search_builder.rb +3 -5
  50. data/app/search_builders/hyrax/filter_suppressed_with_roles.rb +5 -1
  51. data/app/search_builders/hyrax/my/works_search_builder.rb +2 -1
  52. data/app/services/hyrax/collection_size_service.rb +12 -0
  53. data/app/services/hyrax/collections/nested_collection_query_service.rb +2 -2
  54. data/app/services/hyrax/graph_exporter.rb +6 -1
  55. data/app/services/hyrax/license_service.rb +1 -9
  56. data/app/services/hyrax/qa_select_service.rb +28 -0
  57. data/app/services/hyrax/rights_statement_service.rb +1 -1
  58. data/app/services/hyrax/tolerant_select_service.rb +23 -0
  59. data/app/services/hyrax/workflow/permission_query.rb +1 -1
  60. data/app/services/hyrax/workflow/sipity_actions_generator.rb +1 -1
  61. data/app/strategies/hyrax/strategies/yaml_strategy.rb +1 -1
  62. data/app/views/_logo.html.erb +1 -1
  63. data/app/views/catalog/_search_form.html.erb +1 -1
  64. data/app/views/hyrax/admin/collection_types/index.html.erb +1 -1
  65. data/app/views/hyrax/admin/workflow_roles/index.html.erb +4 -2
  66. data/app/views/hyrax/admin/workflows/index.html.erb +1 -1
  67. data/app/views/hyrax/base/_form_files.html.erb +7 -7
  68. data/app/views/hyrax/base/_form_progress.html.erb +10 -5
  69. data/app/views/hyrax/base/_share_with.html.erb +3 -11
  70. data/app/views/hyrax/base/_show_actions.html.erb +1 -3
  71. data/app/views/hyrax/batch_edits/_check_all.html.erb +15 -7
  72. data/app/views/hyrax/collections/_list_collections.html.erb +1 -1
  73. data/app/views/hyrax/dashboard/_index_partials/_transfers.html.erb +1 -1
  74. data/app/views/hyrax/dashboard/collections/_default_group.html.erb +7 -2
  75. data/app/views/hyrax/dashboard/collections/_edit_actions.html.erb +1 -2
  76. data/app/views/hyrax/dashboard/collections/_form.html.erb +1 -1
  77. data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +6 -6
  78. data/app/views/hyrax/dashboard/collections/_list_collections.html.erb +1 -1
  79. data/app/views/hyrax/dashboard/collections/_show_actions.html.erb +1 -2
  80. data/app/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb +1 -2
  81. data/app/views/hyrax/dashboard/sidebar/_repository_content.html.erb +1 -2
  82. data/app/views/hyrax/dashboard/works/_default_group.html.erb +1 -1
  83. data/app/views/hyrax/file_sets/_actions.html.erb +1 -1
  84. data/app/views/hyrax/file_sets/_form.html.erb +3 -3
  85. data/app/views/hyrax/file_sets/_permission.html.erb +2 -2
  86. data/app/views/hyrax/file_sets/_permission_form.html.erb +10 -10
  87. data/app/views/hyrax/file_sets/_show_actions.html.erb +1 -4
  88. data/app/views/hyrax/file_sets/_single_use_links.html.erb +5 -0
  89. data/app/views/hyrax/file_sets/_versioning.html.erb +9 -7
  90. data/app/views/hyrax/file_sets/edit.html.erb +6 -6
  91. data/app/views/hyrax/file_sets/media_display/_audio.html.erb +1 -1
  92. data/app/views/hyrax/file_sets/media_display/_image.html.erb +1 -1
  93. data/app/views/hyrax/file_sets/media_display/_office_document.html.erb +0 -1
  94. data/app/views/hyrax/file_sets/media_display/_pdf.html.erb +0 -1
  95. data/app/views/hyrax/file_sets/media_display/_video.html.erb +1 -1
  96. data/app/views/hyrax/my/collections/_default_group.html.erb +8 -3
  97. data/app/views/hyrax/my/collections/_list_collections.html.erb +1 -1
  98. data/app/views/hyrax/my/works/_batch_actions.html.erb +1 -1
  99. data/app/views/hyrax/my/works/_tabs.html.erb +3 -3
  100. data/app/views/hyrax/single_use_links_viewer/show.html.erb +1 -1
  101. data/app/views/hyrax/uploads/_js_templates.html.erb +11 -11
  102. data/app/views/hyrax/uploads/_js_templates_branding.html.erb +2 -2
  103. data/app/views/layouts/_head_tag_content.html.erb +1 -1
  104. data/app/views/layouts/hyrax.html.erb +1 -1
  105. data/app/views/layouts/hyrax/dashboard.html.erb +1 -1
  106. data/app/views/records/edit_fields/_license.html.erb +1 -1
  107. data/app/views/records/edit_fields/_rights_statement.html.erb +2 -1
  108. data/config/features.rb +4 -0
  109. data/config/locales/hyrax.de.yml +1 -0
  110. data/config/locales/hyrax.en.yml +39 -1
  111. data/config/locales/hyrax.es.yml +1 -0
  112. data/config/locales/hyrax.fr.yml +1 -0
  113. data/config/locales/hyrax.it.yml +1 -0
  114. data/config/locales/hyrax.pt-BR.yml +1 -0
  115. data/config/locales/hyrax.zh.yml +1 -0
  116. data/hyrax.gemspec +5 -2
  117. data/lib/generators/hyrax/templates/mediated_deposit_workflow.json.erb +1 -0
  118. data/lib/hyrax.rb +7 -1
  119. data/lib/hyrax/arkivo/create_subscription_job.rb +1 -1
  120. data/lib/hyrax/redis_event_store.rb +1 -1
  121. data/lib/hyrax/resource_sync/change_list_writer.rb +2 -2
  122. data/lib/hyrax/version.rb +1 -1
  123. data/spec/actors/hyrax/actors/file_set_actor_spec.rb +1 -1
  124. data/spec/controllers/hyrax/admin/stats_controller_spec.rb +31 -1
  125. data/spec/controllers/hyrax/collections_controller_spec.rb +2 -2
  126. data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +2 -2
  127. data/spec/controllers/hyrax/generic_works_controller_spec.rb +19 -3
  128. data/spec/controllers/hyrax/homepage_controller_spec.rb +1 -1
  129. data/spec/controllers/hyrax/users_controller_spec.rb +58 -0
  130. data/spec/features/batch_create_spec.rb +1 -1
  131. data/spec/features/create_work_spec.rb +22 -2
  132. data/spec/features/dashboard/collection_spec.rb +3 -3
  133. data/spec/features/homepage_spec.rb +20 -4
  134. data/spec/javascripts/save_work_spec.js +50 -0
  135. data/spec/jobs/import_url_job_spec.rb +10 -8
  136. data/spec/lib/hyrax_spec.rb +9 -0
  137. data/spec/models/flipflop_spec.rb +8 -0
  138. data/spec/models/solr_document_spec.rb +2 -2
  139. data/spec/presenters/hyrax/admin_stats_presenter_spec.rb +73 -0
  140. data/spec/search_builders/hyrax/my/works_search_builder_spec.rb +0 -2
  141. data/spec/services/hyrax/graph_exporter_spec.rb +18 -0
  142. data/spec/services/hyrax/qa_select_service_spec.rb +40 -17
  143. data/spec/services/hyrax/tolerant_select_service_spec.rb +80 -0
  144. data/spec/support/fakes/fake_authority.rb +13 -0
  145. data/spec/support/logging_formatter.rb +1 -1
  146. data/spec/support/matchers/collection_type_property_matchers.rb +5 -5
  147. data/spec/views/hyrax/base/_form_progress.html.erb_spec.rb +11 -1
  148. data/spec/views/hyrax/file_sets/_show_actions.html.erb_spec.rb +0 -1
  149. data/spec/views/hyrax/file_sets/_single_use_links.html.erb_spec.rb +4 -0
  150. data/spec/views/hyrax/single_use_links_viewer/show.html.erb_spec.rb +0 -4
  151. data/template.rb +1 -1
  152. metadata +24 -11
  153. 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
- self.default_processor_chain -= [:add_access_controls_to_solr_params]
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
- return nesting_depth if nesting_depth > 0 # this should always be > 0, but just being safe
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
- builder.polymorphic_method routes, route_key, nil, :url, id: resource_id, host: hostname, anchor: anchor
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
@@ -1,7 +1,7 @@
1
1
  module Hyrax
2
2
  # Provide select options for the copyright status (edm:rights) field
3
3
  class RightsStatementService < QaSelectService
4
- def initialize
4
+ def initialize(_authority_name = nil)
5
5
  super('rights_statements')
6
6
  end
7
7
  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
- .where(Sipity::WorkflowAction.arel_table[:name].eq(action_name)).count > 0
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 > 0 # Choosing count so we pre-warm the query
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."
@@ -28,7 +28,7 @@ module Hyrax::Strategies
28
28
  private
29
29
 
30
30
  def key_exists?(feature)
31
- yaml_file[feature.to_s] && yaml_file[feature.to_s].key?("enabled")
31
+ yaml_file[feature.to_s]&.key?("enabled")
32
32
  end
33
33
 
34
34
  def yaml_file
@@ -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', data: { turbolinks: false } do %>
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.user_key %></td>
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>
@@ -34,7 +34,7 @@
34
34
  <%= link_to document, [main_app, document] %>
35
35
  </td>
36
36
  <td>
37
- <%= document.depositor %>
37
+ <%= safe_join(document.creator, tag(:br)) %>
38
38
  </td>
39
39
  <td>
40
40
  <%= document.date_modified %>
@@ -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
- <span id="addfiles" class="btn btn-success fileinput-button">
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
- </span>
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
- <span id="addfolder" class="btn btn-success fileinput-button">
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
- </span>
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>You may grant &quot;View/Download&quot; or &quot;Edit&quot; access for specific users and/or groups to files.
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
- <strong>View/Download:</strong> this file (both contents and metadata) is accessible from within
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', data: { turbolinks: false } %>
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
- <%= check_box_tag 'check_all', 'yes', @all_checked, disabled: @disable_select_all %>
3
- <% if !@disable_select_all %>
4
- <a class="dropdown-toggle" data-toggle="dropdown" href="#"><span class="sr-only">Select to access selection options</span><span class="caret"></span></a>
5
- <ul class="dropdown-menu">
6
- <%= render "batch_edits_actions" %>
7
- </ul>
8
- <% end %>
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.first %></dd>
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, data: { turbolinks: false } do %>
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"><%= t("hyrax.dashboard.my.sr.check_all_label") %></label>
7
- <input type="checkbox" name="check_all" id="check_all" value="yes" />
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", data: { turbolinks: false } %>
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
- <span class="btn btn-success fileinput-button">
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
- </span>
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
- <span class="btn btn-success fileinput-button">
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
- </span>
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 -->