This commit is contained in:
linhk 2014-08-19 14:20:54 +08:00
commit 97707ea44a
32 changed files with 170 additions and 99 deletions

View File

@ -171,7 +171,6 @@ class AccountController < ApplicationController
ue.location_city = params[:city] if params[:city] != nil ue.location_city = params[:city] if params[:city] != nil
ue.save ue.save
end end
#end
end end
end end

View File

@ -62,7 +62,7 @@ class MyController < ApplicationController
end end
end end
@se = @user.user_extensions ||= UserExtensions.new @se = @user.extensions
@se.school_id = params[:occupation] if params[:occupation] @se.school_id = params[:occupation] if params[:occupation]
@se.gender = params[:gender] @se.gender = params[:gender]
@se.location = params[:province] if params[:province] @se.location = params[:province] if params[:province]

View File

@ -369,22 +369,10 @@ class ProjectsController < ApplicationController
#Added by young #Added by young
def homework def homework
@offset, @limit = api_offset_and_limit({:limit => 10}) @offset, @limit = api_offset_and_limit({:limit => 10})
@bids = @project.homeworks.order('deadline DESC') @bids = @project.homeworks.order('deadline')
@bids = @bids.like(params[:name]) if params[:name].present? @bids = @bids.like(params[:name]) if params[:name].present?
@bid_count = @bids.count
@bid_pages = Paginator.new @bid_count, @limit, params['page']
@offset ||= @bid_pages.reverse_offset @bids = paginateHelper @bids
#@bids = @bids.offset(@offset).limit(@limit).all.reverse
unless @offset == 0
@bids = @bids.offset(@offset).limit(@limit).all.reverse
else
limit = @bid_count % @limit
if limit == 0
limit = 10
end
@bids = @bids.offset(@offset).limit(limit).all.reverse
end
render :layout => 'base_courses' render :layout => 'base_courses'
end end

View File

