Sha256: 587599e50c4df36dfeaa8b9e21986dd52af2c3612b2cd96606710edec1330e52

Contents?: true

Size: 1.27 KB

Versions: 27

Compression:

Stored size: 1.27 KB

Contents

<div class="toolbar" style="margin-bottom:5px">		
	<%= will_paginate(collection) %>
</div>

<table class="list">
	<thead>
		<% list_fields = [
			{:label =>"Who", :field => "whodunnit"},
			{:label =>"Did", :field => "event"},
			{:label =>"What", :field => "item_type"},
			{:label =>"When", :field => "created_at"}
		] %>
		<% list_fields.each do |field| %>
			<% g = params.dup %>
			<% g.delete(:controller) %>
			<% g.delete(:action) %>
			<% g[:order] = params[:order] == field[:field] ? "#{field[:field]} desc" : field[:field] %>
			<th><%= link_to("#{field[:label]} #{params[:order] == field[:field] ? "&darr;" : ""} #{params[:order] == "#{field[:field].to_s} desc" ? "&uarr;" : ""}".html_safe, collection_path(g)) %></th>
		<% end %>
	</thead>
	<% collection.each do |row| -%>
		<tr>			
			<td><%= begin User.find(row.whodunnit).email rescue "NA" end %></td>
			<td><strong><%= row.event %>d</strong></td>
			<td><%= row.item_type %>: <em><%= begin row.item.name rescue row.item.title rescue row.item.email rescue "NA" end %></em></td>
			<td><u><%= time_ago_in_words(row.created_at) %> ago</u></td>
		</tr>
	<% end -%>
</table>
	
<div class="toolbar" style="margin-top:5px">
	<%= will_paginate(collection) %>
</div>

<style type="text/css" media="screen">
	a.awesome { color: #fff; }
</style>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
soapbox-0.3.1 app/views/admin/versions/index.html.erb
soapbox-0.3.0 app/views/admin/versions/index.html.erb
soapbox-0.2.24 app/views/admin/versions/index.html.erb
soapbox-0.2.23 app/views/admin/versions/index.html.erb
soapbox-0.2.21 app/views/admin/versions/index.html.erb
soapbox-0.2.20 app/views/admin/versions/index.html.erb
soapbox-0.2.18 app/views/admin/versions/index.html.erb
soapbox-0.2.16 app/views/admin/versions/index.html.erb
soapbox-0.2.15 app/views/admin/versions/index.html.erb
soapbox-0.2.14 app/views/admin/versions/index.html.erb
soapbox-0.2.12 app/views/admin/versions/index.html.erb
soapbox-0.2.11 app/views/admin/versions/index.html.erb
soapbox-0.2.10 app/views/admin/versions/index.html.erb
soapbox-0.2.9 app/views/admin/versions/index.html.erb
soapbox-0.2.8 app/views/admin/versions/index.html.erb
soapbox-0.2.7 app/views/admin/versions/index.html.erb
soapbox-0.2.6 app/views/admin/versions/index.html.erb
soapbox-0.2.5 app/views/admin/versions/index.html.erb
soapbox-0.2.4 app/views/admin/versions/index.html.erb
soapbox-0.2.3 app/views/admin/versions/index.html.erb