<commit_before><%= render :partial => 'shared/pagedown' %>

<%= semantic_form_for [:admin, @quick_answer] do |f| %>
  <%= f.inputs "Quick Answer Details" do %>
    <% if params[:action] == 'new' %>
     <%= f.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %>
    <% end %>
    
    <% if current_user.is_admin? || current_user.is_editor? %>
     <%= f.input :status,  :as => :select, :collection => ["Draft", "Pending Review", "Published"], :include_blank => false %>
    <% else %>
     <%= f.input :status,  :as => :select, :collection => ["Draft", "Pending Review"], :include_blank => false %>
    <% end %>

    <%=f.input :title %>
    <%=f.input :preview, :input_html => { :rows => 4 } %>
    <%=f.input :category %>
    <%=f.input :contact, :label => "Contact / More Info" %>
    <%=f.input :tags, :as => :string %>
    <%=f.input :author_link %>
    <%=f.input :author_pic %>
    <%=f.input :author_name %>
    <%=f.input :render_markdown, :as => :radio, :collection => [["Markdown", true], ["HTML", false]] %>
    <div class="wmd-panel">
      <div id="wmd-button-bar-content_main" class="wmd-button-bar"></div>
      <%= f.input :content_main, :label => "Content", :input_html => {
          :class => 'wmd-input', :id => 'wmd-input-content_main'} %>
      <div id="wmd-preview-content_main" class="wmd-preview article"></div>
    </div>
    <div class="clear"></div>

    <div class="wmd-panel">
      <div id="wmd-button-bar-content_main_extra" class="wmd-button-bar"></div>
      <%= f.input :content_main_extra, :input_html => {
        :class => 'wmd-input', :id => 'wmd-input-content_main_extra'}  %>
      <div id="wmd-preview-content_main_extra" class="wmd-preview article"></div>
    </div>

    <div class="clear"></div>
    <div class="wmd-panel">
      <div id="wmd-button-bar-content_need_to_know" class="wmd-button-bar"></div>
      <%= f.input :content_need_to_know, :input_html => {
        :class => 'wmd-input', :id => 'wmd-input-content_need_to_know'} %>
      <div id="wmd-preview-content_need_to_know" class="wmd-preview article"></div>
    </div>
  <%end%>

  <% if current_user.is_admin? || current_user.is_editor? %>
    <%= f.commit_button "Save" %>
    <%= f.commit_button "Ask Writer to Revise" %>
    <%= f.commit_button "Publish" %>
  <% else %>
    <%= f.commit_button "Save Draft" %>
    <%= f.commit_button "Ready to Review" %>
  <% end %>

<% end %><commit_msg>test quick answer editing changes based on status<commit_after><%= render :partial => 'shared/pagedown' %>

<%= semantic_form_for [:admin, @quick_answer] do |f| %>
  <%= f.inputs "Quick Answer Details" do %>
    <% if params[:action] == 'new' %>
     <%= f.input :user_id, :as => :hidden, :input_html => { :value => current_user.id } %>
    <% end %>
    
    <% if current_user.is_admin? || current_user.is_editor? %>
     <%= f.input :status,  :as => :select, :collection => ["Draft", "Pending Review", "Published"], :include_blank => false %>
    <% else %>
     <%= f.input :status,  :as => :select, :collection => ["Draft", "Pending Review"], :include_blank => false %>
    <% end %>

    <%=f.input :title %>
    <%=f.input :preview, :input_html => { :rows => 4 } %>
    <%=f.input :category %>
    <%=f.input :contact, :label => "Contact / More Info" %>
    <%=f.input :tags, :as => :string %>
    <%=f.input :author_link %>
    <%=f.input :author_pic %>
    <%=f.input :author_name %>
    <%=f.input :render_markdown, :as => :radio, :collection => [["Markdown", true], ["HTML", false]] %>
    <div class="wmd-panel">
      <div id="wmd-button-bar-content_main" class="wmd-button-bar"></div>
      <%= f.input :content_main, :label => "Content", :input_html => {
          :class => 'wmd-input', :id => 'wmd-input-content_main'} %>
      <div id="wmd-preview-content_main" class="wmd-preview article"></div>
    </div>
    <div class="clear"></div>

    <div class="wmd-panel">
      <div id="wmd-button-bar-content_main_extra" class="wmd-button-bar"></div>
      <%= f.input :content_main_extra, :input_html => {
        :class => 'wmd-input', :id => 'wmd-input-content_main_extra'}  %>
      <div id="wmd-preview-content_main_extra" class="wmd-preview article"></div>
    </div>

    <div class="clear"></div>
    <div class="wmd-panel">
      <div id="wmd-button-bar-content_need_to_know" class="wmd-button-bar"></div>
      <%= f.input :content_need_to_know, :input_html => {
        :class => 'wmd-input', :id => 'wmd-input-content_need_to_know'} %>
      <div id="wmd-preview-content_need_to_know" class="wmd-preview article"></div>
    </div>
  <%end%>

  <% if current_user.is_admin? || current_user.is_editor? %>
    <%= f.commit_button "Save" %>
    <%= f.commit_button "Ask Writer to Revise" %>
    <% if :status != "Draft"  %>
      <%= f.commit_button "Publish" %>
    <% end %>
  <% else %>
    <%= f.commit_button "Save Draft" %>
    <%= f.commit_button "Ready to Review" %>
  <% end %>

<% end %>
{'fraction_non_alphanumeric': 0.21986674742580253, 'fraction_numerical': 0.0004037956793862306, 'mean_word_length': 3.3380035026269703, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 0, '>': 167, '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': '1205161', 'n_tokens_mistral': 1915, 'n_tokens_neox': 1768, 'n_words': 341}