Sha256: 41a881e320c0b761c96dc7566641e3387d5552bd9144b83f283d37fdae196048

Contents?: true

Size: 1.39 KB

Versions: 11

Compression:

Stored size: 1.39 KB

Contents

<%%- model_class = <%= model_class %> -%>
<h1><%%= model_class.model_name.human.pluralize %></h1>

<table class="striped">
  <thead class="thead-black">
    <tr>
      <th><%%= model_class.human_attribute_name(:id) %></th>
      <%- columns.each do |column| -%>
      <th><%%= model_class.human_attribute_name(:<%= column.name %>) %></th>
      <%- end -%>
      <th><%%= model_class.human_attribute_name(:created_at) %></th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    <%% @<%= plural_resource_name %>.each do |<%= resource_name %>| %>
      <tr>
        <td><%%= link_to <%= resource_name %>.id, <%= singular_controller_routing_path %>_path(<%= resource_name %>) %></td>
        <%- columns.each do |column| -%>
        <td><%%= <%= resource_name %>.<%= column.name %> %></td>
        <%- end -%>
        <td><%%=l <%= resource_name %>.created_at %></td>
        <td>
          <%%= link_to 'Edit', edit_<%= singular_controller_routing_path %>_path(<%= resource_name %>), :class => 'btn btn-small' %>
          <%%= link_to 'Destroy', <%= singular_controller_routing_path %>_path(<%= resource_name %>),
                      :method => :delete,
                      :data => { :confirm => 'Are you sure?' },
                      :class => 'btn btn-small' %>
        </td>
      </tr>
    <%% end %>
  </tbody>
</table>

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kube-rails-0.4.0 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.3.1 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.3.0 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.2.0 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.10 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.9 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.8 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.7 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.6 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.5 lib/generators/kube/themed/templates/index.html.erb
kube-rails-0.0.4 lib/generators/kube/themed/templates/index.html.erb