diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 8533c401..9b3a672c 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1459,6 +1459,19 @@ module ApplicationHelper
end
html.html_safe
end
+
+ def show_contest_softapplication(contest)
+ html = ''
+ if contest.softapplications.where('is_public = 1').count == 0
+ html << (content_tag "p", l(:label_no_contest_softapplication), :class => "font_lighter")
+ else
+ contest.softapplications.where('is_public = 1').take(12).each do |softapplication|
+ html << (link_to image_tag(url_to_avatar(project), :class => "avatar", :title => project.name), project_path(project), :class => "avatar")
+ end
+ end
+ html.html_safe
+ end
+
def show_contest_fans_picture(obj)
html = ''
if obj.watcher_users.count == 0
diff --git a/app/views/contests/_contest_list.html.erb b/app/views/contests/_contest_list.html.erb
index 5a8bf689..4fb2865c 100644
--- a/app/views/contests/_contest_list.html.erb
+++ b/app/views/contests/_contest_list.html.erb
@@ -18,10 +18,9 @@
- <%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<%= link_to contest.contesting_projects.count %>)
- <%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<%= link_to contest.contesting_softapplications.count %>)
- <%= l(:label_contest_response, :count => contest.commit) %>(<%= link_to contest.commit, respond_path(contest) %>)
- <%= l(:label_contest_watchers, :count => contest.watcher_users.count) %>(<%= link_to contest.watcher_users.count, respond_path(contest) %>)
+ | <%= l(:label_contest_project, :count => contest.contesting_projects.count) %>(<%= link_to(contest.contesting_projects.count, show_project_contest_path(contest)) %>)
+ <%= l(:label_contest_softapplication, :count => contest.contesting_softapplications.count) %>(<%= link_to(contest.contesting_softapplications.count, show_softapplication_contest_path(contest)) %>)
+
|
diff --git a/app/views/contests/_softapplication_list.html.erb b/app/views/contests/_softapplication_list.html.erb
index 221dc9dc..570a4067 100644
--- a/app/views/contests/_softapplication_list.html.erb
+++ b/app/views/contests/_softapplication_list.html.erb
@@ -2,7 +2,7 @@
<%= render_flash_messages %>
- <%= l(:label_bidding_project) %> |
+ <%= l(:label_contest_softapplication) %>(<%= contesting_softapplication.count%>) |
<% if User.current.logged? %>
diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb
index 14598db3..2f786008 100644
--- a/app/views/layouts/base_newcontest.html.erb
+++ b/app/views/layouts/base_newcontest.html.erb
@@ -197,15 +197,15 @@
<%= l(:label_contest_application) %>
- <% if show_more_contest_project?(@contest) %>
- <%= link_to l(:label_more), :controller => 'contests', :action => 'show_project'%>
+ <% if show_more_contest_softapplication?(@contest) %>
+ <%= link_to l(:label_more), :controller => 'contests', :action => 'show_softapplication'%>
<% end %>
- <%= show_contest_project(@contest) %>
+ <%= show_contest_softapplication(@contest) %>
|
diff --git a/app/views/softapplications/new.html.erb b/app/views/softapplications/new.html.erb
index b47930d6..a300512c 100644
--- a/app/views/softapplications/new.html.erb
+++ b/app/views/softapplications/new.html.erb
@@ -50,7 +50,7 @@
|