improves styles for admin moderators views
This commit is contained in:
@@ -1,26 +1,30 @@
|
|||||||
<div class="small-12 column">
|
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<thead>
|
||||||
<tr>
|
<th scope="col"><%= t("admin.moderators.index.name") %></th>
|
||||||
<td>
|
<th scope="col" class="small-6"><%= t("admin.moderators.index.email") %></th>
|
||||||
<%= moderator.name %>
|
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||||
</td>
|
</thead>
|
||||||
<td>
|
<tbody>
|
||||||
<%= moderator.email %>
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
<td class="text-right">
|
<%= moderator.name %>
|
||||||
<% if moderator.persisted? %>
|
</td>
|
||||||
<%= link_to t('admin.moderators.moderator.delete'),
|
<td>
|
||||||
admin_moderator_path(moderator),
|
<%= moderator.email %>
|
||||||
method: :delete,
|
</td>
|
||||||
class: "button hollow alert" %>
|
<td>
|
||||||
<% else %>
|
<% if moderator.persisted? %>
|
||||||
<%= link_to t('admin.moderators.moderator.add'),{ controller: "admin/moderators", action: :create, user_id: moderator.user_id },
|
<%= link_to t('admin.moderators.moderator.delete'),
|
||||||
method: :post,
|
admin_moderator_path(moderator),
|
||||||
class: "button success" %>
|
method: :delete,
|
||||||
<% end %>
|
class: "button hollow alert expanded" %>
|
||||||
</td>
|
<% else %>
|
||||||
</tr>
|
<%= link_to t('admin.moderators.moderator.add'),{ controller: "admin/moderators", action: :create, user_id: moderator.user_id },
|
||||||
</tbody>
|
method: :post,
|
||||||
</table>
|
class: "button success expanded" %>
|
||||||
</div>
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|||||||
@@ -2,47 +2,61 @@
|
|||||||
|
|
||||||
<h2 class="inline-block"><%= t("admin.moderators.index.title") %></h2>
|
<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 %>
|
<%= 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') %>
|
<%= text_field_tag :email, '', placeholder: t('admin.moderators.search.email_placeholder') %>
|
||||||
</div>
|
<div class="input-group-button">
|
||||||
<div class="small-12 medium-6 column">
|
<%= submit_tag t('admin.moderators.search.search'), class: 'button' %>
|
||||||
<%= submit_tag t('admin.moderators.search.search'), class: 'button' %>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</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>
|
||||||
<% @moderators.each do |moderator| %>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<%= moderator.name %>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= moderator.email %>
|
|
||||||
</td>
|
|
||||||
<td class="text-right">
|
|
||||||
<% if moderator.persisted? %>
|
|
||||||
<%= link_to t('admin.moderators.moderator.delete'),
|
|
||||||
admin_moderator_path(moderator),
|
|
||||||
method: :delete,
|
|
||||||
class: "button hollow alert"
|
|
||||||
%>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to t('admin.moderators.moderator.add'),
|
|
||||||
{ controller: "admin/moderators", action: :create,
|
|
||||||
user_id: moderator.user_id },
|
|
||||||
method: :post,
|
|
||||||
class: "button success" %>
|
|
||||||
<% end %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<%= paginate @moderators %>
|
<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>
|
||||||
|
<%= moderator.name %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= moderator.email %>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<% if moderator.persisted? %>
|
||||||
|
<%= link_to t('admin.moderators.moderator.delete'),
|
||||||
|
admin_moderator_path(moderator),
|
||||||
|
method: :delete,
|
||||||
|
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 expanded" %>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<%= 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:
|
moderators:
|
||||||
index:
|
index:
|
||||||
title: Moderators
|
title: Moderators
|
||||||
|
name: Name
|
||||||
|
email: Email
|
||||||
|
no_moderators: There are no moderators.
|
||||||
moderator:
|
moderator:
|
||||||
add: Add
|
add: Add
|
||||||
delete: Delete
|
delete: Delete
|
||||||
|
|||||||
@@ -446,6 +446,9 @@ es:
|
|||||||
moderators:
|
moderators:
|
||||||
index:
|
index:
|
||||||
title: Moderadores
|
title: Moderadores
|
||||||
|
name: Nombre
|
||||||
|
email: Email
|
||||||
|
no_moderators: No hay moderadores.
|
||||||
moderator:
|
moderator:
|
||||||
add: Añadir como Moderador
|
add: Añadir como Moderador
|
||||||
delete: Borrar
|
delete: Borrar
|
||||||
|
|||||||
Reference in New Issue
Block a user