- if params[:friends] and @user
- set_title(t 'changeset.list.title_friend')
- @heading = t 'changeset.list.title_friend'
- elsif params[:nearby] and @user
- set_title(t 'changeset.list.title_nearby')
- @heading = t 'changeset.list.title_nearby'
- elsif params[:display_name]
- set_title(t 'changeset.list.title_user', :user => params[:display_name])
- @heading = t('changeset.list.title_user', :user => link_to(params[:display_name], :controller => "user", :action => "view", :display_name => params[:display_name])).html_safe
+ set_title(changeset_list_title(params, current_user))
+ if params[:display_name]
+ @heading = t('changeset.list.title_user', :user => link_to(params[:display_name], user_path(:display_name => params[:display_name]))).html_safe