@ -441,7 +441,7 @@ FROM `users` where id = #{user.id}")
#更新对缺陷留言数 #更新对缺陷留言数
def update_messges_for_issue(user,type,project=nil) def update_messges_for_issue(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.messages_for_issues = messges_for_issue_num(user,project)#Journal.includes(:user).where("user_id = '#{user.id}' and notes != '' and notes is not null").all.count option_number.messages_for_issues = messges_for_issue_num(user,project)#Journal.includes(:user).where("user_id = '#{user.id}' and notes != '' and notes is not null").all.count
update_score(option_number) update_score(option_number)
end end
@ -464,7 +464,7 @@ FROM `users` where id = #{user.id}")
#更新更改缺陷状态状态次数 #更新更改缺陷状态状态次数
def update_issues_status(user,type,project=nil) def update_issues_status(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.issues_status = issues_status_num(user,project)#Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'status_id' and #{User.table_name}.id = '#{user.id}'").count option_number.issues_status = issues_status_num(user,project)#Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'status_id' and #{User.table_name}.id = '#{user.id}'").count
update_score(option_number) update_score(option_number)
end end
@ -490,7 +490,7 @@ FROM `users` where id = #{user.id}")
#更新对留言的回复数量 #更新对留言的回复数量
def update_replay_for_message(user,type,project=nil) def update_replay_for_message(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.replay_for_message = replay_for_message_num(user,project)#JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id}").count option_number.replay_for_message = replay_for_message_num(user,project)#JournalsForMessage.includes(:user).where("m_parent_id IS NOT NULL and user_id = #{user.id}").count
update_score(option_number) update_score(option_number)
end end
@ -514,7 +514,7 @@ FROM `users` where id = #{user.id}")
#更新对帖子的回复数量 #更新对帖子的回复数量
def update_replay_for_memo(user,type,project=nil) def update_replay_for_memo(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.replay_for_memo = replay_for_memo_num(user,project)#Message.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count #+ Memo.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count option_number.replay_for_memo = replay_for_memo_num(user,project)#Message.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count #+ Memo.includes(:author).where("parent_id IS NOT NULL and author_id = #{user.id}").all.count
update_score(option_number) update_score(option_number)
end end
@ -552,7 +552,7 @@ FROM `users` where id = #{user.id}")
#更新帖子踩各项数量 #更新帖子踩各项数量
def update_tread(user,type,project=nil) def update_tread(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
tread_nums = tread_num(user,project) tread_nums = tread_num(user,project)
option_number.tread = tread_nums[:tread] option_number.tread = tread_nums[:tread]
option_number.tread_by_one = tread_nums[:tead_by_one] option_number.tread_by_one = tread_nums[:tead_by_one]
@ -617,7 +617,7 @@ FROM `users` where id = #{user.id}")
#更新帖子顶数量 #更新帖子顶数量
def update_praise(user,type,project=nil) def update_praise(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
praise_nums = praise_num(user,project) praise_nums = praise_num(user,project)
option_number.praise_by_one = praise_nums[:praise_by_one] option_number.praise_by_one = praise_nums[:praise_by_one]
option_number.praise_by_two = praise_nums[:praise_by_two] option_number.praise_by_two = praise_nums[:praise_by_two]
@ -682,7 +682,7 @@ FROM `users` where id = #{user.id}")
#更新提交代码次数 #更新提交代码次数
def update_changeset(user,type,project=nil) def update_changeset(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.changeset = changeset_num(user,project)#Changeset.includes(:user).where("user_id = '#{user.id}'").all.count option_number.changeset = changeset_num(user,project)#Changeset.includes(:user).where("user_id = '#{user.id}'").all.count
update_score(option_number) update_score(option_number)
end end
@ -698,7 +698,7 @@ FROM `users` where id = #{user.id}")
#更新文档提交次数 #更新文档提交次数
def update_document(user,type,project=nil) def update_document(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.document = document_num(user,project)#Document.includes(:user).where("user_id = '#{user.id}'").all.count option_number.document = document_num(user,project)#Document.includes(:user).where("user_id = '#{user.id}'").all.count
update_score(option_number) update_score(option_number)
end end
@ -714,7 +714,7 @@ FROM `users` where id = #{user.id}")
#更新附件提交数量 #更新附件提交数量
def update_attachment(user,type,project=nil) def update_attachment(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.attachment = attachment_num(user,project)#Attachment.includes(:author).where("author_id = '#{user.id}'").all.count option_number.attachment = attachment_num(user,project)#Attachment.includes(:author).where("author_id = '#{user.id}'").all.count
update_score(option_number) update_score(option_number)
end end
@ -729,7 +729,7 @@ FROM `users` where id = #{user.id}")
#更新缺陷完成度次数 #更新缺陷完成度次数
def update_issue_done_ratio(user,type,project=nil) def update_issue_done_ratio(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.issue_done_ratio = issue_done_ratio_num(user,project) #Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count option_number.issue_done_ratio = issue_done_ratio_num(user,project) #Journal.joins(:details, :user).where("#{JournalDetail.table_name}.prop_key = 'done_ratio' and #{User.table_name}.id = '#{user.id}'").count
update_score(option_number) update_score(option_number)
end end
@ -745,7 +745,7 @@ FROM `users` where id = #{user.id}")
#更新发布缺陷次数 #更新发布缺陷次数
def update_post_issue(user,type,project=nil) def update_post_issue(user,type,project=nil)
option_number = get_option_number(user,type) option_number = get_option_number(user,type,project)
option_number.post_issue = post_issue_num(user,project) #Issue.includes(:author).where("author_id = '#{user.id}'").all.count option_number.post_issue = post_issue_num(user,project) #Issue.includes(:author).where("author_id = '#{user.id}'").all.count
update_score(option_number) update_score(option_number)
end end
@ -758,6 +758,12 @@ FROM `users` where id = #{user.id}")
end end
end end
#读取项目成员得分
def read_user_project_scores(user,project)
option_num = get_option_number(user,2,project)
option_num.total_score
end
def user_scores(user,type,project=nil) def user_scores(user,type,project=nil)
ooption_num = get_option_number(user,type,project) ooption_num = get_option_number(user,type,project)
update_memo_number(user,type,project) update_memo_number(user,type,project)

View File

@ -512,11 +512,18 @@ class Attachment < ActiveRecord::Base
end end
end end
update_attachment(self.author,1) update_attachment(self.author,1)
if self.container_type == 'Project'
update_attachment(self.author,2,self.container)
end
end end
#删除附件时重新统计用户的附件数量得分 #删除附件时重新统计用户的附件数量得分
def down_user_score def down_user_score
update_attachment(self.author,1) update_attachment(self.author,1)
if self.container_type == 'Project'
update_attachment(self.author,2,self.container)
end
end end
end end

View File

@ -308,12 +308,14 @@ class Changeset < ActiveRecord::Base
#更新用户等级 #更新用户等级
UserLevels.update_user_level(self.user) UserLevels.update_user_level(self.user)
update_changeset(self.user,1) update_changeset(self.user,1)
update_changeset(self.user,2,self.repository.project)
end end
#积分刷新 #积分刷新
def down_user_score def down_user_score
UserLevels.update_user_level(self.user) UserLevels.update_user_level(self.user)
update_changeset(self.user,1) update_changeset(self.user,1)
update_changeset(self.user,2,self.repository.project)
end end
end end

View File

@ -69,9 +69,11 @@ class Document < ActiveRecord::Base
def be_user_score def be_user_score
UserScore.project(:push_document, self.user,self,{ document_id: self.id }) UserScore.project(:push_document, self.user,self,{ document_id: self.id })
update_document(self.user,1) update_document(self.user,1)
update_document(self.user,2,self.project)
end end
def down_user_score def down_user_score
update_document(self.user,1) update_document(self.user,1)
update_document(self.user,2,self.project)
end end
end end

View File

@ -138,10 +138,10 @@ class Issue < ActiveRecord::Base
nil nil
when 'default' when 'default'
user_ids = [user.id] + user.groups.map(&:id) user_ids = [user.id] + user.groups.map(&:id)
"(#{table_name}.is_private = #{connection.quoted_false}) OR (#{table_name}.author_id = #{user.id} OR #{table_name}.tracker_id IN (#{user_ids.join(',')}) OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" "(#{table_name}.is_private = #{connection.quoted_false}) OR (#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
when 'own' when 'own'
user_ids = [user.id] + user.groups.map(&:id) user_ids = [user.id] + user.groups.map(&:id)
"(#{table_name}.author_id = #{user.id} OR #{table_name}.tracker_id IN (#{user_ids.join(',')}) OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))" "(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
else else
'1=0' '1=0'
end end
@ -159,9 +159,9 @@ class Issue < ActiveRecord::Base
when 'all' when 'all'
true true
when 'default' when 'default'
(!self.is_private? ||self.tracker == user) || (self.author == user || user.is_or_belongs_to?(assigned_to)) !self.is_private? || (self.author == user || user.is_or_belongs_to?(assigned_to))
when 'own' when 'own'
self.tracker == user || self.author == user || user.is_or_belongs_to?(assigned_to) self.author == user || user.is_or_belongs_to?(assigned_to)
else else
false false
end end
@ -1524,6 +1524,7 @@ class Issue < ActiveRecord::Base
def be_user_score_new_issue def be_user_score_new_issue
UserScore.project(:post_issue, self.author,self, { issue_id: self.id }) UserScore.project(:post_issue, self.author,self, { issue_id: self.id })
update_post_issue(self.author,1) update_post_issue(self.author,1)
update_post_issue(self.author,2,self.project)
end end
def down_user_score def down_user_score
@ -1539,8 +1540,13 @@ class Issue < ActiveRecord::Base
# update_issues_status(self.author , 1) # update_issues_status(self.author , 1)
#end #end
update_post_issue(self.author,1) update_post_issue(self.author,1)
update_issue_done_ratio(User.current,1) #update_issue_done_ratio(self.author,1)
update_issues_status(self.author , 1) #update_issues_status(self.author , 1)
update_post_issue(self.author,2,self.project)
#update_issue_done_ratio(self.author,2,self.project)
#update_issues_status(self.author , 2)
end end

View File

@ -163,6 +163,7 @@ class Journal < ActiveRecord::Base
#协同得分加分 #协同得分加分
UserScore.joint(:post_issue_message, self.user,self.issue.author,self, { message_id: self.id }) UserScore.joint(:post_issue_message, self.user,self.issue.author,self, { message_id: self.id })
update_messges_for_issue(self.user,1) update_messges_for_issue(self.user,1)
update_messges_for_issue(self.user,2,self.issue.project)
end end
end end
@ -173,6 +174,7 @@ class Journal < ActiveRecord::Base
#协同得分减分 #协同得分减分
UserScore.joint(:delete_issue_message, self.user,self.issue.author,self, { message_id: self.id }) UserScore.joint(:delete_issue_message, self.user,self.issue.author,self, { message_id: self.id })
update_messges_for_issue(self.user,1) update_messges_for_issue(self.user,1)
update_messges_for_issue(self.user,2,self.issue.project)
end end
end end

View File

@ -46,9 +46,15 @@ class JournalDetail < ActiveRecord::Base
#更新缺陷完成度 #更新缺陷完成度
if self.prop_key == 'done_ratio' if self.prop_key == 'done_ratio'
update_issue_done_ratio(self.journal.user,1) update_issue_done_ratio(self.journal.user,1)
unless self.journal.project.nil?
update_issue_done_ratio(self.journal.user,2,self.journal.project)
end
#更新缺陷状态 #更新缺陷状态
elsif self.prop_key == 'status_id' elsif self.prop_key == 'status_id'
update_issues_status(self.journal.user , 1) update_issues_status(self.journal.user , 1)
unless self.journal.project.nil?
update_issues_status(self.journal.user,2,self.journal.project)
end
end end
end end
@ -57,9 +63,16 @@ class JournalDetail < ActiveRecord::Base
if self.prop_key == 'done_ratio' if self.prop_key == 'done_ratio'
update_issue_done_ratio(self.journal.user,1) update_issue_done_ratio(self.journal.user,1)
unless self.journal.project.nil?
update_issue_done_ratio(self.journal.user,2,self.journal.project)
end
#更新缺陷状态 #更新缺陷状态
elsif self.prop_key == 'status_id' elsif self.prop_key == 'status_id'
update_issues_status(self.journal.user, 1) update_issues_status(self.journal.user, 1)
unless self.journal.project.nil?
update_issues_status(self.journal.user,2,self.journal.project)
end
end end
end end

View File

@ -144,6 +144,9 @@ class JournalsForMessage < ActiveRecord::Base
#协同得分加分 #协同得分加分
UserScore.joint(:reply_message, self.user,User.find(self.reply_id),self, { journals_for_messages_id: self.id }) UserScore.joint(:reply_message, self.user,User.find(self.reply_id),self, { journals_for_messages_id: self.id })
update_replay_for_message(self.user,1) update_replay_for_message(self.user,1)
if self.jour_type == "Project"
update_replay_for_message(self.user,2,self.jour)
end
end end
end end
# 更新用户分数 -by zjc # 更新用户分数 -by zjc
@ -153,6 +156,9 @@ class JournalsForMessage < ActiveRecord::Base
#协同得分减分 #协同得分减分
UserScore.joint(:reply_message_delete, self.user,User.find(self.reply_id), { journals_for_messages_id: self.id }) UserScore.joint(:reply_message_delete, self.user,User.find(self.reply_id), { journals_for_messages_id: self.id })
update_replay_for_message(self.user,1) update_replay_for_message(self.user,1)
if self.jour_type == "Project"
update_replay_for_message(self.user,2,self.jour)
end
end end
end end
end end

View File

@ -146,11 +146,12 @@ class Memo < ActiveRecord::Base
end end
#更新用户分数 -by zjc #更新用户分数 -by zjc
def be_user_score def be_user_score
#新建memo且无parent的为发帖 #新建memo且无parent的为发帖
if self.parent_id.nil? if self.parent_id.nil?
UserScore.joint(:post_message, User.current,nil,self ,{ memo_id: self.id }) UserScore.joint(:post_message, User.current,nil,self ,{ memo_id: self.id })
update_memo_number(User.current,1) update_memo_number(User.current,1)
#新建memo且有parent的为回帖 #新建memo且有parent的为回帖
elsif !self.parent_id.nil? elsif !self.parent_id.nil?
UserScore.joint(:reply_posting, User.current,self.parent.author,self, { memo_id: self.id }) UserScore.joint(:reply_posting, User.current,self.parent.author,self, { memo_id: self.id })

View File

@ -152,11 +152,17 @@ class Message < ActiveRecord::Base
#新建message且无parent的为发帖 #新建message且无parent的为发帖
if self.parent_id.nil? && !self.board.project.nil? if self.parent_id.nil? && !self.board.project.nil?
UserScore.joint(:post_message, self.author,nil,self, { message_id: self.id }) UserScore.joint(:post_message, self.author,nil,self, { message_id: self.id })
update_memo_number(User.current,1) update_memo_number(self.author,1)
if self.board.project_id != -1
update_memo_number(self.author,2,self.board.project)
end
#新建message且有parent的为回帖 #新建message且有parent的为回帖
elsif !self.parent_id.nil? && !self.board.project.nil? elsif !self.parent_id.nil? && !self.board.project.nil?
UserScore.joint(:reply_posting, self.author,self.parent.author,self, { message_id: self.id }) UserScore.joint(:reply_posting, self.author,self.parent.author,self, { message_id: self.id })
update_replay_for_memo(User.current,1) update_replay_for_memo(self.author,1)
if self.board.project_id != -1
update_replay_for_memo(self.author,2,self.board.project)
end
end end
end end
@ -165,9 +171,15 @@ class Message < ActiveRecord::Base
if self.parent_id.nil? && !self.board.project.nil? if self.parent_id.nil? && !self.board.project.nil?
UserScore.joint(:delete_message, self.author,nil,self, { message_id: self.id }) UserScore.joint(:delete_message, self.author,nil,self, { message_id: self.id })
update_memo_number(User.current,1) update_memo_number(User.current,1)
if self.board.project_id != -1
update_memo_number(self.author,2,self.board.project)
end
elsif !self.parent_id.nil? && !self.board.project.nil? elsif !self.parent_id.nil? && !self.board.project.nil?
UserScore.joint(:reply_deleting, self.author,self.parent.author,self, { message_id: self.id }) UserScore.joint(:reply_deleting, self.author,self.parent.author,self, { message_id: self.id })
update_replay_for_memo(User.current,1) update_replay_for_memo(User.current,1)
if self.board.project_id != -1
update_replay_for_memo(self.author,2,self.board.project)
end
end end
end end
end end

View File

@ -43,14 +43,21 @@ class PraiseTread < ActiveRecord::Base
obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id) obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id)
target_user = obj.author target_user = obj.author
UserScore.skill(:treaded_by_user, User.current,target_user,self, { praise_tread_id: self.id }) UserScore.skill(:treaded_by_user, User.current,target_user,self, { praise_tread_id: self.id })
update_tread(User.current,1) update_tread(self.user,1)
update_tread(target_user,1) update_tread(target_user,1)
unless self.project.nil?
update_tread(self.user,2,self.project)
update_tread(target_user,2,self.project)
end
#顶贴吧或讨论区帖子 #顶贴吧或讨论区帖子
elsif self.praise_or_tread == 1 && (self.praise_tread_object_type == 'Issue' || self.praise_tread_object_type == 'Message') elsif self.praise_or_tread == 1 && (self.praise_tread_object_type == 'Issue' || self.praise_tread_object_type == 'Message')
obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id) obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id)
target_user = obj.author target_user = obj.author
UserScore.skill(:praised_by_user, User.current,target_user,self,{ praise_tread_id: self.id }) UserScore.skill(:praised_by_user, User.current,target_user,self,{ praise_tread_id: self.id })
update_praise(target_user,1) update_praise(target_user,1)
unless self.project.nil?
update_praise(target_user,2,self.project)
end
#更新用户等级 #更新用户等级
UserLevels.update_user_level(target_user) UserLevels.update_user_level(target_user)
end end
@ -62,14 +69,21 @@ class PraiseTread < ActiveRecord::Base
obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id) obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id)
target_user = obj.author target_user = obj.author
#UserScore.skill(:treaded_by_user, User.current,target_user,self, { praise_tread_id: self.id }) #UserScore.skill(:treaded_by_user, User.current,target_user,self, { praise_tread_id: self.id })
update_tread(User.current,1) update_tread(self.user,1)
update_tread(target_user,1) update_tread(target_user,1)
unless self.project.nil?
update_tread(self.user,2,self.project)
update_tread(target_user,2,self.project)
end
#顶贴吧或讨论区帖子 #顶贴吧或讨论区帖子
elsif self.praise_or_tread == 1 && (self.praise_tread_object_type == 'Issue' || self.praise_tread_object_type == 'Message') elsif self.praise_or_tread == 1 && (self.praise_tread_object_type == 'Issue' || self.praise_tread_object_type == 'Message')
obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id) obj = PraiseTread.find_object_by_type_and_id(self.praise_tread_object_type,praise_tread_object_id)
target_user = obj.author target_user = obj.author
#UserScore.skill(:praised_by_user, User.current,target_user,self,{ praise_tread_id: self.id }) #UserScore.skill(:praised_by_user, User.current,target_user,self,{ praise_tread_id: self.id })
update_praise(target_user,1) update_praise(target_user,1)
unless self.project.nil?
update_praise(target_user,2,self.project)
end
#更新用户等级 #更新用户等级
UserLevels.update_user_level(target_user) UserLevels.update_user_level(target_user)
end end

View File

@ -95,9 +95,6 @@
<% end %> <% end %>
<% end %> <% end %>
<div class="pagination"> <div class="pagination">
<ul> <%= pagination_links_full bid_pages %>
<%= pagination_links_full bid_pages %>
</ul>
</div> </div>

View File

@ -12,7 +12,7 @@
$("#spane_name_notice").focus(); $("#spane_name_notice").focus();
return false; return false;
} }
else if(name.length < 25) else if(name.length <= 25)
{ {
$("#spane_name_notice").text("填写正确"); $("#spane_name_notice").text("填写正确");
$("#spane_name_notice").css('color','#008000'); $("#spane_name_notice").css('color','#008000');
@ -37,7 +37,7 @@
$("#spane_workdescription_notice").css('color','#ff0000'); $("#spane_workdescription_notice").css('color','#ff0000');
return false; return false;
} }
if(workDescription.length < 125) if(workDescription.length <= 125)
{ {
$("#spane_workdescription_notice").text("填写正确"); $("#spane_workdescription_notice").text("填写正确");
$("#spane_workdescription_notice").css('color','#008000'); $("#spane_workdescription_notice").css('color','#008000');
@ -61,7 +61,7 @@
$("#span_softapplication_application_developers").css('color','#ff0000'); $("#span_softapplication_application_developers").css('color','#ff0000');
return false; return false;
} }
if(workDescription.length < 125) if(workDescription.length <= 125)
{ {
$("#span_softapplication_application_developers").text("填写正确"); $("#span_softapplication_application_developers").text("填写正确");
$("#span_softapplication_application_developers").css('color','#008000'); $("#span_softapplication_application_developers").css('color','#008000');
@ -79,7 +79,6 @@
{ {
if(regexName() && regexWorkdescription() && regexDevelopers()) if(regexName() && regexWorkdescription() && regexDevelopers())
{ {
alert("123123123123");
$("#new_softapplication").submit(); $("#new_softapplication").submit();
} }
} }

View File

@ -239,8 +239,9 @@
<!--获奖及教师评奖--> <!--获奖及教师评奖-->
<div style="padding-left: 18px; padding-bottom: 5px"> <div style="padding-left: 18px; padding-bottom: 5px">
<% score = c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_f %>
<span style="padding-left: 50px"><strong><%= l(:label_final_scores) %> <span style="padding-left: 50px"><strong><%= l(:label_final_scores) %>
</strong></span><span style="color: red"><%= c_softapplication.softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %> </strong></span><span style="color: red"><%= format("%.2f" , score) %>
分</span> 分</span>
<span style="padding-left: 334px"> <span style="padding-left: 334px">
<td> <td>

View File

@ -37,26 +37,26 @@
<!-- <!--
<fieldset class="collapsible collapsed"> <fieldset class="collapsible collapsed">
<legend onclick="toggleFieldset(this);"> <legend onclick="toggleFieldset(this);">
<%#= l(:label_options) %> <%= l(:label_options) %>
</legend> </legend>
<div style="display: none;"> <div style="display: none;">
<table> <table>
<tr> <tr>
<td><%#= l(:field_column_names) %></td> <td><%= l(:field_column_names) %></td>
<td><%#= render_query_columns_selection(@query) %></td> <td><%= render_query_columns_selection(@query) %></td>
</tr> </tr>
<tr> <tr>
<td><label for='group_by'><%#= l(:field_group_by) %></label></td> <td><label for='group_by'><%= l(:field_group_by) %></label></td>
<td><%#= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td> <td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
</tr> </tr>
<tr> <tr>
<td><%#= l(:button_show) %></td> <td><%= l(:button_show) %></td>
<td><%#= available_block_columns_tags(@query) %></td> <td><%= available_block_columns_tags(@query) %></td>
</tr> </tr>
</table> </table>
</div> </div>
</fieldset> </fieldset>
--> -->
<div class="buttons hide-when-print"> <div class="buttons hide-when-print">
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %> <%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %> <%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>

View File

@ -1,13 +1,13 @@
<!-- <table id="top-menu" style="background-color: #ac344f;margin-top: 10px;margin-bottom: 0px; padding-top: 3px; "> <!-- <table id="top-menu" style="background-color: #ac344f;margin-top: 10px;margin-bottom: 0px; padding-top: 3px; ">
<tr><td ><%=link_to image_tag("/images/logo_ent.png",weight:"38px", height: "38px"), home_path %></td> <tr><td ><%#=link_to image_tag("/images/logo_ent.png",weight:"38px", height: "38px"), home_path %></td>
<td valign="top" width="300px"><%= render_menu :top_enterprise_menu if User.current.logged? || !Setting.login_required? -%></td> <td valign="top" width="300px"><%#= render_menu :top_enterprise_menu if User.current.logged? || !Setting.login_required? -%></td>
<td><%=link_to "企业入口"%></td> <td><%#=link_to "企业入口"%></td>
<td valign="top" style=" padding-left: 380px"> <td valign="top" style=" padding-left: 380px">
<%= content_tag('div', "#{link_to(l(:label_layouts_feedback)+'(' + User.current.count_new_jour.to_s + ')', feedback_path(User.current))}".html_safe, :id => 'loggedas') if User.current.logged? %> <%#= content_tag('div', "#{link_to(l(:label_layouts_feedback)+'(' + User.current.count_new_jour.to_s + ')', feedback_path(User.current))}".html_safe, :id => 'loggedas') if User.current.logged? %>
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %> <%#= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
</td> </td>
<td valign="top"> <td valign="top">
<%= render_menu :account_menu -%> <%#= render_menu :account_menu -%>
</td> </td>
</tr> </tr>
</table> --> </table> -->
@ -31,14 +31,14 @@
<!-- <div style="float: right; margin-top: 13px;"> <!-- <div style="float: right; margin-top: 13px;">
<%= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => "留言") if User.current.logged? %> <%#= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => "留言") if User.current.logged? %>
</div> --> </div> -->
<!-- <div align="center" style="float: right; margin-right: -25px; margin-top: 6px; background: #ea7125; width: 12px;border-radius:7px; font-size: 8px; color: #fff; font-weight: bold"> <!-- <div align="center" style="float: right; margin-right: -25px; margin-top: 6px; background: #ea7125; width: 12px;border-radius:7px; font-size: 8px; color: #fff; font-weight: bold">
<%= User.current.count_new_jour if User.current.logged? && User.current.count_new_jour != 0 %> <%#= User.current.count_new_jour if User.current.logged? && User.current.count_new_jour != 0 %>
</div> --> </div> -->
<!-- <%= content_tag('div', "#{}".html_safe, :id => 'loggedas')%> --> <!-- <%#= content_tag('div', "#{}".html_safe, :id => 'loggedas')%> -->
<!-- 消息#{link_to((User.current.count_new_jour), feedback_path(User.current))} --> <!-- 消息#{link_to((User.current.count_new_jour), feedback_path(User.current))} -->
<!-- <%= content_tag('div', "消息(#{User.current.journals_for_messages.count}".html_safe, :id => 'loggedas')%> --> <!-- <%#= content_tag('div', "消息(#{User.current.journals_for_messages.count}".html_safe, :id => 'loggedas')%> -->
<!-- <div style="border-top:solid 1px #C6E9F1;width:940px;margin-left:auto;margin-right:auto;margin-bottom: 5px;margin-top: -10px;"></div> --> <!-- <div style="border-top:solid 1px #C6E9F1;width:940px;margin-left:auto;margin-right:auto;margin-bottom: 5px;margin-top: -10px;"></div> -->

View File

@ -1,5 +1,4 @@
<!--add by huang--> <!--add by huang-->
<% cache "footer" do %>
<div class="clearfix"></div> <div class="clearfix"></div>
<div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;"> <div id="footer" style="margin-left:-5px;padding-top: 20px;clear: both;font-size: 12px;">
<div style="border-top:solid 1px #C6E9F1;"></div> <div style="border-top:solid 1px #C6E9F1;"></div>
@ -46,4 +45,3 @@
</div> </div>
</div> </div>
<% end %>

View File

@ -9,14 +9,14 @@
<%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %> <%= content_tag('div', "#{l(:label_logged_as)} #{link_to_user(User.current, :format => :username)}".html_safe, :id => 'loggedas') if User.current.logged? %>
<!-- <div style="float: right; margin-top: 13px;"> <!-- <div style="float: right; margin-top: 13px;">
<%= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => "留言") if User.current.logged? %> <%#= content_tag('div', "#{link_to(image_tag('/images/mes.png'), feedback_path(User.current))}".html_safe, :title => "留言") if User.current.logged? %>
</div> --> </div> -->
<!-- <div align="center" style="float: right; margin-right: -25px; margin-top: 6px; background: #ea7125; width: 12px;border-radius:7px; font-size: 8px; color: #fff; font-weight: bold"> <!-- <div align="center" style="float: right; margin-right: -25px; margin-top: 6px; background: #ea7125; width: 12px;border-radius:7px; font-size: 8px; color: #fff; font-weight: bold">
<%= User.current.count_new_jour if User.current.logged? && User.current.count_new_jour != 0 %> <%#= User.current.count_new_jour if User.current.logged? && User.current.count_new_jour != 0 %>
</div> --> </div> -->
<!-- <%= content_tag('div', "#{}".html_safe, :id => 'loggedas')%> --> <!-- <%#= content_tag('div', "#{}".html_safe, :id => 'loggedas')%> -->
<!-- 消息#{link_to((User.current.count_new_jour), feedback_path(User.current))} --> <!-- 消息#{link_to((User.current.count_new_jour), feedback_path(User.current))} -->
<!-- <%= content_tag('div', "消息(#{User.current.journals_for_messages.count}".html_safe, :id => 'loggedas')%> --> <!-- <%#= content_tag('div', "消息(#{User.current.journals_for_messages.count}".html_safe, :id => 'loggedas')%> -->
<%= render_menu :top_home_menu if User.current.logged? || !Setting.login_required? -%> <%= render_menu :top_home_menu if User.current.logged? || !Setting.login_required? -%>
</div> </div>
<div style="border-top:solid 1px #C6E9F1;width:940px;margin-left:auto;margin-right:auto;margin-bottom: 5px;margin-top: -10px;"></div> <div style="border-top:solid 1px #C6E9F1;width:940px;margin-left:auto;margin-right:auto;margin-bottom: 5px;margin-top: -10px;"></div>

View File

@ -82,7 +82,7 @@
<%= join_in_course(@course, User.current) %> <%= join_in_course(@course, User.current) %>
<% end %> <% end %>
<% unless User.current.member_of_course?(@course) %> <% unless User.current.member_of_course?(@course) %>
<!-- <%= image_tag "/images/fav.png" %> --> <!-- <%#= image_tag "/images/fav.png" %> -->
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@ -30,13 +30,14 @@
border-bottom: 1px dashed rgb(204, 204, 204); border-bottom: 1px dashed rgb(204, 204, 204);
} }
.memo-content { .memo-content {
width: 82%;
padding: 1%; padding: 1%;
margin: 1%; margin: 1%;
margin-bottom: 40px; margin-bottom: 40px;
background-color: #F6F6F6; background-color: #F6F6F6;
white-space: normal; white-space: normal;
/*word-break: break-all; */ word-break: break-all;
word-wrap: break-word; /*word-wrap: break-word;*/
} }
.memo-timestamp { .memo-timestamp {
position: absolute; position: absolute;

View File

@ -24,7 +24,7 @@
<%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %> <%= content_tag "div", content_tag("p", rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ')), :class => "clear avatar_name" %>
<div class="clear avatar_user"> <div class="clear avatar_user">
<p> <!--user_scores(member.user,2,@project).total_score).to_i UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i--> <p> <!--user_scores(member.user,2,@project).total_score).to_i UserGrade.find_by_user_id_and_project_id(member[:user_id], @project.id).grade).to_i-->
<%= l(:label_user_for_project_grade) %>: <span style="color:#ec6300"><%= format("%.2f" ,user_scores(member.user,2,@project).total_score).to_i %></span> <%= l(:label_user_for_project_grade) %>: <span style="color:#ec6300"><%= format("%.2f" ,read_user_project_scores(member.user,@project)).to_i %></span>
</p> </p>
</div> </div>
<% end %> <% end %>

