socialforge/app/views/contests/index.html.erb

82 lines
3.3 KiB
Plaintext
Raw Normal View History

2014-10-23 18:49:14 +08:00
<div class="top-content">
<%= 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>
<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">
<script type="text/javascript">
function regexName1()
{
var name = $.trim($("#name").val());
if(name.length == 0)
{
$("#contest_name_span_head").text("<%= l(:label_search_conditions_not_null) %>");
$("#contest_name_span_head").css('color','#ff0000');
$("#contest_name_span_head").focus();
return false;
}
else
{
$("#contest_name_span_head").text("");
return true;
}
}
function submitSerch()
{
if(regexName1()){$("#contests_serch").submit();}
}
</script>
<%= 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] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => "contests_search" %>
<a href="#" onclick="submitSerch();" class="ButtonColor m3p10" style="padding-top: 7px !important;">
<%= l(:label_search)%>
</a>
<br />
<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%>
<%#= 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 %>
<%#= 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)%>