From f06b0b3fe5df6cf5c1cef82bb54269acd628ffe8 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 25 Jun 2014 17:57:28 +0200 Subject: [PATCH] Fix file popups --- .../hotspot_most_violated_resources.html.erb | 2 +- .../webapp/WEB-INF/app/helpers/application_helper.rb | 12 +++--------- .../WEB-INF/app/views/drilldown/_footer.html.erb | 8 ++------ 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb index 8a7336f670f..ca1664a30e9 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb @@ -63,7 +63,7 @@ %> - <%= link_to_resource(resource, h(resource.name), {:tab => 'issues', :settings => 'issues', :class => 'underlined-link'}) -%> + <%= link_to_resource(resource, h(resource.name), {:metric => 'violations', :class => 'underlined-link'}) -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index e3beaed6014..422e9901ebf 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -319,17 +319,11 @@ module ApplicationHelper link_to(name || resource.name, params.merge({:id => resource.id, :period => period_index, :tab => options[:tab], :rule => options[:rule]}), :title => options[:title], :class => options[:class]) end else - anchor="component=#{resource.key}" if options[:line] - anchor+= '&line=' + options[:line].to_i + anchor= 'L' + options[:line].to_s end - if options[:tab] - anchor+= '&tab=' + options[:tab] - end - if options[:settings] - anchor+= '&settings=' + options[:settings] - end - link_to(name || resource.name, {:controller => 'component', :action => 'index', :anchor => anchor, :period => period_index}, :popup => ['resource', 'scrollbars=1,resizable=1'], :title => options[:title], :class => options[:class]) + link_to(name || resource.name, {:controller => 'dashboard', :action => 'index', :anchor => anchor, :id => resource.key, :period => period_index, :tab => options[:tab], :rule => options[:rule], + :metric => options[:metric]}, :popup => ["resource-#{resource.key.parameterize}", ''], :title => options[:title], :class => options[:class]) end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb index a2e095d5078..1f871e66399 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_footer.html.erb @@ -1,11 +1,7 @@
-<% if @display_viewers %> +<% if @display_viewers && @drilldown.highlighted_resource %> <% end %> -- 2.39.5