Shows documents title only if there is any document

This commit is contained in:
decabeza
2018-12-21 11:51:53 +01:00
parent 63f7c18399
commit 4cda7d1d9f
2 changed files with 34 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
<div id="documents" class="documents">
<h2><%= t("documents.title") %>&nbsp;<span>(<%= documents.count %>)</span></h2>
<% if documents.any? %>
<div id="documents" class="documents">
<h2><%= t("documents.title") %>&nbsp;<span>(<%= documents.count %>)</span></h2>
<% if documents.any? %>
<ul class="no-bullet document-link">
<%= render partial: "documents/document", collection: documents %>
</ul>
<% end %>
</div>
</div>
<% end %>