myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3404] branches/wf4ever/app/views/packs/check_wfr


From: noreply
Subject: [myexperiment-hackers] [3404] branches/wf4ever/app/views/packs/check_wfro_job.rhtml: changed so that the results only show when there are results to show
Date: Wed, 6 Feb 2013 17:00:05 +0000 (UTC)

Revision
3404
Author
dgc
Date
2013-02-06 17:00:04 +0000 (Wed, 06 Feb 2013)

Log Message

changed so that the results only show when there are results to show

Modified Paths

Diff

Modified: branches/wf4ever/app/views/packs/check_wfro_job.rhtml (3403 => 3404)


--- branches/wf4ever/app/views/packs/check_wfro_job.rhtml	2013-02-06 16:42:22 UTC (rev 3403)
+++ branches/wf4ever/app/views/packs/check_wfro_job.rhtml	2013-02-06 17:00:04 UTC (rev 3404)
@@ -6,15 +6,23 @@
 
 <ul><li><%= link_to(@status["resource"], @status["resource"]) -%></li></ul>
 
-<% if @status["added"].length > 0 %>
+<%
+  added = []
+
+  if @status["added"] && @status["added"].length > 0
+    added = @status["added"].select do |path|
+      !path.ends_with?("/")
+    end
+  end
+%>
+
+<% if added.length > 0 %>
   <h2>Results of transformation</h2>
   <p>The following resources have been created as a result of the transformation:</p>
 
   <ul>
-    <% @status["added"].each do |output| %>
-      <% unless output.ends_with?("/") %>
-        <li><%= link_to(output, output) -%></li>
-      <% end %>
+    <% added.each do |output| %>
+      <li><%= link_to(output, output) -%></li>
     <% end %>
   </ul>
 <% end %>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]