竞赛页面中增加“我要参赛”菜单

This commit is contained in:
wanglinchun 2014-05-08 08:33:03 +08:00
parent 1471d78e63
commit fe151f9e29
4 changed files with 21 additions and 10 deletions

View File

@ -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])

View File

@ -1870,6 +1870,7 @@ zh:
label_edit_softapplication: 修改应用
label_contest_delete: 删除竞赛
label_softapplication_list: 应用列表
label_attending_contest: 我要参赛
label_coursefile_sharingarea: 课程资源共享区
label_sort_by_activity: 按动态数排序

View File

@ -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

View File

@ -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