]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/user/view.rhtml
User null to indicate the the user's home location is not set.
[rails.git] / app / views / user / view.rhtml
index 15176f3757ecdd64788b287cd8eaf4f100fc2292..391523b581279eb7eb97740fd7ab8a69f8c96cc8 100644 (file)
 <% end %>
 
 <h3>Nearby users</h3>
-<% if @this_user.home_lat and @this_user.home_lon %>
+<% if @this_user.home_lat.nil? or @this_user.home_lon.nil? %>
+  No home location has been set.
+  <% if @user and @this_user.id == @user.id %>
+  You can set your home location on your <%= link_to 'settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %> page.
+  <% end %>
+<% else %>
   <% if @this_user.nearby.empty? %>
     There are no users who admit to mapping nearby.
   <% else %>
     </tr>
     <%end%>
     </table>
-
   <%end%>
-<% else %>
-  No home location has been set.
-  <% if @user and @this_user.id == @user.id %>
-  You can set your home location on your <%= link_to 'settings', :controller => 'user', :action => 'account', :display_name => @user.display_name %> page.
-  <% end %>
 <% end %>