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