Sha256: 148815ae875ec26e48fa984ced7faa3d69b0c584aafdffc466573e00a7043c20

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

- content_for :title, t('.title')

.row
  .span12
    - if @<%= plural_resource_name %>.blank?
      %p.alert.alert-notice= t(".empty")
    - else
      %table.table.table-striped
        %thead
          %tr
            <%- columns.each do |column| -%>
            %th= <%= resource_name.classify %>.human_attribute_name(:<%= column.name %>)
            <%- end -%>
            %th= t('.actions')
        %tbody
          - @<%= plural_resource_name %>.each do |<%= resource_name %>|
            %tr
              <%- columns.each do |column| -%>
              %td= <%= resource_name %>.<%= column.name %>
              <%- end -%>
              %td
                = link_to t('.show'), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
                = link_to t('.edit'), edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini' if can? :update, <%= resource_name %>
                = link_to t('.destroy'), <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => t('.confirm'), :class => 'btn btn-mini btn-danger' if can? :destroy, <%= resource_name %>

    = link_to t('.new'), new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary' if can? :create, <%= model_name %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ouvrages_scaffold-0.1.2 lib/generators/ouvrages/views/templates/index.html.haml
ouvrages_scaffold-0.1.1 lib/generators/ouvrages/views/templates/index.html.haml
ouvrages_scaffold-0.1.0 lib/generators/ouvrages/views/templates/index.html.haml