From 23ef975c23899b9ec00f454cc5b85a40b0a06f38 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Fri, 8 May 2015 13:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E4=BF=AE=E6=94=B9bu?= =?UTF-8?q?g=20Signed-off-by:=20alan=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/messages_controller.rb | 10 +++++- app/views/boards/_course_show.html.erb | 22 +++++++++++-- app/views/boards/_edit.html.erb | 42 +++++++++++++++++++++++++ app/views/boards/_project_show.html.erb | 29 ++++++++++------- app/views/boards/show.html.erb | 5 ++- 5 files changed, 91 insertions(+), 17 deletions(-) create mode 100644 app/views/boards/_edit.html.erb diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index bab5dfb4c..fd1266095 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -165,7 +165,15 @@ class MessagesController < ApplicationController render_attachment_warning_if_needed(@message) flash[:notice] = l(:notice_successful_update) @message.reload - redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)) + if params[:is_board] + if @project + redirect_to project_boards_path(@project) + elsif @course + redirect_to course_boards_path(@course) + end + else + redirect_to board_message_url(@message.board, @message.root, :r => (@message.parent_id && @message.id)) + end elsif request.get? respond_to do |format| format.html { diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 3b14ee767..adc064e1a 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -29,17 +29,28 @@
讨论区共有<%= @topic_count %>个帖子
<% if @topics.any? %> <% @topics.each do |topic| %> -<%= h(topic.subject) %>
<% if topic.sticky? %> - <%= l(:label_board_sticky)%> + <%= l(:label_board_sticky)%> <% end %> @@ -59,6 +70,11 @@讨论区共有<%= @topic_count %>个帖子
<% if @topics.any? %> <% @topics.each do |topic| %> -<%= h(topic.subject) %>
<% if topic.sticky? %> - <%= l(:label_board_sticky)%> + <%= l(:label_board_sticky)%> <% end %> @@ -74,6 +73,12 @@