Don't try and show distances to friends if the user has no

home location set. Closes #2766.
This commit is contained in:
Tom Hughes 2010-03-02 16:42:45 +00:00
parent 77a3d8d24e
commit 0813f88bc7

View file

@ -4,7 +4,7 @@
</td>
<td>
<%= link_to h(contact.display_name), :controller => 'user', :action => 'view', :display_name => contact.display_name %>
<% if contact.home_lon and contact.home_lat %>
<% if @this_user.home_lon and @this_user.home_lat and contact.home_lon and contact.home_lat %>
<% distance = @this_user.distance(contact) %>
<% if distance < 1 %>
(<%= t 'user.view.m away', :count => (distance * 1000).round %>)