Merge 15722:15806 from head and adjust new views to rails 2 style names.

This commit is contained in:
Tom Hughes 2009-06-09 21:50:37 +00:00
commit edaddbedae
126 changed files with 3070 additions and 1275 deletions

View file

@ -127,14 +127,13 @@ class AmfController < ApplicationController
case message
when 'putway'; orn=renumberednodes.dup
r=putway(renumberednodes,*args)
renumberednodes=r[4].dup
r[4].delete_if { |k,v| orn.has_key?(k) }
r[4]=renumberednodes.reject { |k,v| orn.has_key?(k) }
if r[2] != r[3] then renumberedways[r[2]] = r[3] end
results[index]=AMF.putdata(index,r)
when 'putrelation'; results[index]=AMF.putdata(index,putrelation(renumberednodes, renumberedways, *args))
when 'deleteway'; results[index]=AMF.putdata(index,deleteway(*args))
when 'putpoi'; r=putpoi(*args)
if r[2] != r[3] then renumberednodes[r[2]] = r[3] end
if r[2] != r[3] then renumberednodes[r[2]] = r[3] end
results[index]=AMF.putdata(index,r)
when 'startchangeset'; results[index]=AMF.putdata(index,startchangeset(*args))
end
@ -588,11 +587,12 @@ class AmfController < ApplicationController
#
# Returns:
# 0. '0' (code for success),
# 1. original way id (unchanged),
# 2. new way id,
# 3. hash of renumbered nodes (old id=>new id),
# 4. way version,
# 5. hash of node versions (node=>version)
# 1. message,
# 2. original way id (unchanged),
# 3. new way id,
# 4. hash of renumbered nodes (old id=>new id),
# 5. way version,
# 6. hash of node versions (node=>version)
def putway(renumberednodes, usertoken, changeset_id, wayversion, originalway, pointlist, attributes, nodes, deletednodes) #:doc:
amf_handle_error("'putway' #{originalway}") do

View file

@ -265,7 +265,7 @@ class ChangesetController < ApplicationController
else
conditions = cond_merge conditions, ['false']
end
elsif params[:format] == 'rhtml'
elsif request.format == :html
@title = t 'user.no_such_user.title'
@not_found_user = params[:display_name]
render :template => 'user/no_such_user', :status => :not_found

View file

