竞赛搜索项为空时给出提示
This commit is contained in:
parent
bc179fbc39
commit
b4ee106ce9
|
@ -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']
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div class="project-search" style="float: right">
|
||||
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
||||
<%= 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" %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -3,10 +3,16 @@
|
|||
|
||||
<div class="box ph10_5">
|
||||
<!--[form:message]-->
|
||||
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br />
|
||||
<%= f.text_field :subject,:size => 60, :style => "width: 99%;", :id => "message_subject",:readonly=>true %><!--by young-->
|
||||
</p>
|
||||
<p>
|
||||
<% unless replying %>
|
||||
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br/>
|
||||
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject" %><!--by young-->
|
||||
</p>
|
||||
<% else %>
|
||||
<p><label for="message_subject"><%= l(:field_subject) %><span class="required"> * </span></label><br/>
|
||||
<%= f.text_field :subject, :size => 60, :style => "width: 99%;", :id => "message_subject", :readonly => true %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
<% unless replying %>
|
||||
<% if @message.safe_attribute? 'sticky' %>
|
||||
<%= f.check_box :sticky %> <%= label_tag 'message_sticky', l(:label_board_sticky) %>
|
||||
|
|
Loading…
Reference in New Issue