<%= link_to "<span>+</span> New #{@model.name}".html_safe, polymorphic_url([:admin, @model], :action => "new"), :class => "new_document" %>

<h2><%= @model.name.pluralize %></h2>
<%= will_paginate @items %>
<table>
  <thead>
    <tr>
      <% @list_fields.each do |field| %>
        <th><%= field.humanize %></th>
      <% end %>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @items.each do |item| %>
      <tr<%= ' class="draft"'.html_safe if item.draft rescue nil %>>
        <% @list_fields.each_with_index do |field, index|%>
        <td><%= list_field item, field %> <%= "<em>draft</em>".html_safe if (item.draft? rescue nil) && index == 0 %></td>
        <% end %>
        <%= render :partial => "admin/default/list_actions", :locals => { :item => item } %>
      </tr>
    <% end %>
  </tbody>
</table>
<br />

<% if @model.all.size > 15 %>
  <%= link_to "<span>+</span> New #{@model.name}".html_safe, polymorphic_url([:admin, @model], :action => "new"), :class => "new_document" %>
  <%= will_paginate @items %>
<% end %>
<%= link_to "<span>+</span> New #{@model.name}".html_safe, polymorphic_url([:admin, @model], :action => "new"), :class => "new_document" %>

<h2><%= @model.name.pluralize %></h2>
<%= will_paginate @items %>
<table>
  <thead>
    <tr>
      <% @list_fields.each do |field| %>
        <th><%= field.humanize %></th>
      <% end %>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @items.each do |item| %>
      <tr<%= ' class="draft"'.html_safe if item.draft rescue nil %>>
        <% @list_fields.each_with_index do |field, index|%>
        <td><%= list_field item, field %> <%= "<em>draft</em>".html_safe if (item.draft? rescue nil) && index == 0 %></td>
        <% end %>
        <%= render :partial => find_partial("list_actions"), :locals => { :item => item } %>
      </tr>
    <% end %>
  </tbody>
</table>
<br />

<% if @model.all.size > 15 %>
  <%= link_to "<span>+</span> New #{@model.name}".html_safe, polymorphic_url([:admin, @model], :action => "new"), :class => "new_document" %>
  <%= will_paginate @items %>
<% end %>
Use find_partial for list actions so they can be overridden
Use find_partial for list actions so they can be overridden
