diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index 58880919e..997bb6f62 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -15,9 +15,9 @@ class JournalsForMessage < ActiveRecord::Base "m_reply_id" # 回复某留言的留言id(a留言回复了b留言,这是b留言的id) acts_as_tree :foreign_key => 'm_parent_id', :counter_cache => :m_reply_count, :order => "#{JournalsForMessage.table_name}.created_on ASC" - belongs_to :project, - :foreign_key => 'jour_id', - :conditions => "#{self.table_name}.jour_type = 'Project' " + belongs_to :project + #:foreign_key => 'jour_id', + #:conditions => "#{self.table_name}.jour_type = 'Project' " belongs_to :course, :foreign_key => 'jour_id', :conditions => "#{self.table_name}.jour_type = 'Course' " diff --git a/app/views/users/_activity_new_score_index.html.erb b/app/views/users/_activity_new_score_index.html.erb new file mode 100644 index 000000000..0ceb8f157 --- /dev/null +++ b/app/views/users/_activity_new_score_index.html.erb @@ -0,0 +1,8 @@ +
技术得分:
+
    踩别人的帖子 -2
+
    帖子被一级会员顶 +4
+
    帖子被二级会员顶 +6
+
    帖子被三级会员顶 +8
+
    帖子被一级会员踩 -2
+
    帖子被二级会员踩 -4
+
    帖子被三级会员踩 -6
\ No newline at end of file diff --git a/app/views/users/_influence_new_score_index.html.erb b/app/views/users/_influence_new_score_index.html.erb new file mode 100644 index 000000000..9985d26cd --- /dev/null +++ b/app/views/users/_influence_new_score_index.html.erb @@ -0,0 +1,6 @@ +
项目贡献得分:
+
    提交代码 +4
+
    提交文档 +4
+
    提交附件 +4
+
    更新缺陷完成度 +2
+
    发布缺陷 +4
\ No newline at end of file diff --git a/app/views/users/_project_new_score_index.html.erb b/app/views/users/_project_new_score_index.html.erb new file mode 100644 index 000000000..45e0b0600 --- /dev/null +++ b/app/views/users/_project_new_score_index.html.erb @@ -0,0 +1,2 @@ +
影响力得分:
+
    被关注人数 +2/人
diff --git a/app/views/users/_show_new_score.html.erb b/app/views/users/_show_new_score.html.erb index 3fd5f1050..c5f15694e 100644 --- a/app/views/users/_show_new_score.html.erb +++ b/app/views/users/_show_new_score.html.erb @@ -48,23 +48,23 @@ - <%= l(:label_user_score) %> : + <%= link_to l(:label_user_score) , {:controller => 'users', :action => 'score_new_index', :remote => true} %> : <%= format("%.2f" , @user.user_score_attr.total_score).to_f %>
- <%= l(:label_user_score_of_collaboration) %> : + <%= link_to l(:label_user_score_of_collaboration), {:controller => 'users',:action => 'topic_new_score_index', :remote => true} %> : <%= format("%.2f" , @user.user_score_attr.collaboration.nil? ? 0:@user.user_score_attr.collaboration).to_f %>
- <%= l(:label_user_score_of_influence) %> : + <%= link_to l(:label_user_score_of_influence), {:controller => 'users',:action => 'project_new_score_index', :remote => true} %> : <%= format("%.2f" , @user.user_score_attr.influence.nil? ? 0:@user.user_score_attr.influence).to_f %>
- <%= l(:label_user_score_of_skill) %> : + <%= link_to l(:label_user_score_of_skill), {:controller => 'users',:action => 'activity_new_score_index', :remote => true} %> : <%= format("%.2f" , @user.user_score_attr.skill.nil? ? 0:@user.user_score_attr.skill).to_f %>
- <%= l(:label_user_score_of_active) %> : + <%= link_to l(:label_user_score_of_active), {:controller => 'users',:action => 'influence_new_score_index', :remote => true} %> : <%= format("%.2f" , @user.user_score_attr.active.nil? ? 0:@user.user_score_attr.active).to_f %>
diff --git a/app/views/users/activity_new_score_index.js.erb b/app/views/users/activity_new_score_index.js.erb new file mode 100644 index 000000000..246d9161f --- /dev/null +++ b/app/views/users/activity_new_score_index.js.erb @@ -0,0 +1 @@ +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/activity_new_score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file diff --git a/app/views/users/influence_new_score_index.js.erb b/app/views/users/influence_new_score_index.js.erb new file mode 100644 index 000000000..9a9514372 --- /dev/null +++ b/app/views/users/influence_new_score_index.js.erb @@ -0,0 +1 @@ +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/influence_new_score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file diff --git a/app/views/users/project_new_score_index.js.erb b/app/views/users/project_new_score_index.js.erb new file mode 100644 index 000000000..493bd7fd0 --- /dev/null +++ b/app/views/users/project_new_score_index.js.erb @@ -0,0 +1 @@ +$('#show_score_detail').html('<%= escape_javascript(render :partial => 'users/project_new_score_index', :locals => {:index =>0 }) %>'); \ No newline at end of file diff --git a/db/schema.rb b/db/schema.rb index 027460e1f..cc3d68cba 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 => 20140617013146) do +ActiveRecord::Schema.define(:version => 20140626012511) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -175,6 +175,58 @@ ActiveRecord::Schema.define(:version => 20140617013146) do add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true + create_table "code_review_assignments", :force => true do |t| + t.integer "issue_id" + t.integer "change_id" + t.integer "attachment_id" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.string "action_type" + t.integer "changeset_id" + end + + create_table "code_review_project_settings", :force => true do |t| + t.integer "project_id" + t.integer "tracker_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "updated_by" + t.boolean "hide_code_review_tab", :default => false + t.integer "auto_relation", :default => 1 + t.integer "assignment_tracker_id" + t.text "auto_assign" + t.integer "lock_version", :default => 0, :null => false + t.boolean "tracker_in_review_dialog", :default => false + end + + create_table "code_review_user_settings", :force => true do |t| + t.integer "user_id", :default => 0, :null => false + t.integer "mail_notification", :default => 0, :null => false + t.datetime "created_at" + t.datetime "updated_at" + end + + create_table "code_reviews", :force => true do |t| + t.integer "project_id" + t.integer "change_id" + t.datetime "created_at" + t.datetime "updated_at" + t.integer "line" + t.integer "updated_by_id" + t.integer "lock_version", :default => 0, :null => false + t.integer "status_changed_from" + t.integer "status_changed_to" + t.integer "issue_id" + t.string "action_type" + t.string "file_path" + t.string "rev" + t.string "rev_to" + t.integer "attachment_id" + t.integer "file_count", :default => 0, :null => false + t.boolean "diff_all" + end + create_table "comments", :force => true do |t| t.string "commented_type", :limit => 30, :default => "", :null => false t.integer "commented_id", :default => 0, :null => false @@ -374,12 +426,13 @@ ActiveRecord::Schema.define(:version => 20140617013146) do create_table "homework_attaches", :force => true do |t| t.integer "bid_id" t.integer "user_id" - 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.string "reward" t.string "name" t.string "description" t.integer "state" + t.integer "project_id", :default => 0 end create_table "homework_for_courses", :force => true do |t| @@ -740,7 +793,7 @@ ActiveRecord::Schema.define(:version => 20140617013146) do end create_table "relative_memos", :force => true do |t| - t.integer "osp_id", :null => false + t.integer "osp_id" t.integer "parent_id" t.string "subject", :null => false t.text "content", :null => false