<commit_before>
<%= form_tag unpublish_admin_edition_path(@edition, lock_version: @edition.lock_version) do %>
  <%= fields_for Unpublishing.new do |unpublish| %>
    <%= unpublish.label :unpublishing_reason_id, "Reason for unpublishing" %>
    <%= unpublish.select :unpublishing_reason_id, options_from_collection_for_select(UnpublishingReason.all, :id, :name) %>
    <%= unpublish.text_area :explanation, label_text: 'Further explanation'  %>
    <%= unpublish.text_field :alternative_url, label_text: 'Alternative URL' %>
    <%= submit_tag 'Unpublish', class: "btn btn-danger" %>
  <% end %>
<% end %><commit_msg>Add cancel link to unpublish form<commit_after><% page_title "Unpublish: #{@edition.title}"  %>

  <div class="span8">
    <section>
      <h1>Unpublish <%= @edition.type.titleize %></h1>

      <%= form_tag unpublish_admin_edition_path(@edition, lock_version: @edition.lock_version) do %>
        <%= fields_for :unpublishing do |unpublish| %>
          <%= unpublish.label :unpublishing_reason_id, "Reason for unpublishing" %>
          <%= unpublish.select :unpublishing_reason_id, options_from_collection_for_select(UnpublishingReason.all, :id, :name) %>
          <%= unpublish.text_area :explanation, label_text: 'Further explanation', rows: 5  %>
          <%= unpublish.text_field :alternative_url, label_text: 'Alternative URL' %>
          <%= submit_tag 'Unpublish', class: "btn btn-danger" %>
          <span class="or_cancel"> or <%= link_to 'cancel', [:admin, @edition] %></span>
        <% end %>
      <% end %>
    </section>
  </div>
{'fraction_non_alphanumeric': 0.15369897959183673, 'fraction_numerical': 0.002551020408163265, 'mean_word_length': 4.31864406779661, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 32, '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': '6608275', 'n_tokens_mistral': 565, 'n_tokens_neox': 514, 'n_words': 100}