Sha256: 6d583adc27cd4824f7220724eda4e868800b9feacca62e354eaaec6ab8dae951

Contents?: true

Size: 696 Bytes

Versions: 6

Compression:

Stored size: 696 Bytes

Contents

<% table = table.renderer(self) %>

<div class="table-container">
  <%= content_tag(:table, class: table.classes, data: table.data) do %>
    <thead>
      <tr>
        <% table.columns.each do |column| %>
          <%= content_tag(:th, column.header, class: column.classes, data: column.data) %>
        <% end %>
      </tr>
    </thead>

    <tbody>
      <% collection.each do |instance| %>
        <%= content_tag(:tr, table.row.options(instance)) do %>
          <% table.columns.each do |column| %>
            <%= content_tag(:td, column.content(instance), class: column.classes, data: column.data) %>
          <% end %>
        <% end %>
      <% end %>
    </tbody>
  <% end %>
</div>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
trestle-0.8.6 app/views/trestle/table/_table.html.erb
trestle-0.8.5 app/views/trestle/table/_table.html.erb
trestle-0.8.4 app/views/trestle/table/_table.html.erb
trestle-0.8.3 app/views/trestle/table/_table.html.erb
trestle-0.8.2 app/views/trestle/table/_table.html.erb
trestle-0.8.0 app/views/trestle/table/_table.html.erb