summaryrefslogtreecommitdiff
path: root/app/views/users/show.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/users/show.html.erb')
-rw-r--r--app/views/users/show.html.erb19
1 files changed, 12 insertions, 7 deletions
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index e371a09..d9eb123 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -1,14 +1,19 @@
<% title @user.name %>
<div id="user-info">
- <% 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_path(user: @user), :class => "btn blue" %>
- <% elsif session[:original_user_id] %>
+ <div class="profile-action">
+ <% if session[:original_user_id] %>
<%= link_to "revert", revert_path, :class => "btn blue" %>
+ <% elsif admin? %>
+ <%= link_to "become this user", become_path(user: @user), :class => "btn blue" %>
+ <% end %>
+ <% if @user.is?(current_user) || (mod? && current_user.role >= @user.role) %>
+ <%= link_to "edit profile", edit_user_path(@user), :class => "btn blue" %>
+ <% end %>
+ <% if @user.is?(current_user) %>
+ <%= link_to "Private Messages (#{Message.where(user_target: current_user).count})", messages_path, :class => "btn blue" %>
+ <% else %>
+ <%= link_to "Send this user a message", new_message_path(user_target: @user.ign), :class => "btn blue" %>
<% end %>
</div>