View File

@ -4,7 +4,7 @@
<div> = <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> + <div> = <%= l(:label_issue_score) %> + <%= l(:label_news_score) %> + <%= l(:label_file_score) %> +
<%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %></div> <%= l(:label_code_submit_score) %> + <%= l(:label_topic_score) %></div>
<div> = <%= format("%.2f" , issue_score(@project)).to_i %> + <%= format("%.2f" , news_score(@project)).to_i %> + <div> = <%= format("%.2f" , issue_score(@project)).to_i %> + <%= format("%.2f" , news_score(@project)).to_i %> +
<%= format("%.2f" , document_score(@project)).to_i %> + <%= format("%.2f" , changesets_score(@project)).to_i %> + <%= format("%.2f" , documents_score(@project)).to_i %> + <%= format("%.2f" , changesets_score(@project)).to_i %> +
<%= format("%.2f" , board_message_score(@project)).to_i %></div> <%= format("%.2f" , board_message_score(@project)).to_i %></div>
<div> = <%= format("%.2f" , project_scores(@project)).to_i %></div> <div> = <%= format("%.2f" , project_scores(@project)).to_i %></div>
<!-- end --> <!-- end -->

View File

@ -37,7 +37,7 @@
</li> </li>
<li> <li>
<%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> : <%= link_to l(:label_file_score), {:controller => 'projects', :action => 'file_score_index', :remote => true}%> :
<%= format("%.2f" , document_score(@project)).to_i %> <%= format("%.2f" , documents_score(@project)).to_i %>
</li> </li>
<li> <li>
<%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> : <%= link_to l(:label_code_submit_score), {:controller => 'projects', :action => 'code_submit_score_index', :remote => true}%> :

