修改编辑贴吧无导航栏、提交失败无提示bug
This commit is contained in:
parent
138d90a887
commit
7eb1a76734
|
@ -1,5 +1,7 @@
|
||||||
# added by fq
|
# added by fq
|
||||||
class ForumsController < ApplicationController
|
class ForumsController < ApplicationController
|
||||||
|
layout "users_base"
|
||||||
|
|
||||||
# GET /forums
|
# GET /forums
|
||||||
# GET /forums.json
|
# GET /forums.json
|
||||||
before_filter :find_forum_if_available
|
before_filter :find_forum_if_available
|
||||||
|
@ -143,9 +145,10 @@ class ForumsController < ApplicationController
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @forum.update_attributes(params[:forum])
|
if @forum.update_attributes(params[:forum])
|
||||||
format.html { redirect_to @forum, notice: 'Forum was successfully updated.' }
|
format.html { redirect_to @forum, notice: l(:label_forum_update_succ) }
|
||||||
format.json { head :no_content }
|
format.json { head :no_content }
|
||||||
else
|
else
|
||||||
|
flash.now[:error] = "#{l :label_forum_update_fail}: #{@forum.errors.full_messages[0]}"
|
||||||
format.html { render action: "edit" }
|
format.html { render action: "edit" }
|
||||||
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
format.json { render json: @forum.errors, status: :unprocessable_entity }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1918,6 +1918,8 @@ zh:
|
||||||
label_memo_create_fail: 发布失败
|
label_memo_create_fail: 发布失败
|
||||||
label_forum_create_succ: 贴吧新建成功
|
label_forum_create_succ: 贴吧新建成功
|
||||||
label_forum_create_fail: 贴吧新建失败
|
label_forum_create_fail: 贴吧新建失败
|
||||||
|
label_forum_update_succ: 贴吧更新成功
|
||||||
|
label_forum_update_fail: 贴吧更新失败
|
||||||
label_first_page_create_fail: 首页定制失败
|
label_first_page_create_fail: 首页定制失败
|
||||||
label_forum_edit: 编辑讨论区
|
label_forum_edit: 编辑讨论区
|
||||||
label_memo_create: 发布
|
label_memo_create: 发布
|
||||||
|
|
Loading…
Reference in New Issue