<commit_before><h1>
<% if @list_all %>
Listing all cages
<% else %>
Listing current cages
<% end %>
</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Bats</th>
    <th>Food</th>
    <th>Owner</th>
    <th>Fed by</th>
    <th>Created</th>
    <% if @list_all %>
      <th>Destroyed</th>
    <% end %>
  </tr>
  
<% for cage in @cages %>
  <tr>
    <td>
      <b><%= link_to cage.name, :action => 'show', :id => cage %></b>
    </td>
	<td><%=h cage.bats.count %></td>
    <td><%=h cage.food %>g</td>
    <td><%=h cage.user ? cage.user.name : "NP" %></td>
    <td><%=h cage.fed_by %></td>
	<td><%=h nice_date(cage.date_created) %></td>
  <% if @list_all %>
  <td><%=h nice_date(cage.date_destroyed) %></td>
<% end %>
    <td><%= link_to 'Edit', :action => 'edit', :id => cage %></td>
    <td>
	
	<% if cage.date_destroyed == nil %>
	<%= link_to 'Deactivate', { :action => 'deactivate', :id => cage }, :confirm => 'Are you sure?', :post => true %>
	<% else %>
	<%=  link_to 'Reactivate', { :action => 'reactivate', :id => cage }, :confirm => 'Are you sure?', :post => true %>
    <% end %>
	</td>
  </tr>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @cage_pages.current.previous } if @cage_pages.current.previous %>
<%= link_to 'Next page', { :page => @cage_pages.current.next } if @cage_pages.current.next %> 

<br />

<%= link_to 'New Cage', :action => 'new' %>
<% if @list_all %>
<%= link_to 'List Current Cages', :action => 'list' %>
<% else %>
<%= link_to 'List All Cages', :action => 'list_all' %>
<% end %>
<commit_msg>implemented partials for cage list<commit_after><h1>
<% if @list_all %>
Listing all cages
<% else %>
Listing current cages
<% end %>
</h1>

<%= render_partial 'cages/cage_list', @cages %>

<%= link_to 'Previous page', { :page => @cage_pages.current.previous } if @cage_pages.current.previous %>
<%= link_to 'Next page', { :page => @cage_pages.current.next } if @cage_pages.current.next %> 

<br />

<%= link_to 'New Cage', :action => 'new' %>
<% if @list_all %>
<%= link_to 'List Current Cages', :action => 'list' %>
<% else %>
<%= link_to 'List All Cages', :action => 'list_all' %>
<% end %>
{'fraction_non_alphanumeric': 0.2444757874941232, 'fraction_numerical': 0.0018805829807240243, 'mean_word_length': 3.556745182012848, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 113, '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': '394077', 'n_tokens_mistral': 929, 'n_tokens_neox': 840, 'n_words': 197}