<commit_before># Copyright (C) 2009 <NAME>.

module PageHelper

  

  def ajax_url_for(rnd,options={})
    opts = options.merge(:site_node => rnd.paragraph.page_revision ? rnd.paragraph.page_revision.revision_container_id : 0, 
                         :page_revision => rnd.paragraph.page_revision_id,
                         :paragraph => rnd.paragraph.id)
    rnd.paragraph_action_url(opts)
  end
  
  def end_user_table_for(tbl,options = {},&block)
   options = options.clone
   options.symbolize_keys!
   if options[:style]
    style ="style='#{options[:style]}'"
   else
    style = ''
   end
   tbl_type =options[:type] == 'div' ? 'div' : 'table'

   if options[:class]
     extra_class = " " + options[:class]
   end
   
   div_id = options[:container_id] || "cmspara_#{rnd.paragraph.id}"
   concat(register_table_js(tbl,div_id,options[:refresh_url]))
   concat("<form id='#{tbl.name}_update_form' action='' onsubmit='return false;'>") unless options[:no_form]
   concat("<input type='hidden' name='page_connection_hash' value='#{tbl.page_connection_hash}' />") unless options[:no_form]
   
   if tbl_type == 'table'
      concat("<#{tbl_type} cellspacing='0' cellpadding='0' class='user_#{tbl_type}#{extra_class}' #{style} >")
   else
     concat("<#{tbl_type} class='user_#{tbl_type}#{extra_class}' #{style} >")
   end
   
   
    unless options[:no_header] || tbl_type == 'div'
     concat(tbl.header_html)
    end
   
    if !tbl.generated?<commit_msg>Reverted to paragraph<commit_after># Copyright (C) 2009 <NAME>.

module PageHelper

  

  def ajax_url_for(rnd,options={})
    opts = options.merge(:site_node => rnd.paragraph.page_revision ? rnd.paragraph.page_revision.revision_container_id : 0, 
                         :page_revision => rnd.paragraph.page_revision_id,
                         :paragraph => rnd.paragraph.id)
    rnd.paragraph_action_url(opts)
  end
  
  def end_user_table_for(tbl,options = {},&block)
   options = options.clone
   options.symbolize_keys!
   if options[:style]
    style ="style='#{options[:style]}'"
   else
    style = ''
   end
   tbl_type =options[:type] == 'div' ? 'div' : 'table'

   if options[:class]
     extra_class = " " + options[:class]
   end
   
   div_id = options[:container_id] || "cmspara_#{paragraph.id}"
   concat(register_table_js(tbl,div_id,options[:refresh_url]))
   concat("<form id='#{tbl.name}_update_form' action='' onsubmit='return false;'>") unless options[:no_form]
   concat("<input type='hidden' name='page_connection_hash' value='#{tbl.page_connection_hash}' />") unless options[:no_form]
   
   if tbl_type == 'table'
      concat("<#{tbl_type} cellspacing='0' cellpadding='0' class='user_#{tbl_type}#{extra_class}' #{style} >")
   else
     concat("<#{tbl_type} class='user_#{tbl_type}#{extra_class}' #{style} >")
   end
   
   
    unless options[:no_header] || tbl_type == 'div'
     concat(tbl.header_html)
    end
   
    if !tbl.generated?
{'fraction_non_alphanumeric': 0.15848670756646216, 'fraction_numerical': 0.004771642808452625, 'mean_word_length': 3.7646103896103895, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, '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': '5417994', 'n_tokens_mistral': 1026, 'n_tokens_neox': 1001, 'n_words': 163}