Permalink
Browse files

Handling issue of missing recent task

  • Loading branch information...
joelmoss committed Mar 23, 2012
1 parent e808a04 commit ea5d5e2bae56ce7341fb6e7b0ae4b57892039ac0
Showing with 6 additions and 6 deletions.
  1. +4 −4 app/views/projects/_task.html.erb
  2. +2 −2 app/views/projects/show/_tasks.html.erb
@@ -3,7 +3,7 @@
<div class="span1 margin-top right">
<%= link_to 'Run...', new_project_jobs_path(resource, task.fully_qualified_name), :class => "btn btn-primary" %>
</div>
-
+
<div class="span11 bordered-bottom padding-bottom2 padding-top">
<div class="row">
<div class="span9">
@@ -16,7 +16,7 @@
<%= link_to raw("show full description &raquo;"), '#', :class => "show-task-description smaller" unless task.description.blank? %>
</div>
</div>
-
+
<div class="row">
<div class="span9 quiet">
<%- if last_run = resource.jobs.where(:task => task.fully_qualified_name).first -%>
@@ -26,7 +26,7 @@
<%- end -%>
</div>
</div>
-
+
<%- unless task.description.blank? -%>
<div class="row hide">
<div class="span9">
@@ -35,5 +35,5 @@
</div>
<%- end -%>
</div>
-
+
</div>
@@ -7,7 +7,7 @@
</div>
<%- @recent_tasks.each do |job| -%>
- <%= render :partial => "task", :locals => { :task => resource.cap.find_task(job.task), :hidden => false } %>
+ <%= render :partial => "task", :locals => { :task => task, :hidden => false } if task = resource.cap.find_task(job.task) %>
<%- end -%>
<div class="page-header margin-top8">
@@ -17,7 +17,7 @@
</a>
</h4>
</div>
-
+
<%- end -%>
<div id="other_tasks" class="<%= 'hide' unless @recent_tasks.empty? %>">

0 comments on commit ea5d5e2

Please sign in to comment.