diff options
Diffstat (limited to 'app/views/admin_user/_user_table.html.erb')
-rw-r--r-- | app/views/admin_user/_user_table.html.erb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/views/admin_user/_user_table.html.erb b/app/views/admin_user/_user_table.html.erb new file mode 100644 index 000000000..d35c78594 --- /dev/null +++ b/app/views/admin_user/_user_table.html.erb @@ -0,0 +1,22 @@ +<table> + <tr> + <th>Id</th> + <% for column in ['Name', 'Email', 'Created at', 'Updated at', 'Email confirmed', 'Admin'] + (banned_column ? ['Ban text'] : []) %> + <th><%= column %></th> + <% end %> + </tr> + +<% for user in users %> + <tr class="<%= cycle('odd', 'even') %>"> + <td><%= user.id.to_s %></td> + <td><%= user_both_links(user) %></td> + <td><a href="mailto:<%=h user.email %>"><%=h user.email%></a></td> + <% for column in ['created_at', 'updated_at', 'email_confirmed', 'admin_level'] + (banned_column ? ['ban_text'] : []) %> + <td><%=h user.send(column) %></td> + <% end %> + </tr> +<% end %> +</table> + +<%= will_paginate(users) %> + |