From 72e9515f4d0cd93c9295ff6b348f843a2bc56910 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Fri, 9 May 2014 18:28:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=AB=9E=E8=B5=9B=E5=AD=90?= =?UTF-8?q?=E7=AB=99=E9=A6=96=E9=A1=B5=E5=92=8C=E7=AB=9E=E8=B5=9B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E4=B8=AD=E5=8F=82=E8=B5=9B=E4=BD=9C?= =?UTF-8?q?=E5=93=81=E7=9A=84=E7=BB=9F=E8=AE=A1=E6=95=B0=E9=87=8F=EF=BC=88?= =?UTF-8?q?=E7=94=B1=E4=BA=8E=E4=BB=A5=E5=89=8D=E7=9A=84=E5=8F=82=E8=B5=9B?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=9C=89=E7=A7=81=E6=9C=89=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=BB=9F=E8=AE=A1=E6=95=B0=E9=87=8F=E6=9C=89?= =?UTF-8?q?=E8=AF=AF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/_contest_list.html.erb | 2 +- app/views/welcome/contest.html.erb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/contests/_contest_list.html.erb b/app/views/contests/_contest_list.html.erb index ae9958796..8b5e34975 100644 --- a/app/views/contests/_contest_list.html.erb +++ b/app/views/contests/_contest_list.html.erb @@ -22,7 +22,7 @@ <% if contest.id == 2 or contest.id == 3 or contest.id == 6 %> - <%= l(:label_contest_work, :count => contest.contesting_projects.count) %>(<%= link_to(contest.contesting_projects.count, show_attendingcontest_contest_path(contest), :target => "_blank") %>) + <%= l(:label_contest_work, :count => contest.contesting_projects.count) %>(<%= link_to(contest.projects.where('is_public=1').count, show_attendingcontest_contest_path(contest), :target => "_blank") %>) <% else %> <%= l(:label_contest_work, :count => contest.contesting_softapplications.count) %>(<%= link_to(contest.contesting_softapplications.count, show_attendingcontest_contest_path(contest), :target => "_blank") %>) <% end %> diff --git a/app/views/welcome/contest.html.erb b/app/views/welcome/contest.html.erb index 2692b6ceb..e32d375d0 100644 --- a/app/views/welcome/contest.html.erb +++ b/app/views/welcome/contest.html.erb @@ -152,7 +152,11 @@
<%= link_to(contest.name, show_contest_contest_path(contest.id), :class => "d-g-blue d-p-project-name", :title => "#{contest.name}", :target => "_blank") %> - (<%= link_to("含#{contest.contesting_softapplications.count}个app", show_softapplication_contest_path(contest), :target => "_blank") %>) + <% if contest.id == 2 or contest.id == 3 or contest.id == 6 %> + (<%= link_to("含#{contest.projects.where('is_public=1').count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %>) + <% else %> + (<%= link_to("含#{contest.contesting_softapplications.count}个app", show_attendingcontest_contest_path(contest), :target => "_blank") %>) + <% end %>