<commit_before><%= error_messages_for 'article' %>

<% if @article.archived? %>
  <%= render :partial => 'archived_warning', :locals => {:article => @article} %>
<% end %>
<div class='<%= if @article.display_media_panel? then 'col-lg-8 col-md-6 col-sm-6 with_media_panel' else 'col-lg-12 col-md-12 col-sm-12 no_media_panel' end %>'>
<%= labelled_form_for 'article', :html => { :multipart => true, :class => "#{@type} #{@type.to_css_class}" } do |f| %>

  <%= hidden_field_tag("type", @type) if @type %>

  <%= hidden_field_tag('back_to', @back_to) %>

  <%= hidden_field_tag('success_back_to', @success_back_to) %>

  <%= render_partial_for_class @article.class, f: f %>

  <% if environment.is_portal_community?(profile) %>
    <div>
      <%= check_box(:article, :highlighted) %>
      <label for="article_highlighted"><%= _('Highlight this article')%></label>
    </div>
  <% end %>

  <% button_bar do %>
    <%= submit_button :save, s_('cms|Publish') %>
    <%= submit_button :save, s_('cms|Save and continue editing'), name: 'continue' %>
  <% end %>

  <div style='float: right'>
    <%= modal_button :help, _('Why categorize?'), :action => 'why_categorize' %>
  </div>

  <%= select_categories(:article, _('Categorize your article')) %>

  <br />

  <%= f.text_field('tag_list', :size => 64) %>
  <%= content_tag( 'small', _('Separate tags with commas') ) %>

  <script>
    jQuery('#article_tag_list').inputosaurus({
      autoCompleteSource: <%= "'/myprofile/#{profile.identifier}/cms/search_tags'," %>
      activateFinalResult : true
    })
  </script>

  <div id='edit-article-options'>
    <%= options_for_article(@article, @tokenized_children) %>
  </div>

  <% button_bar do %>
    <%= submit_button :save, _('Save') %>

    <% if @back_to %>
      <%= button :cancel, _('Cancel'), @back_to %>
    <% elsif @parent_id || @article.parent %>
      <%= button :cancel, _('Cancel'), :action => 'view', :id => @parent_id || @article.parent %>
    <% else %>
      <%= button :cancel, _('Cancel'), :action => 'index' %>
    <% end %>

    <% unless @article.new_record? %>
      <%= button :delete, _('Delete'), {:controller => :cms, :action => :destroy, :id => @article},<commit_msg>cms/edit: format tag list properly for inputosaurus<commit_after><%= error_messages_for 'article' %>

<% if @article.archived? %>
  <%= render :partial => 'archived_warning', :locals => {:article => @article} %>
<% end %>
<div class='<%= if @article.display_media_panel? then 'col-lg-8 col-md-6 col-sm-6 with_media_panel' else 'col-lg-12 col-md-12 col-sm-12 no_media_panel' end %>'>
<%= labelled_form_for 'article', :html => { :multipart => true, :class => "#{@type} #{@type.to_css_class}" } do |f| %>

  <%= hidden_field_tag("type", @type) if @type %>

  <%= hidden_field_tag('back_to', @back_to) %>

  <%= hidden_field_tag('success_back_to', @success_back_to) %>

  <%= render_partial_for_class @article.class, f: f %>

  <% if environment.is_portal_community?(profile) %>
    <div>
      <%= check_box(:article, :highlighted) %>
      <label for="article_highlighted"><%= _('Highlight this article')%></label>
    </div>
  <% end %>

  <% button_bar do %>
    <%= submit_button :save, s_('cms|Publish') %>
    <%= submit_button :save, s_('cms|Save and continue editing'), name: 'continue' %>
  <% end %>

  <div style='float: right'>
    <%= modal_button :help, _('Why categorize?'), :action => 'why_categorize' %>
  </div>

  <%= select_categories(:article, _('Categorize your article')) %>

  <br />

  <%= f.text_field 'tag_list', size: 64, value: @article.tag_list.join(',') %>
  <%= content_tag( 'small', _('Separate tags with commas') ) %>

  <script>
    jQuery('#article_tag_list').inputosaurus({
      autoCompleteSource: <%= "'/myprofile/#{profile.identifier}/cms/search_tags'," %>
      activateFinalResult : true
    })
  </script>

  <div id='edit-article-options'>
    <%= options_for_article(@article, @tokenized_children) %>
  </div>

  <% button_bar do %>
    <%= submit_button :save, _('Save') %>

    <% if @back_to %>
      <%= button :cancel, _('Cancel'), @back_to %>
    <% elsif @parent_id || @article.parent %>
      <%= button :cancel, _('Cancel'), :action => 'view', :id => @parent_id || @article.parent %>
    <% else %>
      <%= button :cancel, _('Cancel'), :action => 'index' %>
    <% end %>

    <% unless @article.new_record? %>
      <%= button :delete, _('Delete'), {:controller => :cms, :action => :destroy, :id => @article},
{'fraction_non_alphanumeric': 0.21668909825033647, 'fraction_numerical': 0.00493494840735756, 'mean_word_length': 4.090182648401827, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 122, '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': '3714634', 'n_tokens_mistral': 1721, 'n_tokens_neox': 1527, 'n_words': 310}