diff --git a/app/views/projects/_project_score_index.html.erb b/app/views/projects/_project_score_index.html.erb index beff3552e..aefac603e 100644 --- a/app/views/projects/_project_score_index.html.erb +++ b/app/views/projects/_project_score_index.html.erb @@ -1,9 +1,9 @@
<%= l(:label_projects_score) %>
= <%= l(:label_code_submit_score) %> + <%= l(:label_issue_score) %> + <%= l(:label_file_attachment_score) %> + <%= l(:label_topic_score) %> + <%= l(:label_news_score) %>
-
= <%= @project.commits_count * 4 %> + - <%= @project.issues_count * 4 + @project.journals_count %> + - <%= @project.attachments_count * 5 %> + - <%= @project.boards_count * 2 + @project.boards_reply_count %> + - <%= @project.news_count %> +
= <%= @project.project_score.changeset_num * 4 %> + + <%= @project.project_score.issue_num * 4 + @project.project_score.issue_journal_num %> + + <%= @project.project_score.attach_num * 5 %> + + <%= @project.project_score.board_num * 2 + @project.project_score.board_message_num %> + + <%= @project.project_score.news_num %>
-
= <%= static_project_score(@project) %>
+
= <%= static_project_score(@project.project_score) %>
diff --git a/app/views/projects/_show_projects_score.html.erb b/app/views/projects/_show_projects_score.html.erb index c188bad98..c18060257 100644 --- a/app/views/projects/_show_projects_score.html.erb +++ b/app/views/projects/_show_projects_score.html.erb @@ -12,7 +12,7 @@ - +
<%= l(:label_projects_score) %>
<%= static_project_score(@project) %>
<%= static_project_score(@project.project_score) %>
@@ -22,22 +22,22 @@
diff --git a/db/migrate/20160114022833_add_board_num_to_project_score.rb b/db/migrate/20160114022833_add_board_num_to_project_score.rb index e0360f2c1..4ee56a56b 100644 --- a/db/migrate/20160114022833_add_board_num_to_project_score.rb +++ b/db/migrate/20160114022833_add_board_num_to_project_score.rb @@ -1,7 +1,6 @@ class AddBoardNumToProjectScore < ActiveRecord::Migration def change add_column :project_scores, :board_num, :integer, :default => false - add_column :project_scores, :act_num, :integer, :default => false add_column :project_scores, :attach_num, :integer, :default => false end end diff --git a/db/migrate/20160114022928_update_project_score.rb b/db/migrate/20160114022928_update_project_score.rb index fb48049c6..8a632c2bc 100644 --- a/db/migrate/20160114022928_update_project_score.rb +++ b/db/migrate/20160114022928_update_project_score.rb @@ -34,11 +34,6 @@ class UpdateProjectScore < ActiveRecord::Migration news_count = project.news.count project.project_score.update_attribute(:news_num, news_count) end - # update acts - acts = ForgeActivity.where("project_id = ?", project.id) - unless acts.blank? - project.project_score.update_attribute(:act_num, acts.count) - end # update attach unless project.attachments.nil? attachments_count = project.attachments.count diff --git a/db/schema.rb b/db/schema.rb index d1ad108a5..94db7d8c3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1365,7 +1365,6 @@ ActiveRecord::Schema.define(:version => 20160114022928) do t.integer "changeset_num", :default => 0 t.integer "board_message_num", :default => 0 t.integer "board_num", :default => 0 - t.integer "act_num", :default => 0 t.integer "attach_num", :default => 0 end