diff options
Diffstat (limited to 'sonar-server/src/main/webapp')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb | 66 |
1 files changed, 34 insertions, 32 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb index b06f1d99355..563ae0f9461 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_view.html.erb @@ -1,32 +1,34 @@ - <div id="review<%= review.id -%>" style="border:solid 1px black; margin:2px"> - User name: <%= h(review.user.name) -%> - <br/> - Status: <%= h(review.status) -%> - <br/> - Severity: <%= h(review.severity) -%> - <br/> - - <div> - <% unless review.review_comments.blank? - review.review_comments.each do |review_comment| - %> - <div id="commentReview" style="border:solid 1px grey; margin:2px"> - <%= l review_comment.created_at -%>, by <%= h(review_comment.user.name) -%> - » - <%= h(review_comment.review_text) -%> - <br/> - </div> - <% - end - end - %> - </div> - - <%= link_to_remote "Add a comment", - :url => { :controller => "reviews", :action => "form_comment", :review_id => review.id, :rule_failure_id => review.rule_failure_id }, - :update => "createComment" + review.id.to_s, - :complete => "$('commentText" + review.id.to_s + "').focus()" -%> - - <div id="createComment<%= review.id -%>"></div> - - </div> + <div id="review<%= review.id -%>" style="border:solid 1px black; margin:2px">
+ User name: <%= h(review.user.name) -%>
+ <br/>
+ Status: <%= h(review.status) -%>
+ <br/>
+ Severity: <%= h(review.severity) -%>
+ <br/>
+
+ <div>
+ <% unless review.review_comments.blank?
+ review.review_comments.each do |review_comment|
+ %>
+ <div id="commentReview" style="border:solid 1px grey; margin:2px">
+ <%= l review_comment.created_at -%>, by <%= h(review_comment.user.name) -%>
+ »
+ <%= h(review_comment.review_text) -%>
+ <br/>
+ </div>
+ <%
+ end
+ end
+ %>
+ </div>
+
+ <% if current_user %>
+ <%= link_to_remote "Add a comment",
+ :url => { :controller => "reviews", :action => "form_comment", :review_id => review.id, :rule_failure_id => review.rule_failure_id },
+ :update => "createComment" + review.id.to_s,
+ :complete => "$('commentText" + review.id.to_s + "').focus()" -%>
+
+ <div id="createComment<%= review.id -%>"></div>
+ <% end %>
+
+ </div>
|