def show
@review = Review.find(params[:id], :include => ['project'])
if has_role?(:user, @review.project)
- render :partial => 'reviews/show'
+ render :partial => 'reviews/view'
else
render :text => "access denied"
end
@review.assignee = User.find params[:assignee_id]
@review.save
- render :partial => 'reviews/show'
+ render :partial => 'reviews/view'
end
# GET
@review.comments.create!(:user => current_user, :text => params[:text])
end
- render :partial => "reviews/show"
+ render :partial => "reviews/view"
end
# GET
@review.comments.create(:review_text => params[:comment], :user_id => current_user.id)
end
- render :partial => "reviews/show"
+ render :partial => "reviews/view"
end
# POST
comment=@review.comments.find(params[:comment_id].to_i)
comment.delete if comment
end
- render :partial => "reviews/show"
+ render :partial => "reviews/view"
end
<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 class="review_permalink"><span class="review_permalink"><%= link_to "Review #"+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>
- <h2><%= h(review.title) -%></h2>
+ <h2>Review #<%= h(review.id.to_s) -%> - <%= h(review.title) -%></h2>
<% if current_user && review.status != "CLOSED" %>
<span class="actions" id="rActions">
+++ /dev/null
-<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
-<script>
- function onReviewLoading() {
- $('reviews-search').hide();
- $('review').hide();
- $('review-loading').show();
- }
- function onReviewLoaded() {
- $('reviews-search').hide();
- $('review-loading').hide();
- $('review').show();
- }
- function backReviews() {
- $('review').hide();
- $('review-loading').hide();
- $('reviews-search').show();
- }
-</script>
-
<div id="reviews-search">
<h1>Reviews</h1>
<% form_tag({:action => 'index'}, {:method => 'get'}) do %>
<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 h(review.id), :controller => "reviews", :action => "view", :id => review.id -%>
</td>
<td><img src="<%= ApplicationController.root_context -%>/images/priority/<%= review.severity -%>.png" title="<%= review.severity.capitalize -%>"/></td>
<td>
- <%= link_to_remote(h(review.title), :update => 'review', :url => {:action => 'show', :id => review.id}, :loading => 'onReviewLoading()', :complete => "onReviewLoaded()") -%>
+ <%= link_to h(review.title), :controller => "reviews", :action => "view", :id => review.id -%>
</td>
<td><%= review.project.name -%>
<br/><span class="note"><%= review.resource.long_name -%></span></td>
</div>
-<div id="review-loading" style="display: none"><%= image_tag 'loading.gif' -%></div>
-<div id="review" style="display: none"></div>
<script>
$('review_id').focus();
</script>
\ No newline at end of file
div.vtitle{
background-color:#E4ECF3;
margin:0;
- padding:0 10px;
+ padding:0 0 0 10px;
line-height: 2.2em;
text-shadow: 0 1px 0 #FFF;
color:#777
color:#777;
font-size:90%;
}
+div.review_permalink {
+ float: right;
+ background-color: #F4F4F4;
+ border-color: #CDCDCD;
+ border-style: none none none solid;
+ border-width: 1px;
+ color: #333333;
+ font-size: 12px;
+ font-weight: bold;
+ margin: 0;
+ padding: 0 10px;
+ text-shadow: 1px 1px 0 #FFFFFF;
+}
span.review_permalink a {
color:#777;
font-size:90%;
+ padding: 0 0 0 20px;
+ background: url('../images/zoom.png') no-repeat left;
}
span.rulename a:hover {
text-decoration: underline;