From 4a0f11dfcef8dde0657932cb0b2d7ba459defa2b Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 14 Aug 2014 16:33:43 +0800
Subject: [PATCH 01/22] =?UTF-8?q?#1130=20=E9=A1=B9=E7=9B=AE=E8=AE=A8?=
=?UTF-8?q?=E8=AE=BA=E5=8C=BA=E5=9B=9E=E5=A4=8D=E5=AF=B9=E9=9D=9E=E6=B1=89?=
=?UTF-8?q?=E5=AD=97=E8=87=AA=E5=8A=A8=E6=8D=A2=E8=A1=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/messages/_project_show.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index 0bae1a761..0c0c21b91 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -160,7 +160,7 @@
@@ -31,12 +117,12 @@
<%#= select_tag 'app_type_name', work_type_opttion, {:name => 'app_type_name',:style => "width:358px;"} %>
- <%= f.select :app_type_name,work_type_opttion, {},{:style => "width:358px;",:onchange => "selectChange(this)"} %>
+ <%= f.select :app_type_name,work_type_opttion, {},{:style => "width:328px;",:onchange => "selectChange(this)"} %>
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
-
+
@@ -46,7 +132,7 @@
<%= l(:label_work_description) %>
* :
- <%= f.text_field :description, :required => true, :size => 60, :style => "width:350px;" %> |
+ <%= f.text_field :description, :required => true, :size => 60, :style => "width:320px;" %> |
@@ -56,8 +142,8 @@
<%= l(:label_softapplication_developers) %>
* :
- <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:350px;" %> |
- (<%= l(:label_workdescription_lengthlimit) %>)
+ <%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:320px;", :onblur => 'regexDevelopers();' %> |
+ (<%= l(:label_workdescription_lengthlimit) %>)
@@ -65,7 +151,7 @@
<%= l(:label_work_deposit_project) %>:
- <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:358px;" %>
+ <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2',:style => "width:328px;" %>
<%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0,host: Setting.project_domain}, :target => '_blank' %>
@@ -90,7 +176,8 @@
- <%= submit_tag l(:button_create) %>
+
+ <%#= submit_tag l(:button_create) %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "cancel();",
:type => 'button', :class => "enterprise", :onmouseout => "this.style.backgroundPosition = 'left top'",
:onmouseover => "this.style.backgroundPosition = 'left -30px'" %>
From a3fb08817cc29bee12a3e007477f7e08b9b5199e Mon Sep 17 00:00:00 2001
From: z9hang
Date: Sat, 16 Aug 2014 15:08:14 +0800
Subject: [PATCH 19/22] =?UTF-8?q?=E5=88=86=E6=95=B0=E4=B8=8D=E8=83=BD?=
=?UTF-8?q?=E4=B8=BA0=E3=80=81=E6=9B=B4=E6=96=B0readme?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
ReadMe.txt | 7 ++
app/helpers/user_score_helper.rb | 3 +
app/views/layouts/base_projects.html.erb | 2 +-
db/schema.rb | 95 ++++++++++++++++++++----
4 files changed, 90 insertions(+), 17 deletions(-)
diff --git a/ReadMe.txt b/ReadMe.txt
index 7e8af4e21..538457d3d 100644
--- a/ReadMe.txt
+++ b/ReadMe.txt
@@ -81,3 +81,10 @@ kw:
Ĭ֧¸ʽ"bmp,jpeg,jpg,png,gif"
configuration.ymlģʽpic_types: "bmp,jpeg,jpg,png,gif"(ע⣺pic_typesǰ#ȥ)
ɺ
+
+=================================[2014-08-16]====================================
+kw:Ǩƣproject_scoresѴ
+bundle exec rake db:migrate:down VERSION=20140811022947
+bundle exec rake db:migrate:up VERSION=20140811022947
+bundle exec rake db:migrate
+bundle exec rake project_score:calculate
diff --git a/app/helpers/user_score_helper.rb b/app/helpers/user_score_helper.rb
index 38f4f91f0..e981f16a1 100644
--- a/app/helpers/user_score_helper.rb
+++ b/app/helpers/user_score_helper.rb
@@ -384,6 +384,9 @@ module UserScoreHelper
#更新分数
def update_score(option_number)
option_number.total_score = collaboration(option_number) + influence(option_number) + skill(option_number) + active(option_number)
+ if option_number.total_score < 0
+ option_number.total_score = 0
+ end
option_number.save
option_number.total_score
end
diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb
index d8eb17acd..711a9c337 100644
--- a/app/views/layouts/base_projects.html.erb
+++ b/app/views/layouts/base_projects.html.erb
@@ -54,7 +54,7 @@