Sha256: b6a84a3ed7d51f842258564e3890d1f28c024fd6b4395dae32dca74ffe735ff5

Contents?: true

Size: 1.58 KB

Versions: 7

Compression:

Stored size: 1.58 KB

Contents

<table>
	<thead>
		<tr>
			<% model.columns(:display).each do |column| %>
				<th><%= sort_link_to(model, column) %></th>
			<% end %>
			<th>Actions</th>
		</tr>
	</thead>
	<tbody>
		<% records.each do |record| %>
			<tr class="<%= cycle('odd', 'even') %>">
				<% model.columns(:display).each do |column| %>
					<td><%= truncate(sanitize(model.display_for(record, column.name).to_s), :length => 20) %></td>
				<% end %>
				<td>
					<% unless model.disabled?(:edit) %>
						<% if parent %>
							<%= link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id, (parent.class.to_s.underscore+'_id').to_sym => parent.id %>
						<% else %>
							<%= link_to 'Edit', :controller => 'admin/kitsune/records', :action => :edit, :model_id => model.object_class, :id => record.id %>
						<% end %>
					<% end %>
					<% unless model.disabled?(:edit) || model.disabled?(:delete) %>
						- 
					<% end %>
					<% unless model.disabled?(:delete) %>
						<% if parent %>
							<%= link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy, :redirect => (parent.class.to_s.underscore+'_id'), :redirect_id => parent.id), :method => :delete, :confirm => "Are you sure?") %>
						<% else %>
							<%= link_to('Delete', url_for(:controller => 'admin/kitsune/records', :model_id => model.object_class, :id => record.id, :action => :destroy), :method => :delete, :confirm => "Are you sure?") %>
						<% end %>
					<% end %>
				</td>
			</tr>
		<% end %>
	</tbody>
</table>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
kitsune-0.0.13 app/views/admin/kitsune/records/_list.html.erb
kitsune-0.0.12 app/views/admin/kitsune/records/_list.html.erb
kitsune-0.0.11 app/views/admin/kitsune/records/_list.html.erb
kitsune-0.0.10 app/views/admin/kitsune/records/_list.html.erb
kitsune-0.0.9 app/views/admin/kitsune/records/_list.html.erb
kitsune-0.0.8 app/views/admin/kitsune/records/_list.html.erb
kitsune-0.0.7 app/views/admin/kitsune/records/_list.html.erb