- <%= link_to("Add #{@model_name.snake_case.gsub('_', ' ')}", slice_url(:admin_new, :model_name => @model_name.snake_case), :class => "addlink") %>
Filter
<% @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 => '?' + Merb::Parse.params_to_query_string(params)) %> <% end %> <%= @record_count %> <%= @record_count == 1 ? @model_name.snake_case.gsub('_', ' ') : @model_name.snake_case.gsub('_', ' ').pluralize %> <% if @page_count.to_i == 2 %> <%= link_to("Show all", '?' + Merb::Parse.params_to_query_string(params.merge(:all => true)), :class => "showall") %> <% end %>