]> git.openstreetmap.org Git - rails.git/blob - app/views/user/_contact.html.erb
Allow users to send themselves a new confirmation email
[rails.git] / app / views / user / _contact.html.erb
1 <tr>
2   <td rowspan="2">
3     <%= user_thumbnail contact %>
4   </td>
5   <td>
6     <%= link_to h(contact.display_name), :controller => 'user', :action => 'view',  :display_name => contact.display_name %>
7     <% if @this_user.home_lon and @this_user.home_lat and contact.home_lon and contact.home_lat %>
8       <% distance = @this_user.distance(contact) %>
9       <% if distance < 1 %>
10         (<%= t 'user.view.m away', :count => (distance * 1000).round %>)
11       <% else %>
12         (<%= t 'user.view.km away', :count => distance.round %>)
13       <% end %>
14     <% end %>
15   </td>
16 </tr>
17 <tr>
18   <td>
19     <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => contact.display_name %>
20     |
21     <% if @user.is_friends_with?(contact) %>
22       <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => contact.display_name, :referer => request.request_uri %>
23     <% else %>
24       <%= link_to t('user.view.add as friend'), :controller => 'user', :action => 'make_friend', :display_name => contact.display_name, :referer => request.request_uri %>
25     <% end %>
26   </td>
27 </tr>