improves styles for admin moderators views
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<div class="small-12 column">
|
||||
<table>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.moderators.index.name") %></th>
|
||||
<th scope="col" class="small-6"><%= t("admin.moderators.index.email") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -8,19 +13,18 @@
|
||||
<td>
|
||||
<%= moderator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td>
|
||||
<% if moderator.persisted? %>
|
||||
<%= link_to t('admin.moderators.moderator.delete'),
|
||||
admin_moderator_path(moderator),
|
||||
method: :delete,
|
||||
class: "button hollow alert" %>
|
||||
class: "button hollow alert expanded" %>
|
||||
<% else %>
|
||||
<%= link_to t('admin.moderators.moderator.add'),{ controller: "admin/moderators", action: :create, user_id: moderator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
class: "button success expanded" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</table>
|
||||
|
||||
@@ -2,22 +2,30 @@
|
||||
|
||||
<h2 class="inline-block"><%= t("admin.moderators.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6">
|
||||
<%= form_tag search_admin_moderators_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.moderators.search.email_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t('admin.moderators.search.search'), class: 'button' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
<div id="search-result"></div>
|
||||
|
||||
<h3><%= page_entries_info @moderators %></h3>
|
||||
<% if @moderators.any? %>
|
||||
|
||||
<table id="moderators">
|
||||
<h3><%= page_entries_info @moderators %></h3>
|
||||
|
||||
<table id="moderators">
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.moderators.index.name") %></th>
|
||||
<th scope="col" class="small-6"><%= t("admin.moderators.index.email") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @moderators.each do |moderator| %>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -26,23 +34,29 @@
|
||||
<td>
|
||||
<%= moderator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<td>
|
||||
<% if moderator.persisted? %>
|
||||
<%= link_to t('admin.moderators.moderator.delete'),
|
||||
admin_moderator_path(moderator),
|
||||
method: :delete,
|
||||
class: "button hollow alert"
|
||||
class: "button hollow alert expanded"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to t('admin.moderators.moderator.add'),
|
||||
{ controller: "admin/moderators", action: :create,
|
||||
user_id: moderator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
class: "button success expanded" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @moderators %>
|
||||
<%= paginate @moderators %>
|
||||
<% else %>
|
||||
<div class="callout primary">
|
||||
<%= t("admin.moderators.index.no_moderators") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<div class=\"small-12 column\"><div class=\"callout alert\"><%= j t('admin.moderators.search.user_not_found') %></div></div>");
|
||||
$("#search-result").html("<div class=\"callout alert\"><%= j t('admin.moderators.search.user_not_found') %></div>");
|
||||
|
||||
@@ -446,6 +446,9 @@ en:
|
||||
moderators:
|
||||
index:
|
||||
title: Moderators
|
||||
name: Name
|
||||
email: Email
|
||||
no_moderators: There are no moderators.
|
||||
moderator:
|
||||
add: Add
|
||||
delete: Delete
|
||||
|
||||
@@ -446,6 +446,9 @@ es:
|
||||
moderators:
|
||||
index:
|
||||
title: Moderadores
|
||||
name: Nombre
|
||||
email: Email
|
||||
no_moderators: No hay moderadores.
|
||||
moderator:
|
||||
add: Añadir como Moderador
|
||||
delete: Borrar
|
||||
|
||||
Reference in New Issue
Block a user