<commit_before><tr>
  <td class="petition-id">
    <label>
      <%= check_box_tag 'id', signature.id, false, disabled: signature.creator? %> <%= signature.petition.id %>
    </label>
  </td>
  <td class="petition-action"><%= link_to signature.petition.action, admin_petition_path(signature.petition) %></td>
  <td class="petition-signature-count"><%= number_with_delimiter(signature.petition.signature_count) %></td>
  <td class="signature-name"><%= mail_to signature.email, signature.name %></td>
  <td class="signature-status"><%= signature.state %></td>
  <td class="signature-timestamp">
    <% if signature.validated? %>
      <span title="Validated"><%= date_time_format(signature.validated_at) %></span>
    <% else %>
      <span title="Created"><%= date_time_format(signature.updated_at) %></spam>
    <% end %>
  </td>
  <% if signature.creator? %>
    <td class="signature-creator">Yes</td>
    <td class="signature-actions">
      <% if signature.pending? %>
        <%= button_to 'Validate', validate_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button validate-action', data: { confirm: 'Validate signature?' } %>
      <% else %>
        &nbsp;
      <% end %>
    </td>
  <% else %>
    <td class="signature-creator">No</td>
    <td class="signature-actions">
      <% if signature.subscribed? %>
        <%= button_to 'Unsubscribe', unsubscribe_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button unsubscribe-action', data: { confirm: 'Unsubscribe signature?' } %>
      <% else %>
        <%= button_to 'Subscribe', subscribe_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button subscribe-action', data: { confirm: 'Subscribe signature?' } %>
      <% end %>
      <% if signature.pending? %>
        <%= button_to 'Validate', validate_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button validate-action', data: { confirm: 'Validate signature?' } %>
      <% elsif signature.validated? %>
        <%= button_to 'Invalidate', invalidate_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button invalidate-action', data: { confirm: 'Invalidate signature?' } %>
      <% end %>
      <%= button_to 'Delete', admin_signature_path(signature, q: params[:q]), method: :delete, class: 'button-warning delete-action', data: { confirm: 'Delete signature?' } %>
    </td>
  <% end %>
</tr><commit_msg>Don't allow actions on an anonymised signature<commit_after><tr>
  <td class="petition-id">
    <label>
      <%= check_box_tag 'id', signature.id, false, disabled: signature.creator? %> <%= signature.petition.id %>
    </label>
  </td>
  <td class="petition-action"><%= link_to signature.petition.action, admin_petition_path(signature.petition) %></td>
  <td class="petition-signature-count"><%= number_with_delimiter(signature.petition.signature_count) %></td>
  <td class="signature-name"><%= mail_to signature.email, signature.name %></td>
  <td class="signature-status"><%= signature.state %></td>
  <td class="signature-timestamp">
    <% if signature.validated? %>
      <span title="Validated"><%= date_time_format(signature.validated_at) %></span>
    <% else %>
      <span title="Created"><%= date_time_format(signature.updated_at) %></spam>
    <% end %>
  </td>
  <% if signature.creator? %>
    <td class="signature-creator">Yes</td>
    <td class="signature-actions">
      <% if signature.pending? %>
        <%= button_to 'Validate', validate_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button validate-action', data: { confirm: 'Validate signature?' } %>
      <% else %>
        &nbsp;
      <% end %>
    </td>
  <% else %>
    <td class="signature-creator">No</td>
    <td class="signature-actions">
      <% unless signature.anonymized? %>
        <% if signature.subscribed? %>
          <%= button_to 'Unsubscribe', unsubscribe_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button unsubscribe-action', data: { confirm: 'Unsubscribe signature?' } %>
        <% else %>
          <%= button_to 'Subscribe', subscribe_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button subscribe-action', data: { confirm: 'Subscribe signature?' } %>
        <% end %>
        <% if signature.pending? %>
          <%= button_to 'Validate', validate_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button validate-action', data: { confirm: 'Validate signature?' } %>
        <% elsif signature.validated? %>
          <%= button_to 'Invalidate', invalidate_admin_signature_path(signature, q: params[:q]), method: :post, class: 'button invalidate-action', data: { confirm: 'Invalidate signature?' } %>
        <% end %>
        <%= button_to 'Delete', admin_signature_path(signature, q: params[:q]), method: :delete, class: 'button-warning delete-action', data: { confirm: 'Delete signature?' } %>
      <% end %>
    </td>
  <% end %>
</tr>
{'fraction_non_alphanumeric': 0.1838087585375653, 'fraction_numerical': 0.0, 'mean_word_length': 4.117163412127441, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 119, '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': '2642266', 'n_tokens_mistral': 1612, 'n_tokens_neox': 1489, 'n_words': 330}