Sha256: 8b2d2c774bd4ca0f2f40e26f1c13c35fde1db49d09859da6628d1897e40619cc

Contents?: true

Size: 1.08 KB

Versions: 6

Compression:

Stored size: 1.08 KB

Contents

#region-<%= plural_table_name %>.container

  .region
    .region-title
      %h1= page_title!('Listando <%= plural_table_name %>')

    .region
      - if current_admin
        .admin-control
          = link_to 'Crear <%= human_name %>', new_<%= singular_table_name %>_path, class: 'btn btn-primary'

      .table-responsive
        %table.table
          %tr
<% for attribute in attributes -%>
            %th <%= attribute.human_name %>
<% end -%>
            %th
            %th
            %th

          - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
            %tr
<% for attribute in attributes -%>
              %td= <%= singular_table_name %>.<%= attribute.name %>
<% end -%>
              %td= link_to 'Ver', <%= singular_table_name %>, class: 'btn btn-info'
              - if current_admin
                %td= link_to 'Editar', edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'btn btn-success'
                %td= link_to 'Eliminar', <%= singular_table_name %>, :method => :delete, :data => { :confirm => '¿Estás Seguro?' }, class: 'btn btn-danger'

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scaffold-bootstrap3-0.0.8 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-0.0.6 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-0.0.5 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-0.0.4 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-0.0.2 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-0.0.1 lib/generators/haml/scaffold/templates/index.html.haml