Refine changeset browse behavior

The general history view shows changesets in the current view
and updates when you move the map. The view for an individual
user, nearby users, or friends zooms the map to the extent of
the results, and doesn't change when you move the map.
This commit is contained in:
John Firebaugh 2013-11-19 12:10:00 -08:00
parent a5e8b4cb88
commit d0de36b607
5 changed files with 41 additions and 28 deletions

View file

@ -279,18 +279,12 @@ class ChangesetController < ApplicationController
else
changesets = changesets.where("false")
end
end
if params[:friends] && @user
changesets = changesets.where(:user_id => @user.friend_users.public)
end
if params[:nearby] && @user
changesets = changesets.where(:user_id => @user.nearby)
end
if params[:bbox]
elsif params[:bbox]
changesets = conditions_bbox(changesets, BoundingBox.from_bbox_params(params))
elsif params[:friends] && @user
changesets = changesets.where(:user_id => @user.friend_users.public)
elsif params[:nearby] && @user
changesets = changesets.where(:user_id => @user.nearby)
end
if params[:max_id]