Sha256: f081a5860ba0f27b92a6103dbe71326cb484fe65ab635f78dcf4fc70604f388d

Contents?: true

Size: 927 Bytes

Versions: 10

Compression:

Stored size: 927 Bytes

Contents

- add_title '<%= plural_table_name.titleize %>'

%table.table.table-bordered
  %thead
    %tr
<% attributes.reject(&:password_digest?).each do |attribute| -%>
      %th <%= attribute.human_name %>
<% end -%>
      %th{colspan: '3'}
  %tbody
    - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
      %tr
<% attributes.reject(&:password_digest?).each do |attribute| -%>
        %td= <%= singular_table_name %>.<%= attribute.name %>
<% end -%>
        %td= link_to :show.l, <%= singular_table_name %>, class: 'btn btn-success'
        %td= link_to :edit.l, edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-info'
        %td= link_to :destroy.l, <%= singular_table_name %>, method: :delete, data: { confirm: :are_you_sure.l }, class: 'btn btn-danger'

%p
  = link_to :new.l(name: '<%= singular_table_name.titleize %>'), new_<%= singular_table_name %>_path, class: 'btn btn-primary'

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bootstrap_leather-0.10.14 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.13 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.11 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.10 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.9 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.8 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.7 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.6 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.5 lib/templates/haml/scaffold/index.html.haml
bootstrap_leather-0.10.4 lib/templates/haml/scaffold/index.html.haml