aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-02-07 13:28:54 +0100
committerJulien Lancelot <julien.lancelot@gmail.com>2013-02-07 13:29:15 +0100
commit972651fea4598e90a18e831136dcc3c80b3f30aa (patch)
treea7a2ef48a2887784b77667653f1a55c30d60d639 /sonar-server
parentb919ec6f4a02ba3361537f405ec8dc1e0991ad17 (diff)
downloadsonarqube-972651fea4598e90a18e831136dcc3c80b3f30aa.tar.gz
sonarqube-972651fea4598e90a18e831136dcc3c80b3f30aa.zip
Fix issue when displaying resource in popup
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb4
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb3
2 files changed, 3 insertions, 4 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
index 61b14bd0254..49945c6710b 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
@@ -64,10 +64,8 @@ class ResourceController < ApplicationController
else
render_resource_deleted()
end
- # popup mode
else
- # Always display title in popup mode
- @params_opts = '&popup=true&display_title=true'
+ # popup mode, title will always be displayed
params[:layout] = 'false'
render :action => 'index'
end
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb
index 4372f5fd24c..5f6c175be1d 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/index.html.erb
@@ -1,5 +1,6 @@
<div id="accordion-panel"/>
<script type="text/javascript">
- openAccordionItem('<%= request.request_uri + @params_opts.to_s -%>', this);
+ // Always display title in popup mode
+ openAccordionItem('<%= url_for(params.merge({:display_title => 'true', :popup => 'true'})) -%>', this);
</script> \ No newline at end of file