From efc247f2e76f47ea21d43592f47ca00141112601 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 23 Oct 2014 17:05:36 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=90=84=E4=B8=AA=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=9C=A8=EF=BC=8C=E6=B2=A1=E6=9C=89=E6=95=B0=E6=8D=AE=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E7=9A=84=E6=98=BE=E7=A4=BA=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E3=80=822=E3=80=81=E7=82=B9=E5=87=BB=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E5=88=97=E8=A1=A8=EF=BC=8C=E5=9C=A8=E6=B2=A1=E6=9C=89=E7=AB=9E?= =?UTF-8?q?=E8=B5=9B=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E6=98=AF=E6=97=A0=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E4=BF=AE=E6=AD=A3=E4=B8=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/contests_controller.rb | 1 + app/views/contests/index.html.erb | 9 +++++++-- app/views/courses/index.html.erb | 2 +- app/views/projects/index.html.erb | 2 +- app/views/school/index.html.erb | 2 +- public/stylesheets/application.css | 3 +++ public/stylesheets/nyan.css | 2 +- 7 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/controllers/contests_controller.rb b/app/controllers/contests_controller.rb index 5cdbda5a7..d7a79457a 100644 --- a/app/controllers/contests_controller.rb +++ b/app/controllers/contests_controller.rb @@ -42,6 +42,7 @@ class ContestsController < ApplicationController @offset, @limit = api_offset_and_limit(:limit => 10) #@contests = Contest.visible #@contests = @contests.like(params[:name]) if params[:name].present? + @is_search = params[:name] ? true:false @contests = Contest.visible.where("name like '%#{params[:name]}%'") if params[:contests_search] (redirect_to contests_url, :notice => l(:label_sumbit_empty);return) if params[:name].blank? diff --git a/app/views/contests/index.html.erb b/app/views/contests/index.html.erb index 115b154e6..b8033f89f 100644 --- a/app/views/contests/index.html.erb +++ b/app/views/contests/index.html.erb @@ -38,11 +38,16 @@ <% if @contests.size > 0%> <%= sort_contest(@s_state)%> -
+
<%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %>
-<% else %> +<% elsif @is_search%> <%= render :partial => "layouts/no_content"%> +<% else %> + <%= sort_contest(@s_state)%> +
+ <%= render :partial => 'contest_list', :locals => {:contests => @contests, :contest_pages => @contest_pages} %> +
<% end %> <% html_title l(:label_contest_list)%> diff --git a/app/views/courses/index.html.erb b/app/views/courses/index.html.erb index f781ab5c4..6b75bee67 100644 --- a/app/views/courses/index.html.erb +++ b/app/views/courses/index.html.erb @@ -36,7 +36,7 @@
<%= sort_course(@s_type, @school_id)%> -
+
<%if @courses%> <%= render_course_hierarchy(@courses)%> <%end%> diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index 5d479bced..721fa5eaf 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -31,7 +31,7 @@ <% end %>
<%= sort_project(@s_type, @project_type) %> -
+
<%= render_project_hierarchy(@projects)%>
diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 37febe309..15a76a3d4 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -93,7 +93,7 @@
-
+
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 1f53d9903..aed928ebe 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -2832,3 +2832,6 @@ div.repos_explain{ } .list .tableth{background-color:#EEEEEE; padding: 4px; white-space:pre;} + +.projects-index{min-height: 350px} +.school-index{min-height: 400px} \ No newline at end of file diff --git a/public/stylesheets/nyan.css b/public/stylesheets/nyan.css index 7b35559e6..71b739ad8 100644 --- a/public/stylesheets/nyan.css +++ b/public/stylesheets/nyan.css @@ -864,7 +864,7 @@ table.content-text-list tbody tr td.locked, div.memo-section .locked { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -box-sizing: border-box; - min-height: 200px; + min-height: 180px; }