<% if !@showing_user.is_active? %> <% elsif @showing_user.is_new? %> <% else %> <% end %> <%= @showing_user.username %> <% if @user && @showing_user.is_active? %> (Send a Message) <% end %>
<% if @showing_user.is_active? %>
<% end %> > <% if @showing_user.is_banned? %> Banned <% elsif !@showing_user.is_active? %> Inactive <% else %> Active <% end %> <%= @showing_user.is_admin? ? "administrator" : (@showing_user.is_moderator? ? "moderator" : "user") %>
<%= time_ago_in_words_label(@showing_user.created_at) %> <% if @showing_user.invited_by_user %> by invitation from <%= link_to @showing_user.invited_by_user.try(:username), @showing_user.invited_by_user %> <% end %>
<% if @showing_user.is_banned? %> <%= time_ago_in_words_label(@showing_user.banned_at) %> <% if @showing_user.banned_by_user %> by <%= link_to @showing_user.banned_by_user.try(:username), @showing_user.banned_by_user %>: <%= @showing_user.banned_reason %> <% end %>
<% end %> <% if @showing_user.hats.any? %> <% @showing_user.hats.each do |hat| %> <%= hat.to_html_label %> <% end %>
<% end %> <% if @showing_user.deleted_at? %> <%= time_ago_in_words_label(@showing_user.deleted_at) %>
<% end %> <% if !@showing_user.is_admin? %> <%= @showing_user.karma %>, averaging <%= number_with_precision(@showing_user.average_karma, :precision => 2) %> per story/comment
<% end %> <% tag = @showing_user.most_common_story_tag %> <%= @showing_user.stories_submitted_count %><%= tag ? ", " : "" %> <% if tag %> most commonly tagged <%= tag.tag %> <% end %>
<%= @showing_user.comments_posted_count %>
<% if @showing_user.is_active? %>
<% if @showing_user.about.present? %> <%= raw @showing_user.linkified_about %> <% else %> A mystery... <% end %>
<% end %> <% if @user && @user.is_admin? && !@showing_user.is_moderator? %>

Administrative Information

<%= @showing_user.email %>
<% @showing_user.votes_for_others.limit(10).each do |v| %>

<% if v.vote == 1 %> +1 <% else %> <%= v.vote %> <% if v.comment_id %> (<%= Vote::COMMENT_REASONS[v.reason] %>) <% else %> (<%= Vote::STORY_REASONS[v.reason] %>) <% end %> <% end %> on <% if v.comment_id %> comment by <%= v.comment.user.try(:username) %> on <%= v.story.title %> <% elsif v.story_id && !v.comment_id %> <%= v.story.title %> by <%= v.story.user.try(:username) %> <% end %>

<% end %>


Administrative Actions

<% if @showing_user.is_banned? %> <%= form_tag user_unban_path, :method => :post do %>

<%= submit_tag "Unban User" %>

<% end %> <% else %> <%= form_tag user_ban_path, :method => :post do %>

Banning a user will send an e-mail to the user with the reason below, with your e-mail address as the Reply-To so the user can respond.

<%= label_tag :reason, "Reason:", :class => "required" %> <%= text_field_tag :reason, "", :size => 40 %>

<%= submit_tag "Ban User" %>

<% end %> <% end %> <% end %>