summaryrefslogtreecommitdiff
path: root/lib/generators/nifty/scaffold/templates/views/haml/_index_core.html.haml
blob: 46543b4a04f22812e2300993e02535b331b52fb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
%table{:class => 'table table-striped'}
  %tr
    <%- for attribute in model_attributes -%>
    %th= t('<%= plural_name %>.index.<%= attribute.name %>')
    <%- end -%>

  - reset_cycle
  - for <%= instance_name %> in <%= instances_name %>
    %tr{:class => cycle('odd', 'even')}
      <%- for attribute in model_attributes -%>
      %td= <%= instance_name %>.<%= attribute.name %>
      <%- end -%>
      =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => <%= instance_name %>}