<commit_before><% content_for :sidebar do %>
  <%= build_sidebar %>
<% end %>

<h2>
  <%= _("Edit {{resources}}", :resources => @resource.model_name.human.pluralize) %>
  <small><%= remove_filter_link %></small>
</h2>

<% if (build_filters || search) && !@resource.count.zero? %>
  <div class="filters">
    <%= build_filters %>
    <%= search %>
  </div>
<% end %>

<%= typus_block %>

<% unless @items.count.zero? -%>
  <%= raw build_list(@resource, @fields, @items) %>
  <%= pagination %>
<% else %>
  <% if @resource.count.zero? %>
    <p><%= _("There are no {{records}}.", :records => @resource.model_name.human.pluralize.downcase) %> <%= link_to _("Create one now."), :action => "new" %></p>
  <% else %>
    <p><%= _("There are no {{records}} under this filter.", :records => @resource.model_name.human.pluralize.downcase) %></p>
  <% end %>
<% end %><commit_msg>Show link to Create one now only if user has permission.<commit_after><% content_for :sidebar do %>
  <%= build_sidebar %>
<% end %>

<h2>
  <%= _("Edit {{resources}}", :resources => @resource.model_name.human.pluralize) %>
  <small><%= remove_filter_link %></small>
</h2>

<% if (build_filters || search) && !@resource.count.zero? %>
  <div class="filters">
    <%= build_filters %>
    <%= search %>
  </div>
<% end %>

<%= typus_block %>

<% unless @items.count.zero? -%>
  <%= raw build_list(@resource, @fields, @items) %>
  <%= pagination %>
<% else %>
  <% if @resource.count.zero? %>
    <p>
      <%= _("There are no {{records}}.", :records => @resource.model_name.human.pluralize.downcase) %>
      <%= link_to _("Create one now."), { :action => "new" } if @current_user.can?('create', @resource) %>
    </p>
  <% else %>
    <p><%= _("There are no {{records}} under this filter.", :records => @resource.model_name.human.pluralize.downcase) %></p>
  <% end %>
<% end %>
{'fraction_non_alphanumeric': 0.24134199134199133, 'fraction_numerical': 0.0021645021645021645, 'mean_word_length': 3.9175531914893615, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 73, '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': '7646221', 'n_tokens_mistral': 728, 'n_tokens_neox': 652, 'n_words': 141}