<commit_before><h1><%= @parent.nil? ? 'Content Tree' : "Content under '#{@parent.title}'" %></h1>

<ul class="choices">

<% if !@parent.nil? -%>
  <li><%= link_to 'New', new_noodall_admin_node_node_path(@parent), :class => 'button', :title =>  "Add content under #{@parent.title}" %></li>
<% else  %>
  <li><%= link_to 'New', new_noodall_admin_node_path, :class => 'button', :title => "Add new" %></li>
<% end -%>

<% if !@parent.nil? and @parent.parent.nil? %>
  <li><%= link_to "Top Level", noodall_admin_nodes_path, :class => "top button" %></li>
<% elsif !@parent.nil?  %>
  <li><%= link_to "Up to #{@parent.parent.title}", noodall_admin_node_nodes_path(@parent.parent), :class => "up button" %></li>
<% end %>


</ul>

<div id="content-table">
 <table border="0" cellspacing="0" cellpadding="0" class="content">
  <thead>
    <tr>
      <th>Title</th>
      <th>Type</th>
      <th colspan="2">Arrange</th>
      <th width="120">Sub Section</th>
      <th>Updated</th>
      <th width="45">Show</th>
      <th width="45">Published</th>
      <th width="45">Delete</th>
    </tr>
  </thead>
  <tbody>
<% @nodes.each do |node| %>
    <tr id="node-<%= node.id %>" class="<%=cycle('odd', 'even')%>">
      <td class="edit"><%= link_to h(node.title), noodall_admin_node_path(node), :class => 'edit', :title => "Edit #{node.title}" %></td>
      <td><%= node.class.name.titleize %></td>
      <td width="25"><%= link_to 'up', move_up_noodall_admin_node_path(node), { :class => "page_up", :title => 'Move this content higher in the navigation' } unless node.first? %></td>
      <td width="30" class="down"><%= link_to 'down', move_down_noodall_admin_node_path(node), { :class => 'page_down', :title => 'Move this content lower in the navigation' } unless node.last? %></td>
      <td class="child">
<% unless node.class.template_classes.blank? -%>
        <%= link_to pluralize(node.children.size, "Child"), noodall_admin_node_nodes_path(node), :title => "View content under #{h(node.title)}", :class => 'child-no' %>
        <%= link_to 'Add', new_noodall_admin_node_node_path(node), :title => "Add content under #{h(node.title)}", :class => 'child' %>
<% end -%>
      </td>
      <td class="date" title="by <%= node.updater.full_name if node.updater %>"><%=h node.updated_at.to_formatted_s(:short_ordinal) %></td>
      <td class=""><%= link_to 'Show', node_path(node), :class => 'show', :title => 'View this content' if node.published? %></td>
      <td class="date" title="<%= node.published? ? 'Published ':'Draft' %><%= node.published_at.to_formatted_s(:short_ordinal) unless node.published_at.nil? %><%= " - #{node.published_to.to_formatted_s(:short_ordinal)}" unless node.published_to.nil? %>"><%= (node.published? ? '<span class="check">Published</span>' : '<span class="draft">Draft</span>').html_safe %></td>
      <td><%= link_to 'Delete', noodall_admin_node_path(node), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this content' %></td>
    </tr>
<% end %>
  </tbody>
  <tfoot>
    <tr>
      <th>Title</th>
      <th>Type</th>
      <th colspan="2">Arrange</th>
      <th width="100"># Sub-Section</th>
      <th>Updated</th>
      <th width="45">Show</th>
      <th width="45">Published</th>
      <th width="45">Delete</th>
    </tr>
  </tfoot>
</table>
</div>
<commit_msg>Logic on buttons to show top level and up a level<commit_after><h1><%= @parent.nil? ? 'Content Tree' : "Content under '#{@parent.title}'" %></h1>

<ul class="choices">