@ -78,6 +78,8 @@ class DiaryEntryController < ApplicationController
end
def rss
request.format = :rss
if params[:display_name]
user = User.find_by_display_name(params[:display_name], :conditions => {:visible => true})
@ -86,8 +88,6 @@ class DiaryEntryController < ApplicationController
@title = "OpenStreetMap diary entries for #{user.display_name}"
@description = "Recent OpenStreetmap diary entries from #{user.display_name}"
@link = "http://#{SERVER_URL}/user/#{user.display_name}/diary"
render :content_type => Mime::RSS
else
render :nothing => true, :status => :not_found
end
@ -98,8 +98,6 @@ class DiaryEntryController < ApplicationController
@title = "OpenStreetMap diary entries in #{params[:language]}"
@description = "Recent diary entries from users of OpenStreetMap"
@link = "http://#{SERVER_URL}/diary/#{params[:language]}"
render :content_type => Mime::RSS
else
@entries = DiaryEntry.find(:all, :include => :user,
:conditions => ["users.visible = ?", true],
@ -107,8 +105,6 @@ class DiaryEntryController < ApplicationController
@title = "OpenStreetMap diary entries"
@description = "Recent diary entries from users of OpenStreetMap"
@link = "http://#{SERVER_URL}/diary"
render :content_type => Mime::RSS
end
end

View file

@ -16,12 +16,9 @@ class NodeController < ApplicationController
node = Node.from_xml(request.raw_post, true)
if node
node.create_with_history @user
render :text => node.id.to_s, :content_type => "text/plain"
else
raise OSM::APIBadXMLError.new(:node, request.raw_post)
end
# Assume that Node.from_xml has thrown an exception if there is an error parsing the xml
node.create_with_history @user
render :text => node.id.to_s, :content_type => "text/plain"
end
# Dump the details on a node given in params[:id]
@ -40,12 +37,11 @@ class NodeController < ApplicationController
node = Node.find(params[:id])
new_node = Node.from_xml(request.raw_post)
if new_node and new_node.id == node.id
node.update_from(new_node, @user)
render :text => node.version.to_s, :content_type => "text/plain"
else
render :nothing => true, :status => :bad_request
unless new_node and new_node.id == node.id
raise OSM::BadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})")
end
node.update_from(new_node, @user)
render :text => node.version.to_s, :content_type => "text/plain"
end
# Delete a node. Doesn't actually delete it, but retains its history
@ -55,28 +51,26 @@ class NodeController < ApplicationController
node = Node.find(params[:id])
new_node = Node.from_xml(request.raw_post)
if new_node and new_node.id == node.id
node.delete_with_history!(new_node, @user)
render :text => node.version.to_s, :content_type => "text/plain"
else
render :nothing => true, :status => :bad_request
unless new_node and new_node.id == node.id
raise OSM::BadUserInput.new("The id in the url (#{node.id}) is not the same as provided in the xml (#{new_node.id})")
end
node.delete_with_history!(new_node, @user)
render :text => node.version.to_s, :content_type => "text/plain"
end
# Dump the details on many nodes whose ids are given in the "nodes" parameter.
def nodes
ids = params['nodes'].split(',').collect { |n| n.to_i }
if ids.length > 0
doc = OSM::API.new.get_xml_doc
Node.find(ids).each do |node|
doc.root << node.to_xml_node
end
render :text => doc.to_s, :content_type => "text/xml"
else
render :nothing => true, :status => :bad_request
if ids.length == 0
raise OSM::BadUserInput.new("No nodes were given to search for")
end
doc = OSM::API.new.get_xml_doc
Node.find(ids).each do |node|
doc.root << node.to_xml_node
end
render :text => doc.to_s, :content_type => "text/xml"
end
end

View file

@ -92,17 +92,14 @@ class Node < ActiveRecord::Base
node.version = create ? 0 : pt['version'].to_i
unless create
raise OSM::APIBadXMLError.new("node", pt, "ID is required when updating.") if pt['id'].nil?
if pt['id'] != '0'
node.id = pt['id'].to_i
end
end
# visible if it says it is, or as the default if the attribute
# is missing.
# Don't need to set the visibility, when it is set explicitly in the create/update/delete
#node.visible = pt['visible'].nil? or pt['visible'] == 'true'
# We don't care about the time, as it is explicitly set on create/update/delete
# We don't care about the visibility as it is implicit based on the action
tags = []

View file

@ -33,7 +33,7 @@ class Notifier < ActionMailer::Base
def gpx_success(trace, possible_points)
common_headers trace.user
subject "[OpenStreetMap] GPX Import success"
subject I18n.t('notifier.gpx_notification.success.subject')
body :trace_name => trace.name,
:trace_points => trace.size,
:trace_description => trace.description,
@ -44,7 +44,7 @@ class Notifier < ActionMailer::Base
def gpx_failure(trace, error)
common_headers trace.user
from "webmaster@openstreetmap.org"
subject "[OpenStreetMap] GPX Import failure"
subject I18n.t('notifier.gpx_notification.failure.subject')
body :trace_name => trace.name,
:trace_description => trace.description,
:trace_tags => trace.tags,

View file

