- <%= link_to("Add #{@abstract_model.pretty_name.downcase}", url(:admin_new, :model_name => @abstract_model.singular_name), :class => "addlink") %>
<%= pretty_name %> | <% end %>
---|
<% case type %> <% when :boolean %> <% if object.send(name) == true %> "/> <% else %> "/> <% end %> <% when :date_time %> <% value = object.send(name) %> <%= value.respond_to?(:strftime) ? value.strftime("%b. %d, %Y, %I:%M%p") : nil %> <% when :date %> <% value = object.send(name) %> <%= value.respond_to?(:strftime) ? value.strftime("%b. %d, %Y") : nil %> <% when :time %> <% value = object.send(name) %> <%= value.respond_to?(:strftime) ? value.strftime("%I:%M%p") : nil %> <% when :string %> <%= object.send(name).to_s.truncate(50) %> <% when :text %> <%= object.send(name).to_s.truncate(50) %> <% else %> <%= object.send(name) %> <% end %> | <% 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 %>