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

module PageHelper


  def webiva_javascript_tags(js_includes,js_header)
    if js_includes || js_header
      if js_header; js_includes ||= []; js_includes += js_header; end 

      js_includes.uniq.each do |js|
        if js.to_s[0..3] == 'http'
          concat(" <script src=\"#{vh js}\" type='text/javascript'></script>\n")
        else 
          concat(" " + javascript_include_tag(js) + "\n")
        end
      end
    end
    nil
  end

  def webiva_css_tags(css_includes,css_header)
    if css_includes || css_header
      if css_header; css_includes ||= []; css_includes += css_header; end 
      css_includes.uniq.each do |css|
        concat(" " + stylesheet_link_tag(css) + "\n")
      end
    end
    nil
  end


  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'
<commit_msg>Fixed stylesheet to default ot all media<commit_after># Copyright (C) 2009 <NAME>.

module PageHelper


  def webiva_javascript_tags(js_includes,js_header)
    if js_includes || js_header
      if js_header; js_includes ||= []; js_includes += js_header; end 

      js_includes.uniq.each do |js|
        if js.to_s[0..3] == 'http'
          concat(" <script src=\"#{vh js}\" type='text/javascript'></script>\n")
        else 
          concat(" " + javascript_include_tag(js) + "\n")
        end
      end
    end
    nil
  end

  def webiva_css_tags(css_includes,css_header)
    if css_includes || css_header
      if css_header; css_includes ||= []; css_includes += css_header; end 
      css_includes.uniq.each do |css|
        concat(" " + stylesheet_link_tag(css, :media => 'all') + "\n")
      end
    end
    nil
  end


  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'

{'fraction_non_alphanumeric': 0.1306532663316583, 'fraction_numerical': 0.005025125628140704, 'mean_word_length': 2.716, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 16, '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': '742465', 'n_tokens_mistral': 970, 'n_tokens_neox': 925, 'n_words': 188}