Sha256: d3f52c61e436caac07d5bcb61fa4f740e3bffa5f6a778b6fa1b6e8bbd75b350e

Contents?: true

Size: 752 Bytes

Versions: 6

Compression:

Stored size: 752 Bytes

Contents

= cardboard_filters <%= singular_table_name.classify %>, :<%= fields.reject{|k| k[/(_at|^id)$/]}.first %>

table class="table table-striped"
  tr
    <% for field in fields %>th= sort_link @q, :<%= field %>
    <% end %>
    th Actions

  - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
    tr
      <% for field in fields %>td = <% if field[/_at$/] %>l <% end %><%= singular_table_name %>.<%= field %>
      <% end %>
      td
        = link_to 'Edit', edit_cardboard_<%= singular_table_name %>_path(<%= singular_table_name %>)
        = " | "
        = link_to 'Delete', cardboard_<%= singular_table_name %>_path(<%= singular_table_name %>), data: { confirm: 'Are you sure?'}, :method => :delete

= paginate @<%= plural_table_name %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cardboard_cms-0.3.1 lib/generators/cardboard/resource/templates/slim/index.html.slim
cardboard_cms-0.2.2 lib/generators/cardboard/resource/templates/slim/index.html.slim
cardboard_cms-0.2.1 lib/generators/cardboard/resource/templates/slim/index.html.slim
cardboard_cms-0.1.8 lib/generators/cardboard/resource/templates/slim/index.html.slim
cardboard_cms-0.1.6 lib/generators/cardboard/resource/templates/slim/index.html.slim
cardboard_cms-0.1.4 lib/generators/cardboard/resource/templates/slim/index.html.slim