summaryrefslogtreecommitdiff
path: root/app/views/users/_user.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/users/_user.html.erb')
-rw-r--r--app/views/users/_user.html.erb22
1 files changed, 15 insertions, 7 deletions
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb
index 04884be8..ff9d4e37 100644
--- a/app/views/users/_user.html.erb
+++ b/app/views/users/_user.html.erb
@@ -9,14 +9,22 @@
9 <% end %> 9 <% end %>
10 </td> 10 </td>
11 <td><%= link_to t("admin.common.show"), user_path(user) %></td> 11 <td><%= link_to t("admin.common.show"), user_path(user) %></td>
12 <% if current_user.admin? || current_user == user %>
13 <td><%= link_to t("admin.common.edit"), edit_user_path(user) %></td>
14 <td> 12 <td>
15 <%= button_to user_path(user), method: :delete, 13 <% if current_user.admin? || current_user == user %>
16 form: { data: { confirm: t(".confirm_destroy", :login => user.login) }, class: 'button_to destructive' } do %> 14 <%= link_to t("admin.common.edit"), edit_user_path(user) %>
17 <%= icon("trash", library: "tabler", "aria-hidden": true) %> <%= t("admin.common.destroy") %> 15 <% end %>
18 <% end %> 16 </td>
17 <td>
18 <% if current_user.admin? && current_user != user %>
19 <% if user.alumni? %>
20 <%= button_to t(".reactivate"), reactivate_user_path(user), method: :put,
21 form: { class: 'button_to state_changing' } %>
22 <% else %>
23 <%= button_to t(".deactivate"), deactivate_user_path(user), method: :put,
24 form: { data: { confirm: t(".confirm_deactivate", :login => user.login) },
25 class: 'button_to destructive' } %>
26 <% end %>
27 <% end %>
19 </td> 28 </td>
20 <% end %>
21</tr> 29</tr>
22<% end %> 30<% end %>