<commit_before>= 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')<commit_msg>Fix colspan for 'no scripts' td<commit_after>= 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')
{'fraction_non_alphanumeric': 0.15483383685800603, 'fraction_numerical': 0.0007552870090634441, 'mean_word_length': 2.4582245430809397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7234855', 'n_tokens_mistral': 839, 'n_tokens_neox': 819, 'n_words': 176}