<commit_before>%h1 Listing posts

%table.table
  %thead
    %tr
      %th Title
      %th Body
      %th Category
      %th Author
      %th Thumbnail
      %th
      %th
      %th

  %tbody
    - @posts.each do |post|
      %tr
        %td= post.title
        %td= post.body
        %td= post.category&.name
        %td= post.author&.name
        %td= image_tag post.thumbnail_url, height: 80 if post.thumbnail.present?
        %td= link_to 'Show', editor_post_url(post)
        %td= link_to 'Preview', preview_editor_post_url(post)
        %td= link_to 'Edit', edit_editor_post_url(post)
        %td= link_to 'Destroy', editor_post_url(post), method: :delete, data: { confirm: 'Are you sure?' }

= link_to 'New Post', new_editor_post_url, class: 'btn btn-default'<commit_msg>Show preview in other window<commit_after>%h1 Listing posts

%table.table
  %thead
    %tr
      %th Title
      %th Body
      %th Category
      %th Author
      %th Thumbnail
      %th
      %th
      %th

  %tbody
    - @posts.each do |post|
      %tr
        %td= post.title
        %td= post.body
        %td= post.category&.name
        %td= post.author&.name
        %td= image_tag post.thumbnail_url, height: 80 if post.thumbnail.present?
        %td= link_to 'Show', editor_post_url(post)
        %td= link_to 'Preview', preview_editor_post_url(post), target: '_blank'
        %td= link_to 'Edit', edit_editor_post_url(post)
        %td= link_to 'Destroy', editor_post_url(post), method: :delete, data: { confirm: 'Are you sure?' }

= link_to 'New Post', new_editor_post_url, class: 'btn btn-default'
{'fraction_non_alphanumeric': 0.12224322621298046, 'fraction_numerical': 0.003780718336483932, 'mean_word_length': 2.4596949891067537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1543926', 'n_tokens_mistral': 560, 'n_tokens_neox': 553, 'n_words': 143}