<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/admin/galleries/follow_import.html.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -88,7 +88,8 @@ class Admin::GalleriesController &lt; Admin::BaseController
       @gallery.save!
       @gallery.insert_pictures(params[:directory])
       # TODO: With mass_upload new system manage the progress bar
-      redirect_to admin_gallery_url(@gallery)
+      #redirect_to admin_gallery_url(@gallery)
+      redirect_to :action =&gt; 'follow_import'
     else
       flash[:notice] = 'the directory is not a directory'
       render :action =&gt; 'new'
@@ -99,6 +100,7 @@ class Admin::GalleriesController &lt; Admin::BaseController
 
   # See the following of mass_upload
   def follow_import
-    
+    @imports = Import.find(:all).group_by(&amp;:gallery)
+    redirect_to :action =&gt; 'index' if @imports.empty?
   end
 end</diff>
      <filename>app/controllers/admin/galleries_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 class Import &lt; ActiveRecord::Base
 
   belongs_to :gallery
+
 end</diff>
      <filename>app/models/import.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ class Picture &lt; ActiveRecord::Base
   
   has_attachment :content_type =&gt; :image, 
       :storage =&gt; :file_system, 
-      :max_size =&gt; 1.megabytes,
+      :max_size =&gt; 10.megabytes,
       :resize_to =&gt; &quot;#{Setting.default.picture_max_width}x#{Setting.default.picture_max_height}&gt;&quot;,
       :path_prefix =&gt; 'public/pictrails_pictures',
       :thumbnail_class =&gt; Thumbnail, </diff>
      <filename>app/models/picture.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,6 +43,10 @@ ActionController::Routing::Routes.draw do |map|
     #Resources for settings
     admin.connect 'settings/delete_cache', :controller =&gt; 'settings', :action =&gt; 'delete_cache'
     admin.resources :settings 
+    
+    # TODO: See a better system by resources
+    admin.mass_upload '/galleries/mass_upload', :controller =&gt; 'galleries', :action =&gt; 'mass_upload'
+    admin.follow_redirect '/galleries/follow_import', :controller =&gt; 'galleries', :action =&gt; 'follow_import'
 
     #Resources of gallerie
     admin.resources :galleries do |gallery|
@@ -52,7 +56,6 @@ ActionController::Routing::Routes.draw do |map|
         :action =&gt; 'show', :page =&gt; /\d+/
 
 
-    admin.mass_upload '/galleries/mass_upload', :controller =&gt; 'galleries', :action =&gt; 'mass_upload'
 
     # particular route
     admin.login '/login', :controller =&gt; 'sessions', :action =&gt; 'new'
@@ -61,6 +64,7 @@ ActionController::Routing::Routes.draw do |map|
     
     # Default page in this namespace
     admin.root :controller =&gt; 'galleries'
+
   end
 
   map.root :controller =&gt; 'galleries'</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -985,3 +985,22 @@ li.paginate {
 .pagination a {
   text-decoration : underline;
 }
+
+table.progress {
+  width: 40em;
+  border: 1px solid #D7D7D7;
+  border-collapse: collapse;
+  border-spacing: 0pt;
+  empty-cells: show;
+  text-align: center;
+  float:left;
+  margin: 1px 6px 1px 0px;
+}
+
+table.progress td { 
+  height: 0.9em; 
+}
+
+td.made {
+  background : #BAE0BA none repeat scroll 0% 50%;
+}</diff>
      <filename>public/stylesheets/administration.css</filename>
    </modified>
    <modified>
      <diff>@@ -141,7 +141,7 @@ describe Admin::GalleriesController, 'with user logged and no import' do
     @gallery.should_receive(:save!).once.and_return(true)
     @gallery.should_receive(:insert_pictures).once.with(directory)
     post 'mass_upload', :directory =&gt; directory
-    response.should redirect_to(admin_gallery_url(@gallery))
+    response.should redirect_to(:action =&gt; 'follow_import')
   end
 
   it 'should not add gallery by mass_upload with a bad directory' do
@@ -161,4 +161,10 @@ describe Admin::GalleriesController, 'with user logged and no import' do
     response.should render_template('new')
   end
 
+  it 'should redirect in follow_import if no import' do
+    Import.delete_all
+    get 'follow_import'
+    response.should redirect_to(:action =&gt; 'index')
+  end
+
 end</diff>
      <filename>spec/controllers/admin/galleries_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,6 +4,7 @@ Story: Add a Gallery and Picture
   Scenario: Add a gallery after login
     Given there are no user save
     And there are no gallery save
+    And there are no picture save
     And a username 'shingara'
     And a password 'shin'
     And an email 'cyril.mougel@gmail.com'</diff>
      <filename>stories/add_gallery_story</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0c7c1ba4d958656d952bdf80be63acfc466877f5</id>
    </parent>
  </parents>
  <author>
    <name>shingara</name>
    <email>cyril.mougel@gmail.com</email>
  </author>
  <url>http://github.com/shingara/pictrails/commit/ec539303cdfde2c0c16853ad99c16fc4be549284</url>
  <id>ec539303cdfde2c0c16853ad99c16fc4be549284</id>
  <committed-date>2008-04-30T15:00:29-07:00</committed-date>
  <authored-date>2008-04-30T15:00:29-07:00</authored-date>
  <message>Add a view of progress in mass_upload</message>
  <tree>7422b9b0bac2e250acb63137c80c68f4cb125c97</tree>
  <committer>
    <name>shingara</name>
    <email>cyril.mougel@gmail.com</email>
  </committer>
</commit>
