@@ -62,7 +62,7 @@
<%= form_for "tag_for_save",:remote=>true,:url=>tag_path,
:update => "tags_show",
:complete => '$("#put-tag-form").hide();' do |f| %>
- <%= f.text_field :name ,:id => "name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
+ <%= f.text_field :name ,:id => "tags_name",:size=>"28",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length %>
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
<%= f.submit l(:button_project_tags_add),:class => "small" %>
diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb
index 38b8ac85c..01889f1f3 100644
--- a/app/views/tags/_tag_name.html.erb
+++ b/app/views/tags/_tag_name.html.erb
@@ -22,7 +22,7 @@
<% i += 1 %>
<% end %>
- <%= link_to l(:label_more_tags), :action => "show", :id => obj.id %>
+ <%= link_to l(:label_more_tags),:controller => "tags", :action => "show", :id => obj.id %>
<% else %>
diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb
index 9039bba68..5acd0da1b 100644
--- a/app/views/trackers/_form.html.erb
+++ b/app/views/trackers/_form.html.erb
@@ -1,6 +1,6 @@
<%= error_messages_for 'tracker' %>
-
+
-
<%= f.text_field :name, :required => true %>
@@ -39,14 +39,27 @@ <%= submit_tag l(@tracker.new_record? ? :button_create : :button_save) %>
+
<% if @projects.any? %>
<% end %>
+
diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb
index 539c55f80..b79a57e71 100644
--- a/app/views/users/_score_new_index.html.erb
+++ b/app/views/users/_score_new_index.html.erb
@@ -6,5 +6,9 @@
= <%= format("%.2f" ,collaboration(option_num)).to_i %> + <%= format("%.2f" , influence(option_num) ).to_i %>
+ <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" , active(option_num)).to_i %>
- = <%= format("%.2f" ,option_num.total_score).to_i %>
+ <% if (format("%.2f" ,collaboration(option_num)).to_i + format("%.2f" , influence(option_num) ).to_i + format("%.2f" , skill(option_num)).to_i + format("%.2f" , active(option_num)).to_i) < 0 %>
+ <%= l(:lable_score_less_than_zero) %>
+ <% else %>
+ = <%= format("%.2f" ,option_num.total_score).to_i %>
+ <% end %>
diff --git a/app/views/users/_user_show.html.erb b/app/views/users/_user_show.html.erb
index 3afdb8d96..d0c9e204b 100644
--- a/app/views/users/_user_show.html.erb
+++ b/app/views/users/_user_show.html.erb
@@ -1,32 +1,6 @@
<% for user in @users -%>
-
- <% messages_count = user.messages.count %>
- <% messages_score = messages_count * 0.05%>
- <% finall_messages_score = messages_score %>
-
- <% 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 %>
-
- <% journals_for_messages_count = user.journals_messages.count %>
- <% activities_count = user.activities.count %>
- <% journals_for_messages_score = journals_for_messages_count * 0.05 %>
- <% activities_score = activities_count * 0.2 %>
- <% finall_activity_score = journals_for_messages_score + activities_score %>
-
- <% 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 %>
- <% finall_user_score = finall_messages_score + finall_user_project_score + finall_activity_score + finall_influence_score %>
-
<%= content_tag "p", "#{format_date(user.created_on)} #{l(:label_member_since)}", :class => "float_right member_since" %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 602e7a659..ddae72799 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1807,3 +1807,5 @@ en:
label_company_name: Company Name
notice_account_invalid_creditentials_new: You have not to the mailbox activation
+ lable_unknow_type: Unknow type
+ lable_score_less_than_zero: Score less than 0, revised to 0
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 674b88dbe..2fb7ef2bf 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1589,6 +1589,7 @@ zh:
label_issue_tread_over: 我刚才踩过了~
label_issue_not_praise_over: 不能顶自己~
label_issue_not_treed_over: 不能踩自己~
+ label_issues_score_not_enough: 积分不够,不能踩别人~
#end
label_goto: 前往>>
label_issue_appraise_over: 只能评价一次哦!
@@ -2113,4 +2114,6 @@ zh:
lable_memos_max_length: 帖子内容最大长度为65535个字符
lable_forums_max_length: 贴吧描述最大长度为65535个字符
+ lable_unknow_type: 未知类型
+ lable_score_less_than_zero: 得分小于0,修正为0
\ No newline at end of file
diff --git a/db/migrate/20140826072838_project_score_add_cloumn.rb b/db/migrate/20140826072838_project_score_add_cloumn.rb
new file mode 100644
index 000000000..1792273c1
--- /dev/null
+++ b/db/migrate/20140826072838_project_score_add_cloumn.rb
@@ -0,0 +1,19 @@
+class ProjectScoreAddCloumn < ActiveRecord::Migration
+ def up
+ add_column("project_scores","issue_num",:integer,:default => 0)
+ add_column("project_scores","issue_journal_num",:integer,:default => 0)
+ add_column("project_scores","news_num",:integer,:default => 0)
+ add_column("project_scores","documents_num",:integer,:default => 0)
+ add_column("project_scores","changeset_num",:integer,:default => 0)
+ add_column("project_scores","board_message_num",:integer,:default => 0)
+ end
+
+ def down
+ remove_column("project_scores","issue_num")
+ remove_column("project_scores","issue_journal_num")
+ remove_column("project_scores","news_num")
+ remove_column("project_scores","documents_num")
+ remove_column("project_scores","changeset_num")
+ remove_column("project_scores","board_message_num")
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index e39644b3b..82a6ad97b 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140814062455) do
+ActiveRecord::Schema.define(:version => 20140826072838) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -741,8 +741,14 @@ ActiveRecord::Schema.define(:version => 20140814062455) do
create_table "project_scores", :force => true do |t|
t.string "project_id"
t.integer "score"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ t.integer "issue_num", :default => 0
+ t.integer "issue_journal_num", :default => 0
+ t.integer "news_num", :default => 0
+ t.integer "documents_num", :default => 0
+ t.integer "changeset_num", :default => 0
+ t.integer "board_message_num", :default => 0
end
create_table "project_statuses", :force => true do |t|
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 9d1a6bc93..5f4a3166e 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -1634,7 +1634,7 @@ fieldset#filters td.field { width:230px; }
fieldset#filters td.operator { width:180px; }
fieldset#filters td.operator select {max-width:170px;}
fieldset#filters td.values { white-space:nowrap; }
-fieldset#filters td.values select {min-width:130px;}
+fieldset#filters td.values select {min-width:130px;max-width: 220px;}
fieldset#filters td.values input {height:1em;}
fieldset#filters td.add-filter { text-align: right; vertical-align: top; }
@@ -1725,8 +1725,8 @@ ul.projects li {list-style-type:none;
#projects-index ul.projects div.root a.project {font-family:'微软雅黑', "Trebuchet MS", Verdana, sans-serif; font-weight: bold; font-size: 14px; margin: 0 0 10px 0; }
.my-project { padding-left: 18px; background: url(../images/fav.png) no-repeat 0 50%; }
-#notified-projects ul, #tracker_project_ids ul {max-height:250px; overflow-y:auto;}
-
+#notified-projects ul{max-height:250px; overflow-y:auto;}
+#tracker_project_ids ul {max-height:250px; /*overflow-y:auto;*/}
#related-issues li img {vertical-align:middle;}
ul.properties {padding:0; font-size: 0.9em; color: #777;}
diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css
index 9baa5526c..098e02be2 100644
--- a/public/themes/redpenny-master/stylesheets/application.css
+++ b/public/themes/redpenny-master/stylesheets/application.css
@@ -1071,14 +1071,14 @@ overflow: hidden;
.information {
margin-top: 20px;
margin-left: 690px;
- float: left;
+ /*float: left;*/
height: auto;
width: 280px;
font-family: '微软雅黑',helvetica,arial,sans-serif; /*modify by men*/
color: rgb(0, 0, 0);
font-size: 13px;
line-height: 18px;
- position: absolute;
+ /*position: absolute;*/
}
/*
a.project {
@@ -1216,6 +1216,15 @@ p.stats {
padding-top: 10px;
}
+.add-info-project {
+ /*float: left;*/
+ margin-top: 0px;
+ height: 20px;
+ width: 908px;
+ margin-bottom: 5px;
+ padding-top: 10px;
+}
+
.main-language {
float: left;
height: 18px;