From 947c0f8f6446489d6a0e3949212b0837fdf9dcf4 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Wed, 21 May 2014 11:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E9=A1=B5=E9=9D=A2=E4=B8=AD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=82=E8=B5=9B=E4=BD=9C=E5=93=81=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E5=88=9B=E5=BB=BA=E7=9A=84=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/softapplications_controller.rb | 3 +-- app/views/contests/show_attendingcontest.html.erb | 2 +- config/locales/zh.yml | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/softapplications_controller.rb b/app/controllers/softapplications_controller.rb index 3591360a8..00fd9c0e0 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 426aa1721..c6aed0819 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 7ff18b836..9c98323b5 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