= render 'admin/sheets/upload_script'
.outset
  %table.index
    %thead
      %tr
        %th Javascript
        %th Filter
        %th Modify
    %tbody
      - unless models.blank?
        - models.each do |javascript|
          %tr
            %td.name
              = image('javascript') 
              = link_to javascript.title, edit_admin_script_path(javascript)
            %td.filter= javascript.part('body').filter.filter_name
            %td.actions= link_to(image('minus') + ' ' + t('remove'), admin_script_url(javascript), :class => "action", :method => :delete, :confirm => "Is it OK to delete #{javascript.slug}?")
      - else
        %tr
          %td.empty{:colspan => 2}= t('no_scripts')

#actions
  = pagination_for(models)
  %ul
    %li= link_to image('plus') + " " + t("new_javascript"), new_admin_script_path, :class => 'action_button'
    %li
      = link_to image('upload') + ' ' + t("upload"), '#uploader', :class => 'replace action_button'
      #uploader.action_button
        - form_for :upload, :url => upload_admin_scripts_path, :html => { :class => 'button_form', :multipart => true } do |f|
          %span
            = f.label :upload, image('upload') + ' ' + t('upload')
            = f.file_field :upload 
            = f.submit t('create_javascript')
= render 'admin/sheets/upload_script'
.outset
  %table.index
    %thead
      %tr
        %th Javascript
        %th Filter
        %th Modify
    %tbody
      - unless models.blank?
        - models.each do |javascript|
          %tr
            %td.name
              = image('javascript') 
              = link_to javascript.title, edit_admin_script_path(javascript)
            %td.filter= javascript.part('body').filter.filter_name
            %td.actions= link_to(image('minus') + ' ' + t('remove'), admin_script_url(javascript), :class => "action", :method => :delete, :confirm => "Is it OK to delete #{javascript.slug}?")
      - else
        %tr
          %td.empty{:colspan => 3}= t('no_scripts')

#actions
  = pagination_for(models)
  %ul
    %li= link_to image('plus') + " " + t("new_javascript"), new_admin_script_path, :class => 'action_button'
    %li
      = link_to image('upload') + ' ' + t("upload"), '#uploader', :class => 'replace action_button'
      #uploader.action_button
        - form_for :upload, :url => upload_admin_scripts_path, :html => { :class => 'button_form', :multipart => true } do |f|
          %span
            = f.label :upload, image('upload') + ' ' + t('upload')
            = f.file_field :upload 
            = f.submit t('create_javascript')
Fix colspan for 'no scripts' td
Fix colspan for 'no scripts' td
