improves styles for admin administrators views
This commit is contained in:
@@ -1,26 +1,29 @@
|
||||
<div class="small-12 column">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<%= administrator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= administrator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if administrator.persisted? %>
|
||||
<%= link_to t('admin.administrators.administrator.delete'),
|
||||
admin_administrator_path(administrator),
|
||||
method: :delete,
|
||||
class: "button hollow alert" %>
|
||||
<% else %>
|
||||
<%= link_to t('admin.administrators.administrator.add'),{ controller: "admin/administrators", action: :create, user_id: administrator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.administrators.index.name") %></th>
|
||||
<th scope="col"><%= t("admin.administrators.index.email") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<%= administrator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= administrator.email %>
|
||||
</td>
|
||||
<td>
|
||||
<% if administrator.persisted? %>
|
||||
<%= link_to t('admin.administrators.administrator.delete'),
|
||||
admin_administrator_path(administrator),
|
||||
method: :delete,
|
||||
class: "button hollow alert expanded" %>
|
||||
<% else %>
|
||||
<%= link_to t('admin.administrators.administrator.add'),{ controller: "admin/administrators", action: :create, user_id: administrator.user_id },
|
||||
method: :post,
|
||||
class: "button success expanded" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,46 +1,58 @@
|
||||
<h2 class="inline-block"><%= t("admin.administrators.index.title") %></h2>
|
||||
<h2><%= t("admin.administrators.index.title") %></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="small-12 medium-6">
|
||||
<%= form_tag search_admin_administrators_path, method: :get, remote: true do %>
|
||||
<div class="small-12 medium-6 column">
|
||||
<div class="input-group">
|
||||
<%= text_field_tag :email, '', placeholder: t('admin.administrators.search.email_placeholder') %>
|
||||
</div>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= submit_tag t('admin.administrators.search.search'), class: 'button' %>
|
||||
|
||||
<div class="input-group-button">
|
||||
<%= submit_tag t('admin.administrators.search.search'), class: 'button' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div id="search-result" class="row"></div>
|
||||
<div id="search-result"></div>
|
||||
|
||||
<h3><%= page_entries_info @administrators %></h3>
|
||||
<% if @administrators.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @administrators %></h3>
|
||||
|
||||
<table id="administrators">
|
||||
<% @administrators.each do |administrator| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= administrator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= administrator.email %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<% if administrator.persisted? %>
|
||||
<%= link_to t('admin.administrators.administrator.delete'),
|
||||
admin_administrator_path(administrator),
|
||||
method: :delete,
|
||||
class: "button hollow alert"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to t('admin.administrators.administrator.add'),
|
||||
{ controller: "admin/administrators", action: :create,
|
||||
user_id: administrator.user_id },
|
||||
method: :post,
|
||||
class: "button success" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<table id="administrators">
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.administrators.index.name") %></th>
|
||||
<th scope="col"><%= t("admin.administrators.index.email") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<% @administrators.each do |administrator| %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= administrator.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= administrator.email %>
|
||||
</td>
|
||||
<td>
|
||||
<% if administrator.persisted? %>
|
||||
<%= link_to t('admin.administrators.administrator.delete'),
|
||||
admin_administrator_path(administrator),
|
||||
method: :delete,
|
||||
class: "button hollow alert expanded"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to t('admin.administrators.administrator.add'),
|
||||
{ controller: "admin/administrators", action: :create,
|
||||
user_id: administrator.user_id },
|
||||
method: :post,
|
||||
class: "button success expanded" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @administrators %>
|
||||
<%= paginate @administrators %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.administrators.index.no_administrators") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -1 +1 @@
|
||||
$("#search-result").html("<div class=\"small-12 column\"><div class=\"callout alert\"><%= j t('admin.administrators.search.user_not_found') %></div></div>");
|
||||
$("#search-result").html("<div class=\"callout alert\"><%= j t('admin.administrators.search.user_not_found') %></div>");
|
||||
|
||||
@@ -432,6 +432,9 @@ en:
|
||||
administrators:
|
||||
index:
|
||||
title: Administrators
|
||||
name: Name
|
||||
email: Email
|
||||
no_administrators: There are no administrators.
|
||||
administrator:
|
||||
add: Add
|
||||
delete: Delete
|
||||
@@ -439,7 +442,7 @@ en:
|
||||
search:
|
||||
email_placeholder: Search user by email
|
||||
search: Search
|
||||
user_not_found: User not found
|
||||
user_not_found: User not found.
|
||||
moderators:
|
||||
index:
|
||||
title: Moderators
|
||||
|
||||
@@ -382,6 +382,9 @@ es:
|
||||
administrators:
|
||||
index:
|
||||
title: Administradores
|
||||
name: Nombre
|
||||
email: Email
|
||||
no_administrators: No hay administradores.
|
||||
administrator:
|
||||
add: Añadir como Administrador
|
||||
delete: Borrar
|
||||
@@ -389,7 +392,7 @@ es:
|
||||
search:
|
||||
email_placeholder: Buscar usuario por email
|
||||
search: Buscar
|
||||
user_not_found: Usuario no encontrado
|
||||
user_not_found: Usuario no encontrado.
|
||||
managers:
|
||||
index:
|
||||
title: Gestores
|
||||
|
||||
Reference in New Issue
Block a user