Sha256: a8208f853054076e4c229bf5b62ff07ddf65c1632703fedd37ed193b1e6f7cbb

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

<% if table.filters.any? %>
  <%= form_tag '', method: :get do %>
    <% if params[table.as] and params[table.as][:sort] %>
      <%= hidden_field_tag("#{table.as}[sort]", params[table.as][:sort]) %>
    <% end %>
    <% if params[table.as] and params[table.as][:dir] %>
      <%= hidden_field_tag("#{table.as}[dir]", params[table.as][:dir]) %>
    <% end %>
    <% table.filters.each do |filter| %>
      <%= tableficate_filter_tag filter %>
    <% end %>

    <%= submit_tag('Filter') %>
  <% end %>
<% end %>

<% if defined? ::Kaminari %>
  <%= paginate(table.rows, param_name: "#{table.as}_page") %>
<% elsif defined? ::WillPaginate %>
  <%= will_paginate(table.rows, param_name: "#{table.as}_page") %>
<% end %>

<%= content_tag(:table, table.options[:html]) do %>
  <thead>
    <tr>
      <% table.columns.each do |column| %>
        <%= tableficate_header_tag column %>
      <% end %>
    </tr>
  </thead>
  <tbody>
    <% table.rows.each do |row| %>
      <%= tableficate_row_tag row, table.columns %>
    <% end %>
  </tbody>
<% end %>

Version data entries

8 entries across 6 versions & 1 rubygems

Version Path
tableficate-0.2.1 spec/test_app/app/views/tableficate/custom_check_box_block/_table.html.erb
tableficate-0.2.1 spec/test_app/app/views/tableficate/custom_radio_block/_table.html.erb
tableficate-0.2.0 spec/test_app/app/views/tableficate/custom_check_box_block/_table.html.erb
tableficate-0.2.0 spec/test_app/app/views/tableficate/custom_radio_block/_table.html.erb
tableficate-0.1.3 app/views/tableficate/_table.html.erb
tableficate-0.1.2 app/views/tableficate/_table.html.erb
tableficate-0.1.1 app/views/tableficate/_table.html.erb
tableficate-0.0.1 app/views/tableficate/_table.html.erb