<% if @parent.nil? -%>
  <li><%= link_to 'New', new_noodall_admin_node_path, :class => 'button', :title => "Add new" %></li>
<% else  %>
  <li><%= link_to 'New', new_noodall_admin_node_node_path(@parent), :class => 'button', :title =>  "Add content under #{@parent.title}" %></li>
<% end -%>

<% if !@parent.nil? and !@parent.parent.nil? %>
  <li><%= link_to "Up to #{@parent.parent.title}", noodall_admin_node_nodes_path(@parent.parent), :class => "up button" %></li>
<% end %>

<% if !@parent.nil?  %>
  <li><%= link_to "Top Level", noodall_admin_nodes_path, :class => "top button" %></li>
<% end %>

</ul>

<div id="content-table">
 <table border="0" cellspacing="0" cellpadding="0" class="content">
  <thead>
    <tr>
      <th>Title</th>
      <th>Type</th>
      <th colspan="2">Arrange</th>
      <th width="120">Sub Section</th>
      <th>Updated</th>
      <th width="45">Show</th>
      <th width="45">Published</th>
      <th width="45">Delete</th>
    </tr>
  </thead>
  <tbody>
<% @nodes.each do |node| %>
    <tr id="node-<%= node.id %>" class="<%=cycle('odd', 'even')%>">
      <td class="edit"><%= link_to h(node.title), noodall_admin_node_path(node), :class => 'edit', :title => "Edit #{node.title}" %></td>
      <td><%= node.class.name.titleize %></td>
      <td width="25"><%= link_to 'up', move_up_noodall_admin_node_path(node), { :class => "page_up", :title => 'Move this content higher in the navigation' } unless node.first? %></td>
      <td width="30" class="down"><%= link_to 'down', move_down_noodall_admin_node_path(node), { :class => 'page_down', :title => 'Move this content lower in the navigation' } unless node.last? %></td>
      <td class="child">
<% unless node.class.template_classes.blank? -%>
        <%= link_to pluralize(node.children.size, "Child"), noodall_admin_node_nodes_path(node), :title => "View content under #{h(node.title)}", :class => 'child-no' %>
        <%= link_to 'Add', new_noodall_admin_node_node_path(node), :title => "Add content under #{h(node.title)}", :class => 'child' %>
<% end -%>
      </td>
      <td class="date" title="by <%= node.updater.full_name if node.updater %>"><%=h node.updated_at.to_formatted_s(:short_ordinal) %></td>
      <td class=""><%= link_to 'Show', node_path(node), :class => 'show', :title => 'View this content' if node.published? %></td>
      <td class="date" title="<%= node.published? ? 'Published ':'Draft' %><%= node.published_at.to_formatted_s(:short_ordinal) unless node.published_at.nil? %><%= " - #{node.published_to.to_formatted_s(:short_ordinal)}" unless node.published_to.nil? %>"><%= (node.published? ? '<span class="check">Published</span>' : '<span class="draft">Draft</span>').html_safe %></td>
      <td><%= link_to 'Delete', noodall_admin_node_path(node), :confirm => 'Are you sure?', :method => :delete, :class => 'delete', :title => 'Delete this content' %></td>
    </tr>
<% end %>
  </tbody>
  <tfoot>
    <tr>
      <th>Title</th>
      <th>Type</th>
      <th colspan="2">Arrange</th>
      <th width="100"># Sub-Section</th>
      <th>Updated</th>
      <th width="45">Show</th>
      <th width="45">Published</th>
      <th width="45">Delete</th>
    </tr>
  </tfoot>
</table>
</div>

{'fraction_non_alphanumeric': 0.23355704697986576, 'fraction_numerical': 0.008650260999254289, 'mean_word_length': 4.198449612403101, 'pattern_counts': {'":': 0, '<': 230, '<?xml version=': 0, '>': 274, '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': '2969344', 'n_tokens_mistral': 2587, 'n_tokens_neox': 2456, 'n_words': 523}