From 9f8fee82679e20a5c87db741b1811ead49afe0c3 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sun, 6 Sep 2015 15:46:28 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=A7=AF=E5=88=86?=
=?UTF-8?q?=E6=8A=A5500?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/users/_influence_new_score_index.html.erb | 2 +-
app/views/users/_score_new_index.html.erb | 4 ++--
app/views/users/_show_new_score.html.erb | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb
index 505785351..f99cdee19 100644
--- a/app/views/users/_influence_new_score_index.html.erb
+++ b/app/views/users/_influence_new_score_index.html.erb
@@ -5,4 +5,4 @@
<%= l('userscore.active.update_issues')%> * 2 = <%= option_num.issue_done_ratio %> * 2 = <%= option_num.issue_done_ratio * 2 %>
<%= l('userscore.active.release_issues')%> * 4 = <%= option_num.post_issue %> * 4 = <%= option_num.post_issue * 4 %>
<%= l('userscore.active.release_messages')%> * 1 = <%= option_num.memo %> * 2 = <%= option_num.memo * 2 %>
- <%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> + <%= option_num.memo * 2 %> = <%= active(option_num) %>
\ No newline at end of file
+ <%= l(:label_user_score_of_active)%> = <%= option_num.changeset * 4 %> + <%= option_num.document * 4 %> + <%= option_num.attachment * 4 %> + <%= option_num.issue_done_ratio * 2 %> + <%= option_num.post_issue * 4 %> + <%= option_num.memo * 2 %> = <%= project_active(option_num) %>
\ No newline at end of file
diff --git a/app/views/users/_score_new_index.html.erb b/app/views/users/_score_new_index.html.erb
index e50b240fd..c1d23d0ed 100644
--- a/app/views/users/_score_new_index.html.erb
+++ b/app/views/users/_score_new_index.html.erb
@@ -5,8 +5,8 @@
<%= l(:label_user_score_of_skill)%> + <%= l(:label_user_score_of_active) %>
= <%= 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 %>
- <% 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 %>
+ + <%= "(" if skill(option_num) < 0 %> <%= format("%.2f" , skill(option_num)).to_i %> <%= ")" if skill(option_num) < 0 %> + <%= format("%.2f" ,project_active(option_num)).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" , project_active(option_num)).to_i) < 0 %>
<%= l(:label_score_less_than_zero) %>
<% else %>
= <%= format("%.2f" ,option_num.total_score).to_i %>
diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb
index 2081c38d6..4e89506a6 100644
--- a/app/views/users/_show_new_score.html.erb
+++ b/app/views/users/_show_new_score.html.erb
@@ -68,7 +68,7 @@
<%= link_to l(:label_user_score_of_active), "javascript:void(0)", :onclick => "show_div('influence_new_score_index')" %> :
- <%= format("%.2f" , active(option_num)).to_i %>
+ <%= format("%.2f" , project_active(option_num)).to_i %>
From 29379788fe9e62669c3f23ad49646ab3b201d416 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sun, 6 Sep 2015 16:31:15 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8A=A8=E6=80=81?=
=?UTF-8?q?=E9=87=8C=E5=9B=9E=E5=A4=8D=E7=BC=BA=E9=99=B7=E7=95=99=E8=A8=80?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95=E5=88=A4=E6=96=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/issues_controller.rb | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index b3624b14d..6a0b351ba 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -386,14 +386,16 @@ class IssuesController < ApplicationController
end
def add_journal
- jour = Journal.new
- jour.user_id = User.current.id
- jour.notes = params[:notes]
- jour.journalized = @issue
- jour.save
- @user_activity_id = params[:user_activity_id]
- respond_to do |format|
- format.js
+ if User.current.logged?
+ jour = Journal.new
+ jour.user_id = User.current.id
+ jour.notes = params[:notes]
+ jour.journalized = @issue
+ jour.save
+ @user_activity_id = params[:user_activity_id]
+ respond_to do |format|
+ format.js
+ end
end
end
From 093273968b39fa802d18614d12659eb04c3d61a9 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sun, 6 Sep 2015 16:38:12 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8C=BF=E5=90=8D?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9C=A8=E7=BC=BA=E9=99=B7=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?=E5=9B=9E=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
db/schema.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/db/schema.rb b/db/schema.rb
index 5bf838c25..ec38d5c1d 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 => 20150906025009) do
+ActiveRecord::Schema.define(:version => 20150906083453) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
From 9ddb4f66831c9db283736cabe66b10b9ab1eab93 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sun, 6 Sep 2015 16:38:24 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8C=BF=E5=90=8D?=
=?UTF-8?q?=E7=94=A8=E6=88=B7=E5=9C=A8=E7=BC=BA=E9=99=B7=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?=E5=9B=9E=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../20150906083453_delete_anonymous_jour.rb | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 db/migrate/20150906083453_delete_anonymous_jour.rb
diff --git a/db/migrate/20150906083453_delete_anonymous_jour.rb b/db/migrate/20150906083453_delete_anonymous_jour.rb
new file mode 100644
index 000000000..5361eb5e1
--- /dev/null
+++ b/db/migrate/20150906083453_delete_anonymous_jour.rb
@@ -0,0 +1,15 @@
+class DeleteAnonymousJour < ActiveRecord::Migration
+ def up
+ jour_count = Journal.all.count / 30 + 2
+ transaction do
+ for i in 1 ... jour_count do i
+ Journal.page(i).per(30).each do |jour|
+ jour.destroy if jour.user_id == 2
+ end
+ end
+ end
+ end
+
+ def down
+ end
+end
From e0376b5176ffc0c09907765f312e42fb465ad2cd Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sun, 6 Sep 2015 16:46:03 +0800
Subject: [PATCH 5/6] =?UTF-8?q?tag=E7=9A=84=E5=AF=BC=E8=88=AA=E6=A0=8F?=
=?UTF-8?q?=E5=92=8C=E5=BA=95=E9=83=A8=E5=AF=BC=E8=88=AA=E6=A0=8F=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/layouts/base_tags.html.erb | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/app/views/layouts/base_tags.html.erb b/app/views/layouts/base_tags.html.erb
index 6a5b490d1..3fd00e042 100644
--- a/app/views/layouts/base_tags.html.erb
+++ b/app/views/layouts/base_tags.html.erb
@@ -19,12 +19,23 @@
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
+ <%= stylesheet_link_tag 'base','header', :media => 'all'%>
+
+
+
+ <% if User.current.logged? %>
+ <%= render :partial => 'layouts/logined_header',:locals=>{:name=>@name,:type=>@type} %>
+ <% else%>
+ <%= render :partial => 'layouts/unlogin_header',:locals=>{:name=>@name,:type=>@type} %>
+ <% end%>
+
+
+
-<%= render :partial => 'layouts/base_header'%>
- <%= render :partial => 'layouts/base_footer'%>
@@ -47,6 +57,11 @@
+
+
+<%= render :partial => 'layouts/footer' %>
+
+
<%= call_hook :view_layouts_base_body_bottom %>