讨论区回帖顺序改为与留言一致(新回复在前)

This commit is contained in:
z9hang 2014-05-14 11:58:05 +08:00
parent 91d2b58cf4
commit 8dab599fd2
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class MessagesController < ApplicationController
@reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
@replies = @topic.children.
includes(:author, :attachments, {:board => :project}).
reorder("#{Message.table_name}.created_on ASC").
reorder("#{Message.table_name}.created_on DESC").
limit(@reply_pages.per_page).
offset(@reply_pages.offset).
all

View File

@ -124,7 +124,7 @@
<table class="borad-text-list">
<tr>
<td class="font_lighter"><%= reply_count += 1 %>楼 </td>
<td class="font_lighter"><span style="display: none"><%= reply_count += 1 %>楼</span> </td>
<td>
<div class="contextual-borad">
<%= link_to(