1.修改软件创客中每个用户内容显示不一致的BUG

2.去掉用户项目列表最后一个项目后的逗号
This commit is contained in:
sw 2014-07-04 13:59:08 +08:00
parent b492ead0c0
commit bc9f1e5a01
1 changed files with 2 additions and 7 deletions

View File

@ -1,7 +1,6 @@
<!-- added by bai -->
<div class="autoscroll">
<% for user in @users -%>
<% unless user.id == 1%>
<!-- added by bai -->
<% messages_count = user.messages.count %>
<% messages_score = messages_count * 0.05%>
@ -51,15 +50,12 @@
</div>
<div class="user-bottom">
<% unless user.memberships.empty? %>
<% 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 memberships %>
<%= link_to_project(member.project) %><%= (user.memberships.last == member) ? '' : '' %>
<%= link_to_project(member.project) %><%= (memberships.last == member) ? '' : '' %>
<% end %>
<% end %>
<p>
<%# unless user.memberships.empty? %>
<%# cond = Project.visible_condition(User.current) + " AND projects.project_type = 1" %>
@ -74,9 +70,8 @@
<%# end %>
</p>
<%= user.changesets.count == 0 ? '' : "#{l(:label_x_total_commit, :count => user.changesets.count)}" %>
<%= l(:label_x_total_commit, :count => user.changesets.count) %>
</div>
</div>
<% end -%>
<% end -%>
</div>