#image_actus_content
  #image_actus_big_container.container-fluid
    #image_actu_albums=render :partial => "admin/image_actu_albums/image_actu_albums"
      
    
    #image_actu_albums_navbar
      =render :partial => "admin/image_actu_albums/image_actu_albums_navbar"
      
      
      
      

    =render :partial => "image_actus_container"
    


  %form#fileupload{:action => admin_image_actus_path(:id => @image_actu.id, :image_actu_album_id => params[:image_actu_album_id], :manager => params[:manager], :multiple => params[:multiple]),:method=>"POST", :enctype=>"multipart/form-data", :style => "display:inline;"}
    %input{:name => "redirect", :type => "hidden", :value => "/"}/
  
    %nav.navbar.navbar-default.navbar-fixed-bottom#image_actus_navbar{:style => "position:absolute;"}
    
      .container-fluid
      
        %ul.nav.navbar-nav.navbar-right
        
          .fileupload-progress.fade{:style => "float:left;"}
            #upload_details{:style => ""}
              .content
                .fileupload-buttonbar
                  %button.btn.btn-warning.cancel{:type => "reset"}
                    %i.icon-ban-circle.icon-white
                    %span Cancel upload
                  %span.fileupload-loading
        
                %table.table.table-striped{:role => "presentation"}
                  %tbody.ulpoad_files
         
        
        
            .progress-extended{:style => "float:left;padding: 10px;font-size:14px;line-height:20px;"}

     
            .progress.progress-success.progress-striped.active{"aria-valuemax" => "100", "aria-valuemin" => "0", :role => "progressbar",:style => "width:200px;float:left;margin: 10px;height:20px;"}
              .bar{:style => "width:0%;"}
       
          %div{:style => "float:left;padding: 10px;height:20px;"}
            %input#grid_slider{:type=>"text", :value=>""}
      
          :coffeescript
            initialize_slider()
      
       
  
  
        .navbar-header
          %span.navbar-brand Images d'actu
    


       
          
          
          
          
        .collapse.navbar-collapse
          %ul.nav.navbar-nav#multiple_selection

            %li.dropdown#multiple_menu
              %a#multiple_selection_text{:href => "#", :class => "dropdown-toggle", :data => {:toggle => "dropdown"}}
                %b.caret
      
              %ul.dropdown-menu
                
                %li
                  %a{:href => "#", :onclick => "delete_multiple_image_actus();return false;"} Supprimer ces images
        
                %li.divider
                %li
                  %a{:href => "#", :onclick => "unselect_all_image_actu();return false;"} Tout désélectionner
                %li  
                  %a{:href => "#", :onclick => "select_all_image_actu();return false;"} Tout sélectionner
        
          %ul.nav.navbar-nav
            %li
              -if params[:multiple]
                %li
                  %a{:href => "#", :onclick => "manager_send_multiple_image_actus();return false;"}=ic :"check-circle"
            
  
          %ul.nav.navbar-nav
            %li
              %a{:href => "#", :onclick => "$(this).next('input').click();return false;"}
                %span.fileinput-button{}
                  %i.icon-plus.icon-white
                  %span Ajouter des images
              %input{:multiple => "", :name => "files[]", :type => "file", :style => "display:none;"}
    
          
            

      
      
       

          :plain
             <!-- The template to display files available for upload -->
             <script id="template-upload" type="text/x-tmpl">
             {% for (var i=0, file; file=o.files[i]; i++) { %}
                 <tr class="template-upload fade">
                     <td>
                         <span class="preview"></span>
                     </td>
                     <td>
                         <p class="name">{%=file.name%}</p>
                         {% if (file.error) { %}
                             <div><span class="label label-important">Error</span> {%=file.error%}</div>
                         {% } %}
                     </td>
                     <td>
                         <p class="size">{%=o.formatFileSize(file.size)%}</p>
                         {% if (!o.files.error) { %}
                             <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="bar" style="width:0%;"></div></div>
                         {% } %}
                     </td>
                     <td>
                         {% if (!o.files.error && !i && !o.options.autoUpload) { %}
                             <button class="btn btn-primary start">
                                 <i class="icon-upload icon-white"></i>
                                 <span>Start</span>
                             </button>
                         {% } %}
                         {% if (!i) { %}
                             <button class="btn btn-warning cancel">
                                 <i class="icon-ban-circle icon-white"></i>
                                 <span>Cancel</span>
                             </button>
                         {% } %}
                     </td>
                 </tr>
             {% } %}
             </script>
             <!-- The template to display files available for download -->
             <script id="template-download" type="text/x-tmpl">
             {% for (var i=0, file; file=o.files[i]; i++) { %}
                 <tr class="template-download fade", :style => "display:none;">
    
                 </tr>
             {% } %}
             </script>
     



      :coffeescript
        $('#fileupload').fileupload({
          paramName:"files",
          dataType:"script",
          autoUpload:true,
          filesContainer:".ulpoad_files"
    
        }).bind('fileuploadadded',(e, data)->
          $("#upload_details").show();
        ).bind('fileuploadfinished',(e, data)->
          $("#upload_details").hide();
        )

