diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index 3591360a..00fd9c0e 100644 --- a/app/controllers/softapplications_controller.rb +++ b/app/controllers/softapplications_controller.rb @@ -149,8 +149,7 @@ class SoftapplicationsController < ApplicationController respond_to do |format| if @softapplication.save ContestingSoftapplication.create(:contest_id => params[:contest_id], :softapplication_id => @softapplication.id) - format.js - format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]) } + format.html { redirect_to show_attendingcontest_contest_path(:id => params[:contest_id]), notice: l(:notice_attendingcontest_work_successfully_created) } # format.json { render json: @softapplication, status: :created, location: @softapplication } else format.js { render status: 406 } diff --git a/app/views/contests/show_attendingcontest.html.erb b/app/views/contests/show_attendingcontest.html.erb index 426aa172..c6aed081 100644 --- a/app/views/contests/show_attendingcontest.html.erb +++ b/app/views/contests/show_attendingcontest.html.erb @@ -59,7 +59,7 @@ } - +

<%= notice %>

温馨提示:如果您准备参加竞赛,请点击下面的"新建参赛作品"!
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7ff18b83..9c98323b 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1900,6 +1900,8 @@ zh: label_contest_delete: 删除竞赛 label_noawards_current: 暂未评奖 + notice_account_updated: 帐号更新成功 + notice_attendingcontest_work_successfully_created: 恭喜您,参赛作品成功创建! # ajax异步验证 modal_valid_passing: 可以使用 \ No newline at end of file