return
end
end
+
+ if params[:friends]
+ user = @user
+ if user
+ friend_ids = []
+ user.friends.each do |friend|
+ friend_user = User.find(friend.friend_user_id)
+ if friend_user.data_public?
+ friend_ids << friend.friend_user_id
+ end
+ end
+ if friend_ids.length > 0
+ conditions = cond_merge conditions, ['user_id in (?)', friend_ids]
+ else
+ conditions = cond_merge conditions, ['false']
+ end
+ elsif request.format == :html
+ @title = t 'user.no_such_user.title'
+ render :template => 'user/no_such_user', :status => :not_found
+ end
+ end
if params[:bbox]
bbox = BoundingBox.from_bbox_params(params)
user_link = render_to_string :partial => "user", :object => user
end
- if user and bbox
+ if params[:friends] and user
+ @title = t 'changeset.list.title_friend'
+ @heading = t 'changeset.list.heading_friend'
+ @description = t 'changeset.list.description_friend'
+ elsif user and bbox
@title = t 'changeset.list.title_user_bbox', :user => user.display_name, :bbox => bbox.to_s
@heading = t 'changeset.list.heading_user_bbox', :user => user.display_name, :bbox => bbox.to_s
@description = t 'changeset.list.description_user_bbox', :user => user_link, :bbox => bbox_link
<% if friends.empty? %>
<%= t 'user.view.no friends' %>
<% else %>
+ <%= link_to t('user.view.friends_changesets'), {:controller => 'browse', :action => 'friends'} %><br/><br/>
<table id="friends">
<%= render :partial => "contact", :collection => friends %>
</table>
title_user: "Changesets by %{user}"
title_bbox: "Changesets within %{bbox}"
title_user_bbox: "Changesets by %{user} within %{bbox}"
+ title_friend: "Changesets by your friends"
heading: "Changesets"
heading_user: "Changesets"
heading_bbox: "Changesets"
heading_user_bbox: "Changesets"
+ heading_friend: "Changesets"
description: "Recent changes"
description_user: "Changesets by %{user}"
description_bbox: "Changesets within %{bbox}"
description_user_bbox: "Changesets by %{user} within %{bbox}"
+ description_friend: "Changesets by your friends"
timeout:
sorry: "Sorry, the list of changesets you requested took too long to retrieve."
diary_entry:
unhide_user: "unhide this user"
delete_user: "delete this user"
confirm: "Confirm"
+ friends_changesets: "Browse all changesets by friends"
popup:
your location: "Your location"
nearby mapper: "Nearby mapper"
match '/browse/changeset/:id' => 'browse#changeset', :as => :changeset, :id => /\d+/
match '/user/:display_name/edits' => 'changeset#list'
match '/user/:display_name/edits/feed' => 'changeset#feed', :format => :atom
+ match '/browse/friends' => 'changeset#list', :friends => true
match '/browse/changesets' => 'changeset#list'
match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
match '/browse' => 'changeset#list'