<commit_before>module ApplicationHelper

  # Fetch and link to link field
  def link_field(field)
    link_to("Link to resource", field[:document][field[:field]], :target => "_blank")
  end

  # Fetch HTML text from field
  def html_field(field)
    field[:document][field[:field]].first.html_safe
  end

  # Generate link to sorting action
  def sortable(column, title = nil)
    title ||= column.titleize
    css_class = column == sort_column ? "current #{sort_direction}" : nil
    direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
    direction_icon = (direction.eql? "desc") ? :sort_desc : :sort_asc
    search = params[:search]
    html = link_to title, params.merge(:sort => column, :direction => direction, :page => nil, :id => ""), {:class => css_class}
    html << icon_tag(direction_icon) if column == sort_column
    return html
  end

end<commit_msg>Updated views to use Bootstrap3 styles<commit_after>module ApplicationHelper

  # Fetch and link to link field
  def link_field(field)
    link_to("Link to resource", field[:document][field[:field]], :target => "_blank")
  end

  # Fetch HTML text from field
  def html_field(field)
    field[:document][field[:field]].first.html_safe
  end

  # Generate link to sorting action
  def sortable(column, title = nil)
    title ||= column.titleize
    css_class = column == sort_column ? "current #{sort_direction}" : nil
    direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
    direction_icon = (direction.eql? "desc") ? :sort_desc : :sort_asc
    search = params[:search]
    html = link_to title, params.merge(:sort => column, :direction => direction, :page => nil, :id => ""), {:class => css_class}
    html << content_tag(:i, nil, class: "glyphicon glyphicon-sort") if column == sort_column
    return html
  end

end
{'fraction_non_alphanumeric': 0.13547334058759522, 'fraction_numerical': 0.000544069640914037, 'mean_word_length': 4.151260504201681, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '1862187', 'n_tokens_mistral': 568, 'n_tokens_neox': 554, 'n_words': 164}