<commit_before>.page-header
  %h1 Recent emails

%ul.nav.nav-pills
  %li{class: ("active" if @status.nil?)}
    = link_to "All", emails_path
  %li{class: ("active" if @status == "delivered")}
    = link_to "Delivered", emails_path(status: "delivered")
  %li{class: ("active" if @status == "soft_bounce")}
    = link_to "Soft bounces", emails_path(status: "soft_bounce")
  %li{class: ("active" if @status == "hard_bounce")}
    = link_to "Hard bounces", emails_path(status: "hard_bounce")

= paginated_section @emails do
  %table.table.table-striped
    %thead
      %tr
        %th To
        %th Created
    %tbody(data-provides="rowlink")
      - @emails.each do |email|
        %tr{class: delivered_class(email.status)}
          %td= link_to truncate(email.to_as_string, length: 50), email_path(email), :class => "rowlink"
          %td
            = time_ago_in_words(email.created_at)
            ago<commit_msg>Replace pills with a btn-group<commit_after>.page-header
  %h1 Recent emails

.btn-group
  = link_to "All", emails_path, :class => ["btn", "btn-small", ("active" if @status.nil?)]
  = link_to "Delivered", emails_path(status: "delivered"), :class => ["btn", "btn-small", ("active" if @status == "delivered")]
  = link_to "Soft bounces", emails_path(status: "soft_bounce"), :class => ["btn", "btn-small", ("active" if @status == "soft_bounce")]
  = link_to "Hard bounces", emails_path(status: "hard_bounce"), :class => ["btn", "btn-small", ("active" if @status == "hard_bounce")]

= paginated_section @emails do
  %table.table.table-striped
    %thead
      %tr
        %th To
        %th Created
    %tbody(data-provides="rowlink")
      - @emails.each do |email|
        %tr{class: delivered_class(email.status)}
          %td= link_to truncate(email.to_as_string, length: 50), email_path(email), :class => "rowlink"
          %td
            = time_ago_in_words(email.created_at)
            ago
{'fraction_non_alphanumeric': 0.16562173458725182, 'fraction_numerical': 0.003134796238244514, 'mean_word_length': 3.4847775175644027, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2624678', 'n_tokens_mistral': 682, 'n_tokens_neox': 665, 'n_words': 147}