Sha256: 17c227f812a1c598185f58ef2c08bcdf86526c6177d002c6e690569695c28657

Contents?: true

Size: 941 Bytes

Versions: 9

Compression:

Stored size: 941 Bytes

Contents

<div id="snaptable">
	<%= 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 %>

</div>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
snaptable-1.1.3 app/views/snaptable/base.html.erb
snaptable-1.1.2 app/views/snaptable/base.html.erb
snaptable-1.1.1 app/views/snaptable/base.html.erb
snaptable-1.1.0 app/views/snaptable/base.html.erb
snaptable-1.0.0 app/views/snaptable/base.html.erb
snaptable-0.9.3 app/views/snaptable/base.html.erb
snaptable-0.9.2 app/views/snaptable/base.html.erb
snaptable-0.9.1 app/views/snaptable/base.html.erb
snaptable-0.9.0 app/views/snaptable/base.html.erb