Sha256: 5704d356a492b17a52b81dbd9d649a30f2aed92305bf31ceb77e0ae7f61cf93f

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

%h1 <%= resource_name.titleize %>s
%table.table.table-striped
  %thead
    %tr
      %th ID
      <%- unless columns.empty? -%>
      %th
        = t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= columns.first.name %>", :default => t("activerecord.labels.<%= columns.first.name %>", :default => "<%= columns.first.name.capitalize %>"))
      <%- end -%>
      %th Created at
      %th Actions
  %tbody
    - @<%= plural_resource_name %>.each do |<%= resource_name %>|
      %tr
        %td= <%= resource_name %>.id
        <%- unless columns.empty? -%>
        %td= link_to <%= resource_name %>.<%= columns.first.name %>, <%= singular_controller_routing_path %>_path(<%= resource_name %>)
        <%- end -%>
        %td= <%= resource_name %>.created_at
        %td
          = link_to "Show", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
          = link_to "Edit", edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-mini'
          = link_to "Destroy", <%= singular_controller_routing_path %>_path(<%= resource_name %>), :method => :delete, :confirm => "#{t("web-app-theme.confirm", :default => "Are you sure?")}", :class => 'btn btn-mini btn-danger' 

= link_to "New", new_<%= singular_controller_routing_path %>_path, :class => 'btn btn-primary'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter-bootstrap-rails-2.0.5 lib/generators/bootstrap/themed/templates/index.html.haml