87 lines
3.0 KiB
Plaintext
87 lines
3.0 KiB
Plaintext
<div id="user-info">
|
|
<h1><%= @user.name %></h1>
|
|
|
|
<% if @user.is?(current_user) || (mod? && current_user.role >= @user.role) %>
|
|
<div class="profile-action" ><%= link_to "edit profile", edit_user_path(@user), :class => "btn blue" %></div>
|
|
<% end %>
|
|
<div class="profile-action" >
|
|
<% if !session[:original_user_id] && admin? %>
|
|
<%= link_to "become this user", become_user_path(@user), :class => "btn blue" %>
|
|
<% elsif session[:original_user_id] %>
|
|
<%= link_to "revert", unbecome_users_path, :class => "btn blue" %>
|
|
<% end %>
|
|
</div>
|
|
<div class="clear"></div>
|
|
|
|
<% if @user.banned? %>
|
|
<span class="user-banned">This user is banned!</span>
|
|
<% end %>
|
|
|
|
<% if !@user.confirmed? %>
|
|
<% if @user.is?(current_user) %>
|
|
<span class="user-unconfirmed">Please confirm your email <u><%= @user.email %></u> !</span>
|
|
<% else %>
|
|
<span class="user-unconfirmed">This user hasn't confirmed their email yet!</span>
|
|
<% end %>
|
|
<% elsif @user.disabled? %>
|
|
<% if @user.is?(current_user) %>
|
|
<span class="user-unconfirmed">Your account has been disabled.</span>
|
|
<% else %>
|
|
<span class="user-unconfirmed">This account has been disabled.</span>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
|
|
<%= image_tag @user.avatar_url(128), :class => "user-avatar avatar", :alt => "avatar" %>
|
|
<%= render partial: "users/username", locals: {user: @user} %>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td>IGN</td>
|
|
<td><%= @user.ign %></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Role</td>
|
|
<td><%= link_to @user.role, users_path(:role => @user.role.name) %></td>
|
|
</tr>
|
|
<% if current_user && !@user.skype.blank? && (@user.skype_public || current_user == @user || mod?) %>
|
|
<tr>
|
|
<td>Skype</td>
|
|
<td><%= link_to @user.skype, "skype:#{@user.skype}?chat", target: "_blank" %></a></td>
|
|
</tr>
|
|
<% end %>
|
|
<% if !@user.youtube.blank? && !@user.youtube_channelname.blank? %>
|
|
<tr>
|
|
<td>YouTube</td>
|
|
<td><%= link_to @user.youtube_channelname, "https://youtube.com/user/#{CGI.escape(@user.youtube)}", :target => "_blank" %></td>
|
|
</tr>
|
|
<% end %>
|
|
<% if !@user.twitter.blank? %>
|
|
<tr>
|
|
<td>Twitter</td>
|
|
<td><%= link_to "@#{@user.twitter}", "https://twitter.com/#{CGI.escape(@user.twitter)}", :target => "_blank" %></td>
|
|
</tr>
|
|
<% end %>
|
|
<tr>
|
|
<td>Joined</td>
|
|
<td><%= @user.created_at.strftime("%e. %b %Y, %H:%M") %></td>
|
|
</tr>
|
|
<% if mod? || @user.is?(current_user) %>
|
|
<tr>
|
|
<td>Last IP</td>
|
|
<td><%= @user.last_ip %></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Email</td>
|
|
<td><%= mail_to @user.email, @user.email, :subject => "Redstoner" %></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Last seen</td>
|
|
<td><%= @user.last_seen.strftime("%e. %b %Y, %H:%M") %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
About:<br>
|
|
<%= @user.about.blank? ? "<span class=\"no-about\">nothing</span>".html_safe : render_mini_md(@user.about).html_safe %>
|
|
</div> |