<commit_before><% sort_by   = toolbar[:sort_by]
   filter_by = toolbar[:filter_by] %>
<div class="list-toolbar <%= 'hide' if pagination %>" list-name="<%= toolbar[:list_name] || controller.class.to_s.gsub(/\W/, '_') %>" filters="<%= filter_by.join(',') if filter_by %>">
  <% if sort_by %>
    <div class="btn-group sort pull-left">
      <a class="btn btn-mini sort-indicator" onclick="toggle_order(this)"><%= icon('sort', content_tag(:span, 'Sort')) %></a>
      <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#"><%= icon('caret-down') %></a>
      <ul class="dropdown-menu">
        <% sort_by.each do |attr| %>
          <li><%= link_to_function attr.first, "sort_selected(this, '#{attr.last}', '#{attr.first}')" %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
  <% compact = toolbar[:compact] %>
  <% unless compact.nil? %>
    <button class="btn btn-mini" style="margin-left: 10px" onclick="toggle_compact(this)">
      <% if compact %>
        <i class="fa fa-lg fa-plus-square-o"><span> Expand</span></i>
      <% else %>
        <i class="fa fa-lg fa-minus-square-o"><span> Collapse</span></i>
      <% end %>
    </button>
  <% end %>
  <% if menu.present? %>
    <div class="btn-group menu pull-right">
      <button class="btn btn-mini" onclick="select_all_items(this)" title="Select All"><i class="fa fa-lg fa-check-square-o"></i></button>
      <button class="btn btn-mini" onclick="unselect_all_items(this)" title="Unselect All"><i class="fa fa-lg fa-square-o"></i></button>
      <a class="btn btn-mini" data-toggle="dropdown" href="#"><%= icon('cog', 'Action', 'fa-lg') %> <%= icon('caret-down') %></a>
      <ul class="dropdown-menu">
        <% menu.each do |i| %>
          <% if i.blank? %>
            <li class="divider"></li>
          <% else %>
            <li class="disabled"><a onclick='<%= raw(%(invoke_list_menu_item(this, "#{i[:id]}", "#{i[:function]}", "#{i[:url]}", "#{i[:method]}", "#{i[:param_name]}"))) %>'><%= i[:label] %></a></li>
          <% end %>
        <% end %>
      </ul>
    </div>
  <% end %>
  <% if filter_by %>
    <div class="filter">
      <%= count_marker '', 'list-count-marker' unless pagination %>
      <%= text_field_tag(:filter_list_field, '', :class => 'list-toolbar-filter input-medium search-query', :placeholder => 'type to filter...', (pagination ? :onchnage : :onkeyup) => "filter_changed(this, false)") %>
      <i class="fa fa-times-circle" onclick="filter_changed(this, true)"></i>
    </div>
  <% end %>
</div>
<script type="text/javascript">
  if (!window.sort_selected) {
    window.sort_selected = function(source, attr, label) {
      var indicator = $j(source).closest(".list-toolbar").find(".sort-indicator");
      var current_attr = indicator.attr("sort-by");
      if (current_attr == attr) {
        toggle_order(indicator);<commit_msg>Minor styling touch-up for list toolbar (collapse/expand button).<commit_after><% sort_by   = toolbar[:sort_by]
   filter_by = toolbar[:filter_by] %>
<div class="list-toolbar <%= 'hide' if pagination %>" list-name="<%= toolbar[:list_name] || controller.class.to_s.gsub(/\W/, '_') %>" filters="<%= filter_by.join(',') if filter_by %>">
  <% if sort_by %>
    <div class="btn-group sort pull-left">
      <a class="btn btn-mini sort-indicator" onclick="toggle_order(this)"><%= icon('sort', content_tag(:span, 'Sort')) %></a>
      <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#"><%= icon('caret-down') %></a>
      <ul class="dropdown-menu">
        <% sort_by.each do |attr| %>
          <li><%= link_to_function attr.first, "sort_selected(this, '#{attr.last}', '#{attr.first}')" %></li>
        <% end %>
      </ul>
    </div>
  <% end %>
  <% compact = toolbar[:compact] %>
  <%= link_to_function(compact ? icon('plus-square-o', 'Expand') : icon('minus-square-o', 'Collapse'),
                       'toggle_compact(this)',
                       :class => 'btn btn-mini',
                       :style => 'margin-left:10px') unless compact.nil? %>
  <% if menu.present? %>
    <div class="btn-group menu pull-right">
      <button class="btn btn-mini" onclick="select_all_items(this)" title="Select All"><i class="fa fa-lg fa-check-square-o"></i></button>
      <button class="btn btn-mini" onclick="unselect_all_items(this)" title="Unselect All"><i class="fa fa-lg fa-square-o"></i></button>
      <a class="btn btn-mini" data-toggle="dropdown" href="#"><%= icon('cog', 'Action', 'fa-lg') %> <%= icon('caret-down') %></a>
      <ul class="dropdown-menu">
        <% menu.each do |i| %>
          <% if i.blank? %>
            <li class="divider"></li>
          <% else %>
            <li class="disabled"><a onclick='<%= raw(%(invoke_list_menu_item(this, "#{i[:id]}", "#{i[:function]}", "#{i[:url]}", "#{i[:method]}", "#{i[:param_name]}"))) %>'><%= i[:label] %></a></li>
          <% end %>
        <% end %>
      </ul>
    </div>
  <% end %>
  <% if filter_by %>
    <div class="filter">
      <%= count_marker '', 'list-count-marker' unless pagination %>
      <%= text_field_tag(:filter_list_field, '', :class => 'list-toolbar-filter input-medium search-query', :placeholder => 'type to filter...', (pagination ? :onchnage : :onkeyup) => "filter_changed(this, false)") %>
      <i class="fa fa-times-circle" onclick="filter_changed(this, true)"></i>
    </div>
  <% end %>
</div>
<script type="text/javascript">
  if (!window.sort_selected) {
    window.sort_selected = function(source, attr, label) {
      var indicator = $j(source).closest(".list-toolbar").find(".sort-indicator");
      var current_attr = indicator.attr("sort-by");
      if (current_attr == attr) {
        toggle_order(indicator);
{'fraction_non_alphanumeric': 0.22974160660924592, 'fraction_numerical': 0.0007031112673580594, 'mean_word_length': 3.376923076923077, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 0, '>': 155, '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': '1449770', 'n_tokens_mistral': 2028, 'n_tokens_neox': 1886, 'n_words': 375}