From: Fabrice Bellingard Date: Mon, 21 Jan 2013 17:18:03 +0000 (+0100) Subject: SONAR-3434 Drilldown: Allow files to be opened in new tabs X-Git-Tag: 3.5~369 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=39cbebf91fccd6344eb5d08d5aa7876fa8fdc780;p=sonarqube.git SONAR-3434 Drilldown: Allow files to be opened in new tabs AKA the "Dinesh most wanted feature" ;-) --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb index ba945b3b1b7..aba26c4e3a3 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/measures.html.erb @@ -61,7 +61,11 @@ %> - <% 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) -%>  diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb index 6dc520c94ff..67dcf40d698 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/violations.html.erb @@ -140,7 +140,11 @@ %> - <% 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) -%>