parent
db1874fa07
commit
13fdbde1cf
@ -0,0 +1,5 @@
|
||||
<% changeset_count = @project.changesets.count %>
|
||||
<% code_submit_score = changeset_count * 0.3 %>
|
||||
<% finall_code_submit_score = code_submit_score %>
|
||||
<div><%= l(:label_code_submit_number) %> * 0.3 = <%= changeset_count %> * 0.3 = <%= format("%.2f" , code_submit_score).to_f %></div>
|
||||
<div><%= l(:label_code_submit_score) %> = <%= format("%.2f" , finall_code_submit_score).to_f %></div>
|
@ -0,0 +1,5 @@
|
||||
<% document_count = @project.documents.count %>
|
||||
<% file_score = document_count * 0.1 %>
|
||||
<% finall_file_score = file_score %>
|
||||
<div><%= l(:label_file_number) %> * 0.1 = <%= document_count %> * 0.1 = <%= format("%.2f" , file_score).to_f %></div>
|
||||
<div><%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %></div>
|
@ -0,0 +1,11 @@
|
||||
<!-- 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 %>
|
||||
<div><%= l(:label_issue_number) %> * 0.2 = <%= issue_count %> * 0.2 = <%= format("%.2f" , issue_score).to_f %></div>
|
||||
<div><%= l(:label_issue_journal_number) %> * 0.1 = <%= issue_journal_count %> * 0.1 = <%= format("%.2f" , issue_journal_score).to_f %></div>
|
||||
<div><%= l(:label_issue_score) %> = <%= format("%.2f" , issue_score).to_f %> + <%= format("%.2f" , issue_journal_score).to_f %>
|
||||
= <%= format("%.2f" , finall_issue_score).to_f %></div>
|
||||
<!-- end -->
|
@ -0,0 +1,5 @@
|
||||
<% new_count = @project.news.count %>
|
||||
<% new_score = new_count * 0.1 %>
|
||||
<% finall_new_score = new_score %>
|
||||
<div><%= l(:label_new_number) %> * 0.1 = <%= new_count %> * 0.1 = <%= format("%.2f" , new_score).to_f %></div>
|
||||
<div><%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %></div>
|
@ -0,0 +1,34 @@
|
||||
<% 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>
|
@ -0,0 +1,8 @@
|
||||
<% 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 %>
|
||||
<div><%= l(:label_topic_number) %> * 0.1 = <%= board_message_count %> * 0.1 = <%= topic_score %></div>
|
||||
<div><%= l(:label_topic_score) %> = <%= format("%.2f" , finall_topic_score).to_f %></div>
|
@ -0,0 +1,81 @@
|
||||
<!-- 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 %>
|
||||
|
||||
<h3 class="title"><%= l(:label_projects_score) %></h3>
|
||||
<div class="inf_user_image">
|
||||
<table style="border-bottom: solid 1px #80a6d2;", width="100%">
|
||||
<tr>
|
||||
<td align="left" valign="middle" ><%= image_tag(url_to_avatar(@project), :class => 'avatar2') %></td>
|
||||
<td>
|
||||
<table>
|
||||
<tr class="info_font" align="center" style=" word-wrap: break-word; word-break: break-all"><td><%= @project.name %></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td width="35%">
|
||||
<table>
|
||||
<tr class="info_font"><td><%= l(:label_projects_score) %></td></tr>
|
||||
<tr class="buttons_for_score" style="margin-top:30px;margin-left:144px"><td><span style="color:#ec6300"><%= format("%.2f" , finall_project_score ).to_f %></span></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tabs_new">
|
||||
<ul>
|
||||
<li>
|
||||
<%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> :
|
||||
<%= format("%.2f" , finall_project_score ).to_f %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> :
|
||||
<%= format("%.2f" , finall_issue_score).to_f %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> :
|
||||
<%= format("%.2f" , finall_new_score).to_f %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> :
|
||||
<%= format("%.2f" , finall_file_score).to_f %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> :
|
||||
<%= format("%.2f" , finall_code_submit_score).to_f %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> :
|
||||
<%= format("%.2f" , finall_topic_score).to_f %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="show_score_detail">
|
||||
<%= render :partial => 'projects/project_score_index', :locals => {:index => 0 } %>
|
||||
</div>
|
||||
<!-- end -->
|
@ -0,0 +1,3 @@
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/code_submit_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,3 @@
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/file_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,3 @@
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/issue_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,3 @@
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/news_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,3 @@
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/project_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,3 @@
|
||||
$('#show_score_detail').html('<%= escape_javascript(render :partial => 'projects/projects_topic_score_index') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,3 @@
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'projects/show_projects_score') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
$('#ajax-modal').addClass('new-watcher');
|
@ -0,0 +1,11 @@
|
||||
<!-- added by bai -->
|
||||
<% journals_for_messages_count = @user.journals_for_messages.count %>
|
||||
<% journals_for_messages_score = journals_for_messages_count * 0.05 %>
|
||||
<% activities_count = @user.activities.count %>
|
||||
<% activities_score = activities_count * 0.2 %>
|
||||
<% finall_activity_score = journals_for_messages_score + activities_score %>
|
||||
<div><%= l(:label_message_number) %> * 0.05 = <%= @user.journals_for_messages.count %> * 0.05 = <%= format("%.2f" , journals_for_messages_score).to_f %></div>
|
||||
<div><%= l(:label_activity_number) %> * 0.2 = <%= @user.activities.count %> * 0.2 = <%= format("%.2f" , activities_score).to_f %></div>
|
||||
<div><%= l(:label_user_score_of_activity) %> = <%= format("%.2f" , journals_for_messages_score).to_f %> + <%= format("%.2f" , activities_score).to_f %>
|
||||
= <%= format("%.2f" , finall_activity_score).to_f %></div>
|
||||
<!-- end -->
|
@ -0,0 +1,15 @@
|
||||
<!-- added by bai -->
|
||||
<% 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 %>
|
||||
<div><%= l(:label_comments_number) %> * 0.1 = <%= @user.comments.count %> * 0.1 = <%= format("%.2f" , comments_score).to_f %></div>
|
||||
<div><%= l(:label_news_number) %> * 0.1 = <%= @user.news.count %> * 0.1 = <%= format("%.2f" , news_score).to_f %></div>
|
||||
<div><%= l(:label_wiki_number) %> * 0.1 = <%= @user.wiki_contents.count %> * 0.1 = <%= format("%.2f" , wiki_contents_score).to_f %></div>
|
||||
<div><%= l(:label_user_score_of_influence) %> = <%= format("%.2f" , comments_score).to_f %> + <%= format("%.2f" , news_score).to_f %> +
|
||||
<%= format("%.2f" , wiki_contents_score).to_f %>
|
||||
= <%= format("%.2f" , finall_influence_score).to_f %>
|
||||
<!-- end -->
|
@ -0,0 +1,12 @@
|
||||
<!-- added by bai -->
|
||||
<% 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 %>
|
||||
<div><%= l(:label_issue_message_number) %> * 0.1 = <%= @user.journals.count %> * 0.1 = <%= format("%.2f" , journals_score).to_f %></div>
|
||||
<div><%= l(:label_code_submit_number) %> * 0.3 = <%= @user.changesets.count %> * 0.3 = <%= format("%.2f" , user_changesets_score).to_f %></div>
|
||||
<div><%= l(:label_user_score_of_project) %> = <%= format("%.2f" , journals_score).to_f %> + <%= format("%.2f" , user_changesets_score).to_f %>
|
||||
= <%= format("%.2f" , finall_user_project_score).to_f %>
|
||||
</div>
|
||||
<!-- end -->
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue