From 9b9745ea0afa9f290ed190380d914609a5b3445f Mon Sep 17 00:00:00 2001 From: baiyu Date: Wed, 30 Oct 2013 21:46:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E5=BA=94=E6=A0=87=E9=9C=80?= =?UTF-8?q?=E6=B1=82=EF=BC=8C=E6=8F=90=E4=BA=A4=E4=BD=9C=E4=B8=9A=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=AB=9E=E8=B5=9B=E4=BD=9C=E5=93=81=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E5=90=8E=E9=97=AA=E5=87=BA=E7=9A=84flash=E5=81=9A?= =?UTF-8?q?=E4=BA=86=E5=8C=BA=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 14 +++++++++++++- config/locales/zh.yml | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 6c4e6697f..3b03eb1ff 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -380,7 +380,19 @@ class BidsController < ApplicationController bid_message = params[:bid_for_save][:bid_message] if BidingProject.where("project_id = ? and bid_id = ?", project.id, @bid.id).size == 0 if BidingProject.cerate_bidding(@bid.id, project.id, bid_message) - flash[:notice] = l(:label_bidding_succeed) + + # added by bai type ==1 需求,type==2 竞赛, type==3 作业 + if @bid.reward_type == 1 + flash[:notice] = l(:label_bidding_succeed) + + elsif @bid.reward_type == 2 + flash[:notice] = l(:label_bidding_contest_succeed) + + else @bid.reward_type == 3 + flash[:notice] = l(:label_bidding_homework_succeed) + end + # end + end else if @bid.reward_type == 3 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7b766249e..2accfd9e4 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1298,6 +1298,8 @@ zh: label_wrong_budget: 错误的金额格式 label_wrong_date: 时间格式错误,请输入正确的时间 yyyy-mm-dd label_bidding_succeed: 应标成功 + label_bidding_contest_succeed: 竞赛提交成功 #added by bai + label_bidding_homework_succeed: 作业提交成功 #added by bai label_bidding_fail: 应标失败,该项目已经应标 label_bidding_homework_fail: 作业提交失败,该作业已经被提交!