From e8992d23314a7a50fe0c0df3d94e1ab8c81e626b Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 4 May 2011 10:50:20 +0200 Subject: [PATCH] SONAR-1973 Remove the '#' from the review IDs in the UI --- .../main/webapp/WEB-INF/app/controllers/reviews_controller.rb | 2 +- .../main/webapp/WEB-INF/app/views/resource/_violation.html.erb | 2 +- .../src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb | 2 +- .../src/main/webapp/WEB-INF/app/views/reviews/index.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 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 ceae2e09cf7..e492dcf8b29 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 @@ -36,7 +36,7 @@ class ReviewsController < ApplicationController # Used for the permalink, e.g. http://localhost:9000/reviews/view/1 def view @review = Review.find(params[:id], :include => ['project']) - if current_user && has_role?(:user, @review.project) + if has_role?(:user, @review.project) render 'reviews/_view', :locals => {:review => @review} else render :text => "Cannot access this review : access denied." diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb index 94eadb0f8b2..909f31cb089 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb @@ -2,7 +2,7 @@
<% if violation.review %> -
<%= link_to "#"+violation.review.id.to_s, :controller => "reviews", :action => "view", :id => violation.review.id -%>
+
<%= link_to violation.review.id.to_s, :controller => "reviews", :action => "view", :id => violation.review.id -%>
<% end %> <%= image_tag("priority/" + violation.failure_level.to_s + '.png') -%> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb index be8cccb920f..79b0a2c864d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb @@ -1,6 +1,6 @@
-
#<%= review.id.to_s -%>
+
<%= review.id.to_s -%>

<%= h(review.title) -%>

<% if current_user && review.status != "CLOSED" %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb index 01e838d9cd2..a347bd8374c 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb @@ -114,7 +114,7 @@ - <%= link_to_remote( "#"+h(review.id), :update => 'review', :url => {:action => 'show', :id => review.id}, :loading => 'onReviewLoading()', :complete => "onReviewLoaded()") -%> + <%= link_to_remote( h(review.id), :update => 'review', :url => {:action => 'show', :id => review.id}, :loading => 'onReviewLoading()', :complete => "onReviewLoaded()") -%> -- 2.39.5