X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6baccfaddd190d730b626204e9cf81c2504995bf..908a6ef409518d86bfd2cdf0d2a82a6c312821c8:/app/views/user/view.html.erb?ds=sidebyside
diff --git a/app/views/user/view.html.erb b/app/views/user/view.html.erb
index 0dbc09dd3..931037319 100644
--- a/app/views/user/view.html.erb
+++ b/app/views/user/view.html.erb
@@ -71,8 +71,17 @@
<% end %>
<%= link_to h(@friend.display_name), :controller => 'user', :action => 'view', :display_name => @friend.display_name %> |
- <% if @friend.home_lon and @friend.home_lat %><%= t 'user.view.km away', :count => @this_user.distance(@friend).round %><% end %> |
- (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>) |
+
+ <% if @friend.home_lon and @friend.home_lat %>
+ <% distance = @this_user.distance(@friend) %>
+ <% if distance < 1 %>
+ <%= t 'user.view.m away', :count => (distance * 1000).round %>
+ <% else %>
+ <%= t 'user.view.km away', :count => distance.round %>
+ <% end %>
+ <% end %>
+ |
+ (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @friend.display_name %>) |
<%end%>
@@ -93,8 +102,15 @@
<% @this_user.nearby.each do |nearby| %>
<%= link_to h(nearby.display_name), :controller => 'user', :action => 'view', :display_name => nearby.display_name %> |
- <%= t 'user.view.km away', :count => @this_user.distance(nearby).round %> |
- (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>) |
+
+ <% distance = @this_user.distance(nearby) %>
+ <% if distance < 1 %>
+ <%= t 'user.view.m away', :count => (distance * 1000).round %>
+ <% else %>
+ <%= t 'user.view.km away', :count => distance.round %>
+ <% end %>
+ |
+ (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => nearby.display_name %>) |
<% end %>
@@ -106,4 +122,6 @@
<% if @user and @this_user.id == @user.id %>
<%= link_to t('user.view.change your settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
+
+<%= link_to t('user.view.my_oauth_details'), :controller => 'oauth_clients', :action => 'index' %>
<% end %>