diff options
Diffstat (limited to 'app/views/admin_user')
-rw-r--r-- | app/views/admin_user/list.rhtml | 28 | ||||
-rw-r--r-- | app/views/admin_user/show.rhtml | 20 |
2 files changed, 48 insertions, 0 deletions
diff --git a/app/views/admin_user/list.rhtml b/app/views/admin_user/list.rhtml new file mode 100644 index 000000000..b65b640e4 --- /dev/null +++ b/app/views/admin_user/list.rhtml @@ -0,0 +1,28 @@ +<% @title = 'Listing users' %> + +<h1><%=@title%></h1> + +<table> + <tr> + <th>ID</th> + <% for column in ['Name', 'Email', 'Created at', 'Updated at', 'Email confirmed'] %> + <th><%= column %></th> + <% end %> + </tr> + +<% for user in @admin_users %> + <tr class="<%= cycle('odd', 'even') %>"> + <td><%= user.id.to_s %></td> + <td><%= link_to h(user.name), 'show/' + user.id.to_s %></td> + <td><a href="mailto:<%=h user.email %>"><%=h user.email%></td> + <% for column in ['created_at', 'updated_at', 'email_confirmed'] %> + <td><%=h user.send(column) %></td> + <% end %> + </tr> +<% end %> +</table> + +<%= will_paginate(@admin_users) %> + +<br /> + diff --git a/app/views/admin_user/show.rhtml b/app/views/admin_user/show.rhtml new file mode 100644 index 000000000..f63720234 --- /dev/null +++ b/app/views/admin_user/show.rhtml @@ -0,0 +1,20 @@ +<% @title = "User - " + h(@admin_user.name) %> + +<h1><%=@title%></h1> + +<p> +<% for column in User.content_columns %> + <strong><%= column.human_name %>:</strong> + <% if column.name == 'email' %> + <a href="mailto:<%=h @admin_user.email %>"><%=h @admin_user.email%></a> + <% else %> + <%=h @admin_user.send(column.name) %> + <% end %> + <br> +<% end %> +<strong>ID:</strong> <%= @admin_user.id%> +</p> + +<%= link_to 'Public page', main_url(user_url(@admin_user)) %> + + |