From b3e6f6acd5e7fbc3c994c45ed399cfbfa93caf38 Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 14 Jan 2016 18:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=A0=E9=99=A4=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E9=97=AE=E9=A2=98=20=E9=A1=B9=E7=9B=AE=E5=BE=97?= =?UTF-8?q?=E5=88=86=E6=B7=BB=E5=8A=A0=E8=AE=A8=E8=AE=BA=E5=9B=9E=E5=A4=8D?= =?UTF-8?q?=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/attachment.rb | 2 +- app/views/projects/_projects_topic_score_index.html.erb | 6 +++--- config/locales/projects/zh.yml | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/attachment.rb b/app/models/attachment.rb index 2c99b6870..ea9ad2cc0 100644 --- a/app/models/attachment.rb +++ b/app/models/attachment.rb @@ -643,7 +643,7 @@ class Attachment < ActiveRecord::Base def decrease_attchments_count if self.container_type == "Project" && !self.project.project_score.nil? - aatach_count = self.container.project_score.attach_num - 1+ + aatach_count = self.container.project_score.attach_num - 1 self.container.project_score.update_attribute(:attach_num, aatach_count) end end diff --git a/app/views/projects/_projects_topic_score_index.html.erb b/app/views/projects/_projects_topic_score_index.html.erb index eea2c06c2..1c1c4d22a 100644 --- a/app/views/projects/_projects_topic_score_index.html.erb +++ b/app/views/projects/_projects_topic_score_index.html.erb @@ -1,4 +1,4 @@ -
<%= l(:label_topic_number) %> * 2 = <%= project.project_score.board_num %> * 2 = <%= project.project_score.board_num * 2 %>
-
<%= l(:label_topic_score) %> = <%= project.project_score.board_num * 2 %>
- \ No newline at end of file +
<%= l(:label_topic_reply_score) %> * 1 = <%= project.project_score.board_message_num %> * 1 = <%= project.project_score.board_message_num * 1 %>
+
<%= l(:label_topic_score) %> = <%= project.project_score.board_num * 2 %> + <%= project.project_score.board_message_num * 1 %> + = <%= project.project_score.board_num * 2 + project.project_score.board_message_num * 1 %>
\ No newline at end of file diff --git a/config/locales/projects/zh.yml b/config/locales/projects/zh.yml index ffa2c1cc5..765060675 100644 --- a/config/locales/projects/zh.yml +++ b/config/locales/projects/zh.yml @@ -440,6 +440,7 @@ zh: label_code_submit_number: 代码提交频率 label_topic_score: 讨论区得分 + label_topic_reply_score: 讨论区回复数量 label_topic_number: 讨论区帖子数量 label_add_news: 添加了新闻