View File

@ -7,7 +7,7 @@
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%></li> <li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%></li>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_files) ,project_files_path(@project) %></li> <li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_files) ,project_files_path(@project) %></li>
<% if @project.enabled_modules.where("name = 'wiki'").count > 0 %> <% if @project.enabled_modules.where("name = 'wiki'").count > 0 %>
<li><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li> <li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_wiki), project_wiki_path(@project) %></li>
<% end %> <% end %>
</ul> </ul>
<ul><h3>进度跟踪</h3> <ul><h3>进度跟踪</h3>
@ -17,7 +17,7 @@
</ul> </ul>
<ul><h3>其他工具</h3> <ul><h3>其他工具</h3>
<% if @project.enabled_modules.where(" name = 'dts'").count > 0 %> <% if @project.enabled_modules.where(" name = 'dts'").count > 0 %>
<li><%= link_to l(:label_module_share) ,share_show_path(@project) %></li> <li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:label_module_share) ,share_show_path(@project) %></li>
<% end %> <% end %>
<li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_documents), project_documents_path(@project) %></li> <li style="background: url('http://<%= Setting.host_name %>/images/sidebar/tool_tag_alpha.png') no-repeat scroll 10px 30% transparent;"><%= link_to l(:project_module_documents), project_documents_path(@project) %></li>
<li></li> <li></li>

