diff options
Diffstat (limited to 'app/views/admin_user/show.html.erb')
-rw-r--r-- | app/views/admin_user/show.html.erb | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/app/views/admin_user/show.html.erb b/app/views/admin_user/show.html.erb new file mode 100644 index 000000000..03e3d30c5 --- /dev/null +++ b/app/views/admin_user/show.html.erb @@ -0,0 +1,74 @@ +<% @title = "User - " + h(@admin_user.name) %> + +<h1><%=@title%></h1> + +<% if @admin_user.profile_photo %> + <div class="user_photo_on_admin"> + <%= form_tag '../clear_profile_photo/' + @admin_user.id.to_s, :multipart => true do %> + <img src="<%= main_url(get_profile_photo_url(:url_name => @admin_user.url_name, :only_path => true)) %>"> + <br> + <%= submit_tag "Clear photo" %> + <% end %> + </div> +<% end %> + + +<div> +<strong>Id:</strong> <%= @admin_user.id%> <br> +<% 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> + <% elsif column.name == 'email_bounce_message' %> + <% if !@admin_user.email_bounce_message.empty? %> + <a href="../show_bounce_message/<%= @admin_user.id.to_s %>">See bounce message</a> + <% end %> + <% else %> + <%=h @admin_user.send(column.name) %> + <% end %> + <% if column.name == 'email_bounced_at' && !@admin_user.email_bounced_at.nil? %> + <form action="../clear_bounce/<%= @admin_user.id.to_s %>" style="display: inline;"><input type="submit" name="action" value="Clear bounce"></form> + <% end %> + <br> +<% end %> +</div> + +<p> + <%= link_to 'Public page', main_url(user_url(@admin_user)) %> + | <%= link_to 'Edit', '../edit/' + @admin_user.id.to_s %> + | <%= link_to 'Log in as this user', '../login_as/' + @admin_user.id.to_s %> (also confirms their email) +</p> + +<h2>Track things</h2> +<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @admin_user.track_things } %> + +<h2>Post redirects</h2> + +<table> + <tr> + <th>Id</th> + <% for column in PostRedirect.content_columns %> + <th><%= column.human_name %></th> + <% end %> + </tr> + +<% for post_redirect in @admin_user.post_redirects.find(:all, :order => 'created_at desc') %> + <tr class="<%= cycle('odd', 'even') %>"> + <td><%=h post_redirect.id %></td> + <% for column in PostRedirect.content_columns.map { |c| c.name } %> + <% if column == 'email_token' %> + <td><%=link_to post_redirect.send(column), main_url(confirm_url(:email_token => post_redirect.send(column), :only_path => true)) %></td> + <% else %> + <td><%=h post_redirect.send(column) %></td> + <% end %> + <% end %> + </tr> +<% end %> +</table> + +<h2>Requests</h2> +<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @admin_user.info_requests } %> + +<h2>Censor rules</h2> +<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @admin_user.censor_rules, :user => @admin_user } %> + |