We were displaying documents in five places, and in five different ways. Sometimes with the metadata in parenthesis after the title, sometimes with the metadata below the title, sometimes without metadata, sometimes with an icon in front of the document, and sometimes with a separate link to download the file. So we're now displaying the same thing everywhere. Not sure whether this is the best solution, but at least it's consistent. We aren't unifying the way we display a list of documents, though, since different sections look pretty different and I'm not sure whether the same style would look well everywhere. Note that we're renaming the `document` HTML class in the documents table to `document-row` so the styles for the `document` class don't apply here.
12 lines
342 B
Plaintext
12 lines
342 B
Plaintext
<div id="documents" class="documents">
|
|
<h2><%= t("documents.title") %> <span>(<%= documents.count %>)</span></h2>
|
|
|
|
<ul class="no-bullet document-link">
|
|
<% documents.each do |document| %>
|
|
<li>
|
|
<%= render Documents::DocumentComponent.new(document, show_destroy_link: true) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|