X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/10d65cc8571d38bb6af6d9022edb98a294ad2f2d..refs/heads/master:/app/views/users/show.html.erb diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 0c803ebb0..b2247c0d0 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 %> @@ -33,14 +35,14 @@ <% if current_user.blocks.exists? %>
  • - <%= link_to t(".blocks on me"), user_blocks_on_path(current_user) %> + <%= link_to t(".blocks on me"), user_received_blocks_path(current_user) %> <%= number_with_delimiter(current_user.blocks.active.size) %>
  • <% end %> <% if can?(:create, UserBlock) and current_user.blocks_created.exists? %>
  • - <%= link_to t(".blocks by me"), user_blocks_by_path(current_user) %> + <%= link_to t(".blocks by me"), user_issued_blocks_path(current_user) %> <%= number_with_delimiter(current_user.blocks_created.active.size) %>
  • <% end %> @@ -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,31 +79,38 @@
  • <%= 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.follows?(@user) %> + <%= link_to t(".unfollow"), follow_path(:display_name => @user.display_name), :method => :delete %> + <% else %> + <%= link_to t(".follow"), follow_path(:display_name => @user.display_name), :method => :post %> + <% end %> +
  • + <% end %> <% if @user.blocks.exists? %>
  • - <%= link_to t(".block_history"), user_blocks_on_path(@user) %> + <%= link_to t(".block_history"), user_received_blocks_path(@user) %> <%= number_with_delimiter(@user.blocks.active.size) %>
  • <% end %> <% if @user.moderator? and @user.blocks_created.exists? %>
  • - <%= link_to t(".moderator_history"), user_blocks_by_path(@user) %> + <%= link_to t(".moderator_history"), user_issued_blocks_path(@user) %> <%= number_with_delimiter(@user.blocks_created.active.size) %>
  • <% end %> + <% if can?(:destroy, UserBlock) and @user.blocks.active.exists? %> +
  • + <%= link_to t(".revoke_all_blocks"), edit_user_received_blocks_path(@user) %> +
  • + <% end %> + <% if can?(:create, UserBlock) %>
  • <%= link_to t(".create_block"), new_user_block_path(@user) %> @@ -126,11 +136,13 @@ <% 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" %>
    @@ -149,50 +161,48 @@
    - <% if can?(:set_status, User) || can?(:destroy, User) %> + <% if can?(:update, :user_status) %>