Skip to content

Commit

Permalink
Copy fixes to leases too
Browse files Browse the repository at this point in the history
  • Loading branch information
dlpierce authored Nov 8, 2024
1 parent c131b24 commit eb5e528
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/forms/hyrax/forms/work_lease_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions app/views/hyrax/leases/_list_expired_active_leases.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
<td class="current-visibility"><%= visibility_badge(curation_concern.visibility) %></td>
<td class="lease-release-date"><%= curation_concern.lease_expiration_date %></td>
<td class="visibility-after-lease"><%= visibility_badge(curation_concern.visibility_after_lease) %></td>
<td class="actions"><%= link_to t('.deactivate'), lease_path(curation_concern), method: :delete, class: 'btn btn-primary' %></td>
</tr>
<tr data-behavior="extra" data-id="<%= curation_concern.id %>" class="extra-lease-info">
<td></td>
<td colspan=5>
<td colspan=4>
<%= check_box_tag "leases[#{i}][copy_visibility]", curation_concern.id, true %>
<%= t('.change_all', cc: curation_concern) %>
<%= visibility_badge(curation_concern.visibility_after_lease) %>?
</td>
<td class="actions"><%= link_to t('.deactivate'), lease_path(curation_concern), method: :delete, class: 'btn btn-primary' %></td>
</tr>
<% end %>
</tbody>
Expand Down

0 comments on commit eb5e528

Please sign in to comment.