Merge branch 'dev_raining' of https://git.trustie.net/jacknudt/trustieforge into dev_raining
Conflicts: db/schema.rb
This commit is contained in:
commit
82c6799953
|
@ -1,3 +1,3 @@
|
||||||
# Place all the behaviors and hooks related to the matching controller here.
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
# All this logic will automatically be available in application.js.
|
# All this logic will automatically be available in application.js.
|
||||||
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
// Place all the styles related to the training_tasks controller here.
|
// Place all the styles related to the training_tasks controller here.
|
||||||
// They will automatically be included in application.css.
|
// They will automatically be included in application.css.
|
||||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||||
|
|
|
@ -42,7 +42,7 @@ class AccountController < ApplicationController
|
||||||
redirect_to user_path(User.current)
|
redirect_to user_path(User.current)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
render :layout => 'login'
|
render :layout => 'login'
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
authenticate_user
|
authenticate_user
|
||||||
|
|
|
@ -783,8 +783,8 @@ class AdminController < ApplicationController
|
||||||
begin
|
begin
|
||||||
#更新消息表的status
|
#更新消息表的status
|
||||||
applied_message_id = aas.school_id
|
applied_message_id = aas.school_id
|
||||||
applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
|
#applied_message = AppliedMessage.where(:applied_id => applied_message_id, :applied_type => "ApplyAddSchools")
|
||||||
applied_message.update_all(:status => 2)
|
#applied_message.update_all(:status => 2)
|
||||||
aas.update_attribute(:status, 2)
|
aas.update_attribute(:status, 2)
|
||||||
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => 0, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
|
AppliedMessage.create(:user_id => aas.user_id, :status => 2, :viewed => 0, :applied_id => aas.id, :applied_type => "ApplyAddSchools", :name => school[0].name )
|
||||||
users = UserExtensions.where("school_id = #{aas.school_id}")
|
users = UserExtensions.where("school_id = #{aas.school_id}")
|
||||||
|
|
|
@ -39,6 +39,9 @@ class BlogCommentsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def show
|
def show
|
||||||
|
# 更新博客消息为已读
|
||||||
|
update_messsages_to_viewed("BlogMessage", params[:blog_id])
|
||||||
|
|
||||||
@article = BlogComment.find(params[:id])
|
@article = BlogComment.find(params[:id])
|
||||||
@replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc")
|
@replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc")
|
||||||
@reply_count = @replies.count
|
@reply_count = @replies.count
|
||||||
|
|
|
@ -7,7 +7,8 @@ class ContestsController < ApplicationController
|
||||||
helper :attachments
|
helper :attachments
|
||||||
helper :files
|
helper :files
|
||||||
include AvatarHelper
|
include AvatarHelper
|
||||||
|
include ApplicationHelper
|
||||||
|
|
||||||
before_filter :find_contest, :only => [:show, :settings, :update, :destroy, :contest_activities, :private_or_public, :switch_role, :set_invite_code_halt, :renew,
|
before_filter :find_contest, :only => [:show, :settings, :update, :destroy, :contest_activities, :private_or_public, :switch_role, :set_invite_code_halt, :renew,
|
||||||
:member, :export_all_members, :feedback]
|
:member, :export_all_members, :feedback]
|
||||||
before_filter :is_logged, :only => [:index, :new, :create]
|
before_filter :is_logged, :only => [:index, :new, :create]
|
||||||
|
@ -18,8 +19,7 @@ class ContestsController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
#更新创建课程消息状态
|
#更新创建课程消息状态
|
||||||
contest_request_messages = ContestMessage.where("user_id = #{User.current.id} and contest_id = #{@contest.id} and contest_message_type in ('ContestRequestDealResult', 'JoinContest', 'RemoveFromContest') and viewed = 0")
|
update_messsages_to_viewed("ContestMessage", @contest)
|
||||||
contest_request_messages.update_all(:viewed => true)
|
|
||||||
@left_nav_type = 1
|
@left_nav_type = 1
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -9,6 +9,7 @@ class CoursesController < ApplicationController
|
||||||
helper :attachments
|
helper :attachments
|
||||||
helper :files
|
helper :files
|
||||||
helper :activity_notifys
|
helper :activity_notifys
|
||||||
|
include ApplicationHelper
|
||||||
|
|
||||||
before_filter :auth_login1, :only => [:show, :course_activity, :feedback]
|
before_filter :auth_login1, :only => [:show, :course_activity, :feedback]
|
||||||
menu_item :overview
|
menu_item :overview
|
||||||
|
@ -354,6 +355,44 @@ class CoursesController < ApplicationController
|
||||||
#search_group_members group
|
#search_group_members group
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def change_manager
|
||||||
|
if params[:chooseteacher]
|
||||||
|
man_member = Member.where(:course_id => @course.id, :user_id => @course.tea_id).first
|
||||||
|
cha_member = Member.find params[:chooseteacher]
|
||||||
|
if man_member && cha_member
|
||||||
|
cha_member.member_roles.where("role_id = 9 || role_id = 7").first.update_attributes(:role_id => 3, :is_current => 1)
|
||||||
|
if cha_member.member_roles.where("role_id = 10").count > 0
|
||||||
|
cha_member.member_roles.where("role_id = 10").first.destroy
|
||||||
|
StudentsForCourse.where(:course_id => @course.id, :student_id => cha_member.user_id).destroy_all
|
||||||
|
end
|
||||||
|
@course.update_attributes(:tea_id => cha_member.user_id)
|
||||||
|
man_member.member_roles.first.update_attributes(:role_id => 9)
|
||||||
|
course_act = CourseActivity.where(:course_id => @course.id, :course_act_id => @course.id, :course_act_type => 'Course').first
|
||||||
|
course_act.update_column('user_id', cha_member.user_id)
|
||||||
|
UserActivity.where(:act_id => @course.id, :container_type => 'Course', :act_type => 'Course', :container_id => @course.id).first.update_column('user_id', cha_member.user_id)
|
||||||
|
ws = WechatService.new
|
||||||
|
title = "您已成为班级管理员"
|
||||||
|
ws.create_class_notice cha_member.user_id, "create_course_notice", @course.id,title, @course.name, man_member.user.show_name, @course.members.count, "点击查看班级详情。"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def search_course_teacher_list
|
||||||
|
q = params[:search] ? "#{params[:search].strip}" : ""
|
||||||
|
@members = searchTeacherAndAssistantNoManager(@course)
|
||||||
|
if q.nil? || q == ""
|
||||||
|
else
|
||||||
|
members = []
|
||||||
|
@members.each do |m|
|
||||||
|
username = m.user[:lastname].to_s.downcase + m.user[:firstname].to_s.downcase
|
||||||
|
if m && m.user && (m.user[:login].to_s.downcase.include?(q) || m.user[:mail].to_s.downcase.include?(q) || username.include?(q))
|
||||||
|
members << m
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@members = members
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#查找未分班的学生
|
#查找未分班的学生
|
||||||
def search_not_group_member
|
def search_not_group_member
|
||||||
@group = CourseGroup.find params[:group_id]
|
@group = CourseGroup.find params[:group_id]
|
||||||
|
@ -454,6 +493,8 @@ class CoursesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def member
|
def member
|
||||||
|
# 当前用户查看班级消息时,设置消息为已读
|
||||||
|
update_messsages_to_viewed("CourseMessage", @course)
|
||||||
## 有角色参数的才是课程,没有的就是项目
|
## 有角色参数的才是课程,没有的就是项目
|
||||||
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
|
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
|
||||||
@render_file = 'new_member_list'
|
@render_file = 'new_member_list'
|
||||||
|
@ -1388,11 +1429,19 @@ class CoursesController < ApplicationController
|
||||||
@members = @course.course_homework_statisticss.reorder("#{@type} #{@order}, total_score #{@order}")
|
@members = @course.course_homework_statisticss.reorder("#{@type} #{@order}, total_score #{@order}")
|
||||||
|
|
||||||
elsif params[:tab] == "3"
|
elsif params[:tab] == "3"
|
||||||
|
@homework_id = params[:homework_id] ? params[:homework_id].to_i : 0
|
||||||
@type = params[:type] ? params[:type] : 'project_act_score'
|
@type = params[:type] ? params[:type] : 'project_act_score'
|
||||||
sql = "SELECT (IFNULL(changeset_num, 0)*4 + issue_num*4 + issue_journal_num*1 + attach_num*5 + board_num*2 + board_message_num*1) AS project_act_score,
|
if @homework_id == 0
|
||||||
|
sql = "SELECT (IFNULL(changeset_num, 0)*4 + issue_num*4 + issue_journal_num*1 + attach_num*5 + board_num*2 + board_message_num*1) AS project_act_score,
|
||||||
changeset_num, issue_num, issue_journal_num, attach_num, board_num, board_message_num, pss.project_id FROM project_scores pss
|
changeset_num, issue_num, issue_journal_num, attach_num, board_num, board_message_num, pss.project_id FROM project_scores pss
|
||||||
JOIN student_work_projects ON student_work_projects.project_id = pss.project_id AND student_work_projects.course_id = #{@course.id}
|
JOIN student_work_projects ON student_work_projects.project_id = pss.project_id AND student_work_projects.course_id = #{@course.id}
|
||||||
GROUP BY pss.project_id ORDER BY #{@type} #{@order}, project_act_score #{@order}"
|
GROUP BY pss.project_id ORDER BY #{@type} #{@order}, project_act_score #{@order}"
|
||||||
|
else
|
||||||
|
sql = "SELECT (IFNULL(changeset_num, 0)*4 + issue_num*4 + issue_journal_num*1 + attach_num*5 + board_num*2 + board_message_num*1) AS project_act_score,
|
||||||
|
changeset_num, issue_num, issue_journal_num, attach_num, board_num, board_message_num, pss.project_id FROM project_scores pss
|
||||||
|
JOIN student_work_projects ON student_work_projects.project_id = pss.project_id AND student_work_projects.course_id = #{@course.id} AND student_work_projects.homework_common_id = #{@homework_id}
|
||||||
|
GROUP BY pss.project_id ORDER BY #{@type} #{@order}, project_act_score #{@order}"
|
||||||
|
end
|
||||||
@members = ProjectScore.find_by_sql(sql)
|
@members = ProjectScore.find_by_sql(sql)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -150,6 +150,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
elsif @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
|
elsif @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
|
||||||
homework_detail_manual.comment_status = 1
|
homework_detail_manual.comment_status = 1
|
||||||
|
create_works_list @homework
|
||||||
status = true
|
status = true
|
||||||
#更新CourseHomeworkStatistics中每个学生的未交作品数
|
#更新CourseHomeworkStatistics中每个学生的未交作品数
|
||||||
@homework.course.student.each do |student|
|
@homework.course.student.each do |student|
|
||||||
|
|
|
@ -1,168 +1,168 @@
|
||||||
class PraiseTreadController < ApplicationController
|
class PraiseTreadController < ApplicationController
|
||||||
|
|
||||||
accept_api_auth :tread_plus,:praise_plus
|
accept_api_auth :tread_plus,:praise_plus
|
||||||
# before_filter :require_login,:only => [:praise_plus,:tread_plus]
|
# before_filter :require_login,:only => [:praise_plus,:tread_plus]
|
||||||
before_filter :user_unlogged_check,:only => [:praise_plus,:tread_plus,:praise_minus]
|
before_filter :user_unlogged_check,:only => [:praise_plus,:tread_plus,:praise_minus]
|
||||||
|
|
||||||
def praise_plus
|
def praise_plus
|
||||||
@obj = nil
|
@obj = nil
|
||||||
@activity = false
|
@activity = false
|
||||||
if request.get?
|
if request.get?
|
||||||
@obj_id = params[:obj_id]
|
@obj_id = params[:obj_id]
|
||||||
@obj_type = params[:obj_type]
|
@obj_type = params[:obj_type]
|
||||||
if !params[:user_activity_id].nil? && !params[:type].nil?
|
if !params[:user_activity_id].nil? && !params[:type].nil?
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@activity = true
|
@activity = true
|
||||||
end
|
end
|
||||||
# @is_in_list = nil
|
# @is_in_list = nil
|
||||||
@obj = find_object_by_type_and_id(@obj_type,@obj_id)
|
@obj = find_object_by_type_and_id(@obj_type,@obj_id)
|
||||||
pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",@obj_id,@obj_type.to_s,User.current.id)
|
pts = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",@obj_id,@obj_type.to_s,User.current.id)
|
||||||
unless pts.empty?
|
unless pts.empty?
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@horizontal = params[:horizontal].downcase == "false" ? false:true if params[:horizontal]
|
@horizontal = params[:horizontal].downcase == "false" ? false:true if params[:horizontal]
|
||||||
# if @obj.respond_to?("author_id")
|
# if @obj.respond_to?("author_id")
|
||||||
# author_id = @obj.author_id
|
# author_id = @obj.author_id
|
||||||
# elsif @obj.respond_to?("user_id")
|
# elsif @obj.respond_to?("user_id")
|
||||||
# author_id = @obj.user_id
|
# author_id = @obj.user_id
|
||||||
# end
|
# end
|
||||||
# unless author_id == User.current.id
|
# unless author_id == User.current.id
|
||||||
praise_tread_plus(@obj_type,@obj_id,1)
|
praise_tread_plus(@obj_type,@obj_id,1)
|
||||||
# end
|
# end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def praise_minus
|
def praise_minus
|
||||||
@obj = nil
|
@obj = nil
|
||||||
@activity = false
|
@activity = false
|
||||||
if request.get?
|
if request.get?
|
||||||
#@obj = params[:obj] # 传的是对象,最后变成id了
|
#@obj = params[:obj] # 传的是对象,最后变成id了
|
||||||
#首先更新praise_tread 表 删除关注记录
|
#首先更新praise_tread 表 删除关注记录
|
||||||
#@pt = PraiseTread.find_by_user_id_and_praise_tread_object_id_and_praise_tread_object_type(User.current.id,@obj,"user")
|
#@pt = PraiseTread.find_by_user_id_and_praise_tread_object_id_and_praise_tread_object_type(User.current.id,@obj,"user")
|
||||||
@obj_id = params[:obj_id]
|
@obj_id = params[:obj_id]
|
||||||
@obj_type = params[:obj_type]
|
@obj_type = params[:obj_type]
|
||||||
if !params[:user_activity_id].nil? && !params[:type].nil?
|
if !params[:user_activity_id].nil? && !params[:type].nil?
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@activity = true
|
@activity = true
|
||||||
end
|
end
|
||||||
@obj = find_object_by_type_and_id(@obj_type,@obj_id)
|
@obj = find_object_by_type_and_id(@obj_type,@obj_id)
|
||||||
@pt = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",@obj_id,@obj_type.to_s,User.current.id).first
|
@pt = PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",@obj_id,@obj_type.to_s,User.current.id).first
|
||||||
if @pt.nil?
|
if @pt.nil?
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@pt.delete if !@pt.nil?
|
@pt.delete if !@pt.nil?
|
||||||
#再更新praise_tread_cache表 使相应的记录减1 当为0时删除
|
#再更新praise_tread_cache表 使相应的记录减1 当为0时删除
|
||||||
@ptc = PraiseTreadCache.where("object_id=? and object_type=?",@obj_id,@obj_type.to_s).first
|
@ptc = PraiseTreadCache.where("object_id=? and object_type=?",@obj_id,@obj_type.to_s).first
|
||||||
@ptc.minus(1) if !@ptc.nil?
|
@ptc.minus(1) if !@ptc.nil?
|
||||||
if @ptc.praise_num == 0
|
if @ptc.praise_num == 0
|
||||||
@ptc.delete
|
@ptc.delete
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
#@obj = User.find_by_id(@obj)
|
#@obj = User.find_by_id(@obj)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def tread_plus
|
def tread_plus
|
||||||
@obj = nil
|
@obj = nil
|
||||||
# @is_in_list = nil
|
# @is_in_list = nil
|
||||||
if request.get?
|
if request.get?
|
||||||
@obj_id = params[:obj_id]
|
@obj_id = params[:obj_id]
|
||||||
@obj_type = params[:obj_type]
|
@obj_type = params[:obj_type]
|
||||||
#@horizontal = params[:horizontal].downcase == "false" ? false:true
|
#@horizontal = params[:horizontal].downcase == "false" ? false:true
|
||||||
@obj = find_object_by_type_and_id(@obj_type,@obj_id)
|
@obj = find_object_by_type_and_id(@obj_type,@obj_id)
|
||||||
unless @obj.author_id == User.current.id
|
unless @obj.author_id == User.current.id
|
||||||
praise_tread_plus(@obj_type,@obj_id,0)
|
praise_tread_plus(@obj_type,@obj_id,0)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def tread_minus
|
def tread_minus
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def find_object_by_type_and_id(type,id)
|
def find_object_by_type_and_id(type,id)
|
||||||
@obj = nil
|
@obj = nil
|
||||||
case type
|
case type
|
||||||
when 'Memo'
|
when 'Memo'
|
||||||
@obj = Memo.find_by_id(id)
|
@obj = Memo.find_by_id(id)
|
||||||
when 'Message'
|
when 'Message'
|
||||||
@obj = Message.find_by_id(id)
|
@obj = Message.find_by_id(id)
|
||||||
when 'HomeworkCommon'
|
when 'HomeworkCommon'
|
||||||
@obj = HomeworkCommon.find_by_id(id)
|
@obj = HomeworkCommon.find_by_id(id)
|
||||||
when 'JournalsForMessage'
|
when 'JournalsForMessage'
|
||||||
@obj = JournalsForMessage.find_by_id(id)
|
@obj = JournalsForMessage.find_by_id(id)
|
||||||
when 'News'
|
when 'News'
|
||||||
@obj = News.find_by_id(id)
|
@obj = News.find_by_id(id)
|
||||||
when 'Comment'
|
when 'Comment'
|
||||||
@obj = Comment.find_by_id(id)
|
@obj = Comment.find_by_id(id)
|
||||||
when 'Journal'
|
when 'Journal'
|
||||||
@obj = Journal.find_by_id(id)
|
@obj = Journal.find_by_id(id)
|
||||||
when 'BlogComment'
|
when 'BlogComment'
|
||||||
@obj = BlogComment.find_by_id(id)
|
@obj = BlogComment.find_by_id(id)
|
||||||
when 'OrgDocumentComment'
|
when 'OrgDocumentComment'
|
||||||
@obj = OrgDocumentComment.find_by_id(id)
|
@obj = OrgDocumentComment.find_by_id(id)
|
||||||
when 'User'
|
when 'User'
|
||||||
@obj = User.find_by_id(id)
|
@obj = User.find_by_id(id)
|
||||||
when 'Issue'
|
when 'Issue'
|
||||||
@obj = Issue.find_by_id(id)
|
@obj = Issue.find_by_id(id)
|
||||||
when 'TrainingTask'
|
when 'TrainingTask'
|
||||||
@obj = TrainingTask.find_by_id(id)
|
@obj = TrainingTask.find_by_id(id)
|
||||||
when 'Project'
|
when 'Project'
|
||||||
@obj = Project.find_by_id(id)
|
@obj = Project.find_by_id(id)
|
||||||
when 'Bid'
|
when 'Bid'
|
||||||
@obj = Bid.find_by_id(id)
|
@obj = Bid.find_by_id(id)
|
||||||
when 'Contest'
|
when 'Contest'
|
||||||
@obj = Contest.find_by_id(id)
|
@obj = Contest.find_by_id(id)
|
||||||
when 'Syllabus'
|
when 'Syllabus'
|
||||||
@obj = Syllabus.find_by_id(id)
|
@obj = Syllabus.find_by_id(id)
|
||||||
when 'Work'
|
when 'Work'
|
||||||
@obj = Work.find_by_id(id)
|
@obj = Work.find_by_id(id)
|
||||||
else
|
else
|
||||||
@obj = nil
|
@obj = nil
|
||||||
end
|
end
|
||||||
return @obj
|
return @obj
|
||||||
end
|
end
|
||||||
|
|
||||||
def praise_tread_plus(type,id,flag)
|
def praise_tread_plus(type,id,flag)
|
||||||
unless id.nil? and type.nil?
|
unless id.nil? and type.nil?
|
||||||
#首先创建或更新praise_tread 表
|
#首先创建或更新praise_tread 表
|
||||||
@pt = PraiseTread.new
|
@pt = PraiseTread.new
|
||||||
@pt.user_id = User.current.id
|
@pt.user_id = User.current.id
|
||||||
@pt.praise_tread_object_id = id.to_i
|
@pt.praise_tread_object_id = id.to_i
|
||||||
@pt.praise_tread_object_type = type
|
@pt.praise_tread_object_type = type
|
||||||
@pt.praise_or_tread = flag
|
@pt.praise_or_tread = flag
|
||||||
@pt.save
|
@pt.save
|
||||||
# end
|
# end
|
||||||
|
|
||||||
#再创建或更新praise_tread_cache表
|
#再创建或更新praise_tread_cache表
|
||||||
#@ptc = PraiseTreadCache.find_by_object_id_and_object_type(id,type)
|
#@ptc = PraiseTreadCache.find_by_object_id_and_object_type(id,type)
|
||||||
@ptc = PraiseTreadCache.where("object_id = ? and object_type = ?",id.to_i,type).first
|
@ptc = PraiseTreadCache.where("object_id = ? and object_type = ?",id.to_i,type).first
|
||||||
@ptc = @ptc.nil? ? PraiseTreadCache.new : @ptc
|
@ptc = @ptc.nil? ? PraiseTreadCache.new : @ptc
|
||||||
@ptc.object_id = id.to_i
|
@ptc.object_id = id.to_i
|
||||||
@ptc.object_type = type
|
@ptc.object_type = type
|
||||||
@ptc.save
|
@ptc.save
|
||||||
@ptc.plus(flag,1)
|
@ptc.plus(flag,1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -72,6 +72,7 @@ class ProjectsController < ApplicationController
|
||||||
include UsersHelper
|
include UsersHelper
|
||||||
### added by william
|
### added by william
|
||||||
include ActsAsTaggableOn::TagsHelper
|
include ActsAsTaggableOn::TagsHelper
|
||||||
|
include ApplicationHelper
|
||||||
|
|
||||||
# 仅仅为了转换Gitlab地址
|
# 仅仅为了转换Gitlab地址
|
||||||
def project_home
|
def project_home
|
||||||
|
@ -575,7 +576,7 @@ class ProjectsController < ApplicationController
|
||||||
if params[:message_id]
|
if params[:message_id]
|
||||||
message_invite(params[:message_id], params[:key])
|
message_invite(params[:message_id], params[:key])
|
||||||
end
|
end
|
||||||
update_message_status(User.current, @project)
|
update_messsages_to_viewed("ForgeMessage", @project)
|
||||||
# params[:login]为邮箱邀请用户加入,主要功能:
|
# params[:login]为邮箱邀请用户加入,主要功能:
|
||||||
# 1、自动注册
|
# 1、自动注册
|
||||||
# 2、加入项目、创建角色
|
# 2、加入项目、创建角色
|
||||||
|
|
|
@ -1253,7 +1253,7 @@ class StudentWorkController < ApplicationController
|
||||||
|
|
||||||
def appeal_anonymous_score
|
def appeal_anonymous_score
|
||||||
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
||||||
@is_last = params[:is_last]
|
@is_last = params[:is_last] == "true" ? true : false
|
||||||
if @student_work_score
|
if @student_work_score
|
||||||
@student_work_score.update_column('appeal_status', 1)
|
@student_work_score.update_column('appeal_status', 1)
|
||||||
score_appeal = StudentWorksScoresAppeal.create(:user_id => User.current.id, :student_works_score_id => @student_work_score.id, :comment => params[:appeal][:comment], :appeal_status => 1)
|
score_appeal = StudentWorksScoresAppeal.create(:user_id => User.current.id, :student_works_score_id => @student_work_score.id, :comment => params[:appeal][:comment], :appeal_status => 1)
|
||||||
|
@ -1274,8 +1274,8 @@ class StudentWorkController < ApplicationController
|
||||||
|
|
||||||
def deal_appeal_score
|
def deal_appeal_score
|
||||||
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
@student_work_score = StudentWorksScore.where("id = #{params[:score_id].to_i}").first
|
||||||
@is_last = params[:is_last]
|
@is_last = params[:is_last] == "true" ? true : false
|
||||||
if @student_work_score
|
if @student_work_score && @student_work_score.appeal_status == 1
|
||||||
@student_work_score.update_column('appeal_status', params[:status].to_i)
|
@student_work_score.update_column('appeal_status', params[:status].to_i)
|
||||||
score_appeal = @student_work_score.student_works_scores_appeal
|
score_appeal = @student_work_score.student_works_scores_appeal
|
||||||
score_appeal.applied_messages.update_all(:status => params[:status].to_i == 2 ? 3 : (params[:status].to_i == 3 ? 1 : 2))
|
score_appeal.applied_messages.update_all(:status => params[:status].to_i == 2 ? 3 : (params[:status].to_i == 3 ? 1 : 2))
|
||||||
|
@ -1306,11 +1306,11 @@ class StudentWorkController < ApplicationController
|
||||||
CourseMessage.create(:user_id => @student_work_score.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>params[:status].to_i,:apply_result =>User.current.id)
|
CourseMessage.create(:user_id => @student_work_score.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>params[:status].to_i,:apply_result =>User.current.id)
|
||||||
CourseMessage.create(:user_id => score_appeal.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>params[:status].to_i,:apply_result =>User.current.id)
|
CourseMessage.create(:user_id => score_appeal.user_id, :course_id => course.id, :viewed => false,:course_message_id=> score_appeal.id,:course_message_type=>'StudentWorksScoresAppeal',:status=>params[:status].to_i,:apply_result =>User.current.id)
|
||||||
end
|
end
|
||||||
@homework = @student_work_score.student_work.homework_common
|
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher, course) || User.current.admin?
|
|
||||||
@work = @student_work_score.student_work
|
|
||||||
@is_group_leader = !@work.student_work_projects.empty?
|
|
||||||
end
|
end
|
||||||
|
@homework = @student_work_score.student_work.homework_common
|
||||||
|
@is_teacher = User.current.allowed_to?(:as_teacher, course) || User.current.admin?
|
||||||
|
@work = @student_work_score.student_work
|
||||||
|
@is_group_leader = !@work.student_work_projects.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def forbidden_anonymous_comment
|
def forbidden_anonymous_comment
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1036,6 +1036,32 @@ module ApplicationHelper
|
||||||
return @result
|
return @result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 更新各类消息为已读
|
||||||
|
def update_messsages_to_viewed(message_type, forge_message_id)
|
||||||
|
if(message_type == "CourseMessage")
|
||||||
|
query = CourseMessage.where(:course_message_type => ["JoinCourse", "RemoveFromCourse"],
|
||||||
|
:user_id => User.current,
|
||||||
|
:course_id => forge_message_id,
|
||||||
|
:viewed => false)
|
||||||
|
elsif(message_type == "ForgeMessage")
|
||||||
|
query = ForgeMessage.where(:forge_message_type => ["ProjectInvite", "JoinProject", "RemoveFromProject"],
|
||||||
|
:user_id => User.current,
|
||||||
|
:project_id => forge_message_id,
|
||||||
|
:viewed => false)
|
||||||
|
elsif(message_type == "ContestMessage")
|
||||||
|
query = ContestMessage.where(:contest_message_type => ["ContestRequestDealResult", "JoinContest", "RemoveFromContest"],
|
||||||
|
:user_id => User.current,
|
||||||
|
:contest_id => forge_message_id,
|
||||||
|
:viewed => false)
|
||||||
|
elsif(message_type == "BlogMessage")
|
||||||
|
query = BlogMessage.where(:blog_message_type => "BlogComment",
|
||||||
|
:user_id => User.current,
|
||||||
|
:blog_id => forge_message_id,
|
||||||
|
:viewed => false)
|
||||||
|
end
|
||||||
|
query.update_all(:viewed => true) unless query.blank?
|
||||||
|
end
|
||||||
|
|
||||||
def show_attachment_tip container_id, container_type
|
def show_attachment_tip container_id, container_type
|
||||||
atts = Attachment.where(:container_id => container_id, :container_type => container_type, :is_public => 0)
|
atts = Attachment.where(:container_id => container_id, :container_type => container_type, :is_public => 0)
|
||||||
atts.count > 0 ? true :false
|
atts.count > 0 ? true :false
|
||||||
|
|
|
@ -257,6 +257,14 @@ module CoursesHelper
|
||||||
count.to_s << '+'
|
count.to_s << '+'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def searchTeacherAndAssistantNoManager course
|
||||||
|
members = []
|
||||||
|
course.members.includes(:user).each do |m|
|
||||||
|
members << m if m && m.user && m.user != course.teacher && m.user.has_teacher_role(course)
|
||||||
|
end
|
||||||
|
members
|
||||||
|
end
|
||||||
|
|
||||||
# =====================================================================================
|
# =====================================================================================
|
||||||
# return people list
|
# return people list
|
||||||
def searchTeacherAndAssistant project
|
def searchTeacherAndAssistant project
|
||||||
|
@ -928,5 +936,11 @@ module CoursesHelper
|
||||||
result = !m_roles.blank?
|
result = !m_roles.blank?
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#获取该班级下已关联项目的分组作业
|
||||||
|
def select_group_homeworks course
|
||||||
|
student_work_pros = course.student_work_projects.where("project_id != -1 && project_id != 0")
|
||||||
|
homeworks = @course.homework_commons.where(:id => student_work_pros.map(&:homework_common_id))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
module TrainingTasksHelper
|
module TrainingTasksHelper
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,100 +1,100 @@
|
||||||
class PraiseTread < ActiveRecord::Base
|
class PraiseTread < ActiveRecord::Base
|
||||||
attr_accessible :user_id,:praise_tread_object_id,:praise_tread_object_type,:praise_or_tread
|
attr_accessible :user_id,:praise_tread_object_id,:praise_tread_object_type,:praise_or_tread
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :praise_tread_object, polymorphic: true
|
belongs_to :praise_tread_object, polymorphic: true
|
||||||
#after_create :be_user_score
|
#after_create :be_user_score
|
||||||
#after_destroy :down_user_score
|
#after_destroy :down_user_score
|
||||||
include UserScoreHelper
|
include UserScoreHelper
|
||||||
def self.find_object_by_type_and_id(type,id)
|
def self.find_object_by_type_and_id(type,id)
|
||||||
@obj = nil
|
@obj = nil
|
||||||
case type
|
case type
|
||||||
when 'User'
|
when 'User'
|
||||||
@obj = User.find_by_id(id)
|
@obj = User.find_by_id(id)
|
||||||
when 'Issue'
|
when 'Issue'
|
||||||
@obj = Issue.find_by_id(id)
|
@obj = Issue.find_by_id(id)
|
||||||
when 'TrainingTask'
|
when 'TrainingTask'
|
||||||
@obj = TrainingTask.find_by_id(id)
|
@obj = TrainingTask.find_by_id(id)
|
||||||
when 'Project'
|
when 'Project'
|
||||||
@obj = Project.find_by_id(id)
|
@obj = Project.find_by_id(id)
|
||||||
when 'Bid'
|
when 'Bid'
|
||||||
@obj = Bid.find_by_id(id)
|
@obj = Bid.find_by_id(id)
|
||||||
when 'Contest'
|
when 'Contest'
|
||||||
@obj = Contest.find_by_id(id)
|
@obj = Contest.find_by_id(id)
|
||||||
when 'Memo'
|
when 'Memo'
|
||||||
@obj = Memo.find_by_id(id)
|
@obj = Memo.find_by_id(id)
|
||||||
when 'Message'
|
when 'Message'
|
||||||
@obj = Message.find_by_id(id)
|
@obj = Message.find_by_id(id)
|
||||||
end
|
end
|
||||||
return @obj
|
return @obj
|
||||||
end
|
end
|
||||||
|
|
||||||
# 获取裁定对象为Message时Message所属的项目或课程
|
# 获取裁定对象为Message时Message所属的项目或课程
|
||||||
def project
|
def project
|
||||||
project = nil
|
project = nil
|
||||||
if self.praise_tread_object_type == 'Message' || self.praise_tread_object_type == 'Issues'
|
if self.praise_tread_object_type == 'Message' || self.praise_tread_object_type == 'Issues'
|
||||||
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)
|
||||||
project = obj.project
|
project = obj.project
|
||||||
end
|
end
|
||||||
project
|
project
|
||||||
end
|
end
|
||||||
|
|
||||||
#更新用户分数 - by zjc
|
#更新用户分数 - by zjc
|
||||||
def be_user_score
|
def be_user_score
|
||||||
#踩贴吧或讨论区帖子
|
#踩贴吧或讨论区帖子
|
||||||
if self.praise_or_tread == 0 && (self.praise_tread_object_type == 'Issue' || self.praise_tread_object_type == 'Message')
|
if self.praise_or_tread == 0 && (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(: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(self.user,1)
|
update_tread(self.user,1)
|
||||||
update_tread(target_user,1)
|
update_tread(target_user,1)
|
||||||
unless self.project.nil?
|
unless self.project.nil?
|
||||||
update_tread(self.user,2,self.project)
|
update_tread(self.user,2,self.project)
|
||||||
update_tread(target_user,2,self.project)
|
update_tread(target_user,2,self.project)
|
||||||
end
|
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?
|
unless self.project.nil?
|
||||||
update_praise(target_user,2,self.project)
|
update_praise(target_user,2,self.project)
|
||||||
end
|
end
|
||||||
#更新用户等级
|
#更新用户等级
|
||||||
UserLevels.update_user_level(target_user)
|
UserLevels.update_user_level(target_user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down_user_score
|
def down_user_score
|
||||||
#踩贴吧或讨论区帖子
|
#踩贴吧或讨论区帖子
|
||||||
if self.praise_or_tread == 0 && (self.praise_tread_object_type == 'Issue' || self.praise_tread_object_type == 'Message')
|
if self.praise_or_tread == 0 && (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(: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(self.user,1)
|
update_tread(self.user,1)
|
||||||
update_tread(target_user,1)
|
update_tread(target_user,1)
|
||||||
unless self.project.nil?
|
unless self.project.nil?
|
||||||
update_tread(self.user,2,self.project)
|
update_tread(self.user,2,self.project)
|
||||||
update_tread(target_user,2,self.project)
|
update_tread(target_user,2,self.project)
|
||||||
end
|
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?
|
unless self.project.nil?
|
||||||
update_praise(target_user,2,self.project)
|
update_praise(target_user,2,self.project)
|
||||||
end
|
end
|
||||||
#更新用户等级
|
#更新用户等级
|
||||||
UserLevels.update_user_level(target_user)
|
UserLevels.update_user_level(target_user)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.praised(activity)
|
def self.praised(activity)
|
||||||
self.where(praise_tread_object_id: activity.id,
|
self.where(praise_tread_object_id: activity.id,
|
||||||
praise_tread_object_type: activity.class.to_s,
|
praise_tread_object_type: activity.class.to_s,
|
||||||
user_id: User.current.id).empty?
|
user_id: User.current.id).empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -31,7 +31,7 @@ class StudentsForCourse < ActiveRecord::Base
|
||||||
#加入班级时创建已发布作业的作品
|
#加入班级时创建已发布作业的作品
|
||||||
def create_student_works
|
def create_student_works
|
||||||
course = self.course
|
course = self.course
|
||||||
course.homework_commons.each do |hw|
|
course.homework_commons.includes(:homework_detail_manual).where("homework_detail_manuals.comment_status > 0").each do |hw|
|
||||||
if hw.homework_type != 3 && hw.student_works.where("user_id = #{self.student_id}").count == 0
|
if hw.homework_type != 3 && hw.student_works.where("user_id = #{self.student_id}").count == 0
|
||||||
hw.student_works << StudentWork.new(:user_id => self.student_id, :name => hw.name.to_s+"的作品提交", :work_status => 0)
|
hw.student_works << StudentWork.new(:user_id => self.student_id, :name => hw.name.to_s+"的作品提交", :work_status => 0)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
class TrainingTask < ActiveRecord::Base
|
class TrainingTask < ActiveRecord::Base
|
||||||
attr_accessible :description, :project_id, :subject, :tracker_id
|
attr_accessible :description, :project_id, :subject, :tracker_id
|
||||||
belongs_to :project,:touch=> true
|
belongs_to :project,:touch=> true
|
||||||
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
||||||
belongs_to :tracker
|
belongs_to :tracker
|
||||||
has_many :journals, :as => :journalized, :dependent => :destroy
|
has_many :journals, :as => :journalized, :dependent => :destroy
|
||||||
has_many :visible_journals,
|
has_many :visible_journals,
|
||||||
:class_name => 'Journal',
|
:class_name => 'Journal',
|
||||||
:as => :journalized,
|
:as => :journalized,
|
||||||
:conditions => Proc.new {
|
:conditions => Proc.new {
|
||||||
["(#{Journal.table_name}.private_notes = ? OR (#{Project.allowed_to_condition(User.current, :view_private_notes)}))", false]
|
["(#{Journal.table_name}.private_notes = ? OR (#{Project.allowed_to_condition(User.current, :view_private_notes)}))", false]
|
||||||
},
|
},
|
||||||
:readonly => true
|
:readonly => true
|
||||||
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
has_many :praise_tread, as: :praise_tread_object, dependent: :destroy
|
||||||
has_one :praise_tread_cache, as: :object, dependent: :destroy
|
has_one :praise_tread_cache, as: :object, dependent: :destroy
|
||||||
acts_as_attachable
|
acts_as_attachable
|
||||||
|
|
||||||
validates_presence_of :subject, :author
|
validates_presence_of :subject, :author
|
||||||
validates_length_of :subject, :maximum => 255
|
validates_length_of :subject, :maximum => 255
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,6 +34,12 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="https://www.ucloud.cn/" target="_blank"><img src="images/footer_logo/p-ucloud.png" width="210" height="40" alt="ucloud"></a>
|
<a href="https://www.ucloud.cn/" target="_blank"><img src="images/footer_logo/p-ucloud.png" width="210" height="40" alt="ucloud"></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="http://www.nju.edu.cn/" target="_blank"><img src="images/footer_logo/p-nju.png" width="210" height="40" alt="南京大学"></a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="http://www.xtu.edu.cn/" target="_blank"><img src="images/footer_logo/p-xtu.png" width="210" height="40" alt="湘潭大学"></a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<ul class="rankList">
|
<ul class="rankList">
|
||||||
<h3 style="font-size: 14px; font-weight: normal;">
|
<h3 style="font-size: 14px; font-weight: normal;">
|
||||||
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
||||||
<%= link_to "活跃度", course_member_path(course, :role => 2, :sort_type => 'act_score'), :class => 'fontGrey3' %>
|
<%= link_to "活跃度", course_statistics_course_path(@course), :class => 'fontGrey3' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="fontGrey7"> 活跃度 </span>
|
<span class="fontGrey7"> 活跃度 </span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<ul class="rankList">
|
<ul class="rankList">
|
||||||
<h4 style="font-size: 14px; font-weight: normal;">
|
<h4 style="font-size: 14px; font-weight: normal;">
|
||||||
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
<% if (User.current.logged? && course.open_student == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
||||||
<%= link_to "英雄榜", course_member_path(course, :role => 2), :class => 'fontGrey3' %>
|
<%= link_to "英雄榜", course_statistics_course_path(@course, :tab => 2), :class => 'fontGrey3' %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="fontGrey7">英雄榜</span>
|
<span class="fontGrey7">英雄榜</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
window.location.href = "<%= settings_course_path(@course.id, :tab => 'member') %>";
|
|
@ -42,14 +42,17 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class=" clear ml10 mr10" >
|
<div class=" clear ml10 mr10" >
|
||||||
<!--<div class="mb10 clear">-->
|
<div class="mb10 clear">
|
||||||
<!--<label class=" fl mt5 c_grey02"> 选择作业 : </label>-->
|
<label class=" fl mt5 c_grey02"> 选择作业 : </label>
|
||||||
<!--<select class=" fl newupload_select w150" style="width:150px; height:30px; background:#fff;">-->
|
<% homeworks = select_group_homeworks @course %>
|
||||||
<!--<option>全部</option>-->
|
<% is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin? %>
|
||||||
<!--<option>第一作业</option>-->
|
<select id="homework_select" class=" fl newupload_select w150" onchange="select_homework_projects();" style="width:150px; height:30px; background:#fff;">
|
||||||
<!--<option>第二次作业</option>-->
|
<option value="0">全部</option>
|
||||||
<!--</select>-->
|
<% homeworks.each do |homework| %>
|
||||||
<!--</div>-->
|
<option value="<%= homework.id %>">作业<%= (get_hw_index(homework, is_teacher) + 1)%>:<%= homework.name %></option>
|
||||||
|
<% end %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="project_table_<%=@course.id %>">
|
<div id="project_table_<%=@course.id %>">
|
||||||
<% if @tab == 3 %>
|
<% if @tab == 3 %>
|
||||||
|
@ -71,6 +74,9 @@
|
||||||
g('game-setting-content-<%= @tab %>').className='dis';
|
g('game-setting-content-<%= @tab %>').className='dis';
|
||||||
g('game-setting-tab-nav-<%= @tab %>').className='game-setting-nav-hover';
|
g('game-setting-tab-nav-<%= @tab %>').className='game-setting-nav-hover';
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if @homework_id != 0 %>
|
||||||
|
$("#homework_select option[value='<%= @homework_id %>']").attr("selected",true);
|
||||||
|
<% end %>
|
||||||
});
|
});
|
||||||
|
|
||||||
function g(o){
|
function g(o){
|
||||||
|
@ -83,6 +89,13 @@
|
||||||
}
|
}
|
||||||
g('game-setting-content-'+n).className='dis';
|
g('game-setting-content-'+n).className='dis';
|
||||||
g('game-setting-tab-nav-'+n).className='game-setting-nav-hover';
|
g('game-setting-tab-nav-'+n).className='game-setting-nav-hover';
|
||||||
$.get('<%= course_statistics_course_path() %>'+'?tab='+n);
|
if(n == 3){
|
||||||
|
$("#homework_select option[value='0']").attr("selected",true);
|
||||||
|
}
|
||||||
|
$.get('<%= course_statistics_course_path(@course) %>'+'?tab='+n);
|
||||||
|
}
|
||||||
|
|
||||||
|
function select_homework_projects(){
|
||||||
|
$.get('<%= course_statistics_course_path(@course) %>'+'?tab=3&homework_id='+$("#homework_select").val());
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
|
@ -7,7 +7,7 @@
|
||||||
<li class="mt5 ml45 mb10">
|
<li class="mt5 ml45 mb10">
|
||||||
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
||||||
<% if @syllabus.nil? %>
|
<% if @syllabus.nil? %>
|
||||||
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input w300 h28"} %>
|
<%= select_tag :syllabus_id,options_for_select(course_syllabus_option,@course.syllabus_id), {:id=>"new_syllabus_id", :class=>"syllabus_input w300 h28", :onchange => "change_course_name();"} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span id="course_syllabus_title"><%=@syllabus.title %></span>
|
<span id="course_syllabus_title"><%=@syllabus.title %></span>
|
||||||
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
|
<input style="display: none;" name="syllabus_id" value="<%=@syllabus.id %>" />
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<!--<li class="ml125 mt10 mb10 fontGrey2" style="max-width: 544px;">班级是一个由教师、助教(教辅)和学生组成的临时的教学群体,在规定的时间内(如一个学期)完成一门课程规定的教学任务。本质上,一门课程就是一个教学计划。</li>-->
|
<!--<li class="ml125 mt10 mb10 fontGrey2" style="max-width: 544px;">班级是一个由教师、助教(教辅)和学生组成的临时的教学群体,在规定的时间内(如一个学期)完成一门课程规定的教学任务。本质上,一门课程就是一个教学计划。</li>-->
|
||||||
<li class="mt10 ml45">
|
<li class="mt10 ml45">
|
||||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||||
<input type="text" name="class_period" id="new_class_period" class="hwork_input02 w289" onkeyup="regex_course_class_period('new');" placeholder="例如:54" maxlength="6">
|
<input type="text" name="class_period" id="new_class_period" class="courses_input w289" onkeyup="regex_course_class_period('new');" placeholder="例如:54" maxlength="6">
|
||||||
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -116,5 +116,15 @@
|
||||||
$("#new_term").change(function(){
|
$("#new_term").change(function(){
|
||||||
document.getElementById("new_end_term").options[document.getElementById("new_term").selectedIndex].selected = true;
|
document.getElementById("new_end_term").options[document.getElementById("new_term").selectedIndex].selected = true;
|
||||||
});
|
});
|
||||||
|
<% unless @syllabus.nil? %>
|
||||||
|
$("#new_course_name").val('<%= @syllabus.title %>');
|
||||||
|
$("#new_course_name").focus();
|
||||||
|
<% end %>
|
||||||
});
|
});
|
||||||
|
function change_course_name(){
|
||||||
|
if($("#new_syllabus_id").val() != '0') {
|
||||||
|
$("#new_course_name").val($("#new_syllabus_id").find("option:selected").text());
|
||||||
|
$("#new_course_name").focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
|
@ -0,0 +1 @@
|
||||||
|
$("#search_member_list").html("<%= escape_javascript(render :partial => 'courses/settings/search_teacher_list', :locals => {:members => @members}) %>");
|
|
@ -0,0 +1,76 @@
|
||||||
|
<div id="muban_popup_box" style="width:424px;">
|
||||||
|
<div class="muban_popup_top">
|
||||||
|
<h3 class="fl">更换管理员</h3>
|
||||||
|
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="muban_popup_con clear">
|
||||||
|
<div class="mr10 ml10">
|
||||||
|
<div class="alert alert-orange mb10 mt10">
|
||||||
|
选择的成员将会成为新的管理员,您的角色将变更为“教师”
|
||||||
|
</div>
|
||||||
|
<div class="" style="border: 1px solid #ccc">
|
||||||
|
<input type="text" name="search" value="<%=@search %>" placeholder="支持姓名、邮箱、登录名搜索" class="subjectSearch" style="height: 32px; width: 380px; margin: 5px 7px 0 7px; border: 1px solid #e5e5e5;" />
|
||||||
|
<div class="cl"></div>
|
||||||
|
<%= form_tag(change_manager_course_path(@course), method: 'post', :remote => true, :class => "",:id => "change_manager_form") do %>
|
||||||
|
<div id="search_member_list" style="padding: 0 7px;">
|
||||||
|
<%=render :partial => 'courses/settings/search_teacher_list', :locals => {:members => nil} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="mt10">
|
||||||
|
<span class="c_red none" id="add_members_notice"></span>
|
||||||
|
|
||||||
|
<a href="javascript:void(0);" class="fr sy_btn_blue" onclick="submit_add_members_form();">确定</a>
|
||||||
|
<a href="javascript:void(0);" class="fr sy_btn_grey mr10" onclick="hideModal();">取消</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var lastSearchCondition = '';
|
||||||
|
var count = 0;
|
||||||
|
function search_mems(e){
|
||||||
|
if($(e.target).val().trim() == lastSearchCondition && lastSearchCondition != '')
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lastSearchCondition = $(e.target).val().trim();
|
||||||
|
$.ajax({
|
||||||
|
url: '<%= url_for(:controller => 'courses', :action => 'search_course_teacher_list', :id => @course.id) %>'+'?search='+ e.target.value,
|
||||||
|
type:'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function throttle(method,context,e){
|
||||||
|
clearTimeout(method.tId);
|
||||||
|
method.tId=setTimeout(function(){
|
||||||
|
method.call(context,e);
|
||||||
|
},500);
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询项目
|
||||||
|
$("input[name='search']").on('input', function (e) {
|
||||||
|
throttle(search_mems,window,e);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
$.ajax({
|
||||||
|
url: '<%= url_for(:controller => 'courses', :action => 'search_course_teacher_list', :id => @course.id) %>',
|
||||||
|
type:'get'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function submit_add_members_form(){
|
||||||
|
if($("input[name='chooseteacher']:checked").length == 0) {
|
||||||
|
$("#add_members_notice").show();
|
||||||
|
$("#add_members_notice").html("请先选择成员");
|
||||||
|
} else{
|
||||||
|
$("#change_manager_form").submit();
|
||||||
|
hideModal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -59,12 +59,16 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% unless member.user == @course.teacher %>
|
<% if member.user == @course.teacher %>
|
||||||
|
<% if User.current == @course.teacher %>
|
||||||
|
<a href="javascript:void(0)" class="sy_btn_green" onclick="change_manager();">更换管理员</a>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
<a href="javascript:void(0)" class="sy_btn_blue mr5" onclick="edit_member($(this), <%=member.id %>);">编辑</a>
|
<a href="javascript:void(0)" class="sy_btn_blue mr5" onclick="edit_member($(this), <%=member.id %>);">编辑</a>
|
||||||
<a href="javascript:void(0)" class="sy_btn_blue mr5" style="display: none;" onclick="$('#member-<%= member.id%>-roles-form').submit();">保存</a>
|
<a href="javascript:void(0)" class="sy_btn_blue mr5" style="display: none;" onclick="$('#member-<%= member.id%>-roles-form').submit();">保存</a>
|
||||||
<a href="javascript:void(0)" class="sy_btn_grey mr5" style="display: none;" onclick="cancel_edit($(this), <%=member.id %>);">取消</a>
|
<a href="javascript:void(0)" class="sy_btn_grey mr5" style="display: none;" onclick="cancel_edit($(this), <%=member.id %>);">取消</a>
|
||||||
<a href="javascript:void(0)" class="sy_btn_grey mr5" id="delete_member_<%=member.id %>" onclick="delete_confirm_box_2('<%=membership_path(member) %>', '<%= l(:label_delete_confirm)%>')">删除</a>
|
<a href="javascript:void(0)" class="sy_btn_grey mr5" id="delete_member_<%=member.id %>" onclick="delete_confirm_box_2('<%=membership_path(member) %>', '<%= l(:label_delete_confirm)%>')">删除</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -87,4 +91,8 @@
|
||||||
$('#delete_member_' + id).show();
|
$('#delete_member_' + id).show();
|
||||||
$(div).hide();
|
$(div).hide();
|
||||||
}
|
}
|
||||||
|
function change_manager(){
|
||||||
|
var htmlvalue = "<%= escape_javascript(render :partial => 'courses/settings/change_manager') %>";
|
||||||
|
pop_box_new(htmlvalue, 424, 366);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<ul class="mt10" style="height:160px; min-height:160px; max-height:160px; overflow:auto;">
|
||||||
|
<% unless members.nil? || members.empty? %>
|
||||||
|
<% members.each do |mem| %>
|
||||||
|
<li>
|
||||||
|
<input type="radio" name="chooseteacher" value="<%=mem.id %>" class="mr5" style="vertical-align:middle;" />
|
||||||
|
<span class="break_word" style="width: 350px;"><%=mem.user.show_name %>(<%= mem.user.login %>)</span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
|
@ -20,7 +20,10 @@
|
||||||
var question_form = $("form.new_exercise_question");
|
var question_form = $("form.new_exercise_question");
|
||||||
if($("#polls_head_edit").is(":visible")){
|
if($("#polls_head_edit").is(":visible")){
|
||||||
alert("请先保存测验标题及测验基本信息。");
|
alert("请先保存测验标题及测验基本信息。");
|
||||||
} else if(question_form.length > 0) {
|
} else if($("#show_exercise_time").html().trim() == ""){
|
||||||
|
notice_box("请先设置测验的截止时间");
|
||||||
|
}
|
||||||
|
else if(question_form.length > 0) {
|
||||||
alert("请先保存正在编辑的题目。");
|
alert("请先保存正在编辑的题目。");
|
||||||
} else{
|
} else{
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'exercise_submit_info', locals: { :exercise => exercise}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'exercise_submit_info', locals: { :exercise => exercise}) %>');
|
||||||
|
|
|
@ -9,17 +9,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div id="polls_list" class="polls_list">
|
<div id="polls_list" class="polls_list">
|
||||||
|
<% if @exercises.count != 0 %>
|
||||||
|
<% @exercises.each_with_index do |exercise,index|%>
|
||||||
|
<ul id="exercises_<%= exercise.id %>" class="exercise_list_div" onmouseover="$('#exercise_opr_<%=exercise.id %>').show();" onmouseout="$('#exercise_opr_<%=exercise.id %>').hide();">
|
||||||
|
<%= render :partial => 'exercise', :locals => {:exercise => exercise,:index => index} %>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
<% @exercises.each_with_index do |exercise,index|%>
|
<ul class="wlist">
|
||||||
<ul id="exercises_<%= exercise.id %>" class="exercise_list_div" onmouseover="$('#exercise_opr_<%=exercise.id %>').show();" onmouseout="$('#exercise_opr_<%=exercise.id %>').hide();">
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
<%= render :partial => 'exercise', :locals => {:exercise => exercise,:index => index} %>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end%>
|
<% else %>
|
||||||
|
<div class="icons_tishi"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
|
||||||
<ul class="wlist">
|
<p class="sy_tab_con_p">没有数据可以显示!</p>
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
<% end %>
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--列表end-->
|
</div><!--列表end-->
|
|
@ -6,7 +6,7 @@
|
||||||
<% unless exercise.publish_time.nil? %>
|
<% unless exercise.publish_time.nil? %>
|
||||||
<span class="mr100">发布时间:<%=Time.parse(h(exercise.publish_time)).strftime("%Y-%m-%d %H:%M:%S") if exercise.publish_time%></span>
|
<span class="mr100">发布时间:<%=Time.parse(h(exercise.publish_time)).strftime("%Y-%m-%d %H:%M:%S") if exercise.publish_time%></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="mr100">截止时间:<%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") if exercise.end_time %></span>
|
<span class="mr100">截止时间:<font id="show_exercise_time"><%=Time.parse(h(exercise.end_time)).strftime("%Y-%m-%d %H:%M:%S") if exercise.end_time %></font></span>
|
||||||
<% if exercise.time != -1 %>
|
<% if exercise.time != -1 %>
|
||||||
<span>测验时长:<%= exercise.time %>分钟</span>
|
<span>测验时长:<%= exercise.time %>分钟</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div id="course_list">
|
<div id="course_list">
|
||||||
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
|
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,14 +1,22 @@
|
||||||
<% curse_attachments.each do |file| %>
|
<% if curse_attachments.count != 0 %>
|
||||||
<% if file.is_public? || User.current.member_of_course?(course) || User.current.admin? %>
|
<% curse_attachments.each do |file| %>
|
||||||
<div id="resource_detail_<%=file.id %>">
|
<% if file.is_public? || User.current.member_of_course?(course) || User.current.admin? %>
|
||||||
<%=render :partial=>'files/resource_detail',:locals => {:file => file} %>
|
<div id="resource_detail_<%=file.id %>">
|
||||||
</div>
|
<%=render :partial=>'files/resource_detail',:locals => {:file => file} %>
|
||||||
<% else %>
|
</div>
|
||||||
<div class="re_con_box"><span class='fr mr10 pr_join_span '><%= file.filename %>是私有资源</span></div>
|
<% else %>
|
||||||
|
<div class="re_con_box"><span class='fr mr10 pr_join_span '><%= file.filename %>是私有资源</span></div>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<ul class="wlist">
|
||||||
|
<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true%>
|
||||||
|
</ul>
|
||||||
|
<% else %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div style="background-color: #fff; height: 400px;">
|
||||||
|
<div class="icons_tishi" style="margin-top: 10px; padding-top: 125px;"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
|
||||||
|
<p class="sy_tab_con_p">没有数据可以显示!</p>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<ul class="wlist">
|
|
||||||
<%= pagination_links_full @feedback_pages, @feedback_count, :per_page_links => false, :remote => true, :flag => true%>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => homework_commons,:page => 0,:course_id => course_id} %>
|
<% if homework_commons.count != 0 %>
|
||||||
|
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => homework_commons,:page => 0,:course_id => course_id} %>
|
||||||
|
|
||||||
<div style="text-align:center;">
|
<div style="text-align:center;">
|
||||||
<div class="pages" style="width:auto; display:inline-block;">
|
<div class="pages" style="width:auto; display:inline-block;">
|
||||||
<ul id="homework_pository_ref_pages">
|
<ul id="homework_pository_ref_pages">
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true%>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true%>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
<div style="background-color: #fff; height: 400px;">
|
||||||
</div>
|
<div class="icons_tishi" style="margin-top: 10px; padding-top: 125px;"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
|
||||||
|
<p class="sy_tab_con_p">没有数据可以显示!</p>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -1,7 +1,7 @@
|
||||||
<% if @homework.homework_type == 2 %>
|
<% if @homework.homework_type == 2 %>
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 630, 914);
|
pop_box_new(htmlvalue, 630, 772);
|
||||||
<% else %>
|
<% else %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 530, 404);
|
pop_box_new(htmlvalue, 530, 404);
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 630, 885);
|
pop_box_new(htmlvalue, 630, 742);
|
||||||
<% else %>
|
<% else %>
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:hw_status => @hw_status}) %>";
|
||||||
pop_box_new(htmlvalue, 530, 332);
|
pop_box_new(htmlvalue, 530, 332);
|
||||||
|
|
|
@ -1,106 +1,106 @@
|
||||||
<% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %>
|
<% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %>
|
||||||
<% project_issue_count = @project.issues.count %>
|
<% project_issue_count = @project.issues.count %>
|
||||||
<% training_tasks_count = @project.training_tasks.count %>
|
<% training_tasks_count = @project.training_tasks.count %>
|
||||||
<% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %>
|
<% project_acts = ForgeActivity.where("project_id = ?", @project.id).count %>
|
||||||
<% raodmaps = Version.where("project_id = ?", @project.id).count %>
|
<% raodmaps = Version.where("project_id = ?", @project.id).count %>
|
||||||
<% project_score = @project.project_score %>
|
<% project_score = @project.project_score %>
|
||||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||||
<% update_visiti_count @project %>
|
<% update_visiti_count @project %>
|
||||||
|
|
||||||
<div class="pro_new_top clear mb10">
|
<div class="pro_new_top clear mb10">
|
||||||
<div class="fl pro_new_name ml15 clear">
|
<div class="fl pro_new_name ml15 clear">
|
||||||
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
|
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
|
||||||
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
|
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
|
||||||
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
|
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--加入、退出、关注项目-->
|
<!--加入、退出、关注项目-->
|
||||||
<div class="fr clear mr15">
|
<div class="fr clear mr15">
|
||||||
<ul><span id="join_in_project_applied"><%= render :partial => "projects/applied_status" %></span></ul>
|
<ul><span id="join_in_project_applied"><%= render :partial => "projects/applied_status" %></span></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% unless @project.forked_from_project_id.nil? %>
|
<% unless @project.forked_from_project_id.nil? %>
|
||||||
<div class="fl pro_new_name ml15 clear mt5">
|
<div class="fl pro_new_name ml15 clear mt5">
|
||||||
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
||||||
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pro_new_topnav mt8">
|
<div class="pro_new_topnav mt8">
|
||||||
<ul>
|
<ul>
|
||||||
<li id="project_menu_01">
|
<li id="project_menu_01">
|
||||||
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
|
<%= link_to "#{l(:label_activity)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k(project_acts)}</span>".html_safe, {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "pro_new_proname", :title => "#{project_acts}" %>
|
||||||
</li>
|
</li>
|
||||||
<!--问题跟踪-->
|
<!--问题跟踪-->
|
||||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||||
<li id="project_menu_02">
|
<li id="project_menu_02">
|
||||||
<%= link_to project_issue_count > 0 ? "#{l(:label_issue_tracking)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_issue_count}</span>".html_safe : "#{l(:label_issue_tracking)}", project_issues_path(@project, :remote => true), :class => "pro_new_proname", :title => "#{project_issue_count}" %>
|
<%= link_to project_issue_count > 0 ? "#{l(:label_issue_tracking)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_issue_count}</span>".html_safe : "#{l(:label_issue_tracking)}", project_issues_path(@project, :remote => true), :class => "pro_new_proname", :title => "#{project_issue_count}" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--实训任务-->
|
<!--实训任务-->
|
||||||
<% unless @project.enabled_modules.where("name = 'training_tasks'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'training_tasks'").empty? %>
|
||||||
<li id="project_menu_11">
|
<li id="project_menu_11">
|
||||||
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project, :remote => true), :class => "pro_new_proname", :title => "#{training_tasks_count}" %>
|
<%= link_to training_tasks_count > 0 ? "#{l(:project_module_training_tasks)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k training_tasks_count}</span>".html_safe : "#{l(:project_module_training_tasks)}", project_training_tasks_url(@project, :remote => true), :class => "pro_new_proname", :title => "#{training_tasks_count}" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--讨论区-->
|
<!--讨论区-->
|
||||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||||
<li id="project_menu_03">
|
<li id="project_menu_03">
|
||||||
<%= link_to project_score.board_num > 0 ? "#{l(:project_module_boards)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.board_num}</span>".html_safe : "#{l(:project_module_boards)}", project_boards_path(@project), :class => "pro_new_proname", :title => "#{project_score.board_num}" %>
|
<%= link_to project_score.board_num > 0 ? "#{l(:project_module_boards)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.board_num}</span>".html_safe : "#{l(:project_module_boards)}", project_boards_path(@project), :class => "pro_new_proname", :title => "#{project_score.board_num}" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--资源库-->
|
<!--资源库-->
|
||||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||||
<li id="project_menu_04">
|
<li id="project_menu_04">
|
||||||
<%= link_to project_file_num > 0 ? "#{l(:project_module_files)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_file_num}</span>".html_safe : l(:project_module_files), project_files_path(@project), :class => "pro_new_proname", :title => "#{project_file_num}" %>
|
<%= link_to project_file_num > 0 ? "#{l(:project_module_files)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_file_num}</span>".html_safe : l(:project_module_files), project_files_path(@project), :class => "pro_new_proname", :title => "#{project_file_num}" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--版本库-->
|
<!--版本库-->
|
||||||
<% if visible_repository?(@project) %>
|
<% if visible_repository?(@project) %>
|
||||||
<% if User.current.admin? || (is_project_member?(User.current.id, @project.id) && role_of_members_in_project(@project.id, User.current.id) != "Reporter" ) %>
|
<% if User.current.admin? || (is_project_member?(User.current.id, @project.id) && role_of_members_in_project(@project.id, User.current.id) != "Reporter" ) %>
|
||||||
<li id="project_menu_05"><%= link_to @project.project_score.changeset_num.to_i > 0 ? "#{l(:project_module_repository)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.changeset_num}</span>".html_safe : "#{l(:project_module_repository)}",({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "pro_new_proname", :title => "#{project_score.changeset_num}" %>
|
<li id="project_menu_05"><%= link_to @project.project_score.changeset_num.to_i > 0 ? "#{l(:project_module_repository)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.changeset_num}</span>".html_safe : "#{l(:project_module_repository)}",({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "pro_new_proname", :title => "#{project_score.changeset_num}" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--Pull Request-->
|
<!--Pull Request-->
|
||||||
<% unless @project.gpid.nil? %>
|
<% unless @project.gpid.nil? %>
|
||||||
<li id="project_menu_06">
|
<li id="project_menu_06">
|
||||||
<%= link_to project_score.pull_request_num >0 ? "Pull Requests <span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.pull_request_num}</span>".html_safe : "Pull Requests", project_pull_requests_path(@project), :class => "pro_new_proname", :title => "#{project_score.pull_request_num}" %>
|
<%= link_to project_score.pull_request_num >0 ? "Pull Requests <span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.pull_request_num}</span>".html_safe : "Pull Requests", project_pull_requests_path(@project), :class => "pro_new_proname", :title => "#{project_score.pull_request_num}" %>
|
||||||
<% if project_score.pull_request_num >0 %>
|
<% if project_score.pull_request_num >0 %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--里程碑-->
|
<!--里程碑-->
|
||||||
<li id="project_menu_07">
|
<li id="project_menu_07">
|
||||||
<%= link_to @project.versions.count >0 ? "#{l(:label_roadmap)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k @project.versions.count}</span>".html_safe : l(:label_roadmap) ,project_roadmap_path(@project), :class => "pro_new_proname", :title => "#{@project.versions.count}" %>
|
<%= link_to @project.versions.count >0 ? "#{l(:label_roadmap)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k @project.versions.count}</span>".html_safe : l(:label_roadmap) ,project_roadmap_path(@project), :class => "pro_new_proname", :title => "#{@project.versions.count}" %>
|
||||||
</li>
|
</li>
|
||||||
<!--日历-->
|
<!--日历-->
|
||||||
<% unless @project.enabled_modules.where("name = 'calendar'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'calendar'").empty? %>
|
||||||
<li id="project_menu_08">
|
<li id="project_menu_08">
|
||||||
<%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
|
<%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--甘特图-->
|
<!--甘特图-->
|
||||||
<% unless @project.enabled_modules.where("name = 'gantt'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'gantt'").empty? %>
|
||||||
<li id="project_menu_09">
|
<li id="project_menu_09">
|
||||||
<%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
|
<%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
|
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
|
||||||
<li id="project_menu_010">
|
<li id="project_menu_010">
|
||||||
<%= link_to "#{l(:button_configure)}", settings_project_path(@project), :class => "pro_new_proname" %>
|
<%= link_to "#{l(:button_configure)}", settings_project_path(@project), :class => "pro_new_proname" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--新版项目头部结束-->
|
<!--新版项目头部结束-->
|
||||||
<script>
|
<script>
|
||||||
$(function(){
|
$(function(){
|
||||||
|
|
||||||
$("#project_menu_0<%= @project_menu_type %>").addClass('pro_new_topnav_active');
|
$("#project_menu_0<%= @project_menu_type %>").addClass('pro_new_topnav_active');
|
||||||
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
|
@ -74,7 +74,7 @@
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="sy_class_info fl ml15">
|
<div class="sy_class_info fl ml15 mt14">
|
||||||
<div class="sy_class_titbox">
|
<div class="sy_class_titbox">
|
||||||
<h3 class="fl sy_class_title">
|
<h3 class="fl sy_class_title">
|
||||||
<%=@course.name %>
|
<%=@course.name %>
|
||||||
|
@ -82,13 +82,11 @@
|
||||||
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<p class="sy_cgrey mb5">
|
<p class="sy_cgrey mb5 f14 fl mt5">
|
||||||
<span class="mr25">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
|
|
||||||
<span class="mr25">教师:<%= course_teacher_link teacher_num %></span>
|
<span class="mr25">教师:<%= course_teacher_link teacher_num %></span>
|
||||||
<span class="mr25">学生:<%= course_student_link student_num %></span>
|
<span class="mr25">学生:<%= course_student_link student_num %></span>
|
||||||
</p>
|
<span class="mr25"><%= current_time_and_term @course %></span>
|
||||||
<p class="sy_cgrey fl mt5">
|
<span class="mr25"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span>
|
||||||
<span class="mr25">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
|
|
||||||
</p>
|
</p>
|
||||||
<% is_TA = get_user_member_roles_course @course, User.current, 7 %>
|
<% is_TA = get_user_member_roles_course @course, User.current, 7 %>
|
||||||
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
|
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
|
||||||
|
@ -101,7 +99,7 @@
|
||||||
<%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %>
|
<%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless (is_teacher || is_TA || is_TE || is_ST) %>
|
<% unless (is_teacher || is_TA || is_TE || is_ST) %>
|
||||||
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
|
<div id="join_in_course_header" class="fl"><%= join_in_course_header(@course, User.current) %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>-->
|
<div class="cl"></div>-->
|
||||||
<ul class="copyright">
|
<ul class="copyright">
|
||||||
<li class="fl mr30"><%= l(:label_rights_reserved)%></li>
|
<li class="fl mr10"><%= l(:label_rights_reserved)%></li>
|
||||||
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
|
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
<li id="user_07" class="user_icons_new">
|
<li id="user_07" class="user_icons_new">
|
||||||
<%= link_to "新建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :style => "font-size:14px;" %>
|
<%= link_to "新建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :style => "font-size:14px;" %>
|
||||||
</li>
|
</li>
|
||||||
<li id="user_08" class="user_icons_addproject">
|
<li id="user_08" class="user_icons_addproject mb10">
|
||||||
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
|
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
|
||||||
</li>
|
</li>
|
||||||
<li id="user_09" class="user_icons_myissues">
|
<li id="user_09" class="user_icons_myissues">
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
<% polls.each_with_index do |poll, i|%>
|
<% if polls.count != 0 %>
|
||||||
<ul id="polls_<%= poll.id %>" class="exercise_list_div" onmouseover="$('#exercise_opr_<%=poll.id %>').show();" onmouseout="$('#exercise_opr_<%=poll.id %>').hide();">
|
<% polls.each_with_index do |poll, i|%>
|
||||||
<%= render :partial => 'poll', :locals => {:poll => poll, :index => i} %>
|
<ul id="polls_<%= poll.id %>" class="exercise_list_div" onmouseover="$('#exercise_opr_<%=poll.id %>').show();" onmouseout="$('#exercise_opr_<%=poll.id %>').hide();">
|
||||||
</ul>
|
<%= render :partial => 'poll', :locals => {:poll => poll, :index => i} %>
|
||||||
<div class="cl"></div>
|
</ul>
|
||||||
<% end%>
|
<div class="cl"></div>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
<ul class="wlist">
|
<ul class="wlist">
|
||||||
<%= pagination_links_full obj_pages, obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
<%= pagination_links_full obj_pages, obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
</ul>
|
</ul>
|
||||||
|
<% else %>
|
||||||
|
<div class="icons_tishi"><img src="/images/sy/icons_smile.png" width="110" height="110" alt="" ></div>
|
||||||
|
<p class="sy_tab_con_p">没有数据可以显示!</p>
|
||||||
|
<% end %>
|
|
@ -1,49 +1,49 @@
|
||||||
<% if !User.current.member_of?(@project) %>
|
<% if !User.current.member_of?(@project) %>
|
||||||
<% if User.current.login? && !User.current.admin %>
|
<% if User.current.login? && !User.current.admin %>
|
||||||
<!--关注项目-->
|
<!--关注项目-->
|
||||||
<li class="mr5 fl">
|
<li class="mr5 fl">
|
||||||
<%= watcher_link_for_project(@project, User.current) %>
|
<%= watcher_link_for_project(@project, User.current) %>
|
||||||
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
||||||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||||
</li>
|
</li>
|
||||||
<!--加入项目-->
|
<!--加入项目-->
|
||||||
<li class="mr5 fl">
|
<li class="mr5 fl">
|
||||||
<% if AppliedProject.where(:user_id => User.current, :project_id => @project_id).first.nil? %>
|
<% if AppliedProject.where(:user_id => User.current, :project_id => @project_id).first.nil? %>
|
||||||
<%= join_in_project_link(@project, User.current) %>
|
<%= join_in_project_link(@project, User.current) %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<!--项目创建者不能退出项目-->
|
<!--项目创建者不能退出项目-->
|
||||||
<% if User.current.login? %>
|
<% if User.current.login? %>
|
||||||
<li class="mr5 fl">
|
<li class="mr5 fl">
|
||||||
<%= watcher_link_for_project(@project, User.current) %>
|
<%= watcher_link_for_project(@project, User.current) %>
|
||||||
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
||||||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||||
</li>
|
</li>
|
||||||
<li class="mr5 fl">
|
<li class="mr5 fl">
|
||||||
<a class="pro_new_topbtn_left fl " style="cursor:default;"> 已加入</a>
|
<a class="pro_new_topbtn_left fl " style="cursor:default;"> 已加入</a>
|
||||||
<!-- <a href="<%#= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%#= Member.where(:project_id => @project.id).count %></a>-->
|
<!-- <a href="<%#= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%#= Member.where(:project_id => @project.id).count %></a>-->
|
||||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||||
</li>
|
</li>
|
||||||
<%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
<%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<!--项目fork-->
|
<!--项目fork-->
|
||||||
<li class="mr5 fl">
|
<li class="mr5 fl">
|
||||||
<!--实训项目条件:1、modules中选中了实训任务 2、不是fork的项目-->
|
<!--实训项目条件:1、modules中选中了实训任务 2、不是fork的项目-->
|
||||||
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? && @project.forked_from_project_id.nil? %>
|
<% if !@project.enabled_modules.where("name = 'training_tasks'").empty? && @project.forked_from_project_id.nil? %>
|
||||||
<%= link_to "开始实训", forked_pop_project_path(@project, :task => true), :class => "sy_btn_green fr" %>
|
<%= link_to "开始实训", forked_pop_project_path(@project, :task => true), :class => "sy_btn_green fr" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
||||||
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
||||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
<h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2>
|
<h2 class="pro_newsetting_title">请选择此项目可以使用的模块:</h2>
|
||||||
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
|
<%= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
|
||||||
<% Redmine::AccessControl.available_project_modules.each do |m| %>
|
<% Redmine::AccessControl.available_project_modules.each do |m| %>
|
||||||
<li class="clear ">
|
<li class="clear">
|
||||||
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m), :class=>"fl mt8").html_safe -%>
|
<%= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m), :class=>"fl mt8", :id => 'project_module_'+m.to_s ).html_safe -%>
|
||||||
<p class="fl ml5"><%= l_or_humanize(m, :prefix => "project_module_").html_safe %></p>
|
<p class="fl ml5"><%= l_or_humanize(m, :prefix => "project_module_").html_safe %></p>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -16,27 +16,26 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<script>
|
||||||
<!--h2 class="c_blue mb10">请选择此项目可以使用的模块:</h2>
|
$(function(){
|
||||||
<%#= form_for @project,:url => { :action => 'modules', :id => @project },:html => {:id => 'modules-form',:method => :post} do |f| %>
|
if($("#project_module_issue_tracking").is(":checked")){
|
||||||
<div class="box pl15">
|
$("#project_module_training_tasks").attr('disabled', 'disabled')
|
||||||
<ul>
|
}else if($("#project_module_training_tasks").is(":checked")){
|
||||||
<%# Redmine::AccessControl.available_project_modules.each do |m| %>
|
$("#project_module_issue_tracking").attr('disabled', 'disabled');
|
||||||
<li>
|
}
|
||||||
<label>
|
$("#project_module_issue_tracking").on('click', function(){
|
||||||
<%#= check_box_tag('enabled_module_names[]', m, @project.module_enabled?(m)).html_safe -%>
|
if($("#project_module_issue_tracking").is(":checked")) {
|
||||||
<%#= l_or_humanize(m, :prefix => "project_module_").html_safe %>
|
$("#project_module_training_tasks").attr('disabled', 'disabled');
|
||||||
</label>
|
}else{
|
||||||
</li>
|
$("#project_module_training_tasks").removeAttr('disabled');
|
||||||
<%# end %>
|
}
|
||||||
</ul>
|
});
|
||||||
</div><!--box end-->
|
$("#project_module_training_tasks").on('click', function(){
|
||||||
<!--p class="mb10 c_grey">
|
if($("#project_module_training_tasks").is(":checked")){
|
||||||
<#%= check_all_links('modules-form').html_safe %>
|
$("#project_module_issue_tracking").attr('disabled', 'disabled');
|
||||||
</p>
|
}else {
|
||||||
<p>
|
$("#project_module_issue_tracking").removeAttr('disabled');
|
||||||
<a href="javascript:void(0)" class="blue_btn" onclick="$('#modules-form').submit();">
|
}
|
||||||
<%#= l(:button_save) %>
|
});
|
||||||
</a>
|
});
|
||||||
</p>
|
</script>
|
||||||
<%# end %>-->
|
|
|
@ -57,14 +57,14 @@
|
||||||
|
|
||||||
|
|
||||||
<% if @type == nil || @type == "1" %>
|
<% if @type == nil || @type == "1" %>
|
||||||
<div id="merge_record_1">
|
<div id="merge_record_1" style="width: 998px">
|
||||||
<%= render :partial => "pull_requests/pull_request_comments" %>
|
<%= render :partial => "pull_requests/pull_request_comments" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="merge_record_2" class="undis">
|
<div id="merge_record_2" class="undis" style="width: 998px">
|
||||||
<%= render :partial => "pull_requests/pull_request_commits" %>
|
<%= render :partial => "pull_requests/pull_request_commits" %>
|
||||||
</div>
|
</div>
|
||||||
<div id="merge_record_3" class="undis">
|
<div id="merge_record_3" class="undis" style="width: 998px">
|
||||||
<%= render :partial => "pull_requests/pull_request_changes" %>
|
<%= render :partial => "pull_requests/pull_request_changes" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
:method => "post", :remote => true) do |f|%>
|
:method => "post", :remote => true) do |f|%>
|
||||||
<div class="muban_popup_con clear">
|
<div class="muban_popup_con clear">
|
||||||
<div class="clear mt15 ml20">
|
<div class="clear mt15 ml20">
|
||||||
<label style="vertical-align: top;"><span class="c_red" style="vertical-align: top;">*</span>申诉理由:</label>
|
<span class="c_red" style="vertical-align: top;">*</span><span style="vertical-align: top;">申诉理由:</span>
|
||||||
<%= f.text_area 'comment', :id => 'appeal_comment', :style => 'height: 70px; width: 414px;', :placeholder => "请输入你的申诉理由,最多250个字符。",:maxlength => 250 %>
|
<%= f.text_area 'comment', :id => 'appeal_comment', :style => 'height: 70px; width: 414px;', :placeholder => "请输入你的申诉理由,最多250个字符。",:maxlength => 250 %>
|
||||||
<p id="notice_notes" class="c_red none" style="margin-left: 68px;">请输入申诉理由</p>
|
<p id="notice_notes" class="c_red none" style="margin-left: 68px;">请输入申诉理由</p>
|
||||||
<div class="alert alert-orange mb10 mt10 mr20">
|
<div class="alert alert-orange mb10 mt10 mr20">
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<a href="javascript:void(0);" class="fr linkBlue mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
<a href="javascript:void(0);" class="fr linkBlue mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
||||||
<% if @homework.anonymous_appeal == 1 %>
|
<% if @homework.anonymous_appeal == 1 %>
|
||||||
<% if score.student_work.user == User.current && score.reviewer_role == 3 && score.appeal_status == 0 %>
|
<% if score.student_work.user == User.current && score.reviewer_role == 3 && score.appeal_status == 0 %>
|
||||||
<a href="<%=alert_appeal_box_student_work_index_path(:score_id => score.id,:is_last => is_last) %>" data-remote="true" class="fr linkBlue mr10">申诉</a>
|
<a href="<%=alert_appeal_box_student_work_index_path(:score_id => score.id,:is_last => is_last) %>" data-remote="true" class="fr linkBlue mr10">申诉</a>
|
||||||
<% elsif score.reviewer_role == 3 && score.appeal_status == 1 %>
|
<% elsif score.reviewer_role == 3 && score.appeal_status == 1 %>
|
||||||
<span class="c_red fr mr10">申诉中</span>
|
<span class="c_red fr mr10">申诉中</span>
|
||||||
<% elsif score.reviewer_role == 3 && score.appeal_status == 2 %>
|
<% elsif score.reviewer_role == 3 && score.appeal_status == 2 %>
|
||||||
|
@ -55,10 +55,10 @@
|
||||||
<div class="ping_back mt10" style="border-top: 1px dashed #CCCCCC; padding-top: 10px;">
|
<div class="ping_back mt10" style="border-top: 1px dashed #CCCCCC; padding-top: 10px;">
|
||||||
<span class="fl">申诉</span>
|
<span class="fl">申诉</span>
|
||||||
<% if score.appeal_status == 1 && score.student_work.user == User.current %>
|
<% if score.appeal_status == 1 && score.student_work.user == User.current %>
|
||||||
<a href="javascript:void(0)" onclick="delete_confirm_box('<%=deal_appeal_score_student_work_index_path(:is_last=>true,:score_id=>score.id,:status=>2) %>', '撤销后将不能再对该成绩发起申诉<br/>您是否确认撤销申诉');" class="fr linkBlue mr5 ml20">撤销申诉</a>
|
<a href="javascript:void(0)" onclick="delete_confirm_box('<%=deal_appeal_score_student_work_index_path(:is_last=>is_last,:score_id=>score.id,:status=>2) %>', '撤销后将不能再对该成绩发起申诉<br/>您是否确认撤销申诉');" class="fr linkBlue mr5 ml20">撤销申诉</a>
|
||||||
<% elsif @is_teacher && score.appeal_status == 1 %>
|
<% elsif @is_teacher && score.appeal_status == 1 %>
|
||||||
<a href="javascript:void(0)" onclick="delete_confirm_box('<%=deal_appeal_score_student_work_index_path(:is_last=>true,:score_id=>score.id,:status=>3) %>', '此匿评成绩将被废弃,且评阅人的作品将被违规扣分<br/>您是否确定接受');" class="fr linkBlue mr5">接受</a>
|
<a href="javascript:void(0)" onclick="delete_confirm_box('<%=deal_appeal_score_student_work_index_path(:is_last=>is_last,:score_id=>score.id,:status=>3) %>', '此匿评成绩将被废弃,且评阅人的作品<br/>将被违规扣分,您是否确定接受');" class="fr linkBlue mr5">接受</a>
|
||||||
<a href="javascript:void(0)" onclick="delete_confirm_box('<%=deal_appeal_score_student_work_index_path(:is_last=>true,:score_id=>score.id,:status=>4) %>', '此匿评成绩将被认为合理<br/>您是否确定拒绝');" class="fr linkBlue mr10 ml20">拒绝</a>
|
<a href="javascript:void(0)" onclick="delete_confirm_box('<%=deal_appeal_score_student_work_index_path(:is_last=>is_last,:score_id=>score.id,:status=>4) %>', '此匿评成绩将被认为合理<br/>您是否确定拒绝');" class="fr linkBlue mr10 ml20">拒绝</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="fr c_grey">
|
<span class="fr c_grey">
|
||||||
<%=format_time score.student_works_scores_appeal.updated_at %>
|
<%=format_time score.student_works_scores_appeal.updated_at %>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
$("#student_work_tab2").click();
|
$("#student_work_tab2").click();
|
||||||
<% elsif @tab == 3 %>
|
<% elsif @tab == 3 %>
|
||||||
$("#student_work_tab3").click();
|
$("#student_work_tab3").click();
|
||||||
|
$("#project_activities").show();
|
||||||
<% end %>
|
<% end %>
|
||||||
sd_create_editor_from_data(<%= @homework.id %>, null, "100%", "<%= @homework.class.to_s %>");
|
sd_create_editor_from_data(<%= @homework.id %>, null, "100%", "<%= @homework.class.to_s %>");
|
||||||
});
|
});
|
||||||
|
@ -26,6 +27,11 @@
|
||||||
}
|
}
|
||||||
$('#student_work_tab'+n).addClass('selected');
|
$('#student_work_tab'+n).addClass('selected');
|
||||||
$('#student_work_con'+n).removeClass('undis');
|
$('#student_work_con'+n).removeClass('undis');
|
||||||
|
if (n == 3){
|
||||||
|
$("#project_activities").show();
|
||||||
|
} else{
|
||||||
|
$("#project_activities").hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#moreProject_<%=@homework.id %>").click(function(){
|
$("#moreProject_<%=@homework.id %>").click(function(){
|
||||||
|
@ -160,11 +166,19 @@
|
||||||
<li onclick="HoverLi(3);" id="student_work_tab3">
|
<li onclick="HoverLi(3);" id="student_work_tab3">
|
||||||
<a href="javascript:void(0);" class="fontGrey3">关联项目列表</a>
|
<a href="javascript:void(0);" class="fontGrey3">关联项目列表</a>
|
||||||
</li>
|
</li>
|
||||||
<li style="width:415px;"> </li>
|
<% if !@homework.student_work_projects.empty? %>
|
||||||
|
<li style="width:415px;">
|
||||||
|
<%= link_to '项目活跃度', course_statistics_course_path(@homework.course, :tab => 3, :homework_id => @homework.id),
|
||||||
|
:id => 'project_activities', :class => 'fr fontBlue2 none', :style => 'font-weight: normal;', :target => '_blank' %>
|
||||||
|
</li>
|
||||||
|
<% else %>
|
||||||
|
<li style="width:415px;"> </li>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li style="width:515px;"> </li>
|
<li style="width:515px;"> </li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
<div id="student_work_con1">
|
<div id="student_work_con1">
|
||||||
<div class="homepagePostBrief" id="homework_post_brief">
|
<div class="homepagePostBrief" id="homework_post_brief">
|
||||||
|
@ -184,7 +198,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
<% if is_group_project_homework %>
|
||||||
<div class="undis" id="student_work_con3">
|
<div class="undis" id="student_work_con3">
|
||||||
<% student_work_ids = @homework.student_works.has_committed.blank? ? "(-1)" : "(" + @homework.student_works.has_committed.map{|st| st.id}.join(",") + ")" %>
|
<% student_work_ids = @homework.student_works.has_committed.blank? ? "(-1)" : "(" + @homework.student_works.has_committed.map{|st| st.id}.join(",") + ")" %>
|
||||||
<% student_work_projects = @homework.student_work_projects.where("student_work_id in #{student_work_ids} or student_work_id is null") %>
|
<% student_work_projects = @homework.student_work_projects.where("student_work_id in #{student_work_ids} or student_work_id is null") %>
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
<% tasks.each do |task| -%>
|
<% tasks.each do |task| -%>
|
||||||
<%= render :partial => 'content_list', :locals => {:activity => task, :user_activity_id => task.id} %>
|
<%= render :partial => 'content_list', :locals => {:activity => task, :user_activity_id => task.id} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div style="text-align:left;">
|
<div style="text-align:left;">
|
||||||
<div class="pages fr" style="width:auto; display:inline-block;">
|
<div class="pages fr" style="width:auto; display:inline-block;">
|
||||||
<ul id="issue_list_pagination" class="fr">
|
<ul id="issue_list_pagination" class="fr">
|
||||||
<%= pagination_links_full @training_tasks_pages, @training_tasks_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
<%= pagination_links_full @training_tasks_pages, @training_tasks_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,71 +1,71 @@
|
||||||
<% unless activity.author.nil? %>
|
<% unless activity.author.nil? %>
|
||||||
<div class="issues_list_box clear" id="user_activity_<%= user_activity_id%>">
|
<div class="issues_list_box clear" id="user_activity_<%= user_activity_id%>">
|
||||||
<div class="issues_ciricons fl ">
|
<div class="issues_ciricons fl ">
|
||||||
<span class="issues_ciricons_01"></span>
|
<span class="issues_ciricons_01"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class=" fl ml5">
|
<div class=" fl ml5">
|
||||||
<div class="issues_list_titlebox clear">
|
<div class="issues_list_titlebox clear">
|
||||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="issues_list_small">
|
<div class="issues_list_small">
|
||||||
<%# if activity.try(:author).try(:realname) == ' ' %>
|
<%# if activity.try(:author).try(:realname) == ' ' %>
|
||||||
<%#= link_to activity.try(:author), user_path(activity.author_id), :class => "fl issues_list_name" %>
|
<%#= link_to activity.try(:author), user_path(activity.author_id), :class => "fl issues_list_name" %>
|
||||||
<%# else %>
|
<%# else %>
|
||||||
<%#= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "fl issues_list_name" %>
|
<%#= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "fl issues_list_name" %>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
<!--p class="fl ml10"> <span class="mr5"><%#=format_time(activity.created_on) %></span>发布</p-->
|
<!--p class="fl ml10"> <span class="mr5"><%#=format_time(activity.created_on) %></span>发布</p-->
|
||||||
<p class="fl" ><span class="mr5"><%= format_time(activity.created_at) %> </span>发布</p>
|
<p class="fl" ><span class="mr5"><%= format_time(activity.created_at) %> </span>发布</p>
|
||||||
<p class="fl ml10"> <span class="mr5"><%= format_time(activity.updated_at) %> </span>更新</p>
|
<p class="fl ml10"> <span class="mr5"><%= format_time(activity.updated_at) %> </span>更新</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="issues_list_txt fr">
|
<ul class="issues_list_txt fr">
|
||||||
<li class="c_grey">
|
<li class="c_grey">
|
||||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||||
<%= link_to activity.try(:author), user_path(activity.author_id)%>
|
<%= link_to activity.try(:author), user_path(activity.author_id)%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id)%>
|
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id)%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="issues_list_min c_grey mr5">
|
<li class="issues_list_min c_grey mr5">
|
||||||
<% case activity.tracker_id %>
|
<% case activity.tracker_id %>
|
||||||
<% when 1%>
|
<% when 1%>
|
||||||
缺陷
|
缺陷
|
||||||
<% when 2%>
|
<% when 2%>
|
||||||
功能
|
功能
|
||||||
<% when 3%>
|
<% when 3%>
|
||||||
支持
|
支持
|
||||||
<% when 4%>
|
<% when 4%>
|
||||||
任务
|
任务
|
||||||
<% when 5%>
|
<% when 5%>
|
||||||
周报
|
周报
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(".issues_list_box").mouseover(function(){
|
$(".issues_list_box").mouseover(function(){
|
||||||
var iconOrder;
|
var iconOrder;
|
||||||
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
||||||
if(iconSize > 1){
|
if(iconSize > 1){
|
||||||
iconOrder = 2;
|
iconOrder = 2;
|
||||||
} else{
|
} else{
|
||||||
iconOrder = 0;
|
iconOrder = 0;
|
||||||
}
|
}
|
||||||
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).show();
|
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).show();
|
||||||
});
|
});
|
||||||
$(".issues_list_box").mouseout(function(){
|
$(".issues_list_box").mouseout(function(){
|
||||||
var iconOrder;
|
var iconOrder;
|
||||||
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
|
||||||
if(iconSize > 1){
|
if(iconSize > 1){
|
||||||
iconOrder = 2;
|
iconOrder = 2;
|
||||||
} else{
|
} else{
|
||||||
iconOrder = 0;
|
iconOrder = 0;
|
||||||
}
|
}
|
||||||
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).hide();
|
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).hide();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
<div id="issue_detail" style="display: block">
|
<div id="issue_detail" style="display: block">
|
||||||
<div class="ping_dispic">
|
<div class="ping_dispic">
|
||||||
<%= link_to image_tag(url_to_avatar(@training_task.author), :width => 46, :height => 46), user_path(@training_task.author), :class => "ping_dispic" %>
|
<%= link_to image_tag(url_to_avatar(@training_task.author), :width => 46, :height => 46), user_path(@training_task.author), :class => "ping_dispic" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="talk_txt fl">
|
<div class="talk_txt fl">
|
||||||
<p class="pro_page_tit" style="word-break:break-all;">
|
<p class="pro_page_tit" style="word-break:break-all;">
|
||||||
<% case @training_task.tracker_id %>
|
<% case @training_task.tracker_id %>
|
||||||
<% when 1%>
|
<% when 1%>
|
||||||
<span class="fl" title="缺陷">【缺陷】</span>
|
<span class="fl" title="缺陷">【缺陷】</span>
|
||||||
<% when 2%>
|
<% when 2%>
|
||||||
<span class="fl" title="功能">【功能】</span>
|
<span class="fl" title="功能">【功能】</span>
|
||||||
<% when 3%>
|
<% when 3%>
|
||||||
<span class="fl" title="支持">【支持】</span>
|
<span class="fl" title="支持">【支持】</span>
|
||||||
<% when 4%>
|
<% when 4%>
|
||||||
<span class="fl" title="任务">【任务】</span>
|
<span class="fl" title="任务">【任务】</span>
|
||||||
<% when 5%>
|
<% when 5%>
|
||||||
<span class="fl" title="周报">【周报】</span>
|
<span class="fl" title="周报">【周报】</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span> <span style="padding-left: 5px;"><%= @training_task.subject %></span></p>
|
</span> <span style="padding-left: 5px;"><%= @training_task.subject %></span></p>
|
||||||
<!--<span class='<%#= "#{get_issue_priority(@training_task.priority_id)[0]} " %>'><%#= get_issue_priority(@training_task.priority_id)[1] %></span></p>-->
|
<!--<span class='<%#= "#{get_issue_priority(@training_task.priority_id)[0]} " %>'><%#= get_issue_priority(@training_task.priority_id)[1] %></span></p>-->
|
||||||
<br>
|
<br>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
由<%=link_to @training_task.author.show_name, user_path(@training_task.author), :class => "link-blue" %>添加于 <%= format_time(@training_task.created_at).html_safe %>
|
由<%=link_to @training_task.author.show_name, user_path(@training_task.author), :class => "link-blue" %>添加于 <%= format_time(@training_task.created_at).html_safe %>
|
||||||
</div>
|
</div>
|
||||||
<%= link_to "完成", complete_training_task_training_task_path(@training_task), :class => "sy_btn_green fr" %>
|
<%= link_to "完成", complete_training_task_training_task_path(@training_task), :class => "sy_btn_green fr" %>
|
||||||
|
|
||||||
<!--talk_txt end-->
|
<!--talk_txt end-->
|
||||||
<a href="javascript:void(0)" class="talk_edit fr"> </a>
|
<a href="javascript:void(0)" class="talk_edit fr"> </a>
|
||||||
<%#= render :partial => 'action_menu' %>
|
<%#= render :partial => 'action_menu' %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% if @training_task.description? || @training_task.attachments.any? -%>
|
<% if @training_task.description? || @training_task.attachments.any? -%>
|
||||||
<div class="talk_info mb10 issue_desc ke-block" id="issue_desc_<%= @training_task.id %>" style="word-break:break-all;">
|
<div class="talk_info mb10 issue_desc ke-block" id="issue_desc_<%= @training_task.id %>" style="word-break:break-all;">
|
||||||
<% if @training_task.description? %>
|
<% if @training_task.description? %>
|
||||||
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
<%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||||||
<%= textAreailizable @training_task, :description, :attachments => @training_task.attachments %>
|
<%= textAreailizable @training_task, :description, :attachments => @training_task.attachments %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%# 附件局部刷新 %>
|
<%# 附件局部刷新 %>
|
||||||
<div id = "div_issue_attachment_<%=@training_task.id %>">
|
<div id = "div_issue_attachment_<%=@training_task.id %>">
|
||||||
<%= render :partial => 'task_attachments',:locals => {:training_task => @training_task} %>
|
<%= render :partial => 'task_attachments',:locals => {:training_task => @training_task} %>
|
||||||
</div>
|
</div>
|
||||||
<!--属性-->
|
<!--属性-->
|
||||||
<%#= render :partial => 'issues/attributes_show' %>
|
<%#= render :partial => 'issues/attributes_show' %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
showNormalImage('issue_desc_<%= @training_task.id %>');
|
showNormalImage('issue_desc_<%= @training_task.id %>');
|
||||||
autoUrl('issue_desc_<%= @training_task.id %>');
|
autoUrl('issue_desc_<%= @training_task.id %>');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,55 +1,55 @@
|
||||||
<%= labelled_fields_for :training_task, @training_task do |f| %>
|
<%= labelled_fields_for :training_task, @training_task do |f| %>
|
||||||
<ul class="fl pro_new_conbox_left">
|
<ul class="fl pro_new_conbox_left">
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<span class="fl mt6 mr12">类 型</span>
|
<span class="fl mt6 mr12">类 型</span>
|
||||||
<%= f.select :tracker_id, Tracker.all.collect{ |t| [t.name, t.id] },{:required => true, :no_label => true},
|
<%= f.select :tracker_id, Tracker.all.collect{ |t| [t.name, t.id] },{:required => true, :no_label => true},
|
||||||
:class => "fl", :style => "width:160px;padding-left:0px;" %>
|
:class => "fl", :style => "width:160px;padding-left:0px;" %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
<label class="label"><span class="c_red f12">*</span> 主题 : </label>
|
||||||
<%= f.text_field :subject, :style => "font-size:small;width:606px;", :no_label => true, :id => "training_task_id" %>
|
<%= f.text_field :subject, :style => "font-size:small;width:606px;", :no_label => true, :id => "training_task_id" %>
|
||||||
<span style="display: none">标题不能为空</span>
|
<span style="display: none">标题不能为空</span>
|
||||||
<!--Added by young-->
|
<!--Added by young-->
|
||||||
<%= javascript_tag do %>
|
<%= javascript_tag do %>
|
||||||
observeAutocompleteField('issue_subject',
|
observeAutocompleteField('issue_subject',
|
||||||
'<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>',
|
'<%= escape_javascript auto_complete_issues_path(:project_id => @project, :scope => (Setting.cross_project_issue_relations? ? 'all' : nil)) %>',
|
||||||
{ select: function(event, ui) {
|
{ select: function(event, ui) {
|
||||||
$('input#issue_subject').val(ui.item.value);
|
$('input#issue_subject').val(ui.item.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<label class="label"> 描述 : </label>
|
<label class="label"> 描述 : </label>
|
||||||
<%= f.label_for_field :description, :no_label => true, :class => "label" %>
|
<%= f.label_for_field :description, :no_label => true, :class => "label" %>
|
||||||
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
<%#= link_to_function image_tag('edit.png'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||||
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
<%#= content_tag 'span', :id => "issue_description_and_toolbar" do %>
|
||||||
<%= f.kindeditor :description,:editor_id => "training_task_desc_editor", :width=>'85%', :height =>159, :resizeType => 0, :no_label => true, at_id: @project.id, at_type: @project.class.to_s %>
|
<%= f.kindeditor :description,:editor_id => "training_task_desc_editor", :width=>'85%', :height =>159, :resizeType => 0, :no_label => true, at_id: @project.id, at_type: @project.class.to_s %>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
<%#= wikitoolbar_for 'issue_description' %>
|
<%#= wikitoolbar_for 'issue_description' %>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<label class="label"><%= l(:label_attachment_plural) %>:</label>
|
<label class="label"><%= l(:label_attachment_plural) %>:</label>
|
||||||
<%= render :partial => 'attachments/form', :locals => {:container => @training_task} %>
|
<%= render :partial => 'attachments/form', :locals => {:container => @training_task} %>
|
||||||
</li>
|
</li>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<% if params[:action] == "new" %>
|
<% if params[:action] == "new" %>
|
||||||
<a href="<%= project_training_tasks_url(@project, :remote => true) %>" class="sy_btn_grey mr5 fr"> 取消</a>
|
<a href="<%= project_training_tasks_url(@project, :remote => true) %>" class="sy_btn_grey mr5 fr"> 取消</a>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to "取消", training_task_path(@training_task), :class => "sy_btn_grey mr5 fr" %>
|
<%= link_to "取消", training_task_path(@training_task), :class => "sy_btn_grey mr5 fr" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--<a href="javascript:void(0);" class="sy_btn_blue mr5 fr"> 保存并继续</a>-->
|
<!--<a href="javascript:void(0);" class="sy_btn_blue mr5 fr"> 保存并继续</a>-->
|
||||||
<!--<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue mr5 fr" id="issue_confirm"> 保存</a>-->
|
<!--<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue mr5 fr" id="issue_confirm"> 保存</a>-->
|
||||||
<input onclick="issue_create();" class="sy_btn_blue fr mr5" onfocus="this.blur()" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
|
<input onclick="issue_create();" class="sy_btn_blue fr mr5" onfocus="this.blur()" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<script>
|
<script>
|
||||||
function issue_create(){
|
function issue_create(){
|
||||||
training_task_desc_editor.sync();
|
training_task_desc_editor.sync();
|
||||||
$('#project_training_form').submit();
|
$('#project_training_form').submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,89 +1,89 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% @journals.each do |comment| %>
|
<% @journals.each do |comment| %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
showNormalImage('reply_content_<%= comment.id %>');
|
showNormalImage('reply_content_<%= comment.id %>');
|
||||||
autoUrl('reply_content_<%= comment.id %>');
|
autoUrl('reply_content_<%= comment.id %>');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||||
<div class="homepagePostReplyPortrait" >
|
<div class="homepagePostReplyPortrait" >
|
||||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'Issue', :user_activity_id => issue.id}%>
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'Issue', :user_activity_id => issue.id}%>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
<% if comment.details.any? %>
|
<% if comment.details.any? %>
|
||||||
<% details_to_strings(comment.details).each do |string| %>
|
<% details_to_strings(comment.details).each do |string| %>
|
||||||
<p><%= string %></p>
|
<p><%= string %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<P><%= comment.notes.html_safe %></P>
|
<P><%= comment.notes.html_safe %></P>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span class="reply_praise_count_<%= comment.id %>">
|
<span class="reply_praise_count_<%= comment.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'issues', :action => 'reply', :user_id => comment.user_id, :id => issue.id, :journal_id => comment.id},
|
{:controller => 'issues', :action => 'reply', :user_id => comment.user_id, :id => issue.id, :journal_id => comment.id},
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_reply)) %>
|
:title => l(:button_reply)) %>
|
||||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:controller => 'issues',:action => 'delete_journal', :id => issue.id, :journal_id=>comment.id},
|
{:controller => 'issues',:action => 'delete_journal', :id => issue.id, :journal_id=>comment.id},
|
||||||
:method => :get,
|
:method => :get,
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:id => "delete_reply_#{comment.id}",
|
:id => "delete_reply_#{comment.id}",
|
||||||
:class => 'fr mr20 undis',
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if comment.user_id == User.current.id %>
|
) if comment.user_id == User.current.id %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p id="reply_message_<%= comment.id%>"></p>
|
<p id="reply_message_<%= comment.id%>"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @training_task.id %>">
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @training_task.id %>">
|
||||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@training_task.author_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@training_task.author_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<div nhname='new_message_<%= @training_task.id %>' style="display:none;">
|
<div nhname='new_message_<%= @training_task.id %>' style="display:none;">
|
||||||
<%= form_for('new_form', :url => add_journal_issue_path(@training_task.id, :is_issue_show => true), :method => "post", :remote => true) do |f| %>
|
<%= form_for('new_form', :url => add_journal_issue_path(@training_task.id, :is_issue_show => true), :method => "post", :remote => true) do |f| %>
|
||||||
<input type="hidden" name="issue_id" value="<%=@training_task.id%>"/>
|
<input type="hidden" name="issue_id" value="<%=@training_task.id%>"/>
|
||||||
<div nhname='toolbar_container_<%= @training_task.id %>' ></div>
|
<div nhname='toolbar_container_<%= @training_task.id %>' ></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @training_task.id %>' name="notes"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @training_task.id %>' name="notes"></textarea>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5 fl">
|
<div class="mt5 fl">
|
||||||
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @training_task} %>
|
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @training_task} %>
|
||||||
</div>
|
</div>
|
||||||
<span nhname='contentmsg_<%= @training_task.id %>' class="fl mt5"></span>
|
<span nhname='contentmsg_<%= @training_task.id %>' class="fl mt5"></span>
|
||||||
<a id="new_message_submit_btn_<%= @training_task.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
|
<a id="new_message_submit_btn_<%= @training_task.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
|
@ -1,5 +1,5 @@
|
||||||
<% count = @training_task.journals.count %>
|
<% count = @training_task.journals.count %>
|
||||||
回复<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
回复<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||||
<span id="praise_count_<%= @training_task.id %>">
|
<span id="praise_count_<%= @training_task.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity => @training_task, :user_activity_id=> @training_task.id, :type => "activity"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity => @training_task, :user_activity_id=> @training_task.id, :type => "activity"}%>
|
||||||
</span>
|
</span>
|
|
@ -1,10 +1,10 @@
|
||||||
<% if training_task.attachments.any? %>
|
<% if training_task.attachments.any? %>
|
||||||
<div class="pro_pic_box mb10">
|
<div class="pro_pic_box mb10">
|
||||||
<a href="javascript:void(0)" class="link_img fl">
|
<a href="javascript:void(0)" class="link_img fl">
|
||||||
<!--显示附件、图片-->
|
<!--显示附件、图片-->
|
||||||
<%= link_to_attachment_project training_task, :thumbnails => true %>
|
<%= link_to_attachment_project training_task, :thumbnails => true %>
|
||||||
</a><br/>
|
</a><br/>
|
||||||
<%#= call_hook(:view_issues_show_description_bottom, :training_task => training_task) %>
|
<%#= call_hook(:view_issues_show_description_bottom, :training_task => training_task) %>
|
||||||
</div><!--pro_pic_box end-->
|
</div><!--pro_pic_box end-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,232 +1,232 @@
|
||||||
<%= content_for(:header_tags) do %>
|
<%= content_for(:header_tags) do %>
|
||||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script xmlns="http://www.w3.org/1999/html">
|
<script xmlns="http://www.w3.org/1999/html">
|
||||||
function add_style(){
|
function add_style(){
|
||||||
if($("select[id='tracker_id']").val() != 0){
|
if($("select[id='tracker_id']").val() != 0){
|
||||||
$("#tracker_id").addClass('issues_filter_active');
|
$("#tracker_id").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='author_id']").val() != 0){
|
if($("select[id='author_id']").val() != 0){
|
||||||
$("#author_id").addClass('issues_filter_active');
|
$("#author_id").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='assigned_to_id']").val() !=0){
|
if($("select[id='assigned_to_id']").val() !=0){
|
||||||
$("#assigned_to_id").addClass('issues_filter_active');
|
$("#assigned_to_id").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='priority_id']").val() !=0){
|
if($("select[id='priority_id']").val() !=0){
|
||||||
$("#priority_id").addClass('issues_filter_active');
|
$("#priority_id").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='fixed_version_id']").val() !=0){
|
if($("select[id='fixed_version_id']").val() !=0){
|
||||||
$("#fixed_version_id").addClass('issues_filter_active');
|
$("#fixed_version_id").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='status_id']").val() != 0 ){
|
if($("select[id='status_id']").val() != 0 ){
|
||||||
$("#status_id").addClass('issues_filter_active');
|
$("#status_id").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='done_ratio']").val() != -1){
|
if($("select[id='done_ratio']").val() != -1){
|
||||||
$("#done_ratio").addClass('issues_filter_active');
|
$("#done_ratio").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='test']").val() != 0 ){
|
if($("select[id='test']").val() != 0 ){
|
||||||
$("#test").addClass('issues_filter_active');
|
$("#test").addClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='tracker_id']").val() == 0){
|
if($("select[id='tracker_id']").val() == 0){
|
||||||
$("#tracker_id").removeClass('issues_filter_active');
|
$("#tracker_id").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='author_id']").val() == 0){
|
if($("select[id='author_id']").val() == 0){
|
||||||
$("#author_id").removeClass('issues_filter_active');
|
$("#author_id").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='assigned_to_id']").val() ==0){
|
if($("select[id='assigned_to_id']").val() ==0){
|
||||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='priority_id']").val() ==0){
|
if($("select[id='priority_id']").val() ==0){
|
||||||
$("#priority_id").removeClass('issues_filter_active');
|
$("#priority_id").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='fixed_version_id']").val() ==0){
|
if($("select[id='fixed_version_id']").val() ==0){
|
||||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='status_id']").val() == 0 ){
|
if($("select[id='status_id']").val() == 0 ){
|
||||||
$("#status_id").removeClass('issues_filter_active');
|
$("#status_id").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='done_ratio']").val() == -1){
|
if($("select[id='done_ratio']").val() == -1){
|
||||||
$("#done_ratio").removeClass('issues_filter_active');
|
$("#done_ratio").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
if($("select[id='test']").val() == 0 ){
|
if($("select[id='test']").val() == 0 ){
|
||||||
$("#test").removeClass('issues_filter_active');
|
$("#test").removeClass('issues_filter_active');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//issues列表
|
//issues列表
|
||||||
function g(o){
|
function g(o){
|
||||||
return document.getElementById(o);
|
return document.getElementById(o);
|
||||||
}
|
}
|
||||||
function HoverLi(n){
|
function HoverLi(n){
|
||||||
//如果有N个标签,就将i<=N;
|
//如果有N个标签,就将i<=N;
|
||||||
for(var i=1;i<=3;i++){
|
for(var i=1;i<=3;i++){
|
||||||
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
||||||
g('issues_list_content_'+i).className='undis';
|
g('issues_list_content_'+i).className='undis';
|
||||||
}
|
}
|
||||||
g('issues_list_content_'+n).className='dis';
|
g('issues_list_content_'+n).className='dis';
|
||||||
g('issues_list_nav_'+n).className='issues_nav_hover';
|
g('issues_list_nav_'+n).className='issues_nav_hover';
|
||||||
}
|
}
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#RSide").removeAttr("id");
|
$("#RSide").removeAttr("id");
|
||||||
$("#Container").css("width","1000px");
|
$("#Container").css("width","1000px");
|
||||||
$("input[nhname='date_show']").change(function(){
|
$("input[nhname='date_show']").change(function(){
|
||||||
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
|
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
|
||||||
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
|
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
|
||||||
remote_function();
|
remote_function();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
function remote_function() {
|
function remote_function() {
|
||||||
if($.trim($("#issue_create_date_end_show").val()) !="" && Date.parse($.trim($("#issue_create_date_end_show").val())) < Date.parse($.trim($("#issue_create_date_start_show").val()))){
|
if($.trim($("#issue_create_date_end_show").val()) !="" && Date.parse($.trim($("#issue_create_date_end_show").val())) < Date.parse($.trim($("#issue_create_date_start_show").val()))){
|
||||||
alert("开始日期不能大于结束日期!");
|
alert("开始日期不能大于结束日期!");
|
||||||
}
|
}
|
||||||
$("#issue_query_form").submit();
|
$("#issue_query_form").submit();
|
||||||
// $.ajax({
|
// $.ajax({
|
||||||
// url:'<%#= project_issues_path(@project)%>',
|
// url:'<%#= project_issues_path(@project)%>',
|
||||||
// data:{
|
// data:{
|
||||||
// subject:$("#v_subject").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
// subject:$("#v_subject").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||||
// status_id: $("#status_id").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
// status_id: $("#status_id").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||||
// assigned_to_id: $("#assigned_to_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
// assigned_to_id: $("#assigned_to_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||||
// priority_id: $("#priority_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
// priority_id: $("#priority_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, ""),
|
||||||
// author_id: $("#author_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, "")
|
// author_id: $("#author_id option:selected").attr("value").replace(/(^\s*)|(\s*$)/g, "")
|
||||||
// },
|
// },
|
||||||
// success: function(data){
|
// success: function(data){
|
||||||
// },
|
// },
|
||||||
// error: function(data){
|
// error: function(data){
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function remote_function_export(project_id) {
|
function remote_function_export(project_id) {
|
||||||
// $("#export_issue_hidden").attr("value","1");
|
// $("#export_issue_hidden").attr("value","1");
|
||||||
// $("#issue_query_form").attr("set_filter","1");
|
// $("#issue_query_form").attr("set_filter","1");
|
||||||
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls");
|
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls");
|
||||||
// $("#issue_query_form").submit();
|
// $("#issue_query_form").submit();
|
||||||
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues");
|
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues");
|
||||||
// $("#issue_query_form").removeAttr("format");
|
// $("#issue_query_form").removeAttr("format");
|
||||||
// $("#issue_query_form").attr("set_filter","0");
|
// $("#issue_query_form").attr("set_filter","0");
|
||||||
// $("#export_issue_hidden").attr("value","0");
|
// $("#export_issue_hidden").attr("value","0");
|
||||||
|
|
||||||
var tracker_id = $("#tracker_id").attr("value");
|
var tracker_id = $("#tracker_id").attr("value");
|
||||||
var subject = $("#v_subject").attr("value");
|
var subject = $("#v_subject").attr("value");
|
||||||
var assigned_to_id = $("#assigned_to_id").attr("value");
|
var assigned_to_id = $("#assigned_to_id").attr("value");
|
||||||
var fixed_version_id = $("#fixed_version_id").attr("value");
|
var fixed_version_id = $("#fixed_version_id").attr("value");
|
||||||
var status_id = $("#status_id").attr("value");
|
var status_id = $("#status_id").attr("value");
|
||||||
var done_ratio = $("#done_ratio").attr("value");
|
var done_ratio = $("#done_ratio").attr("value");
|
||||||
var test = $("#test").attr("value");
|
var test = $("#test").attr("value");
|
||||||
var author_id = $("#author_id").attr("value");
|
var author_id = $("#author_id").attr("value");
|
||||||
var priority_id = $("#priority_id").attr("value");
|
var priority_id = $("#priority_id").attr("value");
|
||||||
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
|
var issue_create_date_start = $("#issue_date_start_issue_export").attr("value");
|
||||||
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
|
var issue_create_date_end = $("#issue_date_end_issue_export").attr("value");
|
||||||
$("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end+"&priority_id="+priority_id);
|
$("#sendexcel").attr("href","/projects/"+project_id+"/issues.xls?export=true&set_filter=1&tracker_id="+tracker_id+"&assigned_to_id="+assigned_to_id+"&fixed_version_id="+fixed_version_id+"&status_id="+status_id+"&done_ratio="+done_ratio+"&test="+test+"&author_id="+author_id+"&subject="+subject+"&issue_create_date_start="+issue_create_date_start+"&issue_create_date_end="+issue_create_date_end+"&priority_id="+priority_id);
|
||||||
///projects/1811/issues.xls?export=true&set_filter=1
|
///projects/1811/issues.xls?export=true&set_filter=1
|
||||||
}
|
}
|
||||||
|
|
||||||
// function nh_reset_form() {
|
// function nh_reset_form() {
|
||||||
// $("#issue_query_form")[0].reset();
|
// $("#issue_query_form")[0].reset();
|
||||||
// $("input[nhname='date_val']").val('');//涛哥的火狐reset 清不掉这个值 我擦
|
// $("input[nhname='date_val']").val('');//涛哥的火狐reset 清不掉这个值 我擦
|
||||||
// remote_function();
|
// remote_function();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function EnterPress(e){
|
function EnterPress(e){
|
||||||
var e = e || window.event;
|
var e = e || window.event;
|
||||||
if(e.keyCode == 13){
|
if(e.keyCode == 13){
|
||||||
remote_function();
|
remote_function();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击的时候让过滤条件选中assign_to
|
// 点击的时候让过滤条件选中assign_to
|
||||||
function switch_assign_to(assign) {
|
function switch_assign_to(assign) {
|
||||||
var assign = "option[value =" + assign + "]";
|
var assign = "option[value =" + assign + "]";
|
||||||
$("#issues_type_2").click(function(){
|
$("#issues_type_2").click(function(){
|
||||||
|
|
||||||
});
|
});
|
||||||
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
||||||
$("select[id='author_id']").val('');
|
$("select[id='author_id']").val('');
|
||||||
$("select[id='priority_id']").val('');
|
$("select[id='priority_id']").val('');
|
||||||
$("select[id='tracker_id']").val('');
|
$("select[id='tracker_id']").val('');
|
||||||
$("select[id='fixed_version_id']").val('');
|
$("select[id='fixed_version_id']").val('');
|
||||||
$("select[id='status_id']").val('');
|
$("select[id='status_id']").val('');
|
||||||
$("select[id='done_ratio']").val('');
|
$("select[id='done_ratio']").val('');
|
||||||
$("select[id='test']").val('');
|
$("select[id='test']").val('');
|
||||||
$("#tracker_id").removeClass('issues_filter_active');
|
$("#tracker_id").removeClass('issues_filter_active');
|
||||||
$("#author_id").removeClass('issues_filter_active');
|
$("#author_id").removeClass('issues_filter_active');
|
||||||
$("#assigned_to_id").addClass('issues_filter_active');
|
$("#assigned_to_id").addClass('issues_filter_active');
|
||||||
$("#priority_id").removeClass('issues_filter_active');
|
$("#priority_id").removeClass('issues_filter_active');
|
||||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||||
$("#status_id").removeClass('issues_filter_active');
|
$("#status_id").removeClass('issues_filter_active');
|
||||||
$("#done_ratio").removeClass('issues_filter_active');
|
$("#done_ratio").removeClass('issues_filter_active');
|
||||||
$("#test").removeClass('issues_filter_active');
|
$("#test").removeClass('issues_filter_active');
|
||||||
remote_function();
|
remote_function();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 点击的时候让过滤条件选中user_id
|
// 点击的时候让过滤条件选中user_id
|
||||||
function createByMe(user_id) {
|
function createByMe(user_id) {
|
||||||
var user = "option[value =" + user_id + "]";
|
var user = "option[value =" + user_id + "]";
|
||||||
$("#createByMe").click(function(){
|
$("#createByMe").click(function(){
|
||||||
|
|
||||||
});
|
});
|
||||||
$("select[id='author_id']").find(user).attr("selected", "selected");
|
$("select[id='author_id']").find(user).attr("selected", "selected");
|
||||||
$("select[id='assigned_to_id']").val('');
|
$("select[id='assigned_to_id']").val('');
|
||||||
$("select[id='priority_id']").val('');
|
$("select[id='priority_id']").val('');
|
||||||
$("select[id='tracker_id']").val('');
|
$("select[id='tracker_id']").val('');
|
||||||
$("select[id='fixed_version_id']").val('');
|
$("select[id='fixed_version_id']").val('');
|
||||||
$("select[id='status_id']").val('');
|
$("select[id='status_id']").val('');
|
||||||
$("select[id='done_ratio']").val('');
|
$("select[id='done_ratio']").val('');
|
||||||
$("select[id='test']").val('');
|
$("select[id='test']").val('');
|
||||||
$("#tracker_id").removeClass('issues_filter_active');
|
$("#tracker_id").removeClass('issues_filter_active');
|
||||||
$("#author_id").addClass('issues_filter_active');
|
$("#author_id").addClass('issues_filter_active');
|
||||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||||
$("#priority_id").removeClass('issues_filter_active');
|
$("#priority_id").removeClass('issues_filter_active');
|
||||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||||
$("#status_id").removeClass('issues_filter_active');
|
$("#status_id").removeClass('issues_filter_active');
|
||||||
$("#done_ratio").removeClass('issues_filter_active');
|
$("#done_ratio").removeClass('issues_filter_active');
|
||||||
$("#test").removeClass('issues_filter_active');
|
$("#test").removeClass('issues_filter_active');
|
||||||
remote_function();
|
remote_function();
|
||||||
}
|
}
|
||||||
// 清楚表单所有选项
|
// 清楚表单所有选项
|
||||||
function all_reset_form() {
|
function all_reset_form() {
|
||||||
$("#issue_query_form")[0].reset();
|
$("#issue_query_form")[0].reset();
|
||||||
$("select[id='author_id']").val('');
|
$("select[id='author_id']").val('');
|
||||||
$("select[id='assigned_to_id']").val('');
|
$("select[id='assigned_to_id']").val('');
|
||||||
$("input[nhname='date_val']").val('');
|
$("input[nhname='date_val']").val('');
|
||||||
$("#tracker_id").removeClass('issues_filter_active');
|
$("#tracker_id").removeClass('issues_filter_active');
|
||||||
$("#author_id").removeClass('issues_filter_active');
|
$("#author_id").removeClass('issues_filter_active');
|
||||||
$("#assigned_to_id").removeClass('issues_filter_active');
|
$("#assigned_to_id").removeClass('issues_filter_active');
|
||||||
$("#priority_id").removeClass('issues_filter_active');
|
$("#priority_id").removeClass('issues_filter_active');
|
||||||
$("#fixed_version_id").removeClass('issues_filter_active');
|
$("#fixed_version_id").removeClass('issues_filter_active');
|
||||||
$("#status_id").removeClass('issues_filter_active');
|
$("#status_id").removeClass('issues_filter_active');
|
||||||
$("#done_ratio").removeClass('issues_filter_active');
|
$("#done_ratio").removeClass('issues_filter_active');
|
||||||
$("#test").removeClass('issues_filter_active');
|
$("#test").removeClass('issues_filter_active');
|
||||||
remote_function();
|
remote_function();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--缺陷列表开始-->
|
<!--缺陷列表开始-->
|
||||||
<div id="myissues_con" class="myissues_con mb10">
|
<div id="myissues_con" class="myissues_con mb10">
|
||||||
<div class="clear mb5">
|
<div class="clear mb5">
|
||||||
<div class="issues_statistics fl clear">
|
<div class="issues_statistics fl clear">
|
||||||
<ul>
|
<ul>
|
||||||
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @training_tasks.count %></a></li>
|
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @training_tasks.count %></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--issues_statistics end-->
|
</div><!--issues_statistics end-->
|
||||||
<a href="<%= new_project_training_task_path(@project)%>" class="sy_btn_green fr">新建</a>
|
<a href="<%= new_project_training_task_path(@project)%>" class="sy_btn_green fr">新建</a>
|
||||||
</div>
|
</div>
|
||||||
<% if @training_tasks.empty? %>
|
<% if @training_tasks.empty? %>
|
||||||
<%= render :partial => "projects/no_data" %>
|
<%= render :partial => "projects/no_data" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div id="issue_list">
|
<div id="issue_list">
|
||||||
<%= render :partial => 'all_list', :locals => {:tasks => @training_tasks, :query => @query, :training_tasks_pages=> @training_tasks_pages, :training_tasks_count=> @training_tasks_count, :project=> @project, :subject => @subject} %>
|
<%= render :partial => 'all_list', :locals => {:tasks => @training_tasks, :query => @query, :training_tasks_pages=> @training_tasks_pages, :training_tasks_count=> @training_tasks_count, :project=> @project, :subject => @subject} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%#= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
<%#= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||||
</div><!--issues_con_list end-->
|
</div><!--issues_con_list end-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<!--issues_filter end-->
|
<!--issues_filter end-->
|
||||||
<div id="issues_list_content_1">
|
<div id="issues_list_content_1">
|
||||||
</div><!--issues_list_content_1 end-->
|
</div><!--issues_list_content_1 end-->
|
||||||
<div id="issues_list_content_2" class="undis">
|
<div id="issues_list_content_2" class="undis">
|
||||||
</div><!--issues_list_content_2 end-->
|
</div><!--issues_list_content_2 end-->
|
||||||
<div id="issues_list_content_3" class="undis">
|
<div id="issues_list_content_3" class="undis">
|
||||||
</div><!--issues_list_content_3 end-->
|
</div><!--issues_list_content_3 end-->
|
||||||
<!--issues_con_list end-->
|
<!--issues_con_list end-->
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
<%= content_for(:header_tags) do %>
|
<%= content_for(:header_tags) do %>
|
||||||
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
|
<%= import_ke(enable_at: true, prettify: false, init_activity: false) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#RSide").removeAttr("id");
|
$("#RSide").removeAttr("id");
|
||||||
$("#Container").css("width","1000px");
|
$("#Container").css("width","1000px");
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--新建缺陷开始-->
|
<!--新建缺陷开始-->
|
||||||
<div class="pro_new_con ">
|
<div class="pro_new_con ">
|
||||||
<div class="pro_newissue_con clear">
|
<div class="pro_newissue_con clear">
|
||||||
<%#= call_hook(:view_issues_new_top, {:training_task => @training_task}) %>
|
<%#= call_hook(:view_issues_new_top, {:training_task => @training_task}) %>
|
||||||
<%= labelled_form_for @training_task, :url => project_training_tasks_url(@project),
|
<%= labelled_form_for @training_task, :url => project_training_tasks_url(@project),
|
||||||
:html => {:id => 'project_training_form', :multipart => true} do |f| %>
|
:html => {:id => 'project_training_form', :multipart => true} do |f| %>
|
||||||
<%= error_messages_for 'training_task' %>
|
<%= error_messages_for 'training_task' %>
|
||||||
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
||||||
<div>
|
<div>
|
||||||
<%= render :partial => 'training_tasks/form', :locals => {:f => f} %>
|
<%= render :partial => 'training_tasks/form', :locals => {:f => f} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--新建缺陷结束-->
|
<!--新建缺陷结束-->
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
<%= content_for(:header_tags) do %>
|
<%= content_for(:header_tags) do %>
|
||||||
<%= import_ke(enable_at: true) %>
|
<%= import_ke(enable_at: true) %>
|
||||||
<%= javascript_include_tag 'create_kindeditor'%>
|
<%= javascript_include_tag 'create_kindeditor'%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<script>
|
<script>
|
||||||
sd_create_editor_from_data(<%= @training_task.id%>, null, "100%", "<%= @training_task.class.name %>");
|
sd_create_editor_from_data(<%= @training_task.id%>, null, "100%", "<%= @training_task.class.name %>");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="mt10 mb10" id =issue_show_total"">
|
<div class="mt10 mb10" id =issue_show_total"">
|
||||||
<div class="banner-big f16 fontGrey3">
|
<div class="banner-big f16 fontGrey3">
|
||||||
任务详情
|
任务详情
|
||||||
<a href="<%= new_project_training_task_path(@project)%>" class="sy_btn_green fr" >新建</a>
|
<a href="<%= new_project_training_task_path(@project)%>" class="sy_btn_green fr" >新建</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="resources mt10" style="float:left;">
|
<div class="resources mt10" style="float:left;">
|
||||||
<div class="pro_page_box">
|
<div class="pro_page_box">
|
||||||
<div class="problem_main borderBottomNone">
|
<div class="problem_main borderBottomNone">
|
||||||
<div id="issue_detail_show">
|
<div id="issue_detail_show">
|
||||||
<%= render :partial => 'detail'%>
|
<%= render :partial => 'detail'%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--problem_main end-->
|
<!--problem_main end-->
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<div class="topBorder" style="display: <%= @training_task.journals.count>0 ? 'none': '' %>"></div>
|
<div class="topBorder" style="display: <%= @training_task.journals.count>0 ? 'none': '' %>"></div>
|
||||||
<div class="homepagePostReplyBanner" >
|
<div class="homepagePostReplyBanner" >
|
||||||
<div class="homepagePostReplyBannerCount">
|
<div class="homepagePostReplyBannerCount">
|
||||||
<%=render :partial => 'reply_banner' %>
|
<%=render :partial => 'reply_banner' %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyBannerTime"></div>
|
<div class="homepagePostReplyBannerTime"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="" id="reply_div_<%= @training_task.id %>" >
|
<div class="" id="reply_div_<%= @training_task.id %>" >
|
||||||
<%= render :partial => 'issue_replies',:locals => {:issue => @training_task, :replies_all_i => 0} %>
|
<%= render :partial => 'issue_replies',:locals => {:issue => @training_task, :replies_all_i => 0} %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -13,25 +13,25 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @unfinished_homeworks.each do |uh| %>
|
<% @unfinished_homeworks.each do |uh| %>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="homepageTabAvatar">
|
<td class="homepageTabAvatar">
|
||||||
<%= link_to image_tag(url_to_avatar(uh.user), :width => "30", :height => "30"), user_path(uh.user), :target => '_blank' %>
|
<%= link_to image_tag(url_to_avatar(uh.user), :width => "30", :height => "30"), user_path(uh.user), :target => '_blank' %>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabTitle">
|
<li class="homepageTabTitle">
|
||||||
<%= link_to uh.name.to_s, student_work_index_path( :homework => uh.id, :tab => 1), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{uh.name.to_s}" %>
|
<%= link_to uh.name.to_s, student_work_index_path( :homework => uh.id, :tab => 1), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{uh.name.to_s}" %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabProjectName ml5">
|
<li class="homepageTabProjectName ml5">
|
||||||
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :target => "_blank", :title => "#{uh.course.try(:name)}" %>
|
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :target => "_blank", :title => "#{uh.course.try(:name)}" %>
|
||||||
<li>
|
<li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabAuthor ml5" >
|
<li class="homepageTabAuthor ml5" >
|
||||||
<%= homework_type_tip(uh.homework_type) %>
|
<%= homework_type_tip(uh.homework_type) %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabTime ml5" >
|
<li class="homepageTabTime ml5" >
|
||||||
<% end_time = uh.end_time.to_time.to_i + 24*60*60 - 1 %>
|
<% end_time = uh.end_time.to_time.to_i + 24*60*60 - 1 %>
|
||||||
<% if end_time > Time.now.to_i %>
|
<% if end_time > Time.now.to_i %>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<span class="c_red">已截止</span>
|
<span class="c_red">已截止</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -11,21 +11,21 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @unfinished_poll.each do |up| %>
|
<% @unfinished_poll.each do |up| %>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="homepageTabAvatar">
|
<td class="homepageTabAvatar">
|
||||||
<%= link_to image_tag(url_to_avatar(up.user), :width => "30", :height => "30"), user_path(up.user), :target => '_blank' %>
|
<%= link_to image_tag(url_to_avatar(up.user), :width => "30", :height => "30"), user_path(up.user), :target => '_blank' %>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabPollTitle">
|
<li class="homepageTabPollTitle">
|
||||||
<%= link_to up.polls_name.to_s, poll_path(up.id), :target => "_blank", :class => "homepageTabPollTitle fl ml5", :title => "#{up.polls_name.to_s}" %>
|
<%= link_to up.polls_name.to_s, poll_path(up.id), :target => "_blank", :class => "homepageTabPollTitle fl ml5", :title => "#{up.polls_name.to_s}" %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabProjectName ml5">
|
<li class="homepageTabProjectName ml5">
|
||||||
<% if up.polls_type == "Course" %>
|
<% if up.polls_type == "Course" %>
|
||||||
<%= link_to Course.find(up.polls_group_id).name, course_path(Course.find(up.polls_group_id)), :target => "_blank", :title => "#{Course.find(up.polls_group_id).name}" %>
|
<%= link_to Course.find(up.polls_group_id).name, course_path(Course.find(up.polls_group_id)), :target => "_blank", :title => "#{Course.find(up.polls_group_id).name}" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
<li>
|
||||||
</th>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -13,20 +13,20 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @unfinished_test.each do |ut| %>
|
<% @unfinished_test.each do |ut| %>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="homepageTabAvatar">
|
<td class="homepageTabAvatar">
|
||||||
<%= link_to image_tag(url_to_avatar(ut.user), :width => "30", :height => "30"), user_path(ut.user), :target => '_blank' %>
|
<%= link_to image_tag(url_to_avatar(ut.user), :width => "30", :height => "30"), user_path(ut.user), :target => '_blank' %>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabTitle">
|
<li class="homepageTabTitle">
|
||||||
<%= link_to ut.exercise_name.to_s, exercise_index_path(:course_id => ut.course_id), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ut.exercise_name.to_s}" %>
|
<%= link_to ut.exercise_name.to_s, exercise_index_path(:course_id => ut.course_id), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ut.exercise_name.to_s}" %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabProjectName ml5">
|
<li class="homepageTabProjectName ml5">
|
||||||
<%= link_to ut.course.try(:name), course_path(ut.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :title => "#{ut.course.try(:name)}" %>
|
<%= link_to ut.course.try(:name), course_path(ut.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :title => "#{ut.course.try(:name)}" %>
|
||||||
<li>
|
<li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabAuthor ml5" >
|
<li class="homepageTabAuthor ml5" >
|
||||||
<% if ut.time.to_i == -1 %>
|
<% if ut.time.to_i == -1 %>
|
||||||
不限时
|
不限时
|
||||||
|
@ -34,8 +34,8 @@
|
||||||
<%= ut.time %>
|
<%= ut.time %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabTime ml5" >
|
<li class="homepageTabTime ml5" >
|
||||||
<% if ut.end_time > Time.now %>
|
<% if ut.end_time > Time.now %>
|
||||||
<span class="c_red"><%= (ut.end_time.to_i - Time.now.to_i) / (24*60*60) %></span> 天
|
<span class="c_red"><%= (ut.end_time.to_i - Time.now.to_i) / (24*60*60) %></span> 天
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<span class="c_red">已截止</span>
|
<span class="c_red">已截止</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -14,20 +14,20 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @unsolved_issues.each do |ui| %>
|
<% @unsolved_issues.each do |ui| %>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="homepageTabAvatar">
|
<td class="homepageTabAvatar">
|
||||||
<%= link_to image_tag(url_to_avatar(ui.author), :width => "30", :height => "30"), user_path(ui.author), :target => '_blank' %>
|
<%= link_to image_tag(url_to_avatar(ui.author), :width => "30", :height => "30"), user_path(ui.author), :target => '_blank' %>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabTitle">
|
<li class="homepageTabTitle">
|
||||||
<%= link_to ui.subject.to_s, issue_path(ui), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ui.subject.to_s}" %>
|
<%= link_to ui.subject.to_s, issue_path(ui), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ui.subject.to_s}" %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabProjectName ml5">
|
<li class="homepageTabProjectName ml5">
|
||||||
<%= link_to ui.project.try(:name), project_path(ui.project_id), :target => "_blank", :title => "#{ui.project.try(:name)}" %>
|
<%= link_to ui.project.try(:name), project_path(ui.project_id), :target => "_blank", :title => "#{ui.project.try(:name)}" %>
|
||||||
<li>
|
<li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabAuthor ml5" >
|
<li class="homepageTabAuthor ml5" >
|
||||||
<% if ui.author.show_name == ' ' %>
|
<% if ui.author.show_name == ' ' %>
|
||||||
<%= link_to ui.try(:author), user_path(ui.author_id), :target => "_blank", :title => "#{ui.try(:author)}" %>
|
<%= link_to ui.try(:author), user_path(ui.author_id), :target => "_blank", :title => "#{ui.try(:author)}" %>
|
||||||
|
@ -35,17 +35,17 @@
|
||||||
<%= link_to ui.author.show_name, user_path(ui.author_id), :target => "_blank", :title => "#{ui.author.show_name}" %>
|
<%= link_to ui.author.show_name, user_path(ui.author_id), :target => "_blank", :title => "#{ui.author.show_name}" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabAuthor ml5" >
|
<li class="homepageTabAuthor ml5" >
|
||||||
<%= ui.priority.name %>
|
<%= ui.priority.name %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
<th>
|
<td>
|
||||||
<li class="homepageTabAuthor ml5" >
|
<li class="homepageTabAuthor ml5" >
|
||||||
<%= ui.status.name %>
|
<%= ui.status.name %>
|
||||||
</li>
|
</li>
|
||||||
</th>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
“<%= ma.name %>”的申请,已通过审核。谢谢!
|
“<%= ma.name %>”的申请,已通过审核。谢谢!
|
||||||
</a>
|
</a>
|
||||||
<% elsif ma.status == 2 %>
|
<% elsif ma.status == 2 %>
|
||||||
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!">
|
<a class ="#{ma.viewed == 0 ? 'newsBlack' : 'newsGrey'}" target = '_blank' title="“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!">
|
||||||
“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!
|
“<%= ma.applied.name %>”的申请,因名称不符合规范,系统已将其更改为“<%= ma.name %>”。谢谢!
|
||||||
</a>
|
</a>
|
||||||
<% elsif ma.status == 3 %>
|
<% elsif ma.status == 3 %>
|
||||||
|
|
|
@ -213,6 +213,12 @@
|
||||||
add_class("reorder_turnover_time");
|
add_class("reorder_turnover_time");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($.browser.webkit){
|
||||||
|
$("#issues_filter_por").css("padding-left","5px");
|
||||||
|
$("#issue_filter_status").css("padding-left","10px");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--缺陷列表开始-->
|
<!--缺陷列表开始-->
|
||||||
|
@ -258,36 +264,33 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="issues_filter">
|
<div class="issues_filter">
|
||||||
<div class="issues_form_filter mt5 mr5">
|
<div class="my_issues_form_filter mt5">
|
||||||
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
|
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
|
||||||
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
|
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
|
||||||
{ :onchange => "remote_function();add_style();", :id => "project_id", :name => "project_id", :class => "fl", :style=>"width: 80px; margin-right:20px;"}
|
{ :onchange => "remote_function();add_style();", :id => "project_id", :name => "project_id", :class => "fl", :style => "margin: 0 15px;text-align: left;"}
|
||||||
)%>
|
)%>
|
||||||
<select placeholder=" 类型" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px;width:35px; margin-right:10px;">
|
<select class="my_issues_filter" disabled="disabled" style="width: 50px;;padding-left: 10px;text-align: left;">
|
||||||
<option value="0" selected="selected">类型</option>
|
<option value="0" selected="selected">类型</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 指派给" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right: 15px;">
|
<select class="my_issues_filter" disabled="disabled" style="width: 65px;padding-left: 10px;text-align: left;">
|
||||||
<option value="0" selected="selected">指派给</option>
|
<option value="0" selected="selected">指派给</option>
|
||||||
</select>
|
</select>
|
||||||
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["指派给",0]),
|
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["指派给",0]),
|
||||||
{ :include_blank => false, :selected => @assigned_to ? @assigned_to : 0},
|
{ :include_blank => false, :selected => @assigned_to ? @assigned_to : 0},
|
||||||
{:onchange=>"remote_function();add_style();",:id => "assigned_to_id",:name => "assigned_to_id", :class => "fl", :style => "visibility:hidden; width:0px;margin:0px;padding:0px;"} )
|
{:onchange=>"remote_function();add_style();",:id => "assigned_to_id",:name => "assigned_to_id", :class => "fl", :style => "visibility:hidden; width:0px;margin:0px;padding:0px;"} )
|
||||||
%>
|
%>
|
||||||
<select placeholder=" 优先度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
<select class="my_issues_filter" disabled="disabled" style="width: 50px;text-align: left;" id="issues_filter_por">
|
||||||
<option value="0" selected="selected">优先度</option>
|
<option value="0" selected="selected">优先度</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 里程碑" class="fl my_issues_filter" disabled="disabled" style="padding:0px;margin-left: 20px; margin-right: 10px">
|
<select class="my_issues_filter" disabled="disabled" style="width: 80px;padding-left: 20px;text-align: left;">
|
||||||
<option value="0" selected="selected">里程碑</option>
|
<option value="0" selected="selected">里程碑</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 状态" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right:10px;width:35px;">
|
<select class="my_issues_filter" disabled="disabled" style="width: 60px;padding-left: 10px;text-align: left;" id="issue_filter_status">
|
||||||
<option value="0" selected="selected">状态</option>
|
<option value="0" selected="selected">状态</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 完成度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
<select class="my_issues_filter" disabled="disabled" style="width: 50px;text-align: left;">
|
||||||
<option value="0" selected="selected">完成度</option>
|
<option value="0" selected="selected">完成度</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 排序" class="fl my_issues_filter" disabled="disabled" style="width:50px;visibility:hidden;margin-left: 0px;margin-right: 0px;">
|
|
||||||
<option value="0" selected="selected">排序</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -213,6 +213,11 @@
|
||||||
add_class("reorder_turnover_time");
|
add_class("reorder_turnover_time");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
$(document).ready(function(){
|
||||||
|
if($.browser.webkit){
|
||||||
|
$("#issue_filter_status").css("padding-left","10px");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--缺陷列表开始-->
|
<!--缺陷列表开始-->
|
||||||
|
@ -258,12 +263,12 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="issues_filter">
|
<div class="issues_filter">
|
||||||
<div class="issues_form_filter mt5 mr5">
|
<div class="my_issues_form_filter mt5">
|
||||||
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
|
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
|
||||||
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
|
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
|
||||||
{ :onchange => "remote_function();add_style();", :id => "project_id", :name => "project_id", :class => "fl", :style=>"width: 80px; margin-right:20px;"}
|
{ :onchange => "remote_function();add_style();", :id => "project_id", :name => "project_id", :class => "fl", :style => "margin: 0 15px;text-align: left;"}
|
||||||
)%>
|
)%>
|
||||||
<select placeholder=" 发布人" class="fl my_issues_filter" disabled="disabled" style="padding:0px;width: 50px;margin-right: 15px;">
|
<select class="fl my_issues_filter" disabled="disabled" style="width: 70px;padding-left: 15px;text-align: left;">
|
||||||
<option value="0" selected="selected">发布人</option>
|
<option value="0" selected="selected">发布人</option>
|
||||||
</select>
|
</select>
|
||||||
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["发布人",0]),
|
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["发布人",0]),
|
||||||
|
@ -271,24 +276,21 @@
|
||||||
{:onchange => "remote_function();add_style();",:id => "author_id", :name => "author_id", :class => "fl", :style => "visibility:hidden;width: 0px;margin:0px;padding:0px;"}
|
{:onchange => "remote_function();add_style();",:id => "author_id", :name => "author_id", :class => "fl", :style => "visibility:hidden;width: 0px;margin:0px;padding:0px;"}
|
||||||
)
|
)
|
||||||
%>
|
%>
|
||||||
<select placeholder=" 类型" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px;width:35px; margin-right:10px;">
|
<select class="fl my_issues_filter" disabled="disabled" style="width: 50px;;padding-left: 10px;text-align: left;">
|
||||||
<option value="0" selected="selected">类型</option>
|
<option value="0" selected="selected">类型</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 优先度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
<select class="fl my_issues_filter" disabled="disabled" style="width: 50px;text-align: left;padding-left: 5px;" id="issues_filter_por">
|
||||||
<option value="0" selected="selected">优先度</option>
|
<option value="0" selected="selected">优先度</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 里程碑" class="fl my_issues_filter" disabled="disabled" style="padding:0px;margin-left: 20px; margin-right: 10px">
|
<select class="fl my_issues_filter" disabled="disabled" style="width: 90px;padding-left: 25px;text-align: left;">
|
||||||
<option value="0" selected="selected">里程碑</option>
|
<option value="0" selected="selected">里程碑</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 状态" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right:10px;width:35px;">
|
<select class="fl my_issues_filter" disabled="disabled" style="width: 60px;padding-left: 10px;text-align: left;" id="issue_filter_status">
|
||||||
<option value="0" selected="selected">状态</option>
|
<option value="0" selected="selected">状态</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 完成度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
|
<select class="fl my_issues_filter" disabled="disabled" style="width: 50px;text-align: left;">>
|
||||||
<option value="0" selected="selected">完成度</option>
|
<option value="0" selected="selected">完成度</option>
|
||||||
</select>
|
</select>
|
||||||
<select placeholder=" 排序" class="fl my_issues_filter" disabled="disabled" style="width:50px;visibility:hidden;margin-left: 0px;margin-right: 0px;">
|
|
||||||
<option value="0" selected="selected">排序</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1384,6 +1384,8 @@ RedmineApp::Application.routes.draw do
|
||||||
get "switch_role"
|
get "switch_role"
|
||||||
get 'search_not_group_member'
|
get 'search_not_group_member'
|
||||||
post 'add_members'
|
post 'add_members'
|
||||||
|
get 'search_course_teacher_list'
|
||||||
|
post 'change_manager'
|
||||||
get 'delete_member'
|
get 'delete_member'
|
||||||
get 'archive_course'
|
get 'archive_course'
|
||||||
get 'set_invite_code_halt'
|
get 'set_invite_code_halt'
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class UpdateAppliedMessagesStatus < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
sql = "update applied_messages set status = 1 where applied_id in(2495, 2496, 2497)"
|
||||||
|
execute(sql)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
|
@ -1,12 +1,12 @@
|
||||||
class CreateTrainingTasks < ActiveRecord::Migration
|
class CreateTrainingTasks < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
create_table :training_tasks do |t|
|
create_table :training_tasks do |t|
|
||||||
t.integer :project_id
|
t.integer :project_id
|
||||||
t.integer :tracker_id
|
t.integer :tracker_id
|
||||||
t.string :subject
|
t.string :subject
|
||||||
t.text :description
|
t.text :description
|
||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class AddAuthorIdToTrainingTasks < ActiveRecord::Migration
|
class AddAuthorIdToTrainingTasks < ActiveRecord::Migration
|
||||||
def change
|
def change
|
||||||
add_column :training_tasks, :author_id, :integer
|
add_column :training_tasks, :author_id, :integer
|
||||||
add_column :training_tasks, :status, :integer, :limit => 1, :default => 1
|
add_column :training_tasks, :status, :integer, :limit => 1, :default => 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
class DeleteExcessStudentWorks < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
homework = HomeworkCommon.where(:id => 4818)
|
||||||
|
unless homework.empty?
|
||||||
|
homework = homework.first
|
||||||
|
homework.course.student.each do |student|
|
||||||
|
student_works = homework.student_works.where(:user_id => student.student_id).reorder("created_at asc")
|
||||||
|
if student_works.count > 1
|
||||||
|
if student_works.first.work_status != 0
|
||||||
|
student_works.last.destroy
|
||||||
|
elsif student_works.last.work_status != 0
|
||||||
|
student_works.first.destroy
|
||||||
|
else
|
||||||
|
student_works.first.destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
|
@ -101,7 +101,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
||||||
.mw380 {max-width: 380px !important;}.mw400 {max-width: 400px !important;}.mw450 {max-width: 450px !important;}.mw550 {max-width: 550px !important;}
|
.mw380 {max-width: 380px !important;}.mw400 {max-width: 400px !important;}.mw450 {max-width: 450px !important;}.mw550 {max-width: 550px !important;}
|
||||||
.mt-20 {margin-top:-20px;}.mt-10 {margin-top:-10px;}.mt-4 {margin-top:-4px;}.mt-5 {margin-top:-5px;}.mt-2 {margin-top:-2px;}.mt0 {margin-top: 0px !important;}
|
.mt-20 {margin-top:-20px;}.mt-10 {margin-top:-10px;}.mt-4 {margin-top:-4px;}.mt-5 {margin-top:-5px;}.mt-2 {margin-top:-2px;}.mt0 {margin-top: 0px !important;}
|
||||||
.mt1{margin-top: 1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7 {margin-top:7px;}
|
.mt1{margin-top: 1px;}.mt2{ margin-top:2px;}.mt3{ margin-top:3px;}.mt4{ margin-top:4px;}.mt5{ margin-top:5px;}.mt6{ margin-top:6px;}.mt7 {margin-top:7px;}
|
||||||
.mt8{ margin-top:8px !important;}.mt9{ margin-top:9px !important;}.mt10{ margin-top:10px !important;}.mt12 { margin-top:12px !important;}
|
.mt8{ margin-top:8px !important;}.mt9{ margin-top:9px !important;}.mt10{ margin-top:10px !important;}.mt12 { margin-top:12px !important;}.mt14 {margin-top:14px;}
|
||||||
.mt15 {margin-top:15px;}.mt16{ margin-top:16px !important;}.mt19 {margin-top:19px !important;}.mt20{margin-top: 20px;}.mt28 {margin-top:28px;}.mt30{ margin-top: 30px;}
|
.mt15 {margin-top:15px;}.mt16{ margin-top:16px !important;}.mt19 {margin-top:19px !important;}.mt20{margin-top: 20px;}.mt28 {margin-top:28px;}.mt30{ margin-top: 30px;}
|
||||||
.mt35 {margin-top:35px;}.mt40{ margin-top: 40px;}.mt45{ margin-top: 45px;}.mt50{ margin-top:50px;}.mt100{ margin-top:100px;}.mb0 {margin-bottom: 0px !important;}.mb4{ margin-bottom:4px;}
|
.mt35 {margin-top:35px;}.mt40{ margin-top: 40px;}.mt45{ margin-top: 45px;}.mt50{ margin-top:50px;}.mt100{ margin-top:100px;}.mb0 {margin-bottom: 0px !important;}.mb4{ margin-bottom:4px;}
|
||||||
.mb5{ margin-bottom:5px;}.mb8 {margin-bottom:8px !important;}.pb5{ padding-bottom: 5px;}.mb10{ margin-bottom:10px !important;}.mb12 {margin-bottom:12px !important;}
|
.mb5{ margin-bottom:5px;}.mb8 {margin-bottom:8px !important;}.pb5{ padding-bottom: 5px;}.mb10{ margin-bottom:10px !important;}.mb12 {margin-bottom:12px !important;}
|
||||||
|
|
|
@ -363,7 +363,12 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
|
||||||
.issues_nav_hover{border-bottom:3px solid #3498db; font-weight:bold; }
|
.issues_nav_hover{border-bottom:3px solid #3498db; font-weight:bold; }
|
||||||
.issues_nav_nomall {border-bottom:none; }
|
.issues_nav_nomall {border-bottom:none; }
|
||||||
.issues_nav_tag{ background-color:#eaeaea; padding:2px 8px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;}
|
.issues_nav_tag{ background-color:#eaeaea; padding:2px 8px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;}
|
||||||
.issues_form_filter{ position: absolute; top:0; right: 0;}
|
.my_issues_form_filter{ position: absolute; top:0; right: 0; width:520px}
|
||||||
|
.my_issues_form_filter select{ width:70px; height:30px; border:none; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center}
|
||||||
|
.my_issues_form_filter select:focus,.issues_form_filter input:focus{border:none; }
|
||||||
|
.my_issues_form_filter select.my_issues_filter{ background:none; width:50px; padding: 0px}
|
||||||
|
.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("/images/new_project/arrow.png") no-repeat scroll right center transparent;}.issues_form_filter{ position: absolute; top:0; right: 0;}
|
||||||
|
|
||||||
.issues_form_filter select{ width:70px; height:30px; border:none; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; padding-right:10px; background-color:#fff; margin-bottom: 10px; color: #888;}
|
.issues_form_filter select{ width:70px; height:30px; border:none; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; padding-right:10px; background-color:#fff; margin-bottom: 10px; color: #888;}
|
||||||
.issues_form_filter select.issues_filter_select_min{width:50px; }
|
.issues_form_filter select.issues_filter_select_min{width:50px; }
|
||||||
.issues_form_filter select:focus,.issues_form_filter input:focus{border:none; }
|
.issues_form_filter select:focus,.issues_form_filter input:focus{border:none; }
|
||||||
|
@ -373,7 +378,7 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
|
||||||
.issues_form_filter select::-ms-expand { display: none; }
|
.issues_form_filter select::-ms-expand { display: none; }
|
||||||
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
||||||
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -29px 9px no-repeat; }
|
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -29px 9px no-repeat; }
|
||||||
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
|
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8; position: relative;}
|
||||||
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
|
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
|
||||||
a.issues_list_title{ color:#444; max-width:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
a.issues_list_title{ color:#444; max-width:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
||||||
a:hover.issues_list_title{color:#3b94d6;}
|
a:hover.issues_list_title{color:#3b94d6;}
|
||||||
|
@ -431,7 +436,7 @@ a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
|
||||||
.table-td-w180{display:inline-block;with:180px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
.table-td-w180{display:inline-block;with:180px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||||
.table-td-w380{display:inline-block;with:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
.table-td-w380{display:inline-block;with:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||||
/*项目简介*/
|
/*项目简介*/
|
||||||
.pro_new_info{ border:1px solid #ddd; background-color:#fff;}
|
.pro_new_info{ border:1px solid #ddd; background-color:#fff; width:100%;}
|
||||||
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
|
.pro_new_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
|
||||||
.pro_description_new_info{ border:1px solid #ddd; background-color:#fff;}
|
.pro_description_new_info{ border:1px solid #ddd; background-color:#fff;}
|
||||||
/*.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px}*/
|
/*.pro_new_info p{ padding-bottom:2px; padding-left: 15px; color: #666; padding-right: 5px}*/
|
||||||
|
@ -485,7 +490,7 @@ p.pro_new_grey{ line-height: 1.9; }
|
||||||
.new_roadmap_type_hover{color: #fff;}
|
.new_roadmap_type_hover{color: #fff;}
|
||||||
.new_roadmap_nav_tagnomal{ background-color:#eaeaea; padding:0px 5px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;}
|
.new_roadmap_nav_tagnomal{ background-color:#eaeaea; padding:0px 5px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;}
|
||||||
.new_roadmap_nav_taghover{ padding:0px 5px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;background: #6bb1e5; color: #fff;}
|
.new_roadmap_nav_taghover{ padding:0px 5px;-webkit-border-radius:15px;-moz-border-radius:15px;-o-border-radius:15px;border-radius:15px; font-size:12px;background: #6bb1e5; color: #fff;}
|
||||||
.new_roadmap_listbox{ padding:15px;border-bottom:1px solid #dbdbdb;}
|
.new_roadmap_listbox{width: 970px; padding:15px;border-bottom:1px solid #dbdbdb;}
|
||||||
.new_roadmap_listbox_commit{ padding:15px;}
|
.new_roadmap_listbox_commit{ padding:15px;}
|
||||||
.new_roadmap_listtitle a{ color: #333;display:block;max-width:800px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
.new_roadmap_listtitle a{ color: #333;display:block;max-width:800px; overflow:hidden;white-space: nowrap; text-overflow:ellipsis;}
|
||||||
.new_roadmap_listtitle a:hover{ color:#3498db;}
|
.new_roadmap_listtitle a:hover{ color:#3498db;}
|
||||||
|
@ -582,10 +587,6 @@ select.issues_filter_active { font-weight: bold; color: #333;}
|
||||||
.issues_list_txt li.issues_list_max{ width:90px }
|
.issues_list_txt li.issues_list_max{ width:90px }
|
||||||
.btn_newpro_grey{display: inline-block;color: #7b7b7b; border:1px solid #dbdbdb;background:#fff;text-align: center;font-size: 12px; padding:0 15px; height:24px; line-height: 24px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;}
|
.btn_newpro_grey{display: inline-block;color: #7b7b7b; border:1px solid #dbdbdb;background:#fff;text-align: center;font-size: 12px; padding:0 15px; height:24px; line-height: 24px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;}
|
||||||
a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
|
a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
|
||||||
.my_issues_form_filter{ position: absolute; top:0; right: 0;}
|
|
||||||
.my_issues_form_filter select{ width:70px; height:30px; border:none; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center}
|
|
||||||
.my_issues_form_filter select.issues_filter_select_min{width:50px; }
|
|
||||||
.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;}
|
|
||||||
/* 版本库分析20170103byLB*/
|
/* 版本库分析20170103byLB*/
|
||||||
#conbox {font-size: 12px; width:100%;}
|
#conbox {font-size: 12px; width:100%;}
|
||||||
#tags {padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; height: 30px}
|
#tags {padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px; height: 30px}
|
||||||
|
|
|
@ -918,6 +918,7 @@ a.syllabusbox_a_blue{ color:#3b94d6;}
|
||||||
.popup_tip_box { position: relative; padding: 5px 10px; white-space: nowrap; background-color: #FFFEF4; border:1px solid #F3DDB3;}
|
.popup_tip_box { position: relative; padding: 5px 10px; white-space: nowrap; background-color: #FFFEF4; border:1px solid #F3DDB3;}
|
||||||
.popup_tip_box em { display: block; border-width: 9px; position: absolute; top: 5px; left: -18px; border-style: dashed solid dashed dashed; border-color: transparent #F3DDB3 transparent transparent; font-size: 0; line-height: 0;}
|
.popup_tip_box em { display: block; border-width: 9px; position: absolute; top: 5px; left: -18px; border-style: dashed solid dashed dashed; border-color: transparent #F3DDB3 transparent transparent; font-size: 0; line-height: 0;}
|
||||||
.popup_tip_box span { display: block; border-width: 9px;position: absolute; top: 5px; left: -17px; border-style: dashed solid dashed dashed;border-color: transparent #FFFEF4 transparent transparent; font-size: 0; line-height: 0; }
|
.popup_tip_box span { display: block; border-width: 9px;position: absolute; top: 5px; left: -17px; border-style: dashed solid dashed dashed;border-color: transparent #FFFEF4 transparent transparent; font-size: 0; line-height: 0; }
|
||||||
|
.popup_tip_box>p{ line-height: 20px !important;}
|
||||||
/*模拟title*/
|
/*模拟title*/
|
||||||
.simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;}
|
.simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;}
|
||||||
/*项目创建*/
|
/*项目创建*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe TrainingTasksController, :type => :controller do
|
RSpec.describe TrainingTasksController, :type => :controller do
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :training_task do
|
factory :training_task do
|
||||||
project_id 1
|
project_id 1
|
||||||
tracker_id 1
|
tracker_id 1
|
||||||
subject "MyString"
|
subject "MyString"
|
||||||
description "MyText"
|
description "MyText"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
RSpec.describe TrainingTask, :type => :model do
|
RSpec.describe TrainingTask, :type => :model do
|
||||||
pending "add some examples to (or delete) #{__FILE__}"
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue