Sha256: 6901cd51bce3eef259999f49d76733f2fe3e8b9660a63e98e289e3937c5431a2

Contents?: true

Size: 1.65 KB

Versions: 3

Compression:

Stored size: 1.65 KB

Contents

<% @title = resource.human %>
<h1><%= @title %></h1>
<%= will_paginate records, :url => resource.collection_path(:page => '') %>
<% if records.present? %>
  <table class="list_table">
    <thead>
      <tr>
      <% index_fields.each do |field| -%>
        <th><%= render_head field %></th>
      <% end -%>
        <th class="actions">Actions</th>
      </tr>
    </thead>
    <tbody>
    <% records.each do |record| -%>
      <tr>
      <% index_fields.each do |field| -%>
        <td><%= render_field field, record %></td>
      <% end -%>
        <td class="actions">
          <%= link_to 'show', resource.member_path(record), :class => 'show_entry' if show_fields.present? || resource.children.present? %>
          <%= link_to 'edit', resource.edit_path(record), :class => 'edit_entry' if update_fields.present? %>
          <%= link_to 'destroy', resource.member_path(record), :confirm => "Are you sure?", :method => :delete, :class => 'remove_entry' if configuration.destroy %>
        </td>
      </tr>
    <% end -%>
    </tbody>
  </table>
<% else %>
  <p>Sorry, but there is no records in <%= resource.human %></p>
<% end %>
<%= will_paginate records, :url => resource.collection_path(:page => '') %>

<% if false %>
<% content_for :additional_navigation do %>
  <ul class="buttons">
    <% resource.ancestors.each do |resource| %>
      <%= link_to resource.plural? ? resource.human : resource.member.to_title, resource.collection_path %>
      <%= link_to resource.member.to_title, resource.member_path unless resource.plural? %>
    <% end %>
    <%= link_to resource.plural? ? resource.human : resource.member.to_title, resource.collection_path %>
  </ul>
<% end %>
<% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
puffer-0.0.10 app/views/puffer/index.html.erb
puffer-0.0.9 app/views/puffer/index.html.erb
puffer-0.0.8 app/views/puffer/index.html.erb