]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3434 Drilldown: Allow files to be opened in new tabs
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 21 Jan 2013 17:18:03 +0000 (18:18 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Mon, 21 Jan 2013 17:18:03 +0000 (18:18 +0100)
AKA the "Dinesh most wanted feature" ;-)

sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb

index ba945b3b1b701c26bcdda2c1fdf48b081ebe98cc..aba26c4e3a3098cc11623ebdaac8437a4daa706f 100644 (file)
           %>
             <tr class="<%= clazz -%>" id="row_<%= index -%>_<%= row_index -%>">
               <td nowrap>
-                <% unless resource.source_code? %>
+                <% if resource.source_code? %>
+                  <%= link_to(image_tag('zoom.png'), 
+                            {:controller => 'dashboard', :action => 'index', :id => resource.key, :period => params[:period],
+                             :metric => @metric ? @metric.id : nil, :rule => @rule ? @rule.id : @severity }) %>
+                <% else %>
                   <%= link_to(image_tag('zoom.png'), {:id => resource.id, :metric => @metric.id}, {:class => 'nolink'}) -%>
                 <% end %>
                 <%= qualifier_icon(resource) -%>&nbsp;
index 6dc520c94fffd586fe61de8781a060bef6d470de..67dcf40d698610c9629e7f86cc879b025d8a1dcf 100644 (file)
         %>
           <tr class="<%= clazz -%>" id="row_<%= index -%>_<%= row_index -%>">
             <td nowrap>
-              <% unless resource.source_code? %>
+              <% if resource.source_code? %>
+                <%= link_to(image_tag('zoom.png'), 
+                            {:controller => 'dashboard', :action => 'index', :id => resource.key, :period => params[:period],
+                             :metric => @metric ? @metric.id : nil, :rule => @rule ? @rule.id : @severity }) %>
+              <% else %>
                 <%= link_to(image_tag('zoom.png'), {:id => resource.id}, {:class => 'nolink'}) %>
               <% end %>
               <%= qualifier_icon(resource) -%>&nbsp;