+
+
+ <% if @user and @this_user.id == @user.id %>
+ <h3><%= t 'user.view.nearby users' %></h3>
+ <% if @this_user.nearby.empty? %>
+ <%= t 'user.view.no nearby users' %>
+ <% else %>
+
+ <div id="map" style="border: 1px solid black; position: relative; width : 90%; height : 400px;"></div>
+ <%= render :partial => 'friend_map' %>
+ <table id="nearbyusers">
+ <% @this_user.nearby.each do |nearby| %>
+ <tr>
+ <td class="username"><%= link_to h(nearby.display_name), :controller => 'user', :action => 'view', :display_name => nearby.display_name %></td>
+ <td><%= t 'user.view.km away', :distance => @this_user.distance(nearby).round %></td>
+ <td class="message">(<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>)</td>
+ </tr>
+ <% end %>
+ </table>
+ <% end %>
+ <% end %>
+<% end %>
+
+<br/>
+<br/>
+<% 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 %>