issue详情页面的回复调整

This commit is contained in:
cxt 2016-12-16 16:30:08 +08:00
parent 6dfebd447c
commit 8e20dd1a5f
2 changed files with 3 additions and 2 deletions

View File

@ -237,7 +237,8 @@ class IssuesController < ApplicationController
end
@jour_reply = Journal.new
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id ASC").all
@journals = @issue.journals.includes(:user, :details).reorder("#{Journal.table_name}.id desc").all
@journals = get_no_children_comments_all @journals
@journals.each_with_index {|j,i| j.indice = i+1}
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
@journals.reverse! if User.current.wants_comments_in_reverse_order?

View File

@ -1,5 +1,5 @@
<ul>
<% issue.journals.reorder("created_on desc").each do |comment| %>
<% @journals.each do |comment| %>
<script type="text/javascript">
$(function(){
showNormalImage('reply_content_<%= comment.id %>');