diff --git a/app/models/project.rb b/app/models/project.rb
index 730a10606..36a28e1b6 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -152,6 +152,10 @@ class Project < ActiveRecord::Base
end
}
+ def new_course
+ self.where('project_type = ?', 1)
+ end
+
# 项目留言 added by fq
def self.add_jour(user, notes)
diff --git a/app/views/bids/show_participator.html.erb b/app/views/bids/show_participator.html.erb
index da62436b9..4a2bcab45 100644
--- a/app/views/bids/show_participator.html.erb
+++ b/app/views/bids/show_participator.html.erb
@@ -26,7 +26,7 @@
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_contribute_to, :count => memberships.count) %>
- <% for member in user.memberships %>
+ <% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
<% end %>
<% end %>
diff --git a/app/views/layouts/base_contest.html.erb b/app/views/layouts/base_contest.html.erb
index c082013b9..4e96e56f4 100644
--- a/app/views/layouts/base_contest.html.erb
+++ b/app/views/layouts/base_contest.html.erb
@@ -55,7 +55,7 @@
-
+ |
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
|
@@ -63,50 +63,40 @@
|
<%= h @bid.name %> |
-
-
+ |
+
<%= join_in_contest(@bid, User.current)%>
<%= watcher_link(@bid, User.current) %> |
-
-
-
-
+
+
-
-
+
+
<%if User.current.logged? %>
<% if @bid.author.id == User.current.id %>
<%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
<% end %>
<% end %>
- |
-
+
-
-
-
+
+
-
-
-
- <%=link_to "#{@bid.join_in_contests.count}",:controller => "bids", :action => "show_participator" %> |
-
- <%=link_to "#{@bid.projects.count}", :controller => 'bids', :action => 'show_project' %> |
-
-
+
+ <%=link_to "#{@bid.join_in_contests.count}",:controller => "bids",
+ :action => "show_participator" %> |
+ <%=link_to "#{@bid.projects.count}", :controller => 'bids',
+ :action => 'show_project' %> |
- <%= l(:label_participator) %> |
-
- <%= l(:label_bidding_project) %> |
-
-
+ <%= l(:label_participator) %> |
+ <%= l(:label_bidding_project) %> |
-
+
diff --git a/app/views/users/user_fanslist.html.erb b/app/views/users/user_fanslist.html.erb
index fb3a3f310..bfdf29075 100644
--- a/app/views/users/user_fanslist.html.erb
+++ b/app/views/users/user_fanslist.html.erb
@@ -21,7 +21,7 @@
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_contribute_to, :count => memberships.count) %>
- <% for member in user.memberships %>
+ <% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
<% end %>
<% end %>
diff --git a/app/views/users/user_watchlist.html.erb b/app/views/users/user_watchlist.html.erb
index e93cd2c01..31047e92b 100644
--- a/app/views/users/user_watchlist.html.erb
+++ b/app/views/users/user_watchlist.html.erb
@@ -16,7 +16,7 @@
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_contribute_to, :count => memberships.count) %>
- <% for member in user.memberships %>
+ <% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
<% end %>
<% end %>