View File

@ -13,16 +13,15 @@
</div> </div>
<div class="activity-content" style="padding:5px 5px 5px 70px;"> <div class="activity-content" style="padding:5px 5px 5px 70px;">
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong> <strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
<span class="activity-title font_lighter"> <span class="activity-title font_lighter">
<% if @canShowRealName %> <% if @canShowRealName %>
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
(<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>) (<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>)
<% else %> <% else %>
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %> <%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
<% end %> <% end %>
<%= l(:label_new_activity) %>
<%= l(:label_new_activity) %> </span>
</span>
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %> <%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;"> <div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;">

View File

@ -79,9 +79,10 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<div style="float: left; padding-left: 100px; padding-top:35px " align="center"> <div style="float: left; padding-left: 100px; padding-top:35px ">
<div><%=l(:label_final_scores)%></div> <div style="text-align: center;"><%=l(:label_final_scores)%></div>
<div style="padding-top: 1px; font-size: 15px; color: blue"><%= @softapplication.average(:quality).try(:avg).try(:round, 2).to_i.to_s %>分</div> <% score = @softapplication.average(:quality).try(:avg).try(:round, 2).to_f %>
<div style="padding-top: 1px; font-size: 15px; color: blue;text-align: center;"><%= format("%.2f" , score) %>分</div>
<div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div> <div><%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></div>
</div> </div>
<div style="float: left; padding-left: 100px; padding-top:35px;" align="center"> <div style="float: left; padding-left: 100px; padding-top:35px;" align="center">

