<% if do_checkboxes %> <% end %> <% unless no_actions %><% end %> <% col_titles.each_with_index do |col, i| %> <% end %> <% ar_col.each do |record| %> <% shallow ? path_args = [record] : path_args = [scoped_by, record] %> <% if do_checkboxes %> <% end %> <% unless no_actions %> <% end %> <% cols.each do |col| translate_method = "translate_#{col}".to_sym if polymorphic_as && col.to_s.include?( polymorphic_as.to_s ) col_name = col.to_s.gsub( /#{polymorphic_as}_/, "" ) col_val = record.send( 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( date_format.to_sym ) elsif respond_to?( translate_method ) record_val = send( translate_method, col_val ) #elsif col_val.is_a?( TrueClass ) || col_val.is_a?( NilClass ) # record_val = respond_to?( :translate_boolean ) ? translate_boolean( col_val ) : col_val else record_val = col_val.to_s end %> <% end %> <% end %>
Actions<%= sort_by.include?( cols[i].to_sym ) ? sortable_header( col, cols[i], index_rest_method ) : col %>
<%= link_to 'show', @controller.send( show_rest_method, *path_args ) unless show_rest_method.nil? %> <%= link_to 'edit', @controller.send( edit_rest_method, *path_args ) unless edit_rest_method.nil? %> <%= link_to( 'del', @controller.send( delete_rest_method, *path_args ), :method => :delete, :confirm => del_confirmation ) unless delete_rest_method.nil? %> <%= no_actions ? link_to( record_val, @controller.send( show_rest_method, *path_args ) ) : record_val %>
<% if do_paginate %>

<%= will_paginate( ar_col ) %>

<%= page_entries_info( ar_col ) %>

<% end %>