<commit_before>= link_to "<span class='icon-plus'></span> New #{@model.name.titleize}".html_safe, polymorphic_url([:brightcontent, @model], action:"new"), class:"new_document"

%h2= @model.name.pluralize.titleize
- if @search_fields.present?
  .search_and_pagination
    #search
      = form_for "", :method => "get" do
        %input.box{name: "term", value: "#{@search_term.presence || ""}"}
        = submit_tag "Search", :class => "button"
    = will_paginate @items, {previous_label: "Previous", next_label: "Next"}
    :javascript
      $(function(){
        $("#search .box").click(function(){
          this.select();
        });
      });
- else
  = will_paginate @items, {previous_label: "Previous", next_label: "Next"}

.list
  %table
    %thead
      %tr
        - @list_fields.each do |field|
          %th= field.humanize
        %th
    %tbody
      - @items.each do |item|
        %tr{class:"#{'hidden' if (item.hidden? rescue nil)} #{'draft' if (item.draft? rescue nil)} #{ cycle('odd', 'even')}"}
          - @list_fields.each_with_index do |field, index|
            %td
              = list_field item, field
              = "<em>draft</em>".html_safe if (item.draft? rescue nil) && index == 0
              = "<span>(hidden)</span>".html_safe if (item.hidden? rescue nil) && index == 0
          = render "list_actions", :item => item

%br
- if @items.count > 15
  = link_to "<span class='icon-plus'></span> New #{@model.name.titleize}".html_safe, polymorphic_url([:brightcontent, @model], :action => "new"), :class => "new_document"
  = will_paginate @items, {previous_label: "Previous", next_label: "Next"}<commit_msg>minor performance enhancement<commit_after>= link_to "<span class='icon-plus'></span> New #{@model.name.titleize}".html_safe, polymorphic_url([:brightcontent, @model], action:"new"), class:"new_document"

%h2= @model.name.pluralize.titleize
- if @search_fields.present?
  .search_and_pagination
    #search
      = form_for "", :method => "get" do
        %input.box{name: "term", value: "#{@search_term.presence || ""}"}
        = submit_tag "Search", :class => "button"
    = will_paginate @items, {previous_label: "Previous", next_label: "Next"}
    :javascript
      $(function(){
        $("#search .box").click(function(){
          this.select();
        });
      });
- else
  = will_paginate @items, {previous_label: "Previous", next_label: "Next"}

.list
  %table
    %thead
      %tr
        - @list_fields.each do |field|
          %th= field.humanize
        %th
    %tbody
      - @items.each do |item|
        %tr{class:"#{'hidden' if (item.hidden? rescue nil)} #{'draft' if (item.draft? rescue nil)} #{ cycle('odd', 'even')}"}
          - @list_fields.each_with_index do |field, index|
            %td
              = list_field item, field
              - if index == 0
                = "<em>draft</em>".html_safe if (item.draft? rescue nil)
                = "<span>(hidden)</span>".html_safe if (item.hidden? rescue nil)
          = render "list_actions", :item => item

%br
- if @items.count > 15
  = link_to "<span class='icon-plus'></span> New #{@model.name.titleize}".html_safe, polymorphic_url([:brightcontent, @model], :action => "new"), :class => "new_document"
  = will_paginate @items, {previous_label: "Previous", next_label: "Next"}
{'fraction_non_alphanumeric': 0.1812953995157385, 'fraction_numerical': 0.002723970944309927, 'mean_word_length': 3.006060606060606, 'pattern_counts': {'":': 0, '<': 19, '<?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': '5006437', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1069, 'n_words': 238}