<% if options[:checkboxes] %> <% end %> <% unless options[:actions].empty? %><% end %> <% options[:col_titles].each_with_index do |col, i| %> <% end %> <% ar_col.each do |record| %> <% record_array = Array.new << record %> <% if options[:checkboxes] %> <% end %> <% unless options[:actions].empty? %> <% end %> <% options[:cols].each do |col| translate_method = "translate_#{col}".to_sym if options[:polymorphic_as] && col.to_s.include?( options[:polymorphic_as].to_s ) col_name = col.to_s.gsub( /#{options[:polymorphic_as]}_/, "" ) col_val = record.send( options[:polymorphic_as].to_sym ).send( col_name.to_sym ) else col_val = record.send( col.to_sym ) end if col_val.is_a?( Time ) record_val = col_val.to_formatted_s( options[:date_format].to_sym ) elsif respond_to?( translate_method ) record_val = send( translate_method, col_val ) else record_val = col_val.to_s end %> <% end %> <% end %>
Actions<%= sort_by.include?( options[:cols][i].to_sym ) ? sortable_header( col, options[:cols][i], path_helpers[:index_rest_helper], path_helpers[:index_rest_args] ) : col %>
<%= link_to 'show', @controller.send( path_helpers[:show_rest_helper], *(path_helpers[:show_rest_args] + record_array) ) if options[:actions].include?( :show ) %> <%= link_to 'edit', @controller.send( path_helpers[:edit_rest_helper], *(path_helpers[:edit_rest_args] + record_array) ) if options[:actions].include?( :edit ) %> <%= link_to( 'del', @controller.send( path_helpers[:delete_rest_helper], *(path_helpers[:edit_rest_args] + record_array) ), :method => :delete, :confirm => options[:del_confirmation] ) if options[:actions].include?( :edit ) %> <% cell_args = path_helpers[:show_rest_args] + record_array %> <% if options[:actions].empty? && options[:clickable] == true %> <%= link_to( record_val, @controller.send( path_helpers[:show_rest_helper], *cell_args ) ) %> <% else %> <%= link_to( record_val, "javascript:void(0)" ) %> <% end %>
<% if do_paginate %>

<%= will_paginate( ar_col ) %>

<%= page_entries_info( ar_col ) %>

<% end %>