<% content_for :last_crumbs do %> <%= admin_list_name(@model_info) %> <% end %> <% content_for :page_header do %>

<%= admin_list_name(@model_info) %>

<% end %> <% content_for :nav_buttons do %><% new_uri = admin_new_uri(@model_info) if new_uri concat link_to admin_add_name(@model_info) + '+', new_uri, :class => 'btn-flat success new-product' end %><% end %> <% content_for :content do %> <% if @sortable_service.can_reset? %> Reset sorting <% end %> <% @list_fields.each_with_index do |name, index| list_field_name = field_name(name) %> <% end %> <% has_position = @sortable_service.has_position? %> <% @items.each_with_index do |item| %> id='<%= item.position %>'<% end %> data-id='<%= item.id %>'> <% @list_fields.each do |name| %> <% end %> <% end %>
<% unless index == 0 %> <% end %> <%= field_to_label(name) + @sortable_service.sorting_sign(list_field_name) %> Management
<% value = field_value(name, item) # todo remove hard code, extract helper (data adapter) if value.respond_to? :id concat link_to value.to_s, admin_edit_uri(value) else concat value end %>
  • <%= link_to 'Edit', admin_edit_uri(item) %>
  • <%= button_to 'Destroy', admin_delete_uri(item), { :method => :delete, :form => {:class => 'delete-item-form'} } %>
<%= render 'rademade_admin/_blocks/pagination' %> <% end %> <%= render :template => 'rademade_admin/_layouts/inner' %>