<%if pagination?%> <%%= paginate @<%= plural_table_name %>, :remote => remote %> <%end%> <%%= page_entries_info @<%= plural_table_name %>, t('models.<%= singular_table_name %>'), t('models.<%= plural_table_name %>') %> <%% if @<%= plural_table_name %>.any? -%> <%%= form_for :select, :url => select_<%= plural_table_name %>_path, :remote => false, :html => { :method => :post, :id => "form_select" } do |f| %> <%- attributes.each do |attribute| -%> <%- attr_name = case attribute.type when :references, :belongs_to then "#{attribute.name}_id" else attribute.name end -%> <%- end -%> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| -%> "> <%%= render 'row_index', :<%= singular_table_name %> => <%= singular_table_name %>, :remote => remote, :message => "" %> <%% end -%>
<%%= check_box_tag nil, nil, false, :class => "selector" %> <%%= sortable :id, '#', remote<%= ", '#{underscore_resource_path(:parent_singular_resource_plural)}_path', '#{formatted_parent_resources("@")}'" if nested? %> %> <%%= sortable :<%= attr_name %>, t('attributes.<%= singular_table_name %>.<%= attribute.name %>'), remote<%= ", '#{underscore_resource_path(:parent_singular_resource_plural)}_path', '#{formatted_parent_resources("@")}'" if nested? %> %>
<%- if authorization? -%> <%%- if can? :destroy, <%= class_name %> -%> <%- end -%> <%%= f.submit t(:destroy).upcase, <%= key_value :confirm, "t(:sure?)" %>, :class=>'button small' %> <%- if authorization? -%> <%%- end -%> <%- end -%> <%- if authorization? -%> <%%- if can? :update, <%= class_name %> -%> <%- end -%> <%%= f.submit t(:edit).upcase, {:class=>'button small'} %> <%- if authorization? -%> <%%- end -%> <%- end -%> <%- if authorization? -%> <%%- if can? :create, <%= class_name %> -%> <%- end -%> <%%= f.submit t(:copy).upcase, {:class=>'button small'} %> <%- if authorization? -%> <%%- end -%> <%- end -%>
<%% end -%>
<%% end -%> <%- if pagination? -%> <%%= paginate @<%= plural_table_name %>, :remote => remote %> <%- end -%>