From c1bd17b07e397da22a88cfb9f2305123393289fa Mon Sep 17 00:00:00 2001
From: lizanle <491823689@qq.com>
Date: Fri, 25 Sep 2015 09:44:15 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=BA=E5=9D=9B?=
=?UTF-8?q?=E5=8F=91=E5=B8=96=E6=8E=92=E5=BA=8F=E6=AF=94=E8=BE=83=E4=B9=B1?=
=?UTF-8?q?=E3=80=82=20=E5=8E=BB=E6=8E=89=E7=BD=AE=E9=A1=B6=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=EF=BC=88=E5=8F=91=E5=B8=96=E7=9A=84=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E9=87=8C=E5=8E=9F=E6=9D=A5=E6=9C=89=E7=BD=AE=E9=A1=B6=E6=8C=89?=
=?UTF-8?q?=E9=92=AE=E3=80=82=E7=8E=B0=E5=9C=A8=E6=B2=A1=E6=9C=89=E4=BA=86?=
=?UTF-8?q?=E3=80=82=E6=89=80=E4=BB=A5=E6=8E=92=E5=BA=8F=E4=B9=9F=E8=A6=81?=
=?UTF-8?q?=E5=8F=96=E6=B6=88=EF=BC=89?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/boards_controller.rb | 3 ++-
app/views/boards/_project_show.html.erb | 6 +++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb
index 53fb21b8c..434ea4470 100644
--- a/app/controllers/boards_controller.rb
+++ b/app/controllers/boards_controller.rb
@@ -101,8 +101,9 @@ class BoardsController < ApplicationController
@topic_count = @board ? @board.topics.count : 0
if @project
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
+ #现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC,
@topics = @board.topics.
- reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
+ reorder("#{Message.table_name}.created_on desc").
includes(:last_reply).
limit(@topic_pages.per_page).
offset(@topic_pages.offset).
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb
index 3cfd4ae72..4f022261f 100644
--- a/app/views/boards/_project_show.html.erb
+++ b/app/views/boards/_project_show.html.erb
@@ -51,9 +51,9 @@
:data => {:confirm => l(:text_are_you_sure)},
:class => 'talk_edit fr',
:style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %>
- <% if topic.sticky? %>
- <%= l(:label_board_sticky)%>
- <% end %>
+ <%# if topic.sticky? %>
+
+ <%# end %>