Refactors documents partials and reorganices css

This commit is contained in:
decabeza
2018-02-26 18:37:30 +01:00
parent c2e9096ce1
commit 5c0a10699a
6 changed files with 68 additions and 93 deletions

View File

@@ -1,24 +1,20 @@
<table>
<tbody>
<tr id="<%= dom_id(document)%>">
<td class="document-link">
<%= document.title %>
</td>
<td class="text-center">
<%= link_to t('documents.buttons.download_document'),
document.attachment.url,
target: "_blank",
rel: "nofollow",
class: 'button hollow' %>
</td>
<td class="text-center">
<% if can?(:destroy, document) %>
<%= link_to t('documents.buttons.destroy_document'),
document_path(document, from: request.url), method: :delete,
data: { confirm: t('documents.actions.destroy.confirm') },
class: 'button hollow alert' %>
<% end %>
</td>
</tr>
</tbody>
</table>
<li id="<%= dom_id(document)%>">
<%= link_to t("documents.buttons.download_document"),
document.attachment.url, target: "_blank",
rel: "nofollow", class: "button hollow medium float-right" %>
<strong><%= document.title %></strong>
<br>
<small>
<%= document.humanized_content_type %>&nbsp;|&nbsp;
<%= number_to_human_size(document.attachment_file_size, precision: 2) %>
</small>
<% if can?(:destroy, document) %>
<br>
<%= link_to t("documents.buttons.destroy_document"),
document_path(document, from: request.url), method: :delete,
data: { confirm: t("documents.actions.destroy.confirm") },
class: "delete" %>
<% end %>
</li>