]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-1973 Remove the '#' from the review IDs in the UI
authorFabrice Bellingard <bellingard@gmail.com>
Wed, 4 May 2011 08:50:20 +0000 (10:50 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Wed, 4 May 2011 08:50:20 +0000 (10:50 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/resource/_violation.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/reviews/index.html.erb

index ceae2e09cf76a1a07a55f49b55630f375bc1e1b8..e492dcf8b29ff0c1aa680e75eadcf6183f9efac8 100644 (file)
@@ -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."
index 94eadb0f8b2aaaac1ccdd4e09711a02a3861d6f7..909f31cb089f36680bb3222b0fb4060a0a36e12b 100644 (file)
@@ -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') -%>
index be8cccb920fe7ad5cbc4153757a42fc029164a66..79b0a2c864d2fd0805bcc9f8356692f8d8e4b20e 100644 (file)
@@ -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" %>
index 01e838d9cd2a7433d104c71efedb55ff436cf713..a347bd8374ce29687c623c6fe54d30b021f020b7 100644 (file)
         <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>