diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 4a27f02ff..db5bded55 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -80,19 +80,19 @@ class BoardsController < ApplicationController if @project @topic_pages = Paginator.new @topic_count, per_page_option, params['page'] @topics = @board.topics. - reorder("#{Message.table_name}.sticky 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). - order("last_replies_messages.created_on desc"). + preload(:author, {:last_reply => :author}). all elsif @course - board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC"). + board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc"). includes(:last_reply). # limit(@topic_pages.per_page). # offset(@topic_pages.offset). - order("last_replies_messages.created_on desc"). + preload(:author, {:last_reply => :author}). all : [] @topics = paginateHelper board_topics,10 diff --git a/app/views/boards/_course_new.html.erb b/app/views/boards/_course_new.html.erb index a380ad67f..aaf6d66e5 100644 --- a/app/views/boards/_course_new.html.erb +++ b/app/views/boards/_course_new.html.erb @@ -3,7 +3,7 @@ <%= render :partial => 'form_course', :locals => {:f => f, :topic => @message} %>
  • <%= l(:button_cancel) %> - <%= l(:button_submit)%> + <%= l(:button_submit)%>
  • <% end %> diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 2a078553c..766340c1b 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -16,7 +16,7 @@
    -
    +
      <%= render :partial => 'course_new' %>
    @@ -40,7 +40,7 @@

      <%= h(topic.subject) %>

    <% if topic.course_editable_by?(User.current) %> - <%= l(:button_edit) %> <% end %> @@ -59,7 +59,7 @@
    @@ -70,7 +70,7 @@
    -