2014-10-23 18:49:14 +08:00
|
|
|
<div class="top-content">
|
2014-12-18 15:39:32 +08:00
|
|
|
<%= form_tag({:controller => 'contests', :action => 'index'}, :method => :get, :id => 'contests_serch') do %>
|
2014-10-23 18:49:14 +08:00
|
|
|
<table width="940px">
|
|
|
|
<tr>
|
2014-11-27 17:05:53 +08:00
|
|
|
<td class="info_font" style="width: 220px; color: #15bccf" rowspan="2">
|
|
|
|
<a href="http://<%= Setting.host_contest%>" style="color: #15bccf;">
|
|
|
|
<%=l(:label_contest_innovate_community)%>
|
|
|
|
</a>
|
|
|
|
</td>
|
|
|
|
<td class="location-list">
|
|
|
|
<strong><%= l(:label_user_location) %> :</strong>
|
|
|
|
</td>
|
2015-01-09 10:57:33 +08:00
|
|
|
<td rowspan="2" valign="bottom">
|
2014-10-23 18:49:14 +08:00
|
|
|
<% if User.current.logged? %>
|
|
|
|
<% unless User.current.user_extensions.identity == 1 %>
|
|
|
|
<%= link_to(l(:label_newtype_contest), new_contest_contests_path, :class => 'icon icon-add', :target => "_blank") %>
|
|
|
|
<!-- end longjun -->
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
<td rowspan="2" >
|
|
|
|
<div class="project-search" style="float: right">
|
2014-12-18 15:39:32 +08:00
|
|
|
<script type="text/javascript">
|
2014-12-23 15:13:16 +08:00
|
|
|
function regexName1()
|
2014-12-18 15:39:32 +08:00
|
|
|
{
|
|
|
|
var name = $.trim($("#name").val());
|
|
|
|
if(name.length == 0)
|
|
|
|
{
|
2014-12-23 15:13:16 +08:00
|
|
|
$("#contest_name_span_head").text("<%= l(:label_search_conditions_not_null) %>");
|
|
|
|
$("#contest_name_span_head").css('color','#ff0000');
|
|
|
|
$("#contest_name_span_head").focus();
|
2014-12-18 15:39:32 +08:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-12-23 15:13:16 +08:00
|
|
|
$("#contest_name_span_head").text("");
|
2014-12-18 15:39:32 +08:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function submitSerch()
|
|
|
|
{
|
2014-12-23 15:13:16 +08:00
|
|
|
if(regexName1()){$("#contests_serch").submit();}
|
2014-12-18 15:39:32 +08:00
|
|
|
}
|
|
|
|
</script>
|
2014-12-23 15:18:55 +08:00
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30, :onkeyup => 'regexName1();', :width => "125px" %>
|
2014-10-23 18:49:14 +08:00
|
|
|
<%= hidden_field_tag 'project_type', params[:project_type] %>
|
2014-12-18 15:39:32 +08:00
|
|
|
<%#= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
|
2014-12-19 14:45:50 +08:00
|
|
|
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
|
2014-12-18 15:39:32 +08:00
|
|
|
<%= l(:label_search)%>
|
|
|
|
</a>
|
|
|
|
<br />
|
2014-12-23 15:13:16 +08:00
|
|
|
<span id="contest_name_span_head"></span>
|
2014-10-23 18:49:14 +08:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td >
|
|
|
|
<%=link_to l(:field_homepage), home_path %> >
|
2014-11-27 17:05:53 +08:00
|
|
|
<a><%= l(:label_contest_innovate) %></a>
|
2014-10-23 18:49:14 +08:00
|
|
|
<!-- end longjun -->
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% if @contests.size > 0%>
|
2014-12-18 15:39:32 +08:00
|
|
|
<%#= sort_contest(@s_state)%>
|
2014-10-23 18:49:14 +08:00
|
|
|
<div id="bid-show" class="projects-index">
|
|
|
|
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
|
|
|
</div>
|
|
|
|
<% elsif @is_search%>
|
|
|
|
<%= render :partial => "layouts/no_content"%>
|
|
|
|
<% else %>
|
2014-12-18 15:39:32 +08:00
|
|
|
<%#= sort_contest(@s_state)%>
|
2014-10-23 18:49:14 +08:00
|
|
|
<div id="bid-show" class="projects-index">
|
|
|
|
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% html_title l(:label_contest_list)%>
|