Sha256: 68f7dab0f82b002b65cc9e2770bf2bd4e5cfdea0d5bceb0fd61e7127a1d65d50

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

#region-<%= plural_table_name %>.container

  .region
    .region-title
      %h1= page_title!('<%= 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

3 entries across 3 versions & 1 rubygems

Version Path
scaffold-bootstrap3-1.0.1 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-1.0.0 lib/generators/haml/scaffold/templates/index.html.haml
scaffold-bootstrap3-0.0.9 lib/generators/haml/scaffold/templates/index.html.haml