- if user
- user_link = render_to_string :partial => "user", :object => user
- end
-
- if params[:friends] and @user
- @title = t 'changeset.list.title_friend'
- @heading = t 'changeset.list.title_friend'
- elsif params[:nearby] and @user
- @title = t 'changeset.list.title_nearby'
- @heading = t 'changeset.list.title_nearby'
- elsif user
- @title = t 'changeset.list.title_user', :user => user.display_name
- @heading = t('changeset.list.title_user', :user => user_link).html_safe
- else
- @title = t 'changeset.list.title'
- @heading = t 'changeset.list.title'
- end
-
- @page = (params[:page] || 1).to_i
- @page_size = 20
-
- @edits = changesets.order("changesets.created_at DESC").offset((@page - 1) * @page_size).limit(@page_size).preload(:user, :changeset_tags)