end
end
- Review.find(:all, :include => [ 'review_comments' ], :order => 'created_at DESC', :conditions => [conditions.join(' AND '), values], :limit => 200)
+ Review.find(:all, :include => [ 'review_comments', 'project', 'user', 'assignee', 'resource' ], :order => 'created_at DESC', :conditions => [conditions.join(' AND '), values], :limit => 200)
end
def self.reviews_to_xml(reviews, convert_markdown=false)
<tbody>
<%
@reviews.each do |review|
+ comment = review.comments.first
%>
<tr class="<%= cycle('even', 'odd') -%>">
<td><img src="<%= ApplicationController.root_context -%>/images/status/<%= review.status -%>.png" title="<%= review.status.capitalize -%>"/></td>
<td><img src="<%= ApplicationController.root_context -%>/images/priority/<%= review.severity -%>.png" title="<%= review.severity.capitalize -%>"/></td>
<td>
<%= link_to h(review.title), :controller => "reviews", :action => "view", :id => review.id -%>
+ <div class="discussionComment">
+ <h4>
+ <%= image_tag("reviews/comment.png") -%> <b><%= comment.user.name -%></b> (<%= distance_of_time_in_words_to_now(comment.created_at) -%>)
+ </h4>
+ <%= comment.html_text -%>
+ </div>
</td>
<td><%= review.project.name -%>
<br/><span class="note"><%= review.resource.long_name -%></span></td>
margin: 0;
padding: 5px 10px;
}
+table#reviews-list div.discussionComment {
+ background-color: transparent;
+ border-top: none;
+ border-left: 1px solid #DDDDDD;
+ margin: 5px 0 0 10px;
+ padding: 0px 10px;
+}
div.discussionComment h4 {
font-size: 90%;
margin-bottom: 2px;