parent
5de8e1c2f2
commit
1944cb5bcf
|
@ -152,6 +152,10 @@ class Project < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def new_course
|
||||||
|
self.where('project_type = ?', 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
# 项目留言 added by fq
|
# 项目留言 added by fq
|
||||||
def self.add_jour(user, notes)
|
def self.add_jour(user, notes)
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
|
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
|
||||||
<% memberships = user.memberships.all(:conditions => cond) %>
|
<% memberships = user.memberships.all(:conditions => cond) %>
|
||||||
<%= l(:label_x_contribute_to, :count => memberships.count) %>
|
<%= 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) ? '' : ',' %>
|
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
<div class="inf_user_image">
|
<div class="inf_user_image">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left" valign="middle">
|
<td align="left" width="100px">
|
||||||
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
|
<%= image_tag(url_to_avatar(@user), :class => "avatar2") %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -63,50 +63,40 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
|
<td class="info_font" style=" word-wrap: break-word; word-break: break-all"><%= h @bid.name %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr colspan='3'>
|
||||||
<td rowspan="2" width="250px">
|
<td valign="middle">
|
||||||
<%= join_in_contest(@bid, User.current)%>
|
<%= join_in_contest(@bid, User.current)%>
|
||||||
<%= watcher_link(@bid, User.current) %> <!-- <%= link_to("选为作业", fork_path(@bid)) %> --></td>
|
<%= watcher_link(@bid, User.current) %> <!-- <%= link_to("选为作业", fork_path(@bid)) %> --></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table></td>
|
</table>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<!-- added by bai 增加了竞赛的配置 -->
|
<!-- added by bai 增加了竞赛的配置 -->
|
||||||
<table>
|
|
||||||
<tr><td style="padding-left: 130px">
|
|
||||||
<%if User.current.logged? %>
|
<%if User.current.logged? %>
|
||||||
<% if @bid.author.id == User.current.id %>
|
<% if @bid.author.id == User.current.id %>
|
||||||
<%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
|
<%= link_to l(:label_contest_modify_settings), {:controller => 'bids', :action => 'settings', :id => @bid} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--parameter -->
|
<!-- added by bai 增加参与人和参与项目的数量显示 -->
|
||||||
<div class="user_fans">
|
<div class="user_fans">
|
||||||
|
|
||||||
<table width="240" border="0">
|
<table width="240" border="0">
|
||||||
<tr align="center" width="80px">
|
<tr align="center" width="80px">
|
||||||
|
<td class="font_index"><%=link_to "#{@bid.join_in_contests.count}",:controller => "bids",
|
||||||
|
:action => "show_participator" %></td>
|
||||||
<td class="font_index"><%=link_to "#{@bid.join_in_contests.count}",:controller => "bids", :action => "show_participator" %></td>
|
<td class="font_index"><%=link_to "#{@bid.projects.count}", :controller => 'bids',
|
||||||
|
:action => 'show_project' %></td>
|
||||||
<td class="font_index"><%=link_to "#{@bid.projects.count}", :controller => 'bids', :action => 'show_project' %></td>
|
|
||||||
|
|
||||||
|
|
||||||
<tr class="font_aram">
|
<tr class="font_aram">
|
||||||
<td align="center" width="70px"> <%= l(:label_participator) %></td>
|
<td align="center" width="70px"> <%= l(:label_participator) %></td>
|
||||||
|
<td align="center" width="70px"> <%= l(:label_bidding_project) %></td>
|
||||||
<td align="center" width="70px"> <%= l(:label_bidding_project) %></td>
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="user_underline"></div>
|
<div class="user_underline"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- end -->
|
||||||
|
|
||||||
<div class="inf_user_image">
|
<div class="inf_user_image">
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
|
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
|
||||||
<% memberships = user.memberships.all(:conditions => cond) %>
|
<% memberships = user.memberships.all(:conditions => cond) %>
|
||||||
<%= l(:label_x_contribute_to, :count => memberships.count) %>
|
<%= 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) ? '' : ',' %>
|
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
|
<% cond = Project.visible_condition(User.current) + "AND projects.project_type <> 1" %>
|
||||||
<% memberships = user.memberships.all(:conditions => cond) %>
|
<% memberships = user.memberships.all(:conditions => cond) %>
|
||||||
<%= l(:label_x_contribute_to, :count => memberships.count) %>
|
<%= 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) ? '' : ',' %>
|
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : ',' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in New Issue