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 @@ -
+
<%= textAreailizable message,:content,:attachments => message.attachments %> <%#= message.content.html_safe %>
From 5f559fcb67a93ef8dc8953d285b2b14730ab3a66 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 16:39:07 +0800 Subject: [PATCH 02/22] =?UTF-8?q?#1309=20=E9=A1=B9=E7=9B=AE=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E9=A1=B9=E7=9B=AE=E4=B8=8B=E6=8B=89=E6=A1=86=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_form.html.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 86b6742d6..5c4610856 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -1,3 +1,11 @@ + <%= labelled_fields_for :issue, @issue do |f| %> <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %> From b92f3852024d473449c2d28062d9208a3c09cda0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 14 Aug 2014 16:40:12 +0800 Subject: [PATCH 03/22] =?UTF-8?q?#1309=20=E9=A1=B9=E7=9B=AE=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=E9=A1=B9=E7=9B=AE=E4=B8=8B=E6=8B=89=E6=A1=86=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 5c4610856..c19096f99 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -1,7 +1,7 @@ + + <% object = [] %> @@ -67,11 +77,11 @@ --> <% unless @course.nil?%>

<%= l(:label_class_period) %> *   - <%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时" %>  <%= l(:label_class_hour)%> + <%= text_field_tag :class_period, @course.class_period, :placeholder => "在此输入课时",:maxlength=>5 %>  <%= l(:label_class_hour)%>

<% else %>

<%= l(:label_class_period) %> *   - <%= text_field_tag :class_period, nil, :placeholder => "在此输入课时" %><%= l(:label_class_hour)%> + <%= text_field_tag :class_period, nil, :placeholder => "在此输入课时",:maxlength=>5 %><%= l(:label_class_hour)%>

<% end %> From ace256bea1352bccfc628a22bad455ca71762a4e Mon Sep 17 00:00:00 2001 From: chenmin <19763783@qq.com> Date: Fri, 15 Aug 2014 16:06:41 +0800 Subject: [PATCH 13/22] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AB=9E=E8=B5=9B?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=94=A8=E6=88=B7=E7=95=99=E8=A8=80=E6=8C=A1?= =?UTF-8?q?=E4=BD=8F=E5=8F=B3=E8=BE=B9=E5=9B=BE=E6=A0=87=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/contests/show_contest.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/contests/show_contest.html.erb b/app/views/contests/show_contest.html.erb index c379bc668..91279b7bb 100644 --- a/app/views/contests/show_contest.html.erb +++ b/app/views/contests/show_contest.html.erb @@ -6,7 +6,7 @@

<%= l(:label_bids_reward_method) %><%= @contest.budget%>

-
+
<%= @contest.description %> +<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/contests/_new_softapplication.html.erb b/app/views/contests/_new_softapplication.html.erb index c83bdf6e9..92fed47fe 100644 --- a/app/views/contests/_new_softapplication.html.erb +++ b/app/views/contests/_new_softapplication.html.erb @@ -1,12 +1,98 @@ <%#= error_messages_for 'softapplication' %> + + + <%= form_for Softapplication.new, :url => softapplications_path do |f| %>
<%= hidden_field_tag 'contest_id', @contest.id %> <%= l(:label_work_name) %> * : - <%= f.text_field :name, :required => true, :size => 60, :style => "width:350px;" %> - (<%= l(:label_workname_lengthlimit) %>) + <%= f.text_field :name, :required => true, :size => 60, :style => "width:320px;", :onblur => "regexName();" %> + (<%= l(:label_workname_lengthlimit) %>)

@@ -16,9 +102,9 @@ <%= l(:label_running_platform) %> * : - <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:350px;" %> + <%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:320px;", :onblur=>"regexWorkdescription();"%> - (<%= l(:label_workdescription_lengthlimit) %>) + (<%= l(:label_workdescription_lengthlimit) %>)

@@ -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;" %>
@@ -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 @@