aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-05-04 10:50:20 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-05-04 10:50:20 +0200
commite8992d23314a7a50fe0c0df3d94e1ab8c81e626b (patch)
tree010f1a54af55db78ba3569ddd367a2631969d33b
parentb62c9d36cb5a28300eb7c571a88c27b4172954e0 (diff)
downloadsonarqube-e8992d23314a7a50fe0c0df3d94e1ab8c81e626b.tar.gz
sonarqube-e8992d23314a7a50fe0c0df3d94e1ab8c81e626b.zip
SONAR-1973 Remove the '#' from the review IDs in the UI
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb2
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 => "<b>Cannot access this review</b> : 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 @@
<div class="violation">
<div class="vtitle">
<% if violation.review %>
- <div style="float: right"><span class="review_permalink"><%= link_to "#"+violation.review.id.to_s, :controller => "reviews", :action => "view", :id => violation.review.id -%></span></div>
+ <div style="float: right"><span class="review_permalink"><%= link_to violation.review.id.to_s, :controller => "reviews", :action => "view", :id => violation.review.id -%></span></div>
<% 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 @@
<div id="rev_<%= review.id -%>">
<div class="reportTitle">
- <div style="float: right"><span class="violation_date">#<%= review.id.to_s -%></span></div>
+ <div style="float: right"><span class="violation_date"><%= review.id.to_s -%></span></div>
<h2><%= h(review.title) -%></h2>
<% 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 @@
<tr class="<%= cycle('even', 'odd') -%>">
<td><img src="<%= ApplicationController.root_context -%>/images/status/<%= review.status -%>.png" title="<%= review.status.capitalize -%>"/></td>
<td>
- <%= 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()") -%>
</td>
<td><img src="<%= ApplicationController.root_context -%>/images/priority/<%= review.severity -%>.png" title="<%= review.severity.capitalize -%>"/></td>
<td>