<% if !@showing_user.is_active? %> <% elsif @showing_user.is_new? %> <% else %> <% end %> <%= @showing_user.username %> <% if @user && @showing_user.is_active? %> (<%= t('.sendmessage') %>) <% end %>
<% if @showing_user.is_active? %>
<%= avatar_img(@showing_user, 100) %>
<% end %> > <% if @showing_user.is_banned? %> <%= t('.banneduser') %> <% elsif !@showing_user.is_active? %> <%= t('.inactiveuser') %> <% else %> <%= t('.active') %> <%= @showing_user.is_admin? ? t('.administrator') : (@showing_user.is_moderator? ? t('.moderator') : t('.user')) %> <% if !@showing_user.can_invite? %> <%= t('.withinvites') %> <% if !@showing_user.can_submit_stories? %> <%= t('.storysubmissions') %> <% end %> <%= t('.disabled') %> <% end %> <% end %>
<%= distance_of_time_in_words(@showing_user.created_at, Time.now) %> <% if @showing_user.invited_by_user %> <%= raw(t('.byinvitationfrom', :user => @showing_user.username)) %> <%= link_to @showing_user.invited_by_user.try(:username), @showing_user.invited_by_user %> <% end %>
<% if @showing_user.is_banned? %> <%= distance_of_time_in_words(@showing_user.banned_at, Time.now) %> <% if @showing_user.banned_by_user %> <%= t('.bannedby') %><%= 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? %> <%= distance_of_time_in_words(@showing_user.deleted_at, Time.now) %>
<% end %> <% if !@showing_user.is_admin? %> <%= @showing_user.karma %><%= t('.karmaaverage') %><%= number_with_precision(@showing_user.average_karma, :precision => 2) %> <%= t('.karmaperstorycomment') %>
<% end %> <% tag = @showing_user.most_common_story_tag %> <%= @showing_user.stories_submitted_count %><%= tag ? ", " : "" %> <% if tag %> <%= t('.mostcommonlytagged') %><%= tag.tag %> <% end %>
<%= @showing_user.comments_posted_count %>
<% if @showing_user.is_active? %>
<% if @showing_user.about.present? %> <%= raw @showing_user.linkified_about %> <% else %> <%= t('.aboutdefault') %> <% end %>
<% end %> <% if @user && @user.is_admin? && !@showing_user.is_moderator? %>

<%= t('.administrativeinfo') %>

<%= @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 %> <%= t('.commentlinktext') %> 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 %>


<%= t('.administrativeactions') %>

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

<%= submit_tag t('unbanuser') %>

<% end %> <% else %>

<%= t('.banningdescription') %>

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

<%= label_tag :reason, t('.banningreason'), :class => "required" %> <%= text_field_tag :reason, "", :size => 40 %>

<%= submit_tag t('.banuserbutton') %>

<% end %> <% end %> <% if @showing_user.banned_from_inviting? %> <%= form_tag user_enable_invite_path, :method => :post do %>

<%= submit_tag t('.enableinvitesforuser') %>

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

<%= label_tag :reason, t('.disableinvitesreason'), :class => "required" %> <%= text_field_tag :reason, "", :size => 40 %>

<%= submit_tag t('.disableinvitesbutton') %>

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