1、竞赛里的参与者名字显示全称

2、个人主页里的“关注”与“粉丝”列表名字显示全称
3、区别了“关注”里个人参与的项目与课程
4、竞赛里的参与者的项目与课程数量的显示做出了区分
5、竞赛的参与者列表增加了学员学号
This commit is contained in:
baiyu 2013-11-15 10:25:07 +08:00
parent 48f34f25ae
commit e5baf0959b
4 changed files with 55 additions and 13 deletions

View File

@ -1404,7 +1404,7 @@ module ApplicationHelper
# added by bai
def show_more_participate?(obj)
if obj.join_in_contests.count > 12
if obj.join_in_contests.count > 0
return true
else
return false

View File

@ -6,22 +6,47 @@
<ul class="list_watch"><li>
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %></td>
<!-- modified by bai 显示人名全称-->
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"),
user_path(user),
:title => "#{user.show_name}" %></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user.show_name), :class => "project_avatar_name" ,
:title => "#{user.show_name}" %>
<!-- added by bai 增加了学员的学号 -->
<%= l(:label_bidding_user_studentcode) %> <%= user.user_extensions.student_id%>
</td>
</tr>
<tr>
<!-- modified by bai 区分课程与项目-->
<td colspan="2" width="580px" ><p class="font_description">
<% unless user.memberships.empty? %>
<%= l(:label_x_contribute_to, :count => user.memberships.count) %>
<% 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 %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p></td>
</p>
<!-- added by bai -->
<p class="font_description">
<% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type = 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p>
</td>
</tr>
<!-- end -->
<tr>
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
</td>

View File

@ -5,10 +5,12 @@
<ul class="list_watch"><li>
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %></td>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"),
user_path(user),
:title => "#{user.name}" %></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>
<tr> <!-- modified by bai -->
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user.show_name), :class => "project_avatar_name" %>
</td>
</tr>

View File

@ -6,20 +6,35 @@
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :title => "#{user.name}" %></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user), :class => "project_avatar_name" %>
<tr> <!-- modified by bai 增加了关注人的名字全称-->
<td colspan="2" valign="top"><strong><%= content_tag "div", link_to_user(user.show_name), :class => "project_avatar_name" %>
</td>
</tr>
<tr>
<tr> <!-- modified by bai 区别了“关注”里个人参与的项目与课程-->
<td colspan="2" width="580px" ><p class="font_description">
<% unless user.memberships.empty? %>
<%= l(:label_x_contribute_to, :count => user.memberships.count) %>
<% 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 %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p></td>
</p>
<p class="font_description">
<% unless user.memberships.empty? %>
<% cond = Project.visible_condition(User.current) + "AND projects.project_type = 1" %>
<% memberships = user.memberships.all(:conditions => cond) %>
<%= l(:label_x_course_contribute_to, :count => memberships.count) %>
<% for member in memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
</p>
</td>
</tr>
<!-- end -->
<tr>
<td width="200" align="right" class="font_lighter"><%= l(:label_user_joinin) %><%= format_date(user.created_on) %>
</td>