From 1e7e0a1bb54cdd0d198aad32ae97148c1a21684c Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Thu, 3 Apr 2014 22:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E5=85=A5=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E5=92=8C=E9=80=80=E5=87=BA=E7=AB=9E=E8=B5=9B=E4=B8=8D?= =?UTF-8?q?=E8=83=BD=E5=88=B7=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE=E5=90=8E=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E5=88=97=E8=A1=A8=E5=92=8C=E7=AB=9E=E8=B5=9B=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=90=9C=E7=B4=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 10 +++++----- app/controllers/welcome_controller.rb | 4 ++-- app/views/welcome/contest.html.erb | 8 +++++--- config/locales/zh.yml | 3 +++ config/routes.rb | 2 +- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 32878a2cd..ebe8342d4 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -461,22 +461,22 @@ class BidsController < ApplicationController # added by bai type ==1 需求,type==2 竞赛, type==3 作业 if @bid.reward_type == 1 - flash[:notice] = l(:label_bidding_succeed) + flash.now[:notice] = l(:label_bidding_succeed) elsif @bid.reward_type == 2 - flash[:notice] = l(:label_bidding_contest_succeed) + flash.now[:notice] = l(:label_bidding_contest_succeed) else @bid.reward_type == 3 - flash[:notice] = l(:label_bidding_homework_succeed) + flash.now[:notice] = l(:label_bidding_homework_succeed) end # end end else if @bid.reward_type == 3 - flash[:error] = l(:label_bidding_homework_fail) + flash.now[:error] = l(:label_bidding_homework_fail) else - flash[:error] = l(:label_bidding_fail) + flash.now[:error] = l(:label_bidding_fail) end end @bidding_project = @bid.biding_projects diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index d35be75d2..a7b3b421a 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -81,7 +81,7 @@ class WelcomeController < ApplicationController end def contest - + end def search @@ -120,7 +120,7 @@ class WelcomeController < ApplicationController def entry_select_contest if request.original_url.match(/contest\.trustie\.net/) contest - render :contest + render :contest return 0 end end diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index a343f2ea2..222ff7dc6 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -100,13 +100,15 @@
<%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %> , <%= l(:label_welcome_trustie_contest_description) %>
- - +
diff --git a/config/locales/zh.yml b/config/locales/zh.yml index e2b69082d..448690b46 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1824,3 +1824,6 @@ zh: label_participate: 参赛者 label_contest_project: 参赛项目 label_contest_application: 参赛应用 + button_contesting_as_project: 我要参赛(新建项目) + button_contesting_as_application: 我要参赛(发布应用) + diff --git a/config/routes.rb b/config/routes.rb index e72f83aca..7a782449b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -560,7 +560,7 @@ RedmineApp::Application.routes.draw do match 'calls', :controller => 'bids', :action => 'index' match 'calls/:id', :controller => 'bids', :action => 'show', :as => 'respond' - match 'contest', :controller => 'bids', :action => 'contest', :as => 'contest' + match 'contest', :controller => 'bids', :action => 'contests', :as => 'contest' #modified @20140403 ######added by nie match 'tags/show_projects_tags',:to => 'tags#show_projects_tags'