- <%= link_to("Add #{@model_name.snake_case.gsub('_', ' ')}", slice_url(:admin_new, :model_name => @model_name.snake_case), :class => "addlink") %>
Filter
<% params = request.params.except(:action, :controller, :model_name) %> <% @properties.each do |property| %> <% if property.primitive.to_s == "TrueClass" %>By <%= property.field.gsub('_', ' ') %>
<% elsif property.primitive.to_s == "Integer" && property.type.respond_to?(:flag_map) %>By <%= property.field.gsub('_', ' ') %>
- > All <% property.type.flag_map.each do |value, name| %>
- > <%= name.to_s.capitalize.gsub('_', ' ')%> <% end %>
<% if @page_count.to_i > 1 %> <%= paginate(@current_page, @page_count, :url => slice_url(:admin_list, :model_name => @model_name.snake_case)) %> <% end %> <%= @model.count %> <%= @model.count == 1 ? @model_name.snake_case.gsub('_', ' ') : @model_name.snake_case.gsub('_', ' ').pluralize %> <% if @page_count.to_i == 2 %> <%= link_to("Show all", slice_url(:admin_list, :model_name => @model_name.snake_case, :all => true), :class => "showall") %> <% end %>