]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2701 Fix bug that can occur when using Views
authorFabrice Bellingard <bellingard@gmail.com>
Wed, 31 Aug 2011 07:51:25 +0000 (09:51 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 31 Aug 2011 07:51:25 +0000 (09:51 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb

index 2f9830e54f9ae71e1c5e89d2b84c4383194f82a8..b8d8bcce8a8090d953831bf40a74b7a5a47240cb 100644 (file)
   <thead>
     <tr>
       <th> </th>
-      <% snapshots.each do |snapshot| %>
-        <th nowrap="nowrap">
+      <% 
+        snapshots.each do |snapshot| 
+          event = snapshot.event('Version')
+      %>
+        <th nowrap="nowrap" style="vertical-align:top">
             <%= l snapshot.created_at.to_date -%>
             <br/>
-            <%= snapshot.event('Version').name -%>
+            <%= event.name unless event==nil -%>
         </th>
       <% end %>
       <% if displaySparkLine %>