<commit_before>- data_id  = dom_id_for(data_table, :cell_data)
- form_id  = dom_id_for(data_table, :form_edit_cells)
%div{:id => dom_id_for(data_table, :details), :class => 'content'}
  %form{:name=> form_id,:id=> form_id}
    %table.data_table
      %thead
        %tr
          -1.upto(data_table.column_count) do |index|
            %th= data_table.heading(index)
      %tr
        -1.upto(data_table.visible_rows) do |row_index|
          %tr
          -1.upto(data_table.column_count) do |column_index|
            %td{:id =>dom_id_for(data_table, "cell_container_#{row_index}_#{column_index}".to_sym)}
              = render :partial => "data_tables/cell", :locals => {:data_table => data_table, :x => column_index, :y => row_index}

    %input{:id =>dom_id_for(data_table, :cell_data), :type => :hidden, :name => :data, :value => data_table.data}
  = watch_data_fields(data_table,form_id,data_id)<commit_msg>If the current user cant change the data_table, dont even try to do the ajax call-backs, which will fail anyway.<commit_after>- data_id  = dom_id_for(data_table, :cell_data)
- form_id  = dom_id_for(data_table, :form_edit_cells)
%div{:id => dom_id_for(data_table, :details), :class => 'content'}
  %form{:name=> form_id,:id=> form_id}
    %table.data_table
      %thead
        %tr
          -1.upto(data_table.column_count) do |index|
            %th= data_table.heading(index)
      %tr
        -1.upto(data_table.visible_rows) do |row_index|
          %tr
          -1.upto(data_table.column_count) do |column_index|
            %td{:id =>dom_id_for(data_table, "cell_container_#{row_index}_#{column_index}".to_sym)}
              = render :partial => "data_tables/cell", :locals => {:data_table => data_table, :x => column_index, :y => row_index}

    %input{:id =>dom_id_for(data_table, :cell_data), :type => :hidden, :name => :data, :value => data_table.data}
- if (data_table.changeable? current_user)
  = watch_data_fields(data_table,form_id,data_id)
{'fraction_non_alphanumeric': 0.15162271805273833, 'fraction_numerical': 0.0030425963488843813, 'mean_word_length': 3.7200956937799043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 31, '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': '6067602', 'n_tokens_mistral': 736, 'n_tokens_neox': 727, 'n_words': 129}