diff options
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> |