X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/caf49bb25d94f370cbd4ef9b3033e7f319aa6eaa..2e1f6428e7d03a109db57b0d0614ecd2c0e5d5c1:/app/views/users/show.html.erb?ds=inline
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 81fda926b..d479b1d56 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -14,7 +14,8 @@
<%= number_with_delimiter(current_user.changesets.size) %>
- <%= link_to t(".my notes"), user_notes_path(@user) %>
+ <%= link_to t(".my notes"), user_notes_path(current_user) %>
+ <%= number_with_delimiter(current_user.note_comments.size) %>
<%= link_to t(".my traces"), :controller => "traces", :action => "mine" %>
@@ -26,6 +27,7 @@
<%= link_to t(".my comments"), diary_comments_path(current_user) %>
+ <%= number_with_delimiter(current_user.diary_comments.size) %>
<%= link_to t(".my settings"), edit_account_path %>
@@ -59,6 +61,7 @@
<%= link_to t(".notes"), user_notes_path(@user) %>
+ <%= number_with_delimiter(@user.note_comments.size) %>
<%= link_to t(".traces"), :controller => "traces", :action => "index", :display_name => @user.display_name %>
@@ -76,16 +79,17 @@
<%= link_to t(".comments"), diary_comments_path(@user) %>
+ <%= number_with_delimiter(@user.diary_comments.size) %>
-
- <% if current_user and current_user.friends_with?(@user) %>
- <%= link_to t(".remove as friend"), remove_friend_path(:display_name => @user.display_name), :method => :post %>
- <% elsif current_user %>
- <%= link_to t(".add as friend"), make_friend_path(:display_name => @user.display_name), :method => :post %>
- <% else %>
- <%= link_to t(".add as friend"), make_friend_path(:display_name => @user.display_name) %>
- <% end %>
-
+ <% if current_user %>
+
+ <% if current_user.friends_with?(@user) %>
+ <%= link_to t(".remove as friend"), remove_friend_path(:display_name => @user.display_name), :method => :post %>
+ <% else %>
+ <%= link_to t(".add as friend"), make_friend_path(:display_name => @user.display_name), :method => :post %>
+ <% end %>
+
+ <% end %>
<% if @user.blocks.exists? %>
@@ -101,6 +105,12 @@
<% end %>
+ <% if can?(:revoke_all, UserBlock) and @user.blocks.active.exists? %>
+
+ <%= link_to t(".revoke_all_blocks"), revoke_all_user_blocks_path(@user) %>
+
+ <% end %>
+
<% if can?(:create, UserBlock) %>
<%= link_to t(".create_block"), new_user_block_path(@user) %>
@@ -112,15 +122,27 @@
<%= report_link(t(".report"), @user) %>
<% end %>
+
+ <% if current_user and UserMute.exists?(owner: current_user, subject: @user) %>
+
+ <%= link_to t(".destroy_mute"), user_mute_path(@user), :method => :delete %>
+
+ <% elsif current_user %>
+
+ <%= link_to t(".create_mute"), user_mute_path(@user), :method => :post, :title => t("user_mutes.index.user_mute_explainer") %>
+
+ <% end %>
<% end %>
-
+
- <%= t ".mapper since" %>
- <%= l @user.created_at.to_date, :format => :long %>
+ - <%= t ".last map edit" %>
+ - <%= l @user.changesets.first&.created_at&.to_date, :format => :long, :default => t(".no activity yet") %>
<% unless @user.terms_agreed %>
- <%= t ".ct status" %>
-
@@ -190,17 +212,17 @@
<% end %>
<% if current_user and current_user.administrator? -%>
-
+
- <%= t ".email address" %>
- <%= @user.email %>
- <% unless @user.creation_ip.nil? -%>
+ <% unless @user.creation_address.nil? -%>
- <%= t ".created from" %>
- - <%= @user.creation_ip %>
+ - <%= link_to @user.creation_address, users_path(:ip => @user.creation_address) %>
<% end -%>
- <%= t ".status" %>
- - <%= @user.status.capitalize %>
+ - <%= link_to @user.status.capitalize, users_path(:status => @user.status) %>
- <%= t ".spam score" %>
- <%= @user.spam_score %>