
-if input.nbr_columns == 1 and admin == "dd"
  -input.blocks.each do |block|
    .block
      =render :partial => "admin/blocks/block", :locals => {:block => block, :sortable => false}
  .clear
    
-else
  =raw '</div>' if !admin

  - css_class = ""
  - css_class = "dark_background" if input.style == 2
  - css_class = "gray_light_background" if input.style == 3
  - css_class = "blue_background" if input.style == 4
  - css_class = "yellow_background" if input.style == 5
  - css_class = "green_background" if input.style == 6
  - css_class = "beton" if input.style == 7
  - css_class = "content_center" if input.style == 8
  
  =raw "<div class='#{css_class}'>" if !admin
  
  =raw "<div class='main'>" if input.style > 1 or input.style < 10
  .row
    -for i in 1..input.nbr_columns.to_i
      %div{:class => "columns span_"+eval("input.row#{i}").to_s}
        -if admin
          =render :partial => "admin/blocks/block", :locals => {:admin => false,:block => input.blocks[i-1], :sortable => false}
        -else
          =render :partial => "public/blocks/block", :locals => {:admin => false, :block => input.blocks[i-1], :sortable => false}

  =raw "</div>" if input.style > 1 or input.style < 10
  =raw "</div>" if !admin
  =raw '<div class="row">' if !admin
  
  