app/views/users/index.html.erb in tkh_authentication-0.0.8 vs app/views/users/index.html.erb in tkh_authentication-0.0.9
- old
+ new
@@ -1,21 +1,27 @@
<h1>Listing Users</h1>
<table class='table table-striped'>
<thead>
<tr>
- <th>Name</th>
- <th>Email</th>
+ <th><%= t 'authentication.name' %></th>
+ <th><%= t 'activerecord.attributes.user.email' %></th>
<th>Admin?</th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td><%= user.name %></td>
<td><%= user.email %></td>
- <td><%= user.admin? ? '✓' : 'X' %></td>
+ <td>
+ <% unless user.admin? %>
+ <span class="label label-important">X</span> <%= link_to t('authentication.enable_admin'), make_admin_user_path(user), class: 'btn btn-mini', method: :post %>
+ <% else %>
+ <span class="label label-success">✓</span> <%= link_to t('authentication.disable_admin'), remove_admin_user_path(user), class: 'btn btn-mini', method: :post %>
+ <% end -%>
+ </td>
</tr>
<% end %>
</tbody>
</table>
\ No newline at end of file