Skip to content

Commit

Permalink
Merge pull request #6970 from samvera/embargo-form-fixes
Browse files Browse the repository at this point in the history
Embargo/Lease form fixes
  • Loading branch information
dlpierce authored Nov 8, 2024
2 parents 1584e11 + e22b8f1 commit ae082d1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 6 additions & 0 deletions app/forms/hyrax/forms/work_embargo_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
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
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
<td class="current-visibility"><%= visibility_badge(curation_concern.visibility) %></td>
<td class="embargo-release-date"><%= curation_concern.embargo_release_date %></td>
<td class="visibility-after-embargo"><%= visibility_badge(curation_concern.visibility_after_embargo) %></td>
<td class="actions"><%= link_to t('.deactivate'), embargo_path(curation_concern), method: :delete, class: 'btn btn-primary' %></td>
</tr>
<tr data-behavior="extra" data-id="<%= curation_concern.id %>" class="extra-embargo-info">
<td></td>
<td colspan=5>
<td colspan=4>
<%= check_box_tag "embargoes[#{i}][copy_visibility]", curation_concern.id, true, 'aria-labelledby': "embargoes_#{i}_copy_visibility" %>
<label for="embargoes_<%= i %>_copy_visibility"><%= t('.change_all', cc: curation_concern) %>
<%= visibility_badge(curation_concern.visibility_after_embargo) %>?</label>
</td>
<td class="actions"><%= link_to t('.deactivate'), embargo_path(curation_concern), method: :delete, class: 'btn btn-primary' %></td>
</tr>
<% end %>
</tbody>
Expand Down
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, 'aria-labelledby': "leases_#{i}_copy_visibility" %>
<label for="leases_<%= i %>_copy_visibility"><%= t('.change_all', cc: curation_concern) %>
<%= visibility_badge(curation_concern.visibility_after_lease) %>?</label>
</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 ae082d1

Please sign in to comment.