From d0ea49d1e982d8e6d888a6d92d2255f2f09454c9 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 15 Oct 2015 10:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B9=E7=9B=AE=E8=AE=A8?= =?UTF-8?q?=E8=AE=BA=E5=8C=BA=E7=BD=AE=E9=A1=B6=E5=8A=9F=E8=83=BD=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/boards_controller.rb | 2 +- app/views/boards/_project_show.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 434ea4470..22881b8f2 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -103,7 +103,7 @@ class BoardsController < ApplicationController @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] #现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC, @topics = @board.topics. - reorder("#{Message.table_name}.created_on desc"). + reorder("#{Message.table_name}.sticky DESC, #{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 4f022261f..3cfd4ae72 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? %> - - <%# end %> + <% if topic.sticky? %> + <%= l(:label_board_sticky)%> + <% end %>