vidpush/app/views/accounts/index.html.erb

25 lines
770 B
Plaintext
Raw Normal View History

2014-05-14 18:01:19 +00:00
<h1>Users</h1>
<hr>
2014-05-14 18:30:17 +00:00
<p>To edit your own user, use the Profile Option. To change your admin password, visit the <%= link_to "admin profile edit page", edit_admin_registration_path %>.</p>
2014-05-14 18:01:19 +00:00
<table class="table table-striped">
<thead>
<tr>
<th>Email</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<% next if user.is_admin? %>
<% next if user.equal?(current_user) %>
<tr>
2014-05-14 18:11:52 +00:00
<td><%= link_to user.email, account_path(user) %></td>
<td><%= link_to 'Edit', edit_account_path(user) %></td>
<td><%= link_to 'Destroy', account_path(user), method: :delete, data: { confirm: 'Are you sure?' } %></td>
2014-05-14 18:01:19 +00:00
</tr>
<% end %>
</tbody>
</table>
2014-05-14 18:58:56 +00:00
<%= link_to 'New user', new_account_path %>