diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-04-29 16:33:51 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-04-29 16:34:46 +0200 |
commit | c3a1ff31b2f9e02eccd78338ed101154b7c5ac78 (patch) | |
tree | 2fb48974f1d8c2ec2475a3028574c337f479ebd0 /sonar-server | |
parent | 4c47058069d1b860e185cdbd888a3d816442bf4a (diff) | |
download | sonarqube-c3a1ff31b2f9e02eccd78338ed101154b7c5ac78.tar.gz sonarqube-c3a1ff31b2f9e02eccd78338ed101154b7c5ac78.zip |
SONAR-2327 Fix a problem on the permalink page
Diffstat (limited to 'sonar-server')
3 files changed, 11 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb index f94e9ad4685..ceae2e09cf7 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb @@ -37,7 +37,7 @@ class ReviewsController < ApplicationController def view @review = Review.find(params[:id], :include => ['project']) if current_user && has_role?(:user, @review.project) - render 'reviews/_review', :locals => {:review => @review} + render 'reviews/_view', :locals => {:review => @review} else render :text => "<b>Cannot access this review</b> : access denied." end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_show.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_show.html.erb index 7e90b13accb..b9faf2e6d30 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_show.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_show.html.erb @@ -1,5 +1,11 @@ -<div class="marginbottom10"> +<div id="backReviewDiv" class="marginbottom10"> <a href="#" onclick="backReviews()">« Back to reviews</a> </div> +<script> + if ($('reviews-search')==null) { + // This happens when this page results from a call made from the review permalink page + $('backReviewDiv').hide(); + } +</script> <%= render :partial => 'reviews/review', :locals => {:review => @review} -%>
\ No newline at end of file diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb new file mode 100644 index 00000000000..3a8dd3568a7 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb @@ -0,0 +1,3 @@ +<div id="review"> + <%= render :partial => 'reviews/review' -%> +</div> |