]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/trace_controller.rb
Present "too many pending traces" message as a warning box
[rails.git] / app / controllers / trace_controller.rb
index d82308baa1163734a34218efe613bbfa7b7141b3..0ec033ae794f8549388b9ce71cdd3cc9625c082b 100644 (file)
@@ -143,6 +143,10 @@ class TraceController < ApplicationController
           logger.info("id is #{@trace.id}")
           flash[:notice] = t 'trace.create.trace_uploaded'
 
+          if @user.traces.count(:conditions => { :inserted => false }) > 4
+            flash[:warning] = t 'trace.trace_header.traces_waiting', :count => @user.traces.count(:conditions => { :inserted => false })
+          end
+
           redirect_to :action => 'mine'
         end
       else