Sha256: 7b48ec0824f9ed34e3c4f9890dd0fb2cd383529527620bc3e987b2a3a086786d

Contents?: true

Size: 1019 Bytes

Versions: 2

Compression:

Stored size: 1019 Bytes

Contents

.page-header
  = link_to new_<%= singular_table_name %>_path, class: 'btn btn-primary' do
    %span.glyphicon.glyphicon-plus
    = t( '.new' )
  %h1= t( '.title' )

.table-responsive
  %table.table.table-striped.table-bordered.table-hover
    %thead
      %tr
<% for attribute in attributes -%>
        %th= <%= "t( '." + attribute.name + "')" %>
<% end -%>
        %th
        %th
        %th

    %tbody
      - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
        %tr
<% for attribute in attributes -%>
  <% if attribute.type == :references %>
          %td= <%= singular_table_name %>.<%= attribute.name %>.name
  <% else %>
          %td= <%= singular_table_name %>.<%= attribute.name %>
  <% end %>
<% end -%>
          %td= link_to t( '.show' ), <%= singular_table_name %>
          %td= link_to t( '.edit' ), edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
          %td= link_to t( '.delete' ), <%= singular_table_name %>, data: { confirm: t( '.confirm' ) }, method: :delete

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
toronto-0.0.2 lib/generators/toronto/install/templates/lib/templates/haml/scaffold/index.html.haml
toronto-0.0.1 lib/generators/toronto/install/templates/lib/templates/haml/scaffold/index.html.haml