添加负积分修正为0的说明

This commit is contained in:
z9hang 2014-08-28 10:20:08 +08:00
parent d256b2d336
commit f0db3e1b4a
4 changed files with 8 additions and 29 deletions

View File

@ -92,33 +92,6 @@
<% end %></td> <% end %></td>
</tr> </tr>
<!-- added by bai 增加个人得分 -->
<%# messages_count = @user.messages.count %>
<%# messages_score = messages_count * 0.05%>
<%# finall_messages_score = messages_score %>
<%# journals_count = @user.journals.count %>
<%# journals_score = journals_count * 0.1 %>
<%# user_changesets_count = @user.changesets.count %>
<%# user_changesets_score = user_changesets_count * 0.3 %>
<%# finall_user_project_score = journals_score + user_changesets_score %>
<%# journals_for_messages_count = @user.journals_messages.count %>
<%# activities_count = @user.activities.count %>
<%# journals_for_messages_score = journals_for_messages_count * 0.05 %>
<%# activities_score = activities_count * 0.2 %>
<%# finall_activity_score = journals_for_messages_score + activities_score %>
<%# news_count = @user.news.count %>
<%# news_score = news_count * 0.1 %>
<%# wiki_contents_count = @user.wiki_contents.count %>
<%# wiki_contents_score = wiki_contents_count * 0.1 %>
<%# comments_count = @user.comments.count %>
<%# comments_score = comments_count * 0.1 %>
<%# finall_influence_score = news_score + wiki_contents_score + comments_score %>
<%# finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
<!-- modified by zjc 新得分显示 -->
<tr><td class="score"> <tr><td class="score">
<div id="score_div"> <div id="score_div">
<%= render :partial => 'users/user_score', :locals => {:user => @user}%> <%= render :partial => 'users/user_score', :locals => {:user => @user}%>

View File

@ -6,5 +6,9 @@
<!-- <div>&nbsp;&nbsp;&nbsp;+ <%#= l(:label_user_score_of_influence) %></div> --> <!-- <div>&nbsp;&nbsp;&nbsp;+ <%#= l(:label_user_score_of_influence) %></div> -->
<div> = <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %> <div> = <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %>
+ <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %></div> + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %></div>
<div> = <%= format("%.2f" ,option_num.total_score).to_i %></div> <% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , active(option_num)).to_i) < 0 %>
<div><%= l(:lable_score_less_than_zero) %></div>
<% else %>
<div> = <%= format("%.2f" ,option_num.total_score).to_i %></div>
<% end %>
<!-- end --> <!-- end -->

View File

@ -1807,4 +1807,5 @@ en:
label_company_name: Company Name label_company_name: Company Name
notice_account_invalid_creditentials_new: You have not to the mailbox activation notice_account_invalid_creditentials_new: You have not to the mailbox activation
lable_unknow_type: Unknow type lable_unknow_type: Unknow type
lable_score_less_than_zero: Score less than 0, revised to 0

View File

@ -2115,4 +2115,5 @@ zh:
lable_memos_max_length: 帖子内容最大长度为65535个字符 lable_memos_max_length: 帖子内容最大长度为65535个字符
lable_forums_max_length: 贴吧描述最大长度为65535个字符 lable_forums_max_length: 贴吧描述最大长度为65535个字符
lable_unknow_type: 未知类型 lable_unknow_type: 未知类型
lable_score_less_than_zero: 得分小于0修正为0