e12d91cd43
not much can actually be deleted, but it can be put into a deleted state
110 lines
3.1 KiB
Plaintext
110 lines
3.1 KiB
Plaintext
<div class="box wide">
|
|
<div class="legend">
|
|
<% if !@showing_user.is_active? %>
|
|
<span class="inactive_user">
|
|
<% elsif @showing_user.is_new? %>
|
|
<span class="new_user">
|
|
<% else %>
|
|
<span>
|
|
<% end %>
|
|
<%= @showing_user.username %>
|
|
</span>
|
|
<% if @user %>
|
|
(<a href="/messages?to=<%= @showing_user.username %>">Send a Message</a>)
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if @showing_user.is_active? %>
|
|
<div id="gravatar">
|
|
<img src="<%= @showing_user.avatar_url %>">
|
|
</div>
|
|
<% end %>
|
|
|
|
<label class="required">Status:</label>
|
|
<span class="d"
|
|
<%= @showing_user.is_banned? ? raw("style=\"color: red;\"") : "" %>>
|
|
<% 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") %>
|
|
</span>
|
|
<br>
|
|
|
|
<label class="required">Joined:</label>
|
|
<span class="d">
|
|
<%= raw(time_ago_in_words_label(@showing_user.created_at)) %> ago
|
|
<% if @showing_user.invited_by_user %>
|
|
by invitation from
|
|
<%= link_to @showing_user.invited_by_user.try(:username),
|
|
@showing_user.invited_by_user %>
|
|
<% end %>
|
|
</span>
|
|
<br>
|
|
|
|
<% if @showing_user.is_banned? %>
|
|
<label class="required">Banned:</label>
|
|
<span class="d">
|
|
<%= raw(time_ago_in_words_label(@showing_user.banned_at)) %> ago
|
|
<% if @showing_user.banned_by_user %>
|
|
by <%= link_to @showing_user.banned_by_user.try(:username),
|
|
@showing_user.banned_by_user %>:
|
|
<em><%= @showing_user.banned_reason %></em>
|
|
<% end %>
|
|
</span>
|
|
<br>
|
|
<% end %>
|
|
|
|
<% if @showing_user.deleted_at? %>
|
|
<label class="required">Left:</label>
|
|
<span class="d">
|
|
<%= raw(time_ago_in_words_label(@showing_user.deleted_at)) %> ago
|
|
</span>
|
|
<br>
|
|
<% end %>
|
|
|
|
<label class="required">Karma:</label>
|
|
<span class="d">
|
|
<%= @showing_user.karma %>, averaging <%=
|
|
number_with_precision(@showing_user.average_karma, :precision => 2) %>
|
|
per story/comment
|
|
</span>
|
|
<br>
|
|
|
|
<label class="required">Stories Submitted:</label>
|
|
<span class="d">
|
|
<% tag = @showing_user.most_common_story_tag %>
|
|
<a href="/newest/<%= @showing_user.username %>"><%=
|
|
@showing_user.stories_submitted_count %></a><%= tag ? ", " : "" %>
|
|
<% if tag %>
|
|
most commonly tagged <a href="<%= tag_url(tag.tag) %>"
|
|
class="<%= tag.css_class %>" title="<%= tag.description %>"><%=
|
|
tag.tag %></a>
|
|
<% end %>
|
|
</span>
|
|
<br>
|
|
|
|
<label class="required">Comments Posted:</label>
|
|
<span class="d">
|
|
<a href="/threads/<%= @showing_user.username %>"><%=
|
|
@showing_user.comments_posted_count %></a>
|
|
</span>
|
|
<br>
|
|
|
|
<% if @showing_user.is_active? %>
|
|
<label class="required">About:</label>
|
|
|
|
<div id="user_about" class="shorten_first_p">
|
|
<% if @showing_user.about.present? %>
|
|
<%= raw @showing_user.linkified_about %>
|
|
<% else %>
|
|
<span class="na">A mystery...</span>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|