Add 'Delete' button to Valuators index/search views
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<h2><%= t("admin.valuators.index.title") %></h2>
|
<h2><%= t("admin.valuators.index.title") %></h2>
|
||||||
|
|
||||||
<%= render 'admin/shared/user_search', url: search_admin_valuators_path %>
|
<%= render "admin/shared/user_search", url: search_admin_valuators_path %>
|
||||||
|
|
||||||
<div id="valuators">
|
<div id="valuators">
|
||||||
<% if @valuators.any? %>
|
<% if @valuators.any? %>
|
||||||
@@ -11,16 +11,13 @@
|
|||||||
<th scope="col"><%= t("admin.valuators.index.name") %></th>
|
<th scope="col"><%= t("admin.valuators.index.name") %></th>
|
||||||
<th scope="col"><%= t("admin.valuators.index.email") %></th>
|
<th scope="col"><%= t("admin.valuators.index.email") %></th>
|
||||||
<th scope="col"><%= t("admin.valuators.index.description") %></th>
|
<th scope="col"><%= t("admin.valuators.index.description") %></th>
|
||||||
|
<th scope="col"><%= t("admin.actions.actions") %></th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @valuators.each do |valuator| %>
|
<% @valuators.each do |valuator| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td><%= valuator.name %></td>
|
||||||
<%= valuator.name %>
|
<td><%= valuator.email %></td>
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<%= valuator.email %>
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
<% if valuator.description.present? %>
|
<% if valuator.description.present? %>
|
||||||
<%= valuator.description %>
|
<%= valuator.description %>
|
||||||
@@ -28,6 +25,12 @@
|
|||||||
<%= t("admin.valuators.index.no_description") %>
|
<%= t("admin.valuators.index.no_description") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<%= link_to t("admin.valuators.valuator.delete"),
|
||||||
|
admin_valuator_path(valuator),
|
||||||
|
method: :delete,
|
||||||
|
class: "button hollow alert expanded" %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -29,7 +29,12 @@
|
|||||||
<%= t("admin.valuators.index.no_description") %>
|
<%= t("admin.valuators.index.no_description") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td>
|
<td>
|
||||||
<% unless user.valuator? %>
|
<% if user.valuator? %>
|
||||||
|
<%= link_to t("admin.valuators.valuator.delete"),
|
||||||
|
admin_valuator_path(user),
|
||||||
|
method: :delete,
|
||||||
|
class: "button hollow alert expanded" %>
|
||||||
|
<% else %>
|
||||||
<%= form_for Valuator.new(user: user), url: admin_valuators_path do |f| %>
|
<%= form_for Valuator.new(user: user), url: admin_valuators_path do |f| %>
|
||||||
<%= f.text_field :description,
|
<%= f.text_field :description,
|
||||||
label: false,
|
label: false,
|
||||||
|
|||||||
@@ -481,6 +481,7 @@ en:
|
|||||||
valuator:
|
valuator:
|
||||||
description_placeholder: 'Description (optional)'
|
description_placeholder: 'Description (optional)'
|
||||||
add: Add to valuators
|
add: Add to valuators
|
||||||
|
delete: Delete
|
||||||
search:
|
search:
|
||||||
title: 'Valuators: User search'
|
title: 'Valuators: User search'
|
||||||
summary:
|
summary:
|
||||||
|
|||||||
@@ -481,6 +481,7 @@ es:
|
|||||||
valuator:
|
valuator:
|
||||||
description_placeholder: 'Descripción (opcional)'
|
description_placeholder: 'Descripción (opcional)'
|
||||||
add: Añadir como evaluador
|
add: Añadir como evaluador
|
||||||
|
delete: Borrar
|
||||||
search:
|
search:
|
||||||
title: 'Evaluadores: Búsqueda de usuarios'
|
title: 'Evaluadores: Búsqueda de usuarios'
|
||||||
summary:
|
summary:
|
||||||
|
|||||||
Reference in New Issue
Block a user