From 7907edf168a3b999c24e87775dba49d388cf3e8e Mon Sep 17 00:00:00 2001 From: z9hang Date: Tue, 5 Aug 2014 16:39:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A1=B9=E7=9B=AE=E5=BE=97?= =?UTF-8?q?=E5=88=86=E8=A7=84=E5=88=99=20=E8=B0=83=E6=95=B4=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.txt | 5 ++ app/controllers/projects_controller.rb | 1 + app/controllers/welcome_controller.rb | 2 +- app/helpers/project_score_helper.rb | 64 ++++++++++++++++++- app/views/bids/_homework_list.html.erb | 2 +- app/views/layouts/base_projects.html.erb | 29 +-------- .../_code_submit_score_index.html.erb | 7 +- app/views/projects/_file_score_index.html.erb | 7 +- .../projects/_issue_score_index.html.erb | 13 ++-- app/views/projects/_news_score_index.html.erb | 8 +-- app/views/projects/_project.html.erb | 46 +++---------- .../projects/_project_score_index.html.erb | 34 ++-------- .../_projects_topic_score_index.html.erb | 10 +-- .../projects/_show_projects_score.html.erb | 40 ++---------- .../projects/show_projects_score.html.erb | 39 ++--------- app/views/welcome/index.html.erb | 28 +------- .../stylesheets/application.css | 6 +- 17 files changed, 116 insertions(+), 225 deletions(-) diff --git a/ReadMe.txt b/ReadMe.txt index 722b4cd37..b5822682b 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -70,3 +70,8 @@ kw: undefined image_width bundle exec rake db:migrate:down version=20140725062302 bundle exec rake db:migrate:up version=20140725062302 + +=================================[2014-07-19]===================================== +kw: Mysql2::Error,洢,CALL sp_project_status_cursor(); +bundle exec rake db:migrate:down version=20130828004955 +bundle exec rake db:migrate:up version=20130828004955 diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9b2481c1b..76be5d51f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -75,6 +75,7 @@ class ProjectsController < ApplicationController helper :watchers # helper :watcherlist helper :words + helper :project_score ### added by william include ActsAsTaggableOn::TagsHelper diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index c7cbf217d..4a0586c95 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -18,7 +18,7 @@ class WelcomeController < ApplicationController include ApplicationHelper include WelcomeHelper - + helper :project_score caches_action :robots # before_filter :fake, :only => [:index, :course] before_filter :entry_select, :only => [:index] diff --git a/app/helpers/project_score_helper.rb b/app/helpers/project_score_helper.rb index fe7c8307e..923a3da72 100644 --- a/app/helpers/project_score_helper.rb +++ b/app/helpers/project_score_helper.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -class ProjectScoreHelper +module ProjectScoreHelper #缺陷数量 def issue_num project project.issues.count @@ -7,7 +7,67 @@ class ProjectScoreHelper #缺陷留言数量 def issue_journal_num project - project + project.issue_changes.count + end + + #新闻数量 + def news_num project + project.news.count + end + + #文档数量 + def document_num project + project.documents.count + end + + #代码提交数量 + def changesets_num project + project.changesets.count + end + + #讨论区帖子数量 + def board_message_num project + board_message_count = 0 + project.boards.each do |board| + board_message_count += board.messages_count + end + board_message_count + end + + #缺陷得分 + def issue_score project + i_num = issue_num project + i_j_num = issue_journal_num project + i_num * 4 + i_j_num + end + + # 新闻得分 + def news_score project + n_num = news_num project + n_num + end + + #文档得分 + def document_score project + d_num = document_num project + d_num * 4 + end + + #代码提交得分 + def changesets_score project + c_num = changesets_num project + c_num * 4 + end + + #讨论区帖子得分 + def board_message_score project + b_m_num = board_message_num project + b_m_num * 2 + end + + #项目得分 + def project_scores project + (issue_score project) + (news_score project) + (document_score project) + (changesets_score project) + (board_message_score project) end end \ No newline at end of file diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 2009d1252..9e8aceaff 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -96,7 +96,7 @@ 项目得分:  ;"> - <%= homework.project.nil? ? "N/A" : project_score(homework.project) %> + <%= homework.project.nil? ? "N/A" : project_scores(homework.project) %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index fa20bdff6..b8bede1fb 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -62,37 +62,10 @@ <%= link_to @project.name, project_path(@project)%>
- - <% 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 %> <% if @project.project_type == 0 %> <%= l(:label_project_grade)%> : - <%= link_to(format("%.2f" , finall_project_score ).to_f, {:controller => 'projects', + <%= link_to(format("%.2f" , project_scores(@project) ).to_i, {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id diff --git a/app/views/projects/_code_submit_score_index.html.erb b/app/views/projects/_code_submit_score_index.html.erb index 238993afe..802779967 100644 --- a/app/views/projects/_code_submit_score_index.html.erb +++ b/app/views/projects/_code_submit_score_index.html.erb @@ -1,7 +1,4 @@ -<% changeset_count = @project.changesets.count %> -<% code_submit_score = changeset_count * 0.3 %> -<% finall_code_submit_score = code_submit_score %> -
<%= l(:label_code_submit_number) %> * 0.3 = <%= changeset_count %> * 0.3 = <%= format("%.2f" , code_submit_score).to_f %>
-
<%= l(:label_code_submit_score) %> = <%= format("%.2f" , finall_code_submit_score).to_f %>
+
<%= l(:label_code_submit_number) %> * 4 = <%= changesets_num(@project) %> * 4 = <%= format("%.2f" , changesets_score(@project)).to_i %>
+
<%= l(:label_code_submit_score) %> = <%= format("%.2f" , changesets_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_file_score_index.html.erb b/app/views/projects/_file_score_index.html.erb index 3b4810f65..ce80ddbd2 100644 --- a/app/views/projects/_file_score_index.html.erb +++ b/app/views/projects/_file_score_index.html.erb @@ -1,7 +1,4 @@ -<% document_count = @project.documents.count %> -<% file_score = document_count * 0.1 %> -<% finall_file_score = file_score %> -
<%= l(:label_file_number) %> * 0.1 = <%= document_count %> * 0.1 = <%= format("%.2f" , file_score).to_f %>
-
<%= l(:label_file_score) %> = <%= format("%.2f" , finall_file_score).to_f %>
+
<%= l(:label_file_number) %> * 4 = <%= document_num(@project) %> * 4 = <%= format("%.2f" , document_score(@project)).to_i %>
+
<%= l(:label_file_score) %> = <%= format("%.2f" , document_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_issue_score_index.html.erb b/app/views/projects/_issue_score_index.html.erb index 8ca3d240c..7353ce5a3 100644 --- a/app/views/projects/_issue_score_index.html.erb +++ b/app/views/projects/_issue_score_index.html.erb @@ -1,11 +1,6 @@ -<% 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 %> -
<%= l(:label_issue_number) %> * 0.2 = <%= issue_count %> * 0.2 = <%= format("%.2f" , issue_score).to_f %>
-
<%= l(:label_issue_journal_number) %> * 0.1 = <%= issue_journal_count %> * 0.1 = <%= format("%.2f" , issue_journal_score).to_f %>
-
<%= l(:label_issue_score) %> = <%= format("%.2f" , issue_score).to_f %> + <%= format("%.2f" , issue_journal_score).to_f %> - = <%= format("%.2f" , finall_issue_score).to_f %>
+
<%= l(:label_issue_number) %> * 4 = <%= issue_num(@project) %> * 4 = <%= format("%.2f" , issue_num(@project) * 4).to_i %>
+
<%= l(:label_issue_journal_number) %> * 1 = <%= issue_journal_num(@project) %> * 1 = <%= format("%.2f" , issue_journal_num(@project)).to_i %>
+
<%= l(:label_issue_score) %> = <%= format("%.2f" , issue_num(@project) * 4).to_i %> + <%= format("%.2f" , issue_journal_num(@project)).to_i %> + = <%= format("%.2f" , issue_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_news_score_index.html.erb b/app/views/projects/_news_score_index.html.erb index 0f374b871..b3d66efeb 100644 --- a/app/views/projects/_news_score_index.html.erb +++ b/app/views/projects/_news_score_index.html.erb @@ -1,7 +1,5 @@ -<% new_count = @project.news.count %> -<% new_score = new_count * 0.1 %> -<% finall_new_score = new_score %> -
<%= l(:label_new_number) %> * 0.1 = <%= new_count %> * 0.1 = <%= format("%.2f" , new_score).to_f %>
-
<%= l(:label_news_score) %> = <%= format("%.2f" , finall_new_score).to_f %>
+ +
<%= l(:label_new_number) %> * 1 = <%= news_num(@project) %> * 1 = <%= format("%.2f" , news_score(@project)).to_i %>
+
<%= l(:label_news_score) %> = <%= format("%.2f" , news_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 41ad2a62c..e9a733ece 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -18,37 +18,37 @@

- +
- - - - - - - - @@ -124,37 +124,11 @@
- <% 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 %> <% if @project.project_type !=1 %> <%= l(:label_project_grade)%>: - <%= link_to(format("%.2f" , finall_project_score ).to_f, + <%= link_to(format("%.2f" , project_scores(@project) ).to_i, {:controller => 'projects', :action => 'show_projects_score', :remote => true, :id => @project.id}, :style=>"color: #EC6300;") %> diff --git a/app/views/projects/_project_score_index.html.erb b/app/views/projects/_project_score_index.html.erb index ab0dc18ca..4a94867fc 100644 --- a/app/views/projects/_project_score_index.html.erb +++ b/app/views/projects/_project_score_index.html.erb @@ -1,36 +1,10 @@ -<% 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) %>
= <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> + <%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %>
-
= <%= 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 %>
-
= <%= format("%.2f" , finall_project_score).to_f %>
+
= <%= format("%.2f" , issue_score(@project)).to_i %> + <%= format("%.2f" , news_score(@project)).to_i %> + + <%= format("%.2f" , document_score(@project)).to_i %> + <%= format("%.2f" , changesets_score(@project)).to_i %> + + <%= format("%.2f" , board_message_score(@project)).to_i %>
+
= <%= format("%.2f" , project_scores(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_projects_topic_score_index.html.erb b/app/views/projects/_projects_topic_score_index.html.erb index 1e059007a..909f93a09 100644 --- a/app/views/projects/_projects_topic_score_index.html.erb +++ b/app/views/projects/_projects_topic_score_index.html.erb @@ -1,10 +1,4 @@ -<% 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 %> -
<%= l(:label_topic_number) %> * 0.1 = <%= board_message_count %> * 0.1 = <%= topic_score %>
-
<%= l(:label_topic_score) %> = <%= format("%.2f" , finall_topic_score).to_f %>
+
<%= l(:label_topic_number) %> * 2 = <%= board_message_num(@project) %> * 2 = <%= board_message_score(@project) %>
+
<%= l(:label_topic_score) %> = <%= format("%.2f" , board_message_score(@project)).to_i %>
\ No newline at end of file diff --git a/app/views/projects/_show_projects_score.html.erb b/app/views/projects/_show_projects_score.html.erb index d135cfbdb..95c93d520 100644 --- a/app/views/projects/_show_projects_score.html.erb +++ b/app/views/projects/_show_projects_score.html.erb @@ -1,30 +1,4 @@ -<% 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) %>

@@ -40,7 +14,7 @@
@@ -51,27 +25,27 @@
  • <%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> : - <%= format("%.2f" , finall_project_score ).to_f %> + <%= format("%.2f" , project_scores(@project) ).to_i %>
  • <%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> : - <%= format("%.2f" , finall_issue_score).to_f %> + <%= format("%.2f" , issue_score(@project)).to_i %>
  • <%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> : - <%= format("%.2f" , finall_new_score).to_f %> + <%= format("%.2f" , news_score(@project)).to_i %>
  • <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : - <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , document_score(@project)).to_i %>
  • <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : - <%= format("%.2f" , finall_code_submit_score).to_f %> + <%= format("%.2f" , changesets_score(@project)).to_i %>
  • <%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> : - <%= format("%.2f" , finall_topic_score).to_f %> + <%= format("%.2f" , board_message_score(@project)).to_i %>
diff --git a/app/views/projects/show_projects_score.html.erb b/app/views/projects/show_projects_score.html.erb index 95a7085d4..94f3dfaf8 100644 --- a/app/views/projects/show_projects_score.html.erb +++ b/app/views/projects/show_projects_score.html.erb @@ -1,30 +1,5 @@ -<% 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 %> <%= h html_title %> @@ -56,7 +31,7 @@ @@ -67,27 +42,27 @@
  • <%= link_to l(:label_projects_score), {:controller => 'projects', :action => 'show_projects_score', :remote => true}%> : - <%= format("%.2f" , finall_project_score ).to_f %> + <%= format("%.2f" , project_scores(@project) ).to_i %>
  • <%= link_to l(:label_issue_score), {:controller => 'projects', :action => 'issue_score_index', :remote => true}%> : - <%= format("%.2f" , finall_issue_score).to_f %> + <%= format("%.2f" , issue_score(@project)).to_i %>
  • <%= link_to l(:label_news_score), {:controller => 'projects', :action => 'news_score_index', :remote => true}%> : - <%= format("%.2f" , finall_new_score).to_f %> + <%= format("%.2f" , news_score(@project)).to_i %>
  • <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : - <%= format("%.2f" , finall_file_score).to_f %> + <%= format("%.2f" , document_score(@project)).to_i %>
  • <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : - <%= format("%.2f" , finall_code_submit_score).to_f %> + <%= format("%.2f" , changesets_score(@project)).to_i %>
  • <%= link_to l(:label_topic_score), {:controller => 'projects', :action => 'projects_topic_score_index', :remote => true}%> : - <%= format("%.2f" , finall_topic_score).to_f %> + <%= format("%.2f" , board_message_score(@project)).to_i %>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index f8c7f880d..31fb0432a 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -79,33 +79,7 @@ <%=project.description.truncate(100, omission: '...')%>
- <%# 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 %> - <%= content_tag "span", l(:label_project_score)+ ":" + project_score(project), + <%= content_tag "span", l(:label_project_score)+ ":" + project_scores(project).to_s, :style => "cursor: pointer; display: inline-block; float: right; color: #ec6300;", :title => "项目得分,综合考虑了项目的各项活动,反映了该项目的活跃程度", :class => "tooltip", diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 0f8113054..9baa5526c 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1070,10 +1070,10 @@ overflow: hidden; .information { margin-top: 20px; - margin-left: 607px; + margin-left: 690px; float: left; height: auto; - width: 300px; + width: 280px; font-family: '微软雅黑',helvetica,arial,sans-serif; /*modify by men*/ color: rgb(0, 0, 0); font-size: 13px; @@ -1232,7 +1232,7 @@ p.stats { .licences { float: left; height: 18px; - width: 260px; + width: 200px; font-size: 13px; font-family: '微软雅黑',helvetica,arial,sans-serif; /*modify by men*/ line-height: 18px;
+ <%= link_to @project.watcher_users.count, project_watcherlist_path(project)%> + <%= content_tag('span', l(:label_x_follow_people,:count =>@project.watcher_users.count)) %>
+ <%= link_to "#{@project.members.count}", project_member_path(@project)%> + <%= content_tag('span', l(:label_x_current_contributors, :count => @project.users.count)) %>
+ <%= content_tag('span', "#{(@project.repository.nil? || @project.repository.changesets[0].nil?) ? '0' : distance_of_time_in_words(Time.now, @project.repository.changesets[0].committed_on)}", :class => "info") %> + <%= content_tag('span', l(:label_since_last_commits)) %>
+ <% #find_project_repository @project %> <%= content_tag('span', "#{@project.repository.nil? || @project.project_status.nil? ? '0' : @project.project_status.changesets_count }", :class => "info") %> + <%= content_tag('span', l(:label_commit_on)) %>
- +
<%= l(:label_projects_score) %>
<%= format("%.2f" , finall_project_score ).to_f %>
<%= format("%.2f" , project_scores(@project) ).to_i %>
- +
<%= l(:label_projects_score) %>
<%= format("%.2f" , finall_project_score ).to_f %>
<%= format("%.2f" , project_scores(@project) ).to_i %>