From: Fabrice Bellingard Date: Fri, 28 Sep 2012 11:20:47 +0000 (+0200) Subject: SONAR-968 Highlight lowest level in resource explorer when selected X-Git-Tag: 3.3~179 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=469bda166f41743c80bc3d615b8b83dff9f22ce5;p=sonarqube.git SONAR-968 Highlight lowest level in resource explorer when selected --- 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 c3848b0c1ed..5e0f823f381 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 @@ -55,20 +55,21 @@
- <% column.measures.each do |measure| + <% column.measures.each_with_index do |measure, row_index| resource=column.resource(measure) selected = column.selected_snapshot && column.selected_snapshot.project_id==resource.id clazz = cycle("even", "odd", :name => "col_#{index}") clazz = clazz + ' selected' if selected %> - +
<% unless resource.source_code? %> <%= link_to(image_tag('zoom.png'), {:id => resource.id, :metric => @metric.id}, {:class => 'nolink'}) -%> <% end %> <%= qualifier_icon(resource) -%>  <% if resource.source_code? %> - <%= resource.name(false) -%> + <%= resource.name(false) -%> <% else %> <%= link_to(resource.name, {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}) -%> <% end %> 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 b79d399a1d1..2a44c0e730c 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 @@ -129,7 +129,7 @@
<% - column.measures.each do |measure| + column.measures.each_with_index do |measure, row_index| resource=column.resource(measure) clazz = cycle('even', 'odd', :name => "col_#{index}") selected = column.selected_snapshot && column.selected_snapshot.project_id==resource.id @@ -138,14 +138,15 @@ paths << [h(resource.name), @selected_rids-[resource.id]] end %> - +
<% unless resource.source_code? %> <%= link_to(image_tag('zoom.png'), {:id => resource.id}, {:class => 'nolink'}) %> <% end %> <%= qualifier_icon(resource) -%>  <% if resource.source_code? %> - <%= resource.name(false) %> + <%= resource.name(false) %> <% else %> <%= link_to(h(resource.name), {:only_path => true, :overwrite_params => {:rids => (selected ? rids-[resource.id] : rids+[resource.id])}}) -%> <% end %>