.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

.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

Replace pills with a btn-group
Replace pills with a btn-group
