Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
c0f0e294e5
|
@ -53,7 +53,7 @@ class UserScore < ActiveRecord::Base
|
||||||
user_score = current_user.user_score_attr
|
user_score = current_user.user_score_attr
|
||||||
user_grade = nil #项目个人得分
|
user_grade = nil #项目个人得分
|
||||||
project = obj.project
|
project = obj.project
|
||||||
unless project.nil? && project.project_type == 0
|
unless project.nil?
|
||||||
user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
|
user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
|
||||||
if user_grade.nil?
|
if user_grade.nil?
|
||||||
user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id)
|
user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id)
|
||||||
|
@ -178,7 +178,7 @@ class UserScore < ActiveRecord::Base
|
||||||
current_user_grade = nil #项目个人得分
|
current_user_grade = nil #项目个人得分
|
||||||
target_user_grade = nil
|
target_user_grade = nil
|
||||||
project = obj.project
|
project = obj.project
|
||||||
unless project.nil? && project.project_type == 0
|
unless project.nil?
|
||||||
current_user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
|
current_user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
|
||||||
target_user_grade = UserGrade.find_by_user_id_and_project_id(target_user.id, project.id)
|
target_user_grade = UserGrade.find_by_user_id_and_project_id(target_user.id, project.id)
|
||||||
if current_user_grade.nil?
|
if current_user_grade.nil?
|
||||||
|
@ -285,7 +285,7 @@ class UserScore < ActiveRecord::Base
|
||||||
user_score = current_user.try(:user_score_attr)
|
user_score = current_user.try(:user_score_attr)
|
||||||
user_grade = nil #项目个人得分
|
user_grade = nil #项目个人得分
|
||||||
project = obj.project
|
project = obj.project
|
||||||
unless project.nil? && project.project_type == 0
|
unless project.nil?
|
||||||
user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
|
user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id)
|
||||||
if user_grade.nil?
|
if user_grade.nil?
|
||||||
user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id)
|
user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id)
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<!--加上 onload="Javascript:t()" 开始定时刷新分数 -->
|
<!--加上 onload="Javascript:t()" 开始定时刷新分数 -->
|
||||||
<body class="<%= h body_css_classes %>" onload="Javascript:t()">
|
<body class="<%= h body_css_classes %>">
|
||||||
<div id="wrapper">
|
<div id="wrapper">
|
||||||
<div id="wrapper2">
|
<div id="wrapper2">
|
||||||
<div id="wrapper3">
|
<div id="wrapper3">
|
||||||
|
|
Loading…
Reference in New Issue