skill-assessment-app/app/views/admin/user/_table_list.html.erb

18 lines
505 B
Plaintext
Raw Normal View History

2016-08-18 18:22:57 -05:00
<table cellspacing="0" cellpadding="0">
<tr>
2017-03-06 13:35:45 -06:00
<th><%= sortable "name", "User" %></th>
<th><%= sortable "email" %></th>
<th><%= sortable "role" %></th>
2016-08-18 18:22:57 -05:00
<th></th>
</tr>
<% users.each do |user| %>
<tr>
<td><%= link_to user.name, admin_user_path(user.to_i) %></td>
<td><%= mail_to(user.email) %></td>
<td><%= user.role %></td>
2017-03-20 10:57:50 -05:00
<td><%= link_to 'edit', admin_edit_user_path(user.to_i), { class: "" } if policy(user).edit? %></td>
2016-08-18 18:22:57 -05:00
</tr>
<% end %>
</table>