View File

@ -70,14 +70,13 @@
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% when '5' %> <% when '5' %>
<% if Forum.find(params[:id]) %> <% test = Forum.find(obj.id) %>
<% if Forum.find(params[:id]).creator_id == User.current.id %> <% if test && test.creator_id == User.current.id %>
<span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag, <span class='del'> <%= link_to 'x', :controller => "tags", :action => "remove_tag", :remote => true, :tag_name => tag,
:taggable_id => obj.id, :taggable_type => object_flag %> </span> :taggable_id => obj.id, :taggable_type => object_flag %> </span>
<% end %> <% end %>
<% end %>
<% when '6' %> <% when '6' %>
<%# if (User.current.logged? && <%# if (User.current.logged? &&
User.current.admin? User.current.admin?

View File

@ -163,7 +163,7 @@ zh:
notice_account_invalid_creditentials_new: 您还未到邮箱激活 notice_account_invalid_creditentials_new: 您还未到邮箱激活
notice_account_password_updated: 密码更新成功 notice_account_password_updated: 密码更新成功
notice_account_wrong_password: 密码错误 notice_account_wrong_password: 密码错误
notice_account_register_done: 帐号创建成功,请使用注册确认邮件中的链接来激活您的帐号 notice_account_register_done: 帐号创建成功,请使用注册确认邮件中的链接来激活您的帐号, 如果您的邮件没有在收件箱中可能在垃圾箱中,请您注意查收
notice_account_unknown_email: 未知用户 notice_account_unknown_email: 未知用户
notice_can_t_change_password: 该帐号使用了外部认证,因此无法更改密码。 notice_can_t_change_password: 该帐号使用了外部认证,因此无法更改密码。
notice_account_lost_email_sent: 系统已将引导您设置新密码的邮件发送给您。 notice_account_lost_email_sent: 系统已将引导您设置新密码的邮件发送给您。
@ -1331,7 +1331,7 @@ zh:
permission_add_documents: 新建文档 permission_add_documents: 新建文档
permission_edit_documents: 编辑文档 permission_edit_documents: 编辑文档
permission_delete_documents: 删除文档 permission_delete_documents: 删除文档
label_gantt_progress_line: Progress line label_gantt_progress_line: 进度线
setting_jsonp_enabled: Enable JSONP support setting_jsonp_enabled: Enable JSONP support
field_inherit_members: Inherit members field_inherit_members: Inherit members
field_closed_on: 已关闭 field_closed_on: 已关闭

