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 %>