From eb5e528db06558d4cd40ba16fcf85b4b96aa095d Mon Sep 17 00:00:00 2001 From: Daniel Pierce Date: Fri, 8 Nov 2024 12:14:01 -0500 Subject: [PATCH] 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 %>