diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index 1b172e0c..987881a8 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -28,6 +28,9 @@ class ContestsController < ApplicationController @offset, @limit = api_offset_and_limit({:limit => 10}) @contests = Contest.visible @contests = @contests.like(params[:name]) if params[:name].present? + if params[:contests_search] + (redirect_to contests_path, :notice => l(:label_sumbit_empty);return) if params[:name].blank? + end @contest_count = @contests.count @contest_pages = Paginator.new @contest_count, @limit, params['page'] diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb index 670ba27c..8c999f94 100644 --- a/app/views/contests/index.html.erb +++ b/app/views/contests/index.html.erb @@ -15,7 +15,7 @@
-<%= f.text_field :subject,:size => 60, :style => "width: 99%;", :id => "message_subject",:readonly=>true %>
-
+ <% unless replying %> +
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %>
+
+ <%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
+
<% unless replying %> <% if @message.safe_attribute? 'sticky' %> <%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>