Improves all pages for admin section

This commit is contained in:
Alberto Garcia Cabeza
2016-06-01 13:23:57 +02:00
parent 00fd9da0f9
commit fb6dbdf2f9
31 changed files with 529 additions and 387 deletions

View File

@@ -4,34 +4,32 @@
<h3><%= page_entries_info @comments %></h3>
<ul class="admin-list">
<table>
<% @comments.each do |comment| %>
<li id="<%= dom_id(comment) %>">
<div class="row">
<div class="small-12 medium-8 column">
<%= text_with_links comment.body %><br>
<% if comment.commentable.hidden? %>
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
<% else %>
<%= link_to comment.commentable.title, comment.commentable %>
<% end %>
</div>
<div class="small-6 medium-4 column text-right">
<%= link_to t("admin.actions.restore"),
restore_admin_comment_path(comment, request.query_parameters),
<tr id="<%= dom_id(comment) %>">
<td>
<%= text_with_links comment.body %><br>
<% if comment.commentable.hidden? %>
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
<% else %>
<%= link_to comment.commentable.title, comment.commentable %>
<% end %>
</td>
<td class="text-right">
<%= link_to t("admin.actions.restore"),
restore_admin_comment_path(comment, request.query_parameters),
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button hollow on-hover" %>
<% unless comment.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_comment_path(comment, request.query_parameters),
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button small success float-right" %>
<% unless comment.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_comment_path(comment, request.query_parameters),
method: :put,
class: "button small warning float-right" %>
<% end %>
</div>
</div>
</li>
class: "button hollow warning on-hover" %>
<% end %>
</td>
</tr>
<% end %>
</ul>
</table>
<%= paginate @comments %>