<!-- added by bai -->
<% issue_count = @project.issues.count %>
<% issue_journal_count = @project.issue_changes.count %>
<% issue_score = issue_count * 0.2 %>
<% issue_journal_score = issue_journal_count * 0.1 %>
<% finall_issue_score = issue_score + issue_journal_score %>

<% new_count = @project.news.count %>
<% new_score = new_count * 0.1 %>
<% finall_new_score = new_score %>

<% document_count = @project.documents.count %>
<% file_score = document_count * 0.1 %>
<% finall_file_score = file_score %>

<% changeset_count = @project.changesets.count %>
<% code_submit_score = changeset_count * 0.3 %>
<% finall_code_submit_score = code_submit_score %>

<% board_message_count = 0 %>
<% @project.boards.each do |board| %>
<% board_message_count += board.messages_count %>
<% end %>
<% topic_score = board_message_count * 0.1 %>
<% finall_topic_score = topic_score %>

<% finall_project_score = finall_issue_score + finall_new_score + finall_file_score + finall_code_submit_score + topic_score %>

<%= l(:label_projects_score) %> 
<div> = <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> + 
	  <%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %></div>
<div> = <%= format("%.2f" , finall_issue_score).to_f %> + <%= format("%.2f" , finall_new_score).to_f %> +
	  <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , finall_code_submit_score).to_f %> +
	  <%= format("%.2f" , topic_score).to_f %></div>
<div> = <%= format("%.2f" , finall_project_score).to_f %></div>
<!-- end -->