From 4807044820f32e6004670e4761c49c0f4e990be6 Mon Sep 17 00:00:00 2001 From: Daniel Pierce Date: Fri, 8 Nov 2024 11:46:53 -0500 Subject: [PATCH 1/3] Move deactivate button --- .../hyrax/embargoes/_list_expired_active_embargoes.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb b/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb index 37889239e8..be2410c13b 100644 --- a/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb +++ b/app/views/hyrax/embargoes/_list_expired_active_embargoes.html.erb @@ -35,15 +35,15 @@ <%= visibility_badge(curation_concern.visibility) %> <%= curation_concern.embargo_release_date %> <%= visibility_badge(curation_concern.visibility_after_embargo) %> - <%= link_to t('.deactivate'), embargo_path(curation_concern), method: :delete, class: 'btn btn-primary' %> - + <%= check_box_tag "embargoes[#{i}][copy_visibility]", curation_concern.id, true, 'aria-labelledby': "embargoes_#{i}_copy_visibility" %> + <%= link_to t('.deactivate'), embargo_path(curation_concern), method: :delete, class: 'btn btn-primary' %> <% end %> From c131b24cbca21241ec810bfd08826407bf0d0a13 Mon Sep 17 00:00:00 2001 From: Daniel Pierce Date: Fri, 8 Nov 2024 11:51:05 -0500 Subject: [PATCH 2/3] Display resource title on embargo form --- app/forms/hyrax/forms/work_embargo_form.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/forms/hyrax/forms/work_embargo_form.rb b/app/forms/hyrax/forms/work_embargo_form.rb index 4a86f11a0b..0dbda2bd55 100644 --- a/app/forms/hyrax/forms/work_embargo_form.rb +++ b/app/forms/hyrax/forms/work_embargo_form.rb @@ -31,6 +31,12 @@ def human_readable_type def model_name model.to_model.model_name end + + ## + # @return [String] + def to_s + [*model.title].join(' ') + end end end end From eb5e528db06558d4cd40ba16fcf85b4b96aa095d Mon Sep 17 00:00:00 2001 From: Daniel Pierce Date: Fri, 8 Nov 2024 12:14:01 -0500 Subject: [PATCH 3/3] Copy fixes to leases too --- app/forms/hyrax/forms/work_lease_form.rb | 6 ++++++ app/views/hyrax/leases/_list_expired_active_leases.html.erb | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/forms/hyrax/forms/work_lease_form.rb b/app/forms/hyrax/forms/work_lease_form.rb index 469ac65cb9..1659d3e620 100644 --- a/app/forms/hyrax/forms/work_lease_form.rb +++ b/app/forms/hyrax/forms/work_lease_form.rb @@ -31,6 +31,12 @@ def human_readable_type def model_name model.to_model.model_name end + + ## + # @return [String] + def to_s + [*model.title].join(' ') + end end end end diff --git a/app/views/hyrax/leases/_list_expired_active_leases.html.erb b/app/views/hyrax/leases/_list_expired_active_leases.html.erb index cf0b711eb1..9ffb9964bd 100644 --- a/app/views/hyrax/leases/_list_expired_active_leases.html.erb +++ b/app/views/hyrax/leases/_list_expired_active_leases.html.erb @@ -36,15 +36,15 @@ <%= visibility_badge(curation_concern.visibility) %> <%= curation_concern.lease_expiration_date %> <%= visibility_badge(curation_concern.visibility_after_lease) %> - <%= link_to t('.deactivate'), lease_path(curation_concern), method: :delete, class: 'btn btn-primary' %> - + <%= check_box_tag "leases[#{i}][copy_visibility]", curation_concern.id, true %> <%= t('.change_all', cc: curation_concern) %> <%= visibility_badge(curation_concern.visibility_after_lease) %>? + <%= link_to t('.deactivate'), lease_path(curation_concern), method: :delete, class: 'btn btn-primary' %> <% end %>