Sha256: b902ef8dcea2095d401b7f373bb6f032687740f641ebe42e4939baed2810e4ec

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

Contents

<div class="snaptable <%= presenter.table_name %>">
	<%= render 'snaptable/search_field' if presenter.options[:search] == true %>

	<div class="table_buttons">
		<%= render presenter.instance_variable_get(:@buttons) unless presenter.options[:buttons] == false %>
	</div>

	<table>
		<thead>
			<tr>
				<% presenter.column_names.each do |column| %>
				<th><%= presenter.sortable(column) %></th>
				<% end %>
			</tr>
		</thead>
		<tbody>
			<% if presenter.records.any? %>
				<% presenter.records.each do |record| %>
					<tr class="<%= cycle('odd', 'even') %>" data-url="<%= record.send(presenter.url) %>">
						<% presenter.values(record).each do |value| %>
							<td><%= truncate((strip_tags value), length: 40) %></td>
						<% end %>
					</tr>
				<% end %>
			<% else %>
				<tr><td class="none" colspan="<%= presenter.column_names.count %>"><%= t("table.nothing") %></td></tr>
			<% end %>
		</tbody>
	</table>
	<%= will_paginate presenter.records, param_name: presenter.paginate_key, params: { table: presenter.table_name } %>

</div>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
snaptable-2.0 app/views/snaptable/base.html.erb
snaptable-1.2.0 app/views/snaptable/base.html.erb