While testing for accessibility issues (in a development branch), we're
removing Turbolinks and monkey-patching the behavior of the `click_link`
method to check the page for accessibility issues after each request.
However, we were getting false positives when clicking links that act
like buttons.
So, for the reasons mentioned in commit 5311daadf, we're replacing the
link to delete a document with a button.
18 lines
754 B
Plaintext
18 lines
754 B
Plaintext
<div id="<%= dom_id(document) %>" class="document">
|
|
<%= link_to document.attachment, rel: "nofollow" do %>
|
|
<strong class="document-title"><%= document.title %></strong>
|
|
<small class="document-metadata">
|
|
<span class="document-content-type"><%= document.humanized_content_type %></span>
|
|
<span class="document-size"><%= number_to_human_size(document.attachment_file_size, precision: 2) %></span>
|
|
</small>
|
|
<% end %>
|
|
|
|
<% if show_destroy_link? && can?(:destroy, document) %>
|
|
<%= button_to t("documents.buttons.destroy_document"),
|
|
document,
|
|
method: :delete,
|
|
data: { confirm: t("documents.actions.destroy.confirm") },
|
|
class: "delete" %>
|
|
<% end %>
|
|
</div>
|