hyrax 5.1.0.pre.beta1 → 5.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.
- checksums.yaml +4 -4
- data/.dassie/.env +4 -0
- data/.dassie/Gemfile +12 -7
- data/.dassie/app/controllers/application_controller.rb +4 -0
- data/.dassie/app/helpers/hyrax_helper.rb +4 -0
- data/.dassie/app/models/ability.rb +4 -0
- data/.dassie/app/models/user.rb +11 -0
- data/.dassie/app/views/shared/_footer.html.erb +17 -0
- data/.dassie/config/application.rb +1 -1
- data/.dassie/config/database.yml +18 -0
- data/.dassie/config/environments/production.rb +1 -1
- data/.dassie/config/fedora.yml +6 -6
- data/.dassie/config/initializers/devise.rb +1 -0
- data/.dassie/config/initializers/profiler.rb +5 -0
- data/.dassie/config/locales/hyrax.en.yml +1 -1
- data/.dassie/config/puma.rb +55 -5
- data/.dassie/config/routes.rb +2 -0
- data/.dassie/db/migrate/20250328100249_user_roles.rb +20 -0
- data/.dassie/db/schema.rb +123 -109
- data/.github/workflows/lint-build-test.yml +34 -5
- data/.koppie/.env +1 -1
- data/.koppie/Gemfile +10 -6
- data/.koppie/app/controllers/application_controller.rb +4 -0
- data/.koppie/app/helpers/hyrax_helper.rb +4 -0
- data/.koppie/app/models/ability.rb +4 -0
- data/.koppie/app/models/user.rb +10 -0
- data/.koppie/app/views/shared/_footer.html.erb +17 -0
- data/.koppie/config/database.yml +2 -9
- data/.koppie/config/environments/development.rb +9 -0
- data/.koppie/config/environments/production.rb +1 -1
- data/.koppie/config/initializers/1_valkyrie.rb +5 -5
- data/.koppie/config/initializers/devise.rb +1 -1
- data/.koppie/config/initializers/profiler.rb +5 -0
- data/.koppie/config/locales/hyrax.en.yml +2 -2
- data/.koppie/config/puma.rb +26 -7
- data/.koppie/config/routes.rb +2 -0
- data/.koppie/db/schema.rb +109 -110
- data/CONTAINERS.md +10 -10
- data/Dockerfile +108 -50
- data/Gemfile +2 -1
- data/app/controllers/concerns/hyrax/valkyrie_downloads_controller_behavior.rb +1 -0
- data/app/controllers/concerns/hyrax/works_controller_behavior.rb +2 -1
- data/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +4 -4
- data/app/controllers/hyrax/file_sets_controller.rb +11 -0
- data/app/helpers/hyrax/hyrax_helper_behavior.rb +2 -2
- data/app/helpers/hyrax/trophy_helper.rb +1 -1
- data/app/jobs/concerns/hyrax/queued_job_behavior.rb +22 -0
- data/app/jobs/hyrax/propagate_change_depositor_job.rb +1 -1
- data/app/jobs/hyrax/queued_delete_job.rb +11 -0
- data/app/jobs/hyrax/queued_indexing_job.rb +11 -0
- data/app/jobs/migrate_files_to_valkyrie_job.rb +33 -21
- data/app/jobs/migrate_sipity_entity_job.rb +21 -0
- data/app/models/concerns/hyrax/ability.rb +4 -2
- data/app/models/concerns/hyrax/solr_document_behavior.rb +5 -2
- data/app/models/hyrax/file_metadata.rb +22 -7
- data/app/services/hyrax/analytics/ga4/base.rb +1 -1
- data/app/services/hyrax/analytics/ga4.rb +5 -1
- data/app/services/hyrax/change_depositor_service.rb +1 -1
- data/app/services/hyrax/characterization/valkyrie_characterization_service.rb +21 -13
- data/app/services/hyrax/custom_queries/find_ids_by_model.rb +31 -6
- data/app/services/hyrax/edit_permissions_service.rb +9 -8
- data/app/services/hyrax/workflow/workflow_factory.rb +3 -3
- data/app/services/migrate_resource_service.rb +1 -1
- data/app/views/_user_util_links.html.erb +2 -1
- data/app/views/hyrax/admin/analytics/collection_reports/_top_collections.html.erb +3 -7
- data/app/views/hyrax/admin/analytics/work_reports/_top_file_set_downloads.html.erb +3 -6
- data/app/views/hyrax/admin/analytics/work_reports/_top_works.html.erb +2 -3
- data/app/views/hyrax/admin/analytics/work_reports/_work_files.html.erb +1 -6
- data/app/views/hyrax/base/_social_media.html.erb +2 -0
- data/app/views/hyrax/base/iiif_viewers/_universal_viewer.html.erb +1 -1
- data/app/views/hyrax/dashboard/collections/_show_document_list_menu.html.erb +13 -12
- data/app/views/hyrax/my/_admin_set_action_menu.html.erb +31 -27
- data/app/views/hyrax/my/_collection_action_menu.html.erb +40 -35
- data/app/views/hyrax/my/_work_action_menu.html.erb +23 -22
- data/bin/db-migrate-seed.sh +1 -1
- data/bin/dev-entrypoint.sh +3 -0
- data/config/features.rb +50 -40
- data/config/initializers/indexing_adapter_initializer.rb +4 -0
- data/config/initializers/new_framework_defaults_7_2.rb +6 -4
- data/config/initializers/reform_rails_6_1_monkey_patch.rb +29 -0
- data/config/metadata/core_metadata.yaml +1 -0
- data/docker-compose-dassie.yml +6 -6
- data/docker-compose-koppie.yml +2 -2
- data/docker-compose-sirenia.yml +2 -2
- data/documentation/developing-your-hyrax-based-app.md +2 -2
- data/hyrax.gemspec +3 -3
- data/lib/freyja/persister.rb +11 -4
- data/lib/generators/hyrax/install_generator.rb +0 -5
- data/lib/generators/hyrax/templates/.env +1 -1
- data/lib/generators/hyrax/templates/config/initializers/1_valkyrie.rb +21 -19
- data/lib/generators/hyrax/templates/db/migrate/20170131142607_add_permission_template_to_sipity_workflow.rb.erb +1 -1
- data/lib/generators/hyrax/templates/db/migrate/20170810190549_update_collection_type_column_options.rb.erb +1 -1
- data/lib/generators/hyrax/templates/db/migrate/20230821153635_add_fields_to_counter_metric.rb.erb +1 -1
- data/lib/hyrax/configuration.rb +22 -7
- data/lib/hyrax/controlled_vocabulary/importer/language.rb +5 -1
- data/lib/hyrax/transactions/steps/add_file_sets.rb +2 -1
- data/lib/hyrax/version.rb +1 -1
- data/lib/hyrax.rb +1 -0
- data/lib/tasks/workflow.rake +1 -2
- data/lib/valkyrie/indexing/redis_queue/indexing_adapter.rb +144 -0
- data/lib/wings/valkyrie/query_service.rb +3 -4
- data/template.rb +1 -1
- metadata +28 -14
- data/.github/workflows/main.yml +0 -17
@@ -8,8 +8,9 @@ module Hyrax
|
|
8
8
|
[:find_ids_by_model]
|
9
9
|
end
|
10
10
|
|
11
|
-
def initialize(query_service:)
|
11
|
+
def initialize(query_service:, query_rows: 1_000)
|
12
12
|
@query_service = query_service
|
13
|
+
@query_rows = query_rows
|
13
14
|
end
|
14
15
|
|
15
16
|
attr_reader :query_service
|
@@ -23,14 +24,38 @@ module Hyrax
|
|
23
24
|
#
|
24
25
|
# @param model [Class]
|
25
26
|
# @param ids [Enumerable<#to_s>, Symbol]
|
27
|
+
# @param use_solr [Boolean]
|
26
28
|
#
|
27
29
|
# @return [Enumerable<Valkyrie::ID>]
|
28
|
-
def find_ids_by_model(model:, ids: :all)
|
29
|
-
|
30
|
+
def find_ids_by_model(model:, ids: :all, use_solr: true)
|
31
|
+
if use_solr
|
32
|
+
query_solr(model, ids)
|
33
|
+
else
|
34
|
+
return query_service.find_all_of_model(model: model).map(&:id) if ids == :all
|
35
|
+
query_service.find_many_by_ids(ids: ids).select do |resource|
|
36
|
+
resource.is_a?(model)
|
37
|
+
end.map(&:id)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def query_solr(model, ids)
|
44
|
+
return enum_for(:query_solr, model, ids) unless block_given?
|
45
|
+
model_name = Hyrax::ModelRegistry.rdf_representations_from(Array(model)).first
|
46
|
+
|
47
|
+
solr_query = "_query_:\"{!raw f=has_model_ssim}#{model_name}\""
|
48
|
+
solr_response = Hyrax::SolrService.get(solr_query, fl: 'id', rows: @query_rows)['response']
|
49
|
+
|
50
|
+
loop do
|
51
|
+
response_docs = solr_response['docs']
|
52
|
+
response_docs.select! { |doc| ids.include?(doc['id']) } unless ids == :all
|
53
|
+
|
54
|
+
response_docs.each { |doc| yield doc['id'] }
|
30
55
|
|
31
|
-
|
32
|
-
|
33
|
-
end
|
56
|
+
break if (solr_response['start'] + solr_response['docs'].count) >= solr_response['numFound']
|
57
|
+
solr_response = Hyrax::SolrService.get(solr_query, fl: 'id', rows: @query_rows, start: solr_response['start'] + @query_rows)['response']
|
58
|
+
end
|
34
59
|
end
|
35
60
|
end
|
36
61
|
end
|
@@ -33,23 +33,24 @@ module Hyrax
|
|
33
33
|
# * use work the file_set is in
|
34
34
|
# No other object types are supported by this view.
|
35
35
|
def self.build_service_object_from(form:, ability:)
|
36
|
-
|
36
|
+
obj = form.object
|
37
|
+
if obj.respond_to?(:model) && obj.model.work?
|
37
38
|
# The provided form object is a work form.
|
38
|
-
new(object:
|
39
|
-
elsif
|
39
|
+
new(object: obj, ability: ability)
|
40
|
+
elsif obj.respond_to?(:model) && obj.model.file_set?
|
40
41
|
# The provided form object is a FileSet form. For Valkyrie forms
|
41
42
|
# (+Hyrax::Forms::FileSetForm+), +:in_works_ids+ is prepopulated onto
|
42
43
|
# the form object itself. For +Hyrax::Forms::FileSetEditForm+, the
|
43
44
|
# +:in_works+ method is present on the wrapped +:model+.
|
44
|
-
if
|
45
|
-
object_id =
|
45
|
+
if obj.is_a?(Hyrax.config.file_set_form)
|
46
|
+
object_id = obj.in_works_ids.first
|
46
47
|
new(object: Hyrax.query_service.find_by(id: object_id), ability: ability)
|
47
48
|
else
|
48
|
-
new(object:
|
49
|
+
new(object: obj.model.in_works.first, ability: ability)
|
49
50
|
end
|
50
|
-
elsif
|
51
|
+
elsif obj.file_set?
|
51
52
|
# The provided form object is a FileSet.
|
52
|
-
new(object:
|
53
|
+
new(object: obj.in_works.first, ability: ability)
|
53
54
|
end
|
54
55
|
end
|
55
56
|
|
@@ -50,9 +50,9 @@ module Hyrax
|
|
50
50
|
private
|
51
51
|
|
52
52
|
def create_workflow_entity!
|
53
|
-
Sipity::Entity.
|
54
|
-
|
55
|
-
|
53
|
+
Sipity::Entity.find_or_create_by!(proxy_for_global_id: Hyrax::GlobalID(work).to_s,
|
54
|
+
workflow: workflow_for(work),
|
55
|
+
workflow_state: nil)
|
56
56
|
end
|
57
57
|
|
58
58
|
def assign_specific_roles_to(entity:)
|
@@ -14,7 +14,8 @@
|
|
14
14
|
<%= link_to "My Profile", hyrax.dashboard_profile_path(current_user), class: 'dropdown-item' %>
|
15
15
|
<%= link_to t("hyrax.toolbar.dashboard.menu"), hyrax.dashboard_path, class: "dropdown-item" %>
|
16
16
|
<div class="dropdown-divider"></div>
|
17
|
-
<%=
|
17
|
+
<%= button_to t("hyrax.toolbar.profile.logout"), main_app.destroy_user_session_path, class: "dropdown-item",
|
18
|
+
method: ::Devise.sign_out_via %>
|
18
19
|
</div>
|
19
20
|
</li>
|
20
21
|
<% else %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="card">
|
2
|
-
|
2
|
+
|
3
3
|
<div class="card-header">
|
4
4
|
<h4><%= t('.top_collections') %>
|
5
5
|
<div class="btn-group float-right">
|
@@ -41,15 +41,11 @@
|
|
41
41
|
</tbody>
|
42
42
|
</table>
|
43
43
|
</div>
|
44
|
-
|
44
|
+
|
45
45
|
<div class="card-footer">
|
46
46
|
<div class="float-right">
|
47
|
-
<%= paginate @top_collections %>
|
47
|
+
<%= paginate @top_collections, outer_window: 2, theme: 'blacklight' %>
|
48
48
|
</div>
|
49
49
|
</div>
|
50
50
|
|
51
51
|
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
@@ -14,8 +14,8 @@
|
|
14
14
|
<tbody>
|
15
15
|
<% @top_file_set_downloads.each do |download| %>
|
16
16
|
<tr>
|
17
|
-
<td><%= download[1] %></td>
|
18
|
-
<td><%= download[0] %></td>
|
17
|
+
<td><%= download[1] %></td>
|
18
|
+
<td><%= download[0] %></td>
|
19
19
|
<td><%= download[2] %></td>
|
20
20
|
</tr>
|
21
21
|
<% end %>
|
@@ -24,10 +24,7 @@
|
|
24
24
|
</div>
|
25
25
|
<div class="card-footer">
|
26
26
|
<div class="float-right">
|
27
|
-
|
27
|
+
<%= paginate @top_file_set_downloads, outer_window: 2, theme: 'blacklight' %>
|
28
28
|
</div>
|
29
29
|
</div>
|
30
30
|
</div>
|
31
|
-
|
32
|
-
|
33
|
-
|
@@ -24,16 +24,15 @@
|
|
24
24
|
<td><%= work[0] %></td>
|
25
25
|
<td><%= work[2] %></td>
|
26
26
|
<td><%= work[3] %></td>
|
27
|
-
</tr>
|
27
|
+
</tr>
|
28
28
|
<% end %>
|
29
29
|
</tbody>
|
30
30
|
</table>
|
31
31
|
</div>
|
32
|
-
|
33
32
|
|
34
33
|
<div class="card-footer">
|
35
34
|
<div class="float-right">
|
36
|
-
<%= paginate @top_works %>
|
35
|
+
<%= paginate @top_works, outer_window: 2, theme: 'blacklight' %>
|
37
36
|
</div>
|
38
37
|
</div>
|
39
38
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="viewer-wrapper">
|
2
|
-
<iframe
|
2
|
+
<iframe title="image view"
|
3
3
|
src="<%= universal_viewer_base_url %>#?manifest=<%= main_app.polymorphic_url [main_app, :manifest, presenter], { locale: nil } %>&config=<%= universal_viewer_config_url %>"
|
4
4
|
allowfullscreen="true"
|
5
5
|
frameborder="0"
|
@@ -1,21 +1,22 @@
|
|
1
1
|
<div class="btn-group">
|
2
2
|
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"><%= t('.select') %> <span class="caret"></span>
|
3
3
|
</button>
|
4
|
-
<ul class="dropdown-menu dropdown-menu-right">
|
4
|
+
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
5
5
|
<% if can?( :edit, document ) && !workflow_restriction?(@presenter) %>
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
<%= link_to [main_app, :edit, document],
|
7
|
+
class: "itemicon itemedit",
|
8
|
+
role: 'menuitem',
|
9
|
+
title: t('hyrax.collection.document_list.edit'),
|
10
|
+
id: "edit_work_link_#{document.id}" do %>
|
11
|
+
<li class="dropdown-item">
|
11
12
|
<i class="fa fa-pencil" aria-hidden="true"></i> <%= t('hyrax.collection.document_list.edit') %>
|
12
|
-
|
13
|
-
|
13
|
+
</li>
|
14
|
+
<% end %>
|
14
15
|
<% end %>
|
15
|
-
|
16
|
-
|
16
|
+
<%= display_trophy_link(current_user, document.id, role: 'menuitem') do |text| %>
|
17
|
+
<li class="dropdown-item">
|
17
18
|
<i class="fa fa-star" aria-hidden="true"></i> <%= text %>
|
18
|
-
|
19
|
-
|
19
|
+
</li>
|
20
|
+
<% end %>
|
20
21
|
</ul>
|
21
22
|
</div>
|
@@ -7,39 +7,43 @@
|
|
7
7
|
<%= t("hyrax.dashboard.my.action.select") %>
|
8
8
|
</button>
|
9
9
|
<ul role="menu" id="<%= ul_id %>" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
<%= link_to hyrax.admin_admin_set_path(id),
|
11
|
+
class: 'itemicon itemedit',
|
12
|
+
role: 'menuitem',
|
13
|
+
title: t("hyrax.dashboard.my.action.view_admin_set") do %>
|
14
|
+
<li class="dropdown-item" tabindex="-1">
|
14
15
|
<%= t("hyrax.dashboard.my.action.view_admin_set") %>
|
15
|
-
|
16
|
-
|
16
|
+
</li>
|
17
|
+
<% end %>
|
17
18
|
<% if can? :edit, admin_set_presenter.solr_document %>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
<%= link_to hyrax.edit_admin_admin_set_path(id),
|
20
|
+
class: 'itemicon itemedit',
|
21
|
+
role: 'menuitem',
|
22
|
+
title: t("hyrax.dashboard.my.action.edit_admin_set") do %>
|
23
|
+
<li class="dropdown-item" tabindex="-1">
|
22
24
|
<%= t("hyrax.dashboard.my.action.edit_admin_set") %>
|
23
|
-
|
24
|
-
|
25
|
+
</li>
|
26
|
+
<% end %>
|
25
27
|
<% else %>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
<%= link_to "#",
|
29
|
+
class: 'itemicon itemedit edit-collection-deny-button',
|
30
|
+
role: 'menuitem',
|
31
|
+
title: t("hyrax.dashboard.my.action.edit_collection") do %>
|
32
|
+
<li class="dropdown-item" tabindex="-1">
|
30
33
|
<%= t("hyrax.dashboard.my.action.edit_collection") %>
|
31
|
-
|
32
|
-
|
34
|
+
</li>
|
35
|
+
<% end %>
|
33
36
|
<% end %>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
<%= link_to "#",
|
38
|
+
class: 'itemicon itemtrash delete-collection-button',
|
39
|
+
role: 'menuitem',
|
40
|
+
title: t("hyrax.dashboard.my.action.delete_admin_set"),
|
41
|
+
data: { totalitems: admin_set_presenter.total_items,
|
42
|
+
membership: admin_set_presenter.collection_type_is_require_membership?,
|
43
|
+
hasaccess: (can?(:edit, admin_set_presenter.solr_document)) } do %>
|
44
|
+
<li class="dropdown-item" tabindex="-1">
|
41
45
|
<%= t("hyrax.dashboard.my.action.delete_admin_set") %>
|
42
|
-
|
43
|
-
|
46
|
+
</li>
|
47
|
+
<% end %>
|
44
48
|
</ul>
|
45
49
|
</div>
|
@@ -7,52 +7,57 @@
|
|
7
7
|
<%= t("hyrax.dashboard.my.action.select") %>
|
8
8
|
</button>
|
9
9
|
<ul role="menu" id="<%= ul_id %>" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= id %>">
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
<%= link_to hyrax.dashboard_collection_path(id),
|
11
|
+
class: 'itemicon itemedit',
|
12
|
+
role: 'menuitem',
|
13
|
+
title: t("hyrax.dashboard.my.action.view_collection") do %>
|
14
|
+
<li class="dropdown-item" tabindex="-1">
|
14
15
|
<%= t("hyrax.dashboard.my.action.view_collection") %>
|
15
|
-
|
16
|
-
|
16
|
+
</li>
|
17
|
+
<% end %>
|
17
18
|
<% if can? :edit, collection_presenter.solr_document %>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
<%= link_to hyrax.edit_dashboard_collection_path(id),
|
20
|
+
class: 'itemicon itemedit',
|
21
|
+
role: 'menuitem',
|
22
|
+
title: t("hyrax.dashboard.my.action.edit_collection") do %>
|
23
|
+
<li class="dropdown-item" tabindex="-1">
|
22
24
|
<%= t("hyrax.dashboard.my.action.edit_collection") %>
|
23
|
-
|
24
|
-
|
25
|
+
</li>
|
26
|
+
<% end %>
|
25
27
|
<% else %>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
28
|
+
<%= link_to "#",
|
29
|
+
class: 'itemicon itemedit edit-collection-deny-button',
|
30
|
+
role: 'menuitem',
|
31
|
+
title: t("hyrax.dashboard.my.action.edit_collection") do %>
|
32
|
+
<li class="dropdown-item" tabindex="-1">
|
30
33
|
<%= t("hyrax.dashboard.my.action.edit_collection") %>
|
31
|
-
|
32
|
-
|
34
|
+
</li>
|
35
|
+
<% end %>
|
33
36
|
<% end %>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
<%= link_to "#",
|
38
|
+
class: 'itemicon itemtrash delete-collection-button',
|
39
|
+
role: 'menuitem',
|
40
|
+
title: t("hyrax.dashboard.my.action.delete_collection"),
|
41
|
+
data: { totalitems: collection_presenter.total_items ,
|
42
|
+
membership: collection_presenter.collection_type_is_require_membership? ,
|
43
|
+
hasaccess: (can?(:edit, collection_presenter.solr_document)) } do %>
|
44
|
+
<li class="dropdown-item" tabindex="-1">
|
41
45
|
<%= t("hyrax.dashboard.my.action.delete_collection") %>
|
42
|
-
|
43
|
-
|
46
|
+
</li>
|
47
|
+
<% end %>
|
44
48
|
|
45
49
|
<% if collection_presenter.collection_type_is_nestable? %>
|
46
50
|
<% # The user should have deposit access to the parent we are adding, and read access to the child (the collection we are linking here). %>
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
51
|
+
<%= link_to "#",
|
52
|
+
class: 'itemicon add-to-collection',
|
53
|
+
role: 'menuitem',
|
54
|
+
title: t("hyrax.dashboard.my.action.add_to_collection"),
|
55
|
+
data: { nestable: collection_presenter.collection_type_is_nestable? ,
|
56
|
+
hasaccess: (can?(:read, collection_presenter.solr_document)) } do %>
|
57
|
+
<li class="dropdown-item" tabindex="-1">
|
53
58
|
<%= t("hyrax.dashboard.my.action.add_to_collection") %>
|
54
|
-
|
55
|
-
|
59
|
+
</li>
|
60
|
+
<% end %>
|
56
61
|
<% end %>
|
57
62
|
</ul>
|
58
63
|
</div>
|
@@ -8,38 +8,39 @@
|
|
8
8
|
</button>
|
9
9
|
|
10
10
|
<ul role="menu" id="<%= ul_id %>" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= document.id %>">
|
11
|
-
|
12
11
|
<% if can? :edit, document.id %>
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
<%= link_to [main_app, :edit, document],
|
13
|
+
id: 'action-edit-work', role: 'menuitem' do %>
|
14
|
+
<li class="dropdown-item" tabindex="-1">
|
16
15
|
<%= t("hyrax.dashboard.my.action.edit_work") %>
|
17
|
-
|
18
|
-
|
16
|
+
</li>
|
17
|
+
<% end %>
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
19
|
+
<%= link_to [main_app, document],
|
20
|
+
method: :delete,
|
21
|
+
id: 'action-delete-work',
|
22
|
+
role: 'menuitem',
|
23
|
+
data: {
|
24
|
+
confirm: t("hyrax.dashboard.my.action.work_confirmation", application_name: application_name) } do %>
|
25
|
+
<li class="dropdown-item" tabindex="-1">
|
26
26
|
<%= t("hyrax.dashboard.my.action.delete_work") %>
|
27
|
-
|
28
|
-
|
27
|
+
</li>
|
28
|
+
<% end %>
|
29
29
|
<% end %>
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
<%= display_trophy_link(current_user, document.id, role: 'menuitem' ) do |text| %>
|
32
|
+
<li class="dropdown-item" tabindex="-1">
|
33
33
|
<%= text %>
|
34
|
-
|
35
|
-
|
34
|
+
</li>
|
35
|
+
<% end %>
|
36
36
|
|
37
37
|
<% if can? :transfer, document.id %>
|
38
|
-
|
39
|
-
|
38
|
+
<%= link_to(hyrax.new_work_transfer_path(document.id), id: 'action-transfer-work', role: 'menuitem',
|
39
|
+
class: 'itemicon itemtransfer', title: t("hyrax.dashboard.my.action.transfer")) do %>
|
40
|
+
<li class="dropdown-item" tabindex="-1">
|
40
41
|
<%= t("hyrax.dashboard.my.action.transfer") %>
|
41
|
-
|
42
|
-
|
42
|
+
</li>
|
43
|
+
<% end %>
|
43
44
|
<% end %>
|
44
45
|
</ul>
|
45
46
|
</div>
|
data/bin/db-migrate-seed.sh
CHANGED
data/bin/dev-entrypoint.sh
CHANGED
@@ -12,6 +12,9 @@ cp -Rn /usr/local/bundle/* /app/bundle/ruby/$RUBY_MAJOR.0
|
|
12
12
|
bundle install
|
13
13
|
yarn install
|
14
14
|
|
15
|
+
# Precompile assets if running in production (Nurax)
|
16
|
+
[ "$RAILS_ENV" = "production" ] && bundle exec rake assets:precompile
|
17
|
+
|
15
18
|
db-migrate-seed.sh
|
16
19
|
|
17
20
|
# Run the command
|
data/config/features.rb
CHANGED
@@ -6,46 +6,56 @@ Flipflop.configure do
|
|
6
6
|
strategy Hyrax::Strategies::YamlStrategy, config: Hyrax.config.feature_config_path
|
7
7
|
strategy :default
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
9
|
+
group :site_configuration do
|
10
|
+
feature :cache_work_iiif_manifest,
|
11
|
+
default: false,
|
12
|
+
description: "Use Rails.cache to cache the JSON document for IIIF manifests"
|
13
|
+
|
14
|
+
feature :hide_private_items,
|
15
|
+
default: false,
|
16
|
+
description: "Do not show the private items."
|
17
|
+
|
18
|
+
feature :hide_social_buttons,
|
19
|
+
default: false,
|
20
|
+
description: "Do not show social media share buttons."
|
21
|
+
|
22
|
+
feature :hide_users_list,
|
23
|
+
default: true,
|
24
|
+
description: "Do not show users list unless user has authenticated."
|
25
|
+
|
26
|
+
feature :read_only,
|
27
|
+
default: false,
|
28
|
+
description: "Put the system into read-only mode. Deposits, edits, approvals and anything that makes a change to the data will be disabled."
|
29
|
+
end
|
30
|
+
|
31
|
+
group :repository_management do
|
32
|
+
feature :active_deposit_agreement_acceptance,
|
33
|
+
default: Hyrax.config.active_deposit_agreement_acceptance?,
|
34
|
+
description: "Require an active acceptance of the deposit agreement by checking a checkbox"
|
35
|
+
|
36
|
+
# Note, if this is deactivated, a default admin set will be created and all
|
37
|
+
# works will be assigned to it when they are created.
|
38
|
+
feature :assign_admin_set,
|
39
|
+
default: true,
|
40
|
+
description: "Ability to assign uploaded items to an admin set"
|
41
|
+
|
42
|
+
feature :batch_upload,
|
43
|
+
default: false,
|
44
|
+
description: "Enable uploading batches of works"
|
45
|
+
|
46
|
+
feature :proxy_deposit,
|
47
|
+
default: true,
|
48
|
+
description: "Depositors may designate proxies to deposit works on their behalf"
|
49
|
+
|
50
|
+
feature :show_deposit_agreement,
|
51
|
+
default: true,
|
52
|
+
description: "Show a deposit agreement to users creating works"
|
53
|
+
|
54
|
+
feature :transfer_works,
|
55
|
+
default: true,
|
56
|
+
description: "Depositors may transfer their works to another user"
|
57
|
+
end
|
58
|
+
|
49
59
|
rescue Flipflop::StrategyError, Flipflop::FeatureError => err
|
50
60
|
Hyrax.logger.warn "Ignoring #{err}: #{err.message}"
|
51
61
|
end
|
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
# Any options set here are to override Rails 7.2 configuration defaults
|
4
4
|
|
5
|
-
|
6
|
-
#
|
7
|
-
Rails
|
8
|
-
Rails.application.config.action_view.
|
5
|
+
if Rails::VERSION::MAJOR >= 7
|
6
|
+
# These fix a couple of issues arising from Rails 7.2 enforcement of HTML5 semantics
|
7
|
+
# by default when using certain Rails methods
|
8
|
+
Rails.application.config.action_view.button_to_generates_button_tag = false
|
9
|
+
Rails.application.config.action_view.sanitizer_vendor = Rails::HTML4::Sanitizer
|
10
|
+
end
|