<commit_before><a href="#" data-dropdown="manage" class="button radius secondary small dropdown">Manage Cookbook</a>

<ul class="manage_cookbook f-dropdown" id="manage" data-dropdown-content>
  <% if policy(cookbook).create_collaborator? %>
    <li>
      <%= link_to '#', class: 'addcontributor', rel: 'add-collaborator', 'data-reveal-id' => 'collaborators' do %>
        <i class="fa fa-plus-square"></i>
        Add Collaborator
      <% end %>
    </li>
    <div id="collaborators" class="reveal-modal small" data-reveal>
      <%= render 'collaborators/add', resource: @cookbook %>
    </div>
  <% end %>

  <%= link_to_adoption(cookbook) %>

  <% if policy(cookbook).transfer_ownership? %>
    <li>
      <%= link_to '#', rel: 'transfer_ownership', 'data-reveal-id' => 'transfer' do %>
        <i class="fa fa-random"></i>
        Transfer Ownership
      <% end %>
    </li>

    <div id="transfer" class="reveal-modal small" data-reveal>
      <h1>Transfer Ownership</h1>
      <a class="close-reveal-modal">&#215;</a>

      <%= form_for cookbook, url: transfer_ownership_path(cookbook), method: :put do |f| %>
        <div class="row collapse">
          <div class="small-9 columns">
            <%= f.hidden_field :user_id, class: 'collaborators', 'data-url' => collaborators_path(ineligible_user_ids: Collaborator.ineligible_owners_for(cookbook).map(&:id)) %>
            <%= f.label "Select this box to keep the current owner on as a collaborator." %>
            <%= f.check_box :add_owner_as_collaborator, checked: false %>
          </div>
          <div class="small-3 columns">
            <%= f.submit 'Transfer', class: 'button radius postfix' %>
          </div>
        </div>
      <% end %>
    </div>
  <% end %>

  <% if policy(cookbook).deprecate? %>
    <li>
      <%= link_to '#', class: 'deprecate', rel: 'deprecate', 'data-reveal-id' => 'deprecate' do %>
        <i class="fa fa-archive"></i>
        Deprecate
      <% end %>
    </li>

    <div id="deprecate" class="reveal-modal small" data-reveal>
      <h1>Deprecate Cookbook</h1>

      <p>Deprecating the <%= cookbook.name %> cookbook will add a notice to the
      page letting visitors know the cookbook has been deprecated and its use is
      no longer recommended.  Optionally, select a cookbook that should be used<commit_msg>changes users view of the transfer cookbook checkbox option<commit_after><a href="#" data-dropdown="manage" class="button radius secondary small dropdown">Manage Cookbook</a>

<ul class="manage_cookbook f-dropdown" id="manage" data-dropdown-content>
  <% if policy(cookbook).create_collaborator? %>
    <li>
      <%= link_to '#', class: 'addcontributor', rel: 'add-collaborator', 'data-reveal-id' => 'collaborators' do %>
        <i class="fa fa-plus-square"></i>
        Add Collaborator
      <% end %>
    </li>
    <div id="collaborators" class="reveal-modal small" data-reveal>
      <%= render 'collaborators/add', resource: @cookbook %>
    </div>
  <% end %>

  <%= link_to_adoption(cookbook) %>

  <% if policy(cookbook).transfer_ownership? %>
    <li>
      <%= link_to '#', rel: 'transfer_ownership', 'data-reveal-id' => 'transfer' do %>
        <i class="fa fa-random"></i>
        Transfer Ownership
      <% end %>
    </li>

    <div id="transfer" class="reveal-modal small" data-reveal>
      <h1>Transfer Ownership</h1>
      <a class="close-reveal-modal">&#215;</a>

      <%= form_for cookbook, url: transfer_ownership_path(cookbook), method: :put do |f| %>
        <div class="row collapse">
          <div class="small-9 columns">
            <%= f.hidden_field :user_id, class: 'collaborators', 'data-url' => collaborators_path(ineligible_user_ids: Collaborator.ineligible_owners_for(cookbook).map(&:id)) %>
            <h3>
              <%= f.check_box :add_owner_as_collaborator, checked: false %>
              <%= f.label "Make current owner a collaborator?" %>
            </h3>
          </div>
          <div class="small-3 columns">
            <%= f.submit 'Transfer', class: 'button radius postfix' %>
          </div>
        </div>
      <% end %>
    </div>
  <% end %>

  <% if policy(cookbook).deprecate? %>
    <li>
      <%= link_to '#', class: 'deprecate', rel: 'deprecate', 'data-reveal-id' => 'deprecate' do %>
        <i class="fa fa-archive"></i>
        Deprecate
      <% end %>
    </li>

    <div id="deprecate" class="reveal-modal small" data-reveal>
      <h1>Deprecate Cookbook</h1>

      <p>Deprecating the <%= cookbook.name %> cookbook will add a notice to the
      page letting visitors know the cookbook has been deprecated and its use is
      no longer recommended.  Optionally, select a cookbook that should be used
{'fraction_non_alphanumeric': 0.16198382290336313, 'fraction_numerical': 0.004257130693912303, 'mean_word_length': 2.896351575456053, 'pattern_counts': {'":': 0, '<': 111, '<?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': '4938675', 'n_tokens_mistral': 1642, 'n_tokens_neox': 1502, 'n_words': 362}