Move documents partials to components
This way it'll be easier to change them. Note that there were two `.document-link` elements which aren't part of a `.documents` element. We're renaming the HTML class of the link in investments because it didn't contain links to download documents and are slightly duplicating the CSS in the poll answer documents in order to keep the `word-wrap` property.
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<li id="<%= dom_id(document) %>">
|
||||
<%= link_to t("documents.buttons.download_document"),
|
||||
document.attachment,
|
||||
target: "_blank",
|
||||
rel: "nofollow",
|
||||
class: "button hollow medium float-right" %>
|
||||
|
||||
<strong><%= document.title %></strong>
|
||||
<br>
|
||||
<small>
|
||||
<%= document.humanized_content_type %> |
|
||||
<%= number_to_human_size(document.attachment_file_size, precision: 2) %>
|
||||
</small>
|
||||
|
||||
<% if can?(:destroy, document) %>
|
||||
<br>
|
||||
<%= link_to t("documents.buttons.destroy_document"),
|
||||
document,
|
||||
method: :delete,
|
||||
data: { confirm: t("documents.actions.destroy.confirm") },
|
||||
class: "delete" %>
|
||||
<% end %>
|
||||
</li>
|
||||
@@ -1,9 +0,0 @@
|
||||
<% if documents.any? %>
|
||||
<div id="documents" class="documents">
|
||||
<h2><%= t("documents.title") %> <span>(<%= documents.count %>)</span></h2>
|
||||
|
||||
<ul class="no-bullet document-link">
|
||||
<%= render partial: "documents/document", collection: documents %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user