<commit_before><%= render :partial => "page_nav" %>

<% content_for :sidebar do %>
  <%= render :partial => 'shared_options' %>
  <div class="sgroup">
    <h3><label for="article_filters">Markup options</label></h3>
    <% fields_for :article, @version do |f| -%>
    <ul class="sform">
      <li>
        <select name="article[filters][]" id="article_filters">
          <%= options_for_select(filter_options, (@version.filters || []).first.to_s) %>
        </select>
      </li>
      <li><label><%= f.check_box :parse_macros %>Use macro filters</label></li>
    </ul>
    <% end -%>
  </div>
  
  <div class="sgroup">
    <h3>Revisions<% if params[:version] -%> (<%= link_to 'current', :action => :edit, :id => @article, :version => nil %>)<% end -%></h3>
    <ul id="revisions">
    <% @article.versions.find(:all, :order => 'updated_at DESC', :limit => 4).each do |version| -%>
      <li>
        <%= link_to avatar_for(version.updater), {:action => 'edit', :id => @article, :version => version.version }, :title => 'Edit this revision' %>
        <h4><%=h who(version.updater.login) %></h4>
        edited this <%= time_ago_in_words version.updated_at %> ago.
        <span class="rev-num"><%= version.version %></span>
      </li>
    <% end -%>
    </ul>
  </div>
  
<% end %>

<%= error_messages_for :article %>

<% content_for :form do -%>
  <%= start_form_tag({:action => 'update', :id => @article}, {:id => 'article-form'}) %>
<% end -%>

<% fields_for :article, @version do |f| -%>
<%= render :partial => 'form', :object => f %>
<p class="btns">
  <%= submit_tag 'Apply Changes' %>
  <%= submit_tag 'Save without Revision' %>
  <%= link_to "cancel", :controller => "articles" %></p>
<% end -%><commit_msg>show all versions, limit to 5 per article<commit_after><%= render :partial => "page_nav" %>

<% content_for :sidebar do %>
  <%= render :partial => 'shared_options' %>
  <div class="sgroup">
    <h3><label for="article_filters">Markup options</label></h3>
    <% fields_for :article, @version do |f| -%>
    <ul class="sform">
      <li>
        <select name="article[filters][]" id="article_filters">
          <%= options_for_select(filter_options, (@version.filters || []).first.to_s) %>
        </select>
      </li>
      <li><label><%= f.check_box :parse_macros %>Use macro filters</label></li>
    </ul>
    <% end -%>
  </div>
  
  <div class="sgroup">
    <h3>Revisions<% if params[:version] -%> (<%= link_to 'current', :action => :edit, :id => @article, :version => nil %>)<% end -%></h3>
    <ul id="revisions">
    <% @article.versions.reverse.each do |version| -%>
      <li>
        <%= link_to avatar_for(version.updater), {:action => 'edit', :id => @article, :version => version.version }, :title => 'Edit this revision' %>
        <h4><%=h who(version.updater.login) %></h4>
        edited this <%= time_ago_in_words version.updated_at %> ago.
        <span class="rev-num"><%= version.version %></span>
      </li>
    <% end -%>
    </ul>
  </div>
  
<% end %>

<%= error_messages_for :article %>

<% content_for :form do -%>
  <%= start_form_tag({:action => 'update', :id => @article}, {:id => 'article-form'}) %>
<% end -%>

<% fields_for :article, @version do |f| -%>
<%= render :partial => 'form', :object => f %>
<p class="btns">
  <%= submit_tag 'Apply Changes' %>
  <%= submit_tag 'Save without Revision' %>
  <%= link_to "cancel", :controller => "articles" %></p>
<% end -%>
{'fraction_non_alphanumeric': 0.2298917812225797, 'fraction_numerical': 0.0040947645510383155, 'mean_word_length': 3.379001280409731, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 149, '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': '6796670', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1202, 'n_words': 266}