Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
84e8a40174
|
@ -42,6 +42,7 @@ class ContestsController < ApplicationController
|
||||||
@offset, @limit = api_offset_and_limit(:limit => 10)
|
@offset, @limit = api_offset_and_limit(:limit => 10)
|
||||||
#@contests = Contest.visible
|
#@contests = Contest.visible
|
||||||
#@contests = @contests.like(params[:name]) if params[:name].present?
|
#@contests = @contests.like(params[:name]) if params[:name].present?
|
||||||
|
@is_search = params[:name] ? true:false
|
||||||
@contests = Contest.visible.where("name like '%#{params[:name]}%'")
|
@contests = Contest.visible.where("name like '%#{params[:name]}%'")
|
||||||
if params[:contests_search]
|
if params[:contests_search]
|
||||||
(redirect_to contests_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
(redirect_to contests_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank?
|
||||||
|
|
|
@ -38,11 +38,16 @@
|
||||||
</div>
|
</div>
|
||||||
<% if @contests.size > 0%>
|
<% if @contests.size > 0%>
|
||||||
<%= sort_contest(@s_state)%>
|
<%= sort_contest(@s_state)%>
|
||||||
<div id="bid-show">
|
<div id="bid-show" class="projects-index">
|
||||||
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% elsif @is_search%>
|
||||||
<%= render :partial => "layouts/no_content"%>
|
<%= render :partial => "layouts/no_content"%>
|
||||||
|
<% else %>
|
||||||
|
<%= sort_contest(@s_state)%>
|
||||||
|
<div id="bid-show" class="projects-index">
|
||||||
|
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% html_title l(:label_contest_list)%>
|
<% html_title l(:label_contest_list)%>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</div>
|
</div>
|
||||||
<%= sort_course(@s_type, @school_id)%>
|
<%= sort_course(@s_type, @school_id)%>
|
||||||
|
|
||||||
<div id="courses-index">
|
<div id="courses-index" class="projects-index">
|
||||||
<%if @courses%>
|
<%if @courses%>
|
||||||
<%= render_course_hierarchy(@courses)%>
|
<%= render_course_hierarchy(@courses)%>
|
||||||
<%end%>
|
<%end%>
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%= sort_project(@s_type, @project_type) %>
|
<%= sort_project(@s_type, @project_type) %>
|
||||||
<div id="projects-index">
|
<div id="projects-index" class="projects-index">
|
||||||
<%= render_project_hierarchy(@projects)%>
|
<%= render_project_hierarchy(@projects)%>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div style="clear: both"></div>
|
<div style="clear: both"></div>
|
||||||
<div>
|
<div class="school-index">
|
||||||
<ul id="schoollist" style="line-height: 25px">
|
<ul id="schoollist" style="line-height: 25px">
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -2832,3 +2832,6 @@ div.repos_explain{
|
||||||
}
|
}
|
||||||
|
|
||||||
.list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;}
|
.list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;}
|
||||||
|
|
||||||
|
.projects-index{min-height: 350px}
|
||||||
|
.school-index{min-height: 400px}
|
|
@ -864,7 +864,7 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked {
|
||||||
-webkit-box-sizing: border-box;
|
-webkit-box-sizing: border-box;
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
-box-sizing: border-box;
|
-box-sizing: border-box;
|
||||||
min-height: 200px;
|
min-height: 180px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue