# 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."
<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') -%>
<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" %>
<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>