X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c48d06a585c2a1452ca55d6059202bf7dfd1d58..e310767dcde76839c9c4fe452d5479ba531f3a65:/app/controllers/traces_controller.rb diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 5bee44886..075b5a864 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -2,7 +2,7 @@ class TracesController < ApplicationController include UserMethods include PaginationMethods - layout "site", :except => :georss + layout "site" before_action :authorize_web before_action :set_locale @@ -65,6 +65,8 @@ class TracesController < ApplicationController # final helper vars for view @target_user = target_user + + render :partial => "page" if turbo_frame_request_id == "pagination" end def show @@ -114,7 +116,7 @@ class TracesController < ApplicationController @trace.schedule_import redirect_to :action => :index, :display_name => current_user.display_name else - flash[:error] = t(".upload_failed") if @trace.valid? + flash.now[:error] = t(".upload_failed") if @trace.valid? render :action => "new" end @@ -141,7 +143,7 @@ class TracesController < ApplicationController flash[:notice] = t ".updated" redirect_to :action => "show", :display_name => current_user.display_name else - @title = t ".title", :name => @trace.name + @title = t "traces.edit.title", :name => @trace.name render :action => "edit" end rescue ActiveRecord::RecordNotFound @@ -190,17 +192,6 @@ class TracesController < ApplicationController head :not_found end - def georss - @traces = Trace.visible_to_all.visible - - @traces = @traces.joins(:user).where(:users => { :display_name => params[:display_name] }) if params[:display_name] - - @traces = @traces.tagged(params[:tag]) if params[:tag] - @traces = @traces.order("timestamp DESC") - @traces = @traces.limit(20) - @traces = @traces.includes(:user) - end - private def do_create(file, tags, description, visibility)