<tr id='job_<%= job.id %>' class='job' data-job-id='<%= job.id %>' data-job-failed='<%= job.failed_at.blank? ? false : true %>'>
	<td class='id first'><%= job.id %></td>
	<td class='priority'><%= job.priority %></td>
	<td class='attempts'><%= job.attempts %></td>
	
	<% if ((job.run_at < Time.now) && job.locked_at) %>
		<% if job.last_error %>
			<td class='run_at fail'>failed</td>
		<% else %>
			<td class='run_at currently_running'><%= image_tag('icons/pager.gif') %>(in progress)</td>
		<% end %>
	<% else %>
		<td class='run_at'><%= distance_of_time_in_words(DateTime.now, Time.parse(job.run_at.to_s)) %></td>
	<% end %>
	
	<td class='failed_at'><%= job.failed_at || 'N/A' %></td>
	<td class='last_error'><%= job.last_error.blank? ? 'N/A' : (link_to truncate(job.last_error, :length => 30, :omission => '...'), last_error_job_path(job), :class => 'snorbybox') %></td>
	<td style='width:240px;' class='handler'><%= link_to truncate(job.handler, :length => 30, :omission => '...'), handler_job_path(job), :class => 'view_job_handler' %></td>
	<td class='last'><%= link_to image_tag("icons/destroy.png", :size => '16x16', :class => 'trash'), job_path(job), :method => :delete, :confirm => "Are you sure you want to remove this job?" %></td>
</tr>
