diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index 14395ac0..830c7435 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -4,7 +4,8 @@ class ContestsController < ApplicationController menu_item :respond menu_item :project, :only => :show_project menu_item :application, :only => :show_softapplication - before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward, + menu_item :attendingcontest, :only => :show_attendingcontest + before_filter :find_contest, :only => [:show_contest, :show_project, :show_softapplication, :show_attendingcontest, :create,:destroy,:more,:back,:add,:add_softapplication,:new,:show_results, :set_reward, :show_contest_project, :show_contest_user, :join_in_contest, :unjoin_in_contest, :new_join,:show_participator, :settings] # added by fq @@ -288,6 +289,13 @@ class ContestsController < ApplicationController end end + + ###我要参赛 + def show_attendingcontest + + end + + ###end ###添加已创建的参赛项目 def add project = Project.find(params[:contest]) diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 26d3f668..1b3d0e23 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1870,6 +1870,7 @@ zh: label_edit_softapplication: 修改应用 label_contest_delete: 删除竞赛 label_softapplication_list: 应用列表 + label_attending_contest: 我要参赛 label_coursefile_sharingarea: 课程资源共享区 label_sort_by_activity: 按动态数排序 diff --git a/config/routes.rb b/config/routes.rb index be0d11ce..c40c3b25 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -67,15 +67,16 @@ RedmineApp::Application.routes.draw do end member do match 'add_softapplication' - match 'update_contest' , via: [:put] - match 'show_contest' , via: :get - match 'show_project' , via: :get - match 'show_softapplication', via: :get - match 'show_participator' , via: :get - match 'add' , via: [:get, :post] - match 'add_softapplication' , via: [:get, :post] - match 'create' , via: :post - match 'settings' , via: [:get, :post] + match 'update_contest' , via: [:put] + match 'show_contest' , via: :get + match 'show_project' , via: :get + match 'show_softapplication' , via: :get + match 'show_attendingcontest' , via: :get + match 'show_participator' , via: :get + match 'add' , via: [:get, :post] + match 'add_softapplication' , via: [:get, :post] + match 'create' , via: :post + match 'settings' , via: [:get, :post] end end diff --git a/lib/redmine.rb b/lib/redmine.rb index 2c935074..58349784 100644 --- a/lib/redmine.rb +++ b/lib/redmine.rb @@ -281,6 +281,7 @@ Redmine::MenuManager.map :contest_menu do |menu| menu.push :respond, :show_contest_contest_path, :caption => :label_user_response menu.push :project, :show_project_contest_path, :caption => :label_contest_project menu.push :application, :show_softapplication_contest_path, :caption => :label_contest_application + menu.push :attendingcontest, :show_attendingcontest_contest_path, :caption => :label_attending_contest # menu.push :result, { :controller => 'bids', :action => 'show_results' }, # :caption => :label_bidding_results,:if => Proc.new{ |p| User.current.id == p } end