<commit_before><tr class="<%= status_class_for(publication) %>">
  <td>
    <%= image_tag "/images/icon-publisher-#{publication.format.downcase}.png", :alt => publication.class.name.humanize  %>
  </td>
  <td class="title">
    <%= publication.admin_list_title %>
    
    <span class="version">
    <% if tab && (tab == :published || tab == :archived) %>
      (v.<%= publication.version_number %>)
      <% if publication.has_sibling_in_progress? %>
        (v.<%= publication.latest_publication.version_number %> in <%= publication.latest_edition.state.humanize.downcase %>)
      <% end%>
    <% else %>
      v.<%= publication.version_number %>
    <% end %>
    </span>
  </td>
  <td>
    <% if publication.has_video? %>
      <%= image_tag "/images/icon-publisher-video.png", :alt => "Has video"  %>
    <% end %>
  </td>
  <td class="updated">
    <%= timestamp(publication.updated_at) %>
  </td>
  <% if tab && tab == :fact_check %>
  <td>
    <%= timestamp(publication.latest_edition.last_fact_checked_at) %>
  </td>
  <% end %>
  <td>
    <%= publication.assigned_to %>
    
    <% if tab && tab == :lined_up %>
    <%= link_to publication.assigned_to ? ' (change)' : 'assign', edit_edition_path(publication) %>
    <% end %>
  </td>
    <% unless tab && tab == :lined_up %>
    <td>
      <%= publication.created_by %>
    </td>
    <% end %>
    <td>
      <%= publication.section %>
    </td>
  <td>
    <%= publication.rejected_count %>
  </td>
    <% if tab && tab == :published || tab == :archived %>
    <td>
      <%= (tab == :published) ? publication.published_by : publication.archived_by %>
    </td>
    <td>
      <%= link_to 'View', publication_front_end_path(publication) %>
    </td>
    <td>
      <%= link_to admin_edition_path(publication) do %>
        <%= image_tag '/images/icon-publisher-preview-locked.png', :alt => 'Locked edit view for this publication', :title => 'Locked edit view for this publication' %>
      <% end %>
    </td>
    <% end %>
  <td>
    <% if tab && tab == :lined_up %>
      <%= form_tag start_work_path(publication) do %>
        <%= hidden_field_tag :start_work, 1 %>
        <%= image_submit_tag '/images/icon-publisher-start-work.png', :alt => "Start work on this #{publication.class.to_s.humanize}", :title => 'Start work on this #{publication.class.to_s.humanize)}', :class => 'start-work' %>
      <% end %>
    <% elsif tab and (tab == :published or tab == :archived) and publication.can_create_new_edition? %>
      <%= form_tag duplicate_admin_edition_path(publication) do %>
        <%= image_submit_tag '/images/icon-publisher-create-new-publication.png', :alt => 'Create new edition of this publication', :title => 'Create new edition of this publication', :class => 'new-edition' %>
      <% end %>
    <% elsif tab && tab == :published %>
      <%= link_to admin_edition_path(publication) do %>
        <%= image_tag '/images/icon-publisher-edit.png', :alt => 'Edit this draft publication', :title => 'Edit this draft publication' %>
      <% end %>
    <% else %>
      <%= link_to admin_edition_path(publication) do %>
        <%= image_tag '/images/icon-publisher-edit.png', :alt => 'Edit this publication', :title => 'Edit this publication' %>
      <% end %>
    <% end %>
  </td>
  <td>
    <% if publication.safe_to_preview? %>
      <%= link_to preview_edition_path(publication), {:class => 'preview'} do %>
        <%= image_tag '/images/icon-publisher-preview.png', :alt => 'Preview this publication', :title => 'Preview this publication', :class => 'preview' %>
      <% end %>
    <% else %>
      <%= image_tag '/images/icon-publisher-preview.png', :alt => 'Preview disabled for this publication', :title => 'Preview disabled for this publication', :class => 'disabled' %>
    <% end %>
  </td>
