diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4ab09db38..ef18793ab 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -679,15 +679,15 @@ module ApplicationHelper def textilizable(*args) options = args.last.is_a?(Hash) ? args.pop : {} case args.size - when 1 - obj = options[:object] - text = args.shift - when 2 - obj = args.shift - attr = args.shift - text = obj.send(attr).to_s - else - raise ArgumentError, 'invalid arguments to textilizable' + when 1 + obj = options[:object] + text = args.shift + when 2 + obj = args.shift + attr = args.shift + text = obj.send(attr).to_s + else + raise ArgumentError, 'invalid arguments to textilizable' end return '' if text.blank? project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil) diff --git a/app/helpers/contests_helper.rb b/app/helpers/contests_helper.rb index 67d1c3b3f..0bc3e5e73 100644 --- a/app/helpers/contests_helper.rb +++ b/app/helpers/contests_helper.rb @@ -100,10 +100,10 @@ module ContestsHelper def count_contest_project contests = Contest.find(:id) @projects = [] - # Modified by alan + # Modified by longjun # for contest in contests contests.each do |contest| - # end alan + # end longjun @projects += contest.contesting_projects end @projects.count diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 3554f85dd..39716d50d 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -191,7 +191,7 @@
-

+

<%=l(:label_notification)%>

diff --git a/config/routes.rb b/config/routes.rb index 33b5cd16a..17be94f9d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -161,7 +161,7 @@ RedmineApp::Application.routes.draw do #end root :to => 'welcome#index', :as => 'home' - + match 'welcome/contest', :to => 'welcome#contest', :via => :get #added by baiyu match 'git_usage/ch_usage', :controller => 'git_usage', :action => 'ch_usage', :via => :get, :as => 'ch_usage' match 'git_usage/en_usage', :controller => 'git_usage', :action => 'en_usage', :via => :get, :as => 'en_usage'