<commit_before><% if can?(:manage, Publisher) and (controller.action_name == "new" or (controller.action_name == "create" and !@publisher.errors.empty?)) %>

  <div class="page-header">
    <h1>New Publisher
      <% unless params[:query].blank? %>
        <small>with <em><%= params[:query] %></em> in the name</small>
      <% end %>
    </h1>
  </div>

  <div class="search">
    <%= form_tag(new_publisher_path, :method => "get", :class => "form-inline", :role => "form") do %>
      <div class="form-group">
        <%= search_field_tag :query, params[:query], :placeholder => "Search", :class => "form-control" %>
      </div>
      <button type="submit" id="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
      <% unless params[:query].blank? %>
        <%= link_to "clear", publishers_path, :class => "btn" %>
      <% end %><commit_msg>ALM-616 use ajax for search form<commit_after><% if can?(:manage, Publisher) and (controller.action_name == "new" or (controller.action_name == "create" and !@publisher.errors.empty?)) %>

  <div class="page-header">
    <h1>New Publisher
      <% unless params[:query].blank? %>
        <small>with <em><%= params[:query] %></em> in the name</small>
      <% end %>
    </h1>
  </div>

  <div class="search">
    <%= form_tag(new_publisher_path, :method => "get", :class => "form-inline", :role => "form", remote: true) do %>
      <div class="form-group">
        <%= search_field_tag :query, params[:query], :placeholder => "Search", :class => "form-control" %>
      </div>
      <button type="submit" id="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span></button>
      <% unless params[:query].blank? %>
        <%= link_to "clear", publishers_path, :class => "btn" %>
      <% end %>
{'fraction_non_alphanumeric': 0.2117191818684356, 'fraction_numerical': 0.003869541182974019, 'mean_word_length': 3.652956298200514, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 63, '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': '6595740', 'n_tokens_mistral': 625, 'n_tokens_neox': 578, 'n_words': 133}