Don't try and show distances to friends if the user has no
home location set. Closes #2766.
This commit is contained in:
parent
77a3d8d24e
commit
0813f88bc7
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to h(contact.display_name), :controller => 'user', :action => 'view', :display_name => contact.display_name %>
|
<%= 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) %>
|
<% distance = @this_user.distance(contact) %>
|
||||||
<% if distance < 1 %>
|
<% if distance < 1 %>
|
||||||
(<%= t 'user.view.m away', :count => (distance * 1000).round %>)
|
(<%= t 'user.view.m away', :count => (distance * 1000).round %>)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue