From aea41ba99799306c70402844649bb0322ca00e61 Mon Sep 17 00:00:00 2001 From: nwb Date: Mon, 21 Jul 2014 15:45:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=9E=E8=B5=9B=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/welcome_controller.rb | 2 ++ app/views/welcome/contest.html.erb | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 6a1772c8b..27d02d56e 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -126,6 +126,8 @@ class WelcomeController < ApplicationController :project_type => Project::ProjectType_project) when :courses redirect_to courses_search_path(:name => search_condition) + when :contests + redirect_to contests_search_path(:name => search_condition) when :users redirect_to users_search_path(:name => search_condition) when :users_teacher diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 4efbbe6d4..bd8be87a3 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -131,12 +131,12 @@ -
- <%= form_tag({controller: 'contests', action: 'index'}, method: :get) do %> +
+ <%= form_tag({controller: :welcome, action: :search }, method: :get) do %> <%= text_field_tag 'name', params[:name], :placeholder => l(:label_search_intimation), name: "name", :class => 'blueinputbar', :style => 'width:240px; padding-right:50px;'%>   <%= hidden_field_tag 'project_type', params[:project_type] %> - <%= submit_tag l(:label_search), :class => "enterprise" , :name => nil%> + <%= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %> <% end %>