Sha256: fa5dba0626835c983e848b5ec936f1560cb87be70a819bc5e1aeb94567e6f2fa

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

<% @title = resource.human %>
<h1><%= @title %></h1>


<% if records.present? %>
  <div class="paginator"></div>

  <%= render :layout => 'grid' do |record| %>
    <%= link_to 'show', resource.member_path(record), :data => {'new-dialog-uri' => resource.member_path(record)} if configuration.show %>
    <%= link_to 'edit', resource.edit_path(record) if update_fields.present? %>
    <% _members.each do |member| %>
      <%= link_to member.label, resource.member_path(record, :action => member.action) if member.display? %>
    <% end %>
    <%= link_to 'destroy', resource.member_path(record), :confirm => "Are you sure?", :method => :delete if configuration.destroy %>
  <% end %>

  <div class="paginator"></div>

  <%= javascript_tag do %>
    $$('.paginator').each(function(element) {
      new Paginator({total: <%= records.num_pages %>, current: <%= params[:page] || 1 %>, link: {'href': '<%= resource.collection_path(:page => '%{page}', Puffer::Filters.model_name.param_key => puffer_filters.query).html_safe %>'}}).insertTo(element, 'instead');
    });
  <% end %>
<% else %>
  <p>Sorry, but there is no records in <%= resource.human %></p>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
puffer-0.1.1 app/views/puffer/grid_base/_index.html.erb