@ -49,7 +49,7 @@
<% unless @nodes.empty? %>
<tr valign="top">
<th><%= t 'browse.changeset_details.has_nodes', :node_count => @node_pages.item_count %></th>
<th><%= t 'browse.changeset_details.has_nodes', :count => @node_pages.item_count %></th>
<td>
<table cellpadding="0">
<% @nodes.each do |node| %>
@ -63,7 +63,7 @@
<% unless @ways.empty? %>
<tr valign="top">
<th><%= t 'browse.changeset_details.has_ways', :way_count => @way_pages.item_count %></th>
<th><%= t 'browse.changeset_details.has_ways', :count => @way_pages.item_count %></th>
<td>
<table cellpadding="0">
<% @ways.each do |way| %>
@ -80,7 +80,7 @@
<% unless @relations.empty? %>
<tr valign="top">
<th><%= t 'browse.changeset_details.has_relations', :relation_count => @relation_pages.item_count %></th>
<th><%= t 'browse.changeset_details.has_relations', :count => @relation_pages.item_count %></th>
<td>
<table cellpadding="0">
<% @relations.each do |relation| %>

View file

@ -76,7 +76,7 @@ page << <<EOJ
}
function startDrag() {
$("browse_select_box").innerHTML='#{I18n.t('browse.start_rjs.drag_a_box')}';
$("browse_select_box").innerHTML="#{I18n.t('browse.start_rjs.drag_a_box')}";
browseBoxControl.activate();
@ -131,7 +131,7 @@ page << <<EOJ
var div = document.createElement("div");
var p = document.createElement("p");
p.appendChild(document.createTextNode(i18n_js("#{I18n.t('browse.start_rjs.loaded_an_area_with_num_features', :num_features => '{{num_features}}')}", { num_features: browseFeatureList.length })));
p.appendChild(document.createTextNode(i18n("#{I18n.t('browse.start_rjs.loaded_an_area_with_num_features')}", { num_features: browseFeatureList.length })));
div.appendChild(p);
var input = document.createElement("input");
@ -187,7 +187,7 @@ page << <<EOJ
var size = projected.getWidth() * projected.getHeight();
if (size > #{APP_CONFIG['max_request_area']}) {
setStatus(i18n_js("#{I18n.t('browse.start_rjs.unable_to_load_size', :bbox_size => '{{bbox_size}}', :max_bbox_size => APP_CONFIG['max_request_area'])}", { bbox_size: size }));
setStatus(i18n("#{I18n.t('browse.start_rjs.unable_to_load_size', :max_bbox_size => APP_CONFIG['max_request_area'])}", { bbox_size: size }));
} else {
loadGML("/api/#{API_VERSION}/map?bbox=" + projected.toBBOX());
}
@ -421,7 +421,7 @@ page << <<EOJ
table.appendChild(tr);
var heading = document.createElement("td");
heading.appendChild(document.createTextNode(i18n_js("#{I18n.t('browse.start_rjs.history_for_feature', :feature => '{{feature}}')}", { feature: featureNameHistory(this.feature) })));
heading.appendChild(document.createTextNode(i18n("#{I18n.t('browse.start_rjs.history_for_feature')}", { feature: featureNameHistory(this.feature) })));
tr.appendChild(heading);
var td = document.createElement("td");
@ -442,7 +442,7 @@ page << <<EOJ
var user = nodes[i].getAttribute("user") || "#{I18n.t('browse.start_rjs.private_user')}";
var timestamp = nodes[i].getAttribute("timestamp");
var item = document.createElement("li");
item.appendChild(document.createTextNode(i18n_js("#{I18n.t('browse.start_rjs.edited_by_user_at_timestamp', :user => '{{user}}', :timestamp => '{{timestamp}}')}", { user: user, timestamp: timestamp })));
item.appendChild(document.createTextNode(i18n("#{I18n.t('browse.start_rjs.edited_by_user_at_timestamp')}", { user: user, timestamp: timestamp })));
history.appendChild(item);
}
div.appendChild(history);
@ -470,9 +470,9 @@ page << <<EOJ
if (feature.attributes.name) {
return feature.attributes.name;
} else if (featureType(feature) == "node") {
return i18n_js("#{I18n.t('browse.start_rjs.object_list.selected.type.node', :id => '{{id}}')}", { id: feature.osm_id });
return i18n("#{I18n.t('browse.start_rjs.object_list.selected.type.node')}", { id: feature.osm_id });
} else if (featureType(feature) == "way") {
return i18n_js("#{I18n.t('browse.start_rjs.object_list.selected.type.way', :id => '{{id}}')}", { id: feature.osm_id });
return i18n("#{I18n.t('browse.start_rjs.object_list.selected.type.way')}", { id: feature.osm_id });
}
}
@ -480,28 +480,12 @@ page << <<EOJ
if (feature.attributes.name) {
return feature.attributes.name;
} else if (featureType(feature) == "node") {
return i18n_js("#{I18n.t('browse.start_rjs.object_list.history.type.node', :id => '{{id}}')}", { id: feature.osm_id });
return i18n("#{I18n.t('browse.start_rjs.object_list.history.type.node')}", { id: feature.osm_id });
} else if (featureType(feature) == "way") {
return i18n_js("#{I18n.t('browse.start_rjs.object_list.history.type.way', :id => '{{id}}')}", { id: feature.osm_id });
return i18n("#{I18n.t('browse.start_rjs.object_list.history.type.way')}", { id: feature.osm_id });
}
}
/*
This is a hack so that we can interpolate JavaScript variables in
translation strings from Ruby, doing the string replacement
client-side instead of on the server.
*/
function i18n_js(string, keys) {
for (var key in keys) {
var re_key = '\{\{' + key + '\}\}';
var re = new RegExp(re_key, "g");
string = string.replace(re, keys[key]);
}
return string;
}
function setStatus(status) {
$("browse_status").innerHTML = status;
$("browse_status").style.display = "block";

View file

@ -77,7 +77,7 @@ page << <<EOJ
$("minlat").onchange = boundsChanged;
function startDrag() {
$("drag_box").innerHTML='#{I18n.t('export.start_rjs.drag_a_box')}';
$("drag_box").innerHTML="#{I18n.t('export.start_rjs.drag_a_box')}";
clearBox();
box.activate();
@ -248,7 +248,7 @@ page << <<EOJ
var layers = getMapLayers();
html += '<br /><small><a href="http://#{SERVER_URL}/?lat='+center.lat+'&lon='+center.lon+'&zoom='+zoom+'&layers='+layers+markerUrl+'">#{I18n.t('export.start_rjs.view_larger_map')}</a></small>';
html += '<br /><small><a href="http://#{SERVER_URL}/?lat='+center.lat+'&lon='+center.lon+'&zoom='+zoom+'&layers='+layers+markerUrl+'">'+"#{I18n.t('export.start_rjs.view_larger_map')}"+'</a></small>';
$("export_html_text").value = html;

View file

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= I18n.locale %>" lang="<%= I18n.locale %>" dir="<% t'html.dir' %>">
<head>
<%= javascript_include_tag 'prototype' %>
<%= javascript_include_tag 'site' %>
@ -9,7 +9,7 @@
<%= tag("link", { :rel => "search", :type => "application/opensearchdescription+xml", :title => "OpenStreetMap Search", :href => "/opensearch/osm.xml" }) %>
<%= tag("meta", { :name => "description", :content => "OpenStreetMap is the free wiki world map." }) %>
<%= yield :head %>
<title>OpenStreetMap<%= ' | '+ h(@title) if @title %></title>
<title><%= t 'layouts.project_name.title' %><%= ' | '+ h(@title) if @title %></title>
</head>
<body>
<div id="content">
@ -22,14 +22,18 @@
<span id="greeting">
<% if @user and @user.id %>
<%= t 'layouts.welcome_user', :user_link => (link_to h(@user.display_name), {:controller => 'user', :action => 'view', :display_name => @user.display_name}) %> |
<% @inbox_weight = 'bold' if @user.new_messages.size > 0 %>
<%= t 'layouts.welcome_user', :user_link => (link_to h(@user.display_name), {:controller => 'user', :action => 'view', :display_name => @user.display_name}, :title => t('layouts.welcome_user_link_tooltip')) %> |
<%= yield :greeting %>
<%= link_to t('layouts.inbox', :size => @user.new_messages.size), {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
<%= link_to t('layouts.logout'), {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor'}%>
<%
inbox_attributes = {}
inbox_attributes[:class] = 'greeting-bar-unread' if @user.new_messages.size > 0
inbox_attributes[:title] = t 'layouts.inbox_tooltip', :count => @user.new_messages.size
%>
<%= link_to t('layouts.inbox', :count => @user.new_messages.size), {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, inbox_attributes %> |
<%= link_to t('layouts.logout'), {:controller => 'user', :action => 'logout', :referer => request.request_uri}, {:id => 'logoutanchor', :title => t('layouts.logout_tooltip')}%>
<% else %>
<%= link_to t('layouts.log_in'), {:controller => 'user', :action => 'login', :referer => request.request_uri}, {:id => 'loginanchor'}%> |
<%= link_to t('layouts.sign_up'), {:controller => 'user', :action => 'new'}, {:id => 'registeranchor'} %>
<%= link_to t('layouts.log_in'), {:controller => 'user', :action => 'login', :referer => request.request_uri}, {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %> |
<%= link_to t('layouts.sign_up'), {:controller => 'user', :action => 'new'}, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %>
<% end %>
</span>
@ -65,8 +69,8 @@
<div id="logo">
<center>
<h1>OpenStreetMap</h1>
<%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0), :controller => 'site', :action => 'index') %><br/>
<h1><%= t 'layouts.project_name.h1' %></h1>
<%= link_to(image_tag("osm_logo.png", :size => "120x120", :border => 0, :alt => t('layouts.logo.alt_text')), :controller => 'site', :action => 'index') %><br/>
<h2 class="nowrap"><%= t('layouts.tag_line') %></h2>
</center>
</div>
@ -81,8 +85,8 @@
</p>
<p>
<%= t 'layouts.intro_3',
:ucl => '<a href="http://www.vr.ucl.ac.uk">UCL VR Centre</a>',
:bytemark => '<a href="http://www.bytemark.co.uk">bytemark</a>' %>
:ucl => link_to(t('layouts.intro_3_ucl'), "http://www.vr.ucl.ac.uk"),
:bytemark => link_to(t('layouts.intro_3_bytemark'), "http://www.bytemark.co.uk") %>
</p>
</div>
<% end %>
@ -103,9 +107,9 @@
<% end %>
<div id="left_menu" class="left_menu">
<a href="<%= t 'layouts.help_wiki_url' %>"><%= t 'layouts.help_wiki' %></a><br />
<a href="http://www.opengeodata.org/"><%= t 'layouts.news_blog' %></a><br />
<a href="<%= t 'layouts.shop_url' %>"><%= t 'layouts.shop' %></a><br />
<a href="<%= t 'layouts.help_wiki_url' %>" title="<%= t 'layouts.help_wiki_tooltip' %>"><%= t 'layouts.help_wiki' %></a><br />
<a href="http://www.opengeodata.org" title="<%= t 'layouts.news_blog_tooltip' %>"><%= t 'layouts.news_blog' %></a><br />
<a href="<%= t 'layouts.shop_url' %>" title="<%= t 'layouts.shop_tooltip' %>"><%= t 'layouts.shop' %></a><br />
<%= yield :left_menu %>
</div>

View file

@ -0,0 +1,14 @@
<%= t'notifier.gpx_notification.greeting' %>
<%= t'notifier.gpx_notification.your_gpx_file' %>
<%= @trace_name %>
<%= t'notifier.gpx_notification.with_description' %>
<%= @trace_description %>
<% if @trace_tags.length>0 %>
<%= t'notifier.gpx_notification.and_the_tags' %>
<% @trace_tags.each do |tag| %>
<%= tag.tag.rstrip %><% end %><% else %>
<%= t'notifier.gpx_notification.and_no_tags' %><% end %>

View file

@ -1,14 +0,0 @@
Hi,
It looks like your GPX file
<%= @trace_name %>
with the description
<%= @trace_description %>
<% if @trace_tags.length>0 %>
and the following tags:
<% @trace_tags.each do |tag| %>
<%= tag.tag.rstrip %><% end %><% else %>
and no tags.<% end %>

View file

@ -0,0 +1,9 @@
<%= render :partial => "gpx_description" %>
<%= t'notifier.gpx_notification.failure.failed_to_import' %>
<%= @error %>
<%= t'notifier.gpx_notification.failure.more_info_1' %>
<%= t'notifier.gpx_notification.failure.more_info_2' %>
<%= t'notifier.gpx_notification.failure.import_failures_url' %>

View file

@ -1,9 +0,0 @@
<%= render :partial => "gpx_description" %>
failed to import. Here's the error:
<%= @error %>
More information about GPX import failures and how to avoid
them can be found at:
http://wiki.openstreetmap.org/wiki/GPX_Import_Failures

View file

@ -0,0 +1,2 @@
<%= render :partial => "gpx_description" %>
<%= t'notifier.gpx_notification.success.loaded_successfully', :trace_points => @trace_points, :possible_points => @possible_points %>

View file

@ -1,3 +0,0 @@
<%= render :partial => "gpx_description" %>
loaded successfully with <%= @trace_points %> out of a possible
<%= @possible_points %> points.

View file

@ -1,5 +1,5 @@
<% content_for :left_menu do %>
<%= link_to_function t('site.key.map_key'), "showKey();" %>
<%= link_to_function t('site.key.map_key'), "showKey();", { :title => t('site.key.map_key_tooltip') } %>
<% end %>
<script type="text/javascript">

View file

@ -1,6 +1,6 @@
<% content_for :greeting do %>
<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function t('site.index.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)", { :title => t('layouts.home_tooltip') } %> |
<% end %>
<% end %>
@ -23,11 +23,15 @@
<div id="attribution">
<table width="100%">
<tr>
<td align="left">http://creativecommons.org/licenses/by-sa/2.0/</td>
<td align="right">http://openstreetmap.org/</td>
<td align="left"><%= t'site.index.license.license_url' %></td>
<td align="right"><%= t'site.index.license.project_url' %></td>
</tr>
<tr>
<td colspan="2" align="center"><%= t 'site.index.license' %></td>
<td colspan="2" align="center"><%=
t'site.index.license.notice',
:license_name => t('site.index.license.license_name'),
:project_name => t('site.index.license.project_name')
%></td>
</tr>
</table>
</div>
@ -103,7 +107,7 @@ end
map = createMap("map");
<% unless OSM_STATUS == :api_offline or OSM_STATUS == :database_offline %>
map.dataLayer = new OpenLayers.Layer("Data", { "visibility": false });
map.dataLayer = new OpenLayers.Layer("<%= I18n.t 'browse.start_rjs.data_layer_name' %>", { "visibility": false });
map.dataLayer.events.register("visibilitychanged", map.dataLayer, toggleData);
map.addLayer(map.dataLayer);
<% end %>

View file

@ -4,14 +4,14 @@
<!-- Displaying user's own profile page -->
<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
| <%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
| <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name, :format => 'rhtml' %>
| <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %>
| <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %>
| <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %>
<% else %>
<!-- Displaying another user's profile page -->
<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @this_user.id %>
| <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name, :format => 'rhtml' %>
| <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %>
| <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %>
| <% if @user and @user.is_friends_with?(@this_user) %>
<%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %>
@ -71,7 +71,7 @@
<% end %>
</td>
<td class="username"><%= link_to h(@friend.display_name), :controller => 'user', :action => 'view', :display_name => @friend.display_name %></td>
<td><% if @friend.home_lon and @friend.home_lat %><%= t 'user.view.km away', :distance => @this_user.distance(@friend).round %><% end %></td>
<td><% if @friend.home_lon and @friend.home_lat %><%= t 'user.view.km away', :count => @this_user.distance(@friend).round %><% end %></td>
<td class="message">(<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>)</td>
</tr>
<%end%>
@ -93,7 +93,7 @@
<% @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><%= t 'user.view.km away', :count => @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 %>

Some files were not shown because too many files have changed in this diff Show more