X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/221ca3c1fa985c02243a3c650c828023c1011484..c3d1123965b2d9bc34299c3a6c64d186c62c0ed2:/app/views/user/view.html.erb diff --git a/app/views/user/view.html.erb b/app/views/user/view.html.erb index 95b66e864..31e9d7585 100644 --- a/app/views/user/view.html.erb +++ b/app/views/user/view.html.erb @@ -6,23 +6,25 @@ <% if @user and @this_user.id == @user.id %> <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %> - <%= number_with_delimiter(@this_user.changesets.size) %> + <%= number_with_delimiter(@user.changesets.size) %> | <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %> - <%= number_with_delimiter(@this_user.traces.size) %> + <%= number_with_delimiter(@user.traces.size) %> | <%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %> | - <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %> + <%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @user.display_name %> | <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %> - <% if @user.active_blocks.count > 0 %> + <% if @user.blocks.exists? %> | <%= link_to t('user.view.blocks on me'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @user.display_name %> - <%= number_with_delimiter(@this_user.active_blocks.count) %> + <%= number_with_delimiter(@user.blocks.active.size) %> <% end %> - <% if @user and @user.moderator? %> - | <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %> + <% if @user and @user.moderator? and @user.blocks_created.exists? %> + | + <%= link_to t('user.view.blocks by me'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @user.display_name %> + <%= number_with_delimiter(@user.blocks_created.active.size) %> <% end %> <% else %> <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %> @@ -34,17 +36,24 @@ <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %> | + <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %> + | <%= link_to t('user.view.comments'), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %> | <% if @user and @user.is_friends_with?(@this_user) %> - <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %> + <%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %> <% else %> - <%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => @this_user.display_name %> + <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %> <% end %> - | - <%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %> - <% if @this_user.moderator? %> - | <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %> + <% if @this_user.blocks.exists? %> + | + <%= link_to t('user.view.block_history'), :controller => 'user_blocks', :action => 'blocks_on', :display_name => @this_user.display_name %> + <%= number_with_delimiter(@this_user.blocks.active.size) %> + <% end %> + <% if @this_user.moderator? and @this_user.blocks_created.exists? %> + | + <%= link_to t('user.view.moderator_history'), :controller => 'user_blocks', :action => 'blocks_by', :display_name => @this_user.display_name %> + <%= number_with_delimiter(@this_user.blocks_created.active.size) %> <% end %> <% if @user and @user.moderator? %> | <%= link_to t('user.view.create_block'), :controller => 'user_blocks', :action => 'new', :display_name => @this_user.display_name %> @@ -69,16 +78,20 @@ <% end %> -

<%= t 'user.view.mapper since' %> <%= l @this_user.creation_time, :format => :friendly %> <%= t 'user.view.ago', :time_in_words_ago => time_ago_in_words(@this_user.creation_time) %>

+
<%= @this_user.description.to_html %>
-

<%= t 'user.view.ct status' %> +

+<%= t 'user.view.mapper since' %> <%= l @this_user.creation_time.to_date, :format => :long %> +/ +<%= t 'user.view.ct status' %> <% if not @this_user.terms_agreed.nil? -%> -<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %> +<%= t 'user.view.ct accepted', :ago =>time_ago_in_words(@this_user.terms_agreed) %> <% elsif not @this_user.terms_seen? -%> <%= t 'user.view.ct undecided' %> <% else -%> <%= t 'user.view.ct declined' %> <% end -%> +

<% if @user and @user.administrator? -%> @@ -90,10 +103,6 @@

<%= t 'user.view.spam score' %> <%= @this_user.spam_score %>

<% end -%> -

<%= t 'user.view.description' %>

- -
<%= @this_user.description.to_html %>
- <% if @user and @this_user.id == @user.id %>
<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>