- <%= link_to("Add #{@abstract_model.pretty_name.downcase}", url(:merb_admin_new, :model_name => @abstract_model.singular_name), :class => "addlink") %>
Filter
<% @properties.each do |property| %> <% property_type = property[:type] %> <% property_name = property[:name] %> <% property_pretty_name = property[:pretty_name] %> <% if property_type == :boolean %>By <%= property_pretty_name %>
- "> <%= link_to("All", "?" + Merb::Parse.params_to_query_string(params.merge(:filter => (filter || {}).reject{|key, value| key.to_sym == property_name}))) %>
- "> <%= link_to("Yes", "?" + Merb::Parse.params_to_query_string(params.merge(:filter => (filter || {}).merge({property_name => "true"})))) %>
- "> <%= link_to("No", "?" + Merb::Parse.params_to_query_string(params.merge(:filter => (filter || {}).merge({property_name => "false"})))) %>
"> <%= link_to(property_pretty_name, "?" + Merb::Parse.params_to_query_string(params.merge(:sort => property_name).reject{|key, value| key.to_sym == :sort_reverse}.merge(sort == property_name.to_s && sort_reverse != "true" ? {:sort_reverse => "true"} : {}))) %> | <% end %>
---|
<%= link_to(object_property(object, property), url(:merb_admin_edit, :model_name => @abstract_model.singular_name, :id => object.id)) %> | <% 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 ? @abstract_model.pretty_name.downcase : @abstract_model.pretty_name.downcase.pluralize %> <% if @page_count.to_i == 2 %> <%= link_to("Show all", "?" + Merb::Parse.params_to_query_string(params.merge(:all => true)), :class => "showall") %> <% end %>