View File

@ -0,0 +1,18 @@
# This migration comes from rich (originally 20111201095829)
class AddCkeditorToSettings < ActiveRecord::Migration
def up
str = "
insert into `settings` (`name`, `value`, `updated_on`) values('plugin_redmine_ckeditor','--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nskin: kama\nui_color: ! \'#f4f4f4\'\nwidth: \'\'\nheight: \'400\'\nenter_mode: \'1\'\nshow_blocks: \'1\'\ntoolbar_can_collapse: \'0\'\ntoolbar_location: top\ntoolbar: Source,ShowBlocks,--,Undo,Redo,-,Find,Replace,--,Bold,Italic,Underline,Strike,-,Subscript,Superscript,-,NumberedList,BulletedList,-,Outdent,Indent,Blockquote,-,JustifyLeft,JustifyCenter,JustifyRight,JustifyBlock,-,Link,Unlink,-,richImage,Table,HorizontalRule,/,Styles,Format,Font,FontSize,-,TextColor,BGColor,Cut,Copy,Paste,BidiLtr,BidiRtl,PasteText,PasteFromWord,RemoveFormat,SelectAll\n','2014-07-24 11:24:50');
"
ActiveRecord::Base.connection.execute(
"insert settings(name, value) values('plugin_redmine_ckeditor', '')"
)
end
def down
ss = Setting.where("name='plugin_redmine_ckeditor'")
ss.each do |s|
s.destroy
end
end
end