</tr>
<commit_msg>use subsequent_siblings for now (needs to be more efficient in future)<commit_after><tr class="<%= status_class_for(publication) %>">
  <td>
    <%= image_tag "/images/icon-publisher-#{publication.format.downcase}.png", :alt => publication.class.name.humanize  %>
  </td>
  <td class="title">
    <%= publication.admin_list_title %>
    
    <span class="version">
    <% if tab && (tab == :published || tab == :archived) %>
      (v.<%= publication.version_number %>)
      <% if publication.has_sibling_in_progress? %>
        (v.<%= publication.subsequent_siblings.first.version_number %> in <%= publication.subsequent_siblings.first.state.humanize.downcase %>)
      <% end%>
    <% else %>
      v.<%= publication.version_number %>
    <% end %>
    </span>
  </td>
  <td>
    <% if publication.has_video? %>
      <%= image_tag "/images/icon-publisher-video.png", :alt => "Has video"  %>
    <% end %>
  </td>
  <td class="updated">
    <%= timestamp(publication.updated_at) %>
  </td>
  <% if tab && tab == :fact_check %>
  <td>
    <%= timestamp(publication.latest_edition.last_fact_checked_at) %>
  </td>
  <% end %>
  <td>
    <%= publication.assigned_to %>
    
    <% if tab && tab == :lined_up %>
    <%= link_to publication.assigned_to ? ' (change)' : 'assign', edit_edition_path(publication) %>
    <% end %>
  </td>
    <% unless tab && tab == :lined_up %>
    <td>
      <%= publication.created_by %>
    </td>
    <% end %>
    <td>
      <%= publication.section %>
    </td>
  <td>
    <%= publication.rejected_count %>
  </td>
    <% if tab && tab == :published || tab == :archived %>
    <td>
      <%= (tab == :published) ? publication.published_by : publication.archived_by %>
    </td>
    <td>
      <%= link_to 'View', publication_front_end_path(publication) %>
    </td>
    <td>
      <%= link_to admin_edition_path(publication) do %>
        <%= image_tag '/images/icon-publisher-preview-locked.png', :alt => 'Locked edit view for this publication', :title => 'Locked edit view for this publication' %>
      <% end %>
    </td>
    <% end %>
  <td>
    <% if tab && tab == :lined_up %>
      <%= form_tag start_work_path(publication) do %>
        <%= hidden_field_tag :start_work, 1 %>
        <%= image_submit_tag '/images/icon-publisher-start-work.png', :alt => "Start work on this #{publication.class.to_s.humanize}", :title => 'Start work on this #{publication.class.to_s.humanize)}', :class => 'start-work' %>
      <% end %>
    <% elsif tab and (tab == :published or tab == :archived) and publication.can_create_new_edition? %>
      <%= form_tag duplicate_admin_edition_path(publication) do %>
        <%= image_submit_tag '/images/icon-publisher-create-new-publication.png', :alt => 'Create new edition of this publication', :title => 'Create new edition of this publication', :class => 'new-edition' %>
      <% end %>
    <% elsif tab && tab == :published %>
      <%= link_to admin_edition_path(publication) do %>
        <%= image_tag '/images/icon-publisher-edit.png', :alt => 'Edit this draft publication', :title => 'Edit this draft publication' %>
      <% end %>
    <% else %>
      <%= link_to admin_edition_path(publication) do %>
        <%= image_tag '/images/icon-publisher-edit.png', :alt => 'Edit this publication', :title => 'Edit this publication' %>
      <% end %>
    <% end %>
  </td>
  <td>
    <% if publication.safe_to_preview? %>
      <%= link_to preview_edition_path(publication), {:class => 'preview'} do %>
        <%= image_tag '/images/icon-publisher-preview.png', :alt => 'Preview this publication', :title => 'Preview this publication', :class => 'preview' %>
      <% end %>
    <% else %>
      <%= image_tag '/images/icon-publisher-preview.png', :alt => 'Preview disabled for this publication', :title => 'Preview disabled for this publication', :class => 'disabled' %>
    <% end %>
  </td>
</tr>

{'fraction_non_alphanumeric': 0.18653119708219357, 'fraction_numerical': 0.0002605184316790413, 'mean_word_length': 3.108079186730872, 'pattern_counts': {'":': 0, '<': 187, '<?xml version=': 0, '>': 229, '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': '3005483', 'n_tokens_mistral': 2718, 'n_tokens_neox': 2489, 'n_words': 534}