Merge branch 'develop' into cxt_course
This commit is contained in:
commit
b805fdc666
|
@ -1,3 +1,4 @@
|
|||
# encoding: utf-8
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
#
|
||||
|
@ -685,6 +686,61 @@ class ApplicationController < ActionController::Base
|
|||
:content_type => 'application/atom+xml'
|
||||
end
|
||||
|
||||
def issue_ratio_change done_ratio, status_id
|
||||
if done_ratio == 100 || status_id == 3
|
||||
"已完成"
|
||||
else
|
||||
done_ratio.to_s + "%"
|
||||
end
|
||||
end
|
||||
|
||||
def issue_priority_change priority_id
|
||||
case priority_id
|
||||
when 1
|
||||
"低"
|
||||
when 2
|
||||
"正常"
|
||||
when 3
|
||||
"高"
|
||||
when 4
|
||||
"紧急"
|
||||
when 5
|
||||
"立即"
|
||||
end
|
||||
end
|
||||
|
||||
def issue_status_change status_id
|
||||
case status_id
|
||||
when 1
|
||||
"新增"
|
||||
when 2
|
||||
"正在解决"
|
||||
when 3
|
||||
"已解决"
|
||||
when 4
|
||||
"反馈"
|
||||
when 5
|
||||
"关闭"
|
||||
when 6
|
||||
"拒绝"
|
||||
end
|
||||
end
|
||||
|
||||
def issue_tracker_change tracker_id
|
||||
case tracker_id
|
||||
when 1
|
||||
"缺陷"
|
||||
when 2
|
||||
"功能"
|
||||
when 3
|
||||
"支持"
|
||||
when 4
|
||||
"任务"
|
||||
when 5
|
||||
"周报"
|
||||
end
|
||||
end
|
||||
|
||||
def self.accept_rss_auth(*actions)
|
||||
if actions.any?
|
||||
self.accept_rss_auth_actions = actions
|
||||
|
|
|
@ -379,6 +379,7 @@ class CoursesController < ApplicationController
|
|||
@no_group_count = @members_count - @course.members.where("course_group_id != 0").count
|
||||
@mem_pages = Paginator.new @members_count, @limit, @page
|
||||
@members = paginateHelper @all_members, @limit
|
||||
@left_nav_type = 9
|
||||
else
|
||||
render_403
|
||||
return
|
||||
|
@ -1202,7 +1203,7 @@ class CoursesController < ApplicationController
|
|||
|
||||
#统计
|
||||
def statistics_course
|
||||
@left_nav_type = 9
|
||||
@left_nav_type = 10
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_courses'}
|
||||
end
|
||||
|
@ -1283,18 +1284,18 @@ class CoursesController < ApplicationController
|
|||
WHERE student_works.homework_common_id = homework_commons.id
|
||||
AND homework_commons.course_id = #{@course.id}
|
||||
AND student_works.user_id = members.user_id
|
||||
) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
) AS score,(SELECT max(message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id
|
||||
) AS act_score,(SELECT SUM(exercise_users.score) FROM exercise_users,exercises WHERE exercise_users.exercise_id = exercises.id
|
||||
AND exercises.course_id = #{@course.id} AND exercise_users.user_id = members.user_id) AS ex_score,
|
||||
(SELECT student_id FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT message_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT message_reply_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT news_reply_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT news_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT resource_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT journal_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT homework_journal_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT max(student_id) FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT max(message_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT max(message_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT max(news_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT max(news_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT max(resource_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT max(journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT max(homework_journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT COUNT(ss.id) FROM student_works AS ss ,homework_commons AS hc WHERE ss.homework_common_id = hc.id AND hc.course_id = #{@course.id} AND ss.work_status != 0 AND ss.user_id = members.user_id) AS homework_num,
|
||||
(SELECT COUNT(eu.id) FROM exercise_users AS eu,exercises WHERE eu.exercise_id = exercises.id AND exercises.course_id = #{@course.id} AND exercises.end_time >= eu.created_at AND eu.user_id = members.user_id) AS exercise_num
|
||||
FROM members
|
||||
|
@ -1308,18 +1309,18 @@ class CoursesController < ApplicationController
|
|||
WHERE student_works.homework_common_id = homework_commons.id
|
||||
AND homework_commons.course_id = #{@course.id}
|
||||
AND student_works.user_id = members.user_id
|
||||
) AS score,(SELECT (message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
) AS score,(SELECT max(message_num*2 + message_reply_num*1 + news_reply_num*1 + news_num*1 +
|
||||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id
|
||||
) AS act_score,(SELECT SUM(exercise_users.score) FROM exercise_users,exercises WHERE exercise_users.exercise_id = exercises.id
|
||||
AND exercises.course_id = #{@course.id} AND exercise_users.user_id = members.user_id) AS ex_score,
|
||||
(SELECT student_id FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT message_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT message_reply_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT news_reply_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT news_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT resource_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT journal_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT homework_journal_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT max(student_id) FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT max(message_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT max(message_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT max(news_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT max(news_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT max(resource_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT max(journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT max(homework_journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT COUNT(ss.id) FROM student_works AS ss ,homework_commons AS hc WHERE ss.homework_common_id = hc.id AND hc.course_id = #{@course.id} AND ss.work_status != 0 AND ss.user_id = members.user_id) AS homework_num,
|
||||
(SELECT COUNT(eu.id) FROM exercise_users AS eu,exercises WHERE eu.exercise_id = exercises.id AND exercises.course_id = #{@course.id} AND exercises.end_time >= eu.created_at AND eu.user_id = members.user_id) AS exercise_num
|
||||
FROM members
|
||||
|
@ -1337,14 +1338,14 @@ class CoursesController < ApplicationController
|
|||
resource_num*5 + journal_num*1 + homework_journal_num*1 ) FROM `course_contributor_scores` AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id
|
||||
) AS act_score,(SELECT SUM(exercise_users.score) FROM exercise_users,exercises WHERE exercise_users.exercise_id = exercises.id
|
||||
AND exercises.course_id = #{@course.id} AND exercise_users.user_id = members.user_id) AS ex_score,
|
||||
(SELECT student_id FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT message_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT message_reply_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT news_reply_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT news_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT resource_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT journal_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT homework_journal_num FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT max(student_id) FROM user_extensions WHERE user_extensions.user_id = members.user_id) AS student_id,
|
||||
(SELECT max(message_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_num,
|
||||
(SELECT max(message_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS message_reply_num,
|
||||
(SELECT max(news_reply_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_reply_num,
|
||||
(SELECT max(news_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS news_num,
|
||||
(SELECT max(resource_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS resource_num,
|
||||
(SELECT max(journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS journal_num,
|
||||
(SELECT max(homework_journal_num) FROM course_contributor_scores AS ccs WHERE ccs.course_id = #{@course.id} AND ccs.user_id = members.user_id) AS homework_journal_num,
|
||||
(SELECT COUNT(ss.id) FROM student_works AS ss ,homework_commons AS hc WHERE ss.homework_common_id = hc.id AND hc.course_id = #{@course.id} AND ss.work_status != 0 AND ss.user_id = members.user_id) AS homework_num,
|
||||
(SELECT COUNT(eu.id) FROM exercise_users AS eu,exercises WHERE eu.exercise_id = exercises.id AND exercises.course_id = #{@course.id} AND exercises.end_time >= eu.created_at AND eu.user_id = members.user_id) AS exercise_num
|
||||
FROM members
|
||||
|
@ -1383,27 +1384,32 @@ class CoursesController < ApplicationController
|
|||
#sheet1.row(0).default_format = blue
|
||||
#sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_class),l(:excel_f_score),l(:excel_commit_time)])
|
||||
sheet1[0,0] = "课程编号"
|
||||
sheet1[0,1] = course.id
|
||||
sheet1[1,0] = "课程学期"
|
||||
sheet1[1,1] = course.time.to_s+"年"+course.term
|
||||
sheet1[2,0] = "课程名称"
|
||||
sheet1[2,1] = course.name
|
||||
sheet1[3,0] = "教师团队"
|
||||
sheet1[3,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet1[4,0] = "主讲教师"
|
||||
sheet1[4,1] = course.teacher.show_name
|
||||
sheet1[5,0] = "排名"
|
||||
sheet1[5,1] = "学生姓名"
|
||||
sheet1[5,2] = "昵称"
|
||||
sheet1[5,3] = "学号"
|
||||
sheet1[0,1] = course.syllabus.id
|
||||
sheet1[1,0] = "课程名称"
|
||||
sheet1[1,1] = course.syllabus.title
|
||||
sheet1[2,0] = "班级编号"
|
||||
sheet1[2,1] = course.id
|
||||
sheet1[3,0] = "班级学期"
|
||||
sheet1[3,1] = course.time.to_s+"年"+course.term
|
||||
sheet1[4,0] = "班级名称"
|
||||
sheet1[4,1] = course.name
|
||||
sheet1[5,0] = "教师团队"
|
||||
sheet1[5,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet1[6,0] = "主讲教师"
|
||||
sheet1[6,1] = course.teacher.show_name
|
||||
sheet1[7,0] = "排名"
|
||||
sheet1[7,1] = "学生姓名"
|
||||
sheet1[7,2] = "昵称"
|
||||
sheet1[7,3] = "学号"
|
||||
for i in 0 ... homeworks.count
|
||||
sheet1[5,i+4] = "第"+(i+1).to_s+"次"
|
||||
sheet1[7,i+4] = "第"+(i+1).to_s+"次"
|
||||
end
|
||||
sheet1[5,homeworks.count+4] = "作业得分"
|
||||
sheet1[5,homeworks.count+5] = "测评得分"
|
||||
sheet1[5,homeworks.count+6] = "社区得分"
|
||||
sheet1[5,homeworks.count+7] = "总得分"
|
||||
count_row = 6
|
||||
sheet1[7,homeworks.count+4] = "作业得分"
|
||||
sheet1[7,homeworks.count+5] = "测评得分"
|
||||
sheet1[7,homeworks.count+6] = "社区得分"
|
||||
sheet1[7,homeworks.count+7] = "总得分"
|
||||
sheet1[7,homeworks.count+8] = "分班"
|
||||
count_row = 8
|
||||
members.each_with_index do |member, i|
|
||||
sheet1[count_row,0]= i+1
|
||||
sheet1[count_row,1] = member.user.lastname.to_s + member.user.firstname.to_s
|
||||
|
@ -1427,34 +1433,39 @@ class CoursesController < ApplicationController
|
|||
sheet1[count_row,homeworks.count+5] = ex_score
|
||||
sheet1[count_row,homeworks.count+6] = act_score
|
||||
sheet1[count_row,homeworks.count+7] = sum.round(2)
|
||||
sheet1[count_row,homeworks.count+8] = member.course_group_id == 0 ? "暂无" : member.course_group.name
|
||||
count_row += 1
|
||||
end
|
||||
|
||||
homeworks.each_with_index do |home, i|
|
||||
sheet = book.create_worksheet :name => "第#{i+1}次作业"
|
||||
sheet[0,0] = "课程编号"
|
||||
sheet[0,1] = course.id
|
||||
sheet[1,0] = "课程学期"
|
||||
sheet[1,1] = course.time.to_s+"年"+course.term
|
||||
sheet[2,0] = "课程名称"
|
||||
sheet[2,1] = course.name
|
||||
sheet[3,0] = "教师团队"
|
||||
sheet[3,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet[4,0] = "主讲教师"
|
||||
sheet[4,1] = course.teacher.show_name
|
||||
sheet[4,0] = "作业批次"
|
||||
sheet[4,1] = "第#{i+1}次作业"
|
||||
sheet[4,0] = "作业名称"
|
||||
sheet[4,1] = home.name
|
||||
sheet[0,1] = course.syllabus.id
|
||||
sheet[1,0] = "课程名称"
|
||||
sheet[1,1] = course.syllabus.title
|
||||
sheet[2,0] = "班级编号"
|
||||
sheet[2,1] = course.id
|
||||
sheet[3,0] = "班级学期"
|
||||
sheet[3,1] = course.time.to_s+"年"+course.term
|
||||
sheet[4,0] = "班级名称"
|
||||
sheet[4,1] = course.name
|
||||
sheet[5,0] = "教师团队"
|
||||
sheet[5,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet[6,0] = "主讲教师"
|
||||
sheet[6,1] = course.teacher.show_name
|
||||
sheet[6,0] = "作业批次"
|
||||
sheet[6,1] = "第#{i+1}次作业"
|
||||
sheet[6,0] = "作业名称"
|
||||
sheet[6,1] = home.name
|
||||
if home.homework_type == 1 #普通作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
count_row = 8
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0]= j + 1
|
||||
|
@ -1480,13 +1491,13 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
elsif home.homework_type == 2 #编程作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
count_row = 8
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0]= j + 1
|
||||
|
@ -1513,13 +1524,13 @@ class CoursesController < ApplicationController
|
|||
end
|
||||
elsif home.homework_type == 3 #分组作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
sheet.row(7).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
count_row = 8
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0] = j + 1
|
||||
|
|
|
@ -58,65 +58,104 @@ class IssuesController < ApplicationController
|
|||
include ApplicationHelper
|
||||
|
||||
def index
|
||||
retrieve_query
|
||||
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
|
||||
sort_update(@query.sortable_columns)
|
||||
@query.sort_criteria = sort_criteria.to_a
|
||||
|
||||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
|
||||
|
||||
if @query.valid?
|
||||
case params[:format]
|
||||
when 'csv', 'pdf'
|
||||
@limit = 10#Setting.issues_export_limit.to_i
|
||||
when 'atom'
|
||||
@limit = 10#Setting.feeds_limit.to_i
|
||||
when 'xml', 'json'
|
||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||
else
|
||||
@limit = 10#per_page_option
|
||||
# 为了性能所有用了两种模式,issue的@query查询所有的没有优势
|
||||
# 但是对过滤条件很有有时
|
||||
if params[:set_filter] != "1"
|
||||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
|
||||
if User.current.member_of?(@project)
|
||||
@issues_filter = Issue.where(:project_id => @project.id).order('updated_on desc')
|
||||
else
|
||||
@issues_filter = Issue.where(:project_id => @project.id, :is_private => 0).order('updated_on desc')
|
||||
end
|
||||
@assign_to_id = params[:assigned_to_id]
|
||||
@author_id = params[:author_id]
|
||||
@priority_id = params[:priority_id]
|
||||
@status_id = params[:status_id]
|
||||
@subject = params[:subject]
|
||||
@done_ratio = params[:done_ratio]
|
||||
@issue_count = @query.issue_count
|
||||
@issue_pages = Paginator.new @issue_count, @limit, params['page']
|
||||
params[:page] = (params[:page] || 1).to_i + 1 #页码需要加1
|
||||
open_and_close_num(@project)
|
||||
@issue_count = @issues_filter.count
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||
@offset ||= @issue_pages.offset
|
||||
@issues = @query.issues(:include => [:assigned_to, :tracker, :priority, :category, :fixed_version],
|
||||
:order => 'issues.updated_on desc',
|
||||
:offset => @offset,
|
||||
:limit => @limit)
|
||||
if params[:set_filter]
|
||||
@set_filter = params[:set_filter]
|
||||
end
|
||||
@issue_count_by_group = @query.issue_count_by_group
|
||||
@issues = paginateHelper @issues_filter, @limit
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
|
||||
format.api {
|
||||
Issue.load_visible_relations(@issues) if include_in_api_response?('relations')
|
||||
format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')}
|
||||
format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls"
|
||||
send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||
}
|
||||
# format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json}
|
||||
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
|
||||
format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') }
|
||||
format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') }
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render(:template => 'issues/index', :layout => @project_base_tag) }#by young
|
||||
format.any(:atom, :csv, :pdf) { render(:nothing => true) }
|
||||
format.api { render_validation_errors(@query) }
|
||||
format.js
|
||||
retrieve_query
|
||||
sort_init(@query.sort_criteria.empty? ? [['id', 'desc']] : @query.sort_criteria)
|
||||
sort_update(@query.sortable_columns)
|
||||
@query.sort_criteria = sort_criteria.to_a
|
||||
@project_base_tag = (params[:project_id] || @issue.project) ? 'base_projects':'base'
|
||||
if @query.valid?
|
||||
@tracker_id = params[:tracker_id]
|
||||
@assign_to_id = params[:assigned_to_id]
|
||||
@author_id = params[:author_id]
|
||||
@status_id = params[:status_id]
|
||||
@subject = params[:subject]
|
||||
@done_ratio = params[:done_ratio]
|
||||
@fixed_version_id = params[:fixed_version_id]
|
||||
@issue_count = @query.issue_count
|
||||
@test = params[:test]
|
||||
@project_sort = 'issues.updated_on desc'
|
||||
if params[:test] != "0"
|
||||
case @test
|
||||
when "1"
|
||||
@project_sort = 'issues.created_on desc'
|
||||
when "2"
|
||||
@project_sort = 'issues.created_on asc'
|
||||
when "3"
|
||||
@project_sort = 'issues.updated_on desc'
|
||||
when "4"
|
||||
@project_sort = 'issues.updated_on asc'
|
||||
end
|
||||
end
|
||||
open_and_close_num(@project)
|
||||
@issues_filter_assign_count = @query.issues.select{|issue| issue.assigned_to_id == User.current.id }.count
|
||||
@issues_filter_author_count = @query.issues.select{|issue| issue.author_id == User.current.id }.count
|
||||
@issues_filter = @query.issues(:order => @project_sort)
|
||||
@limit = 10
|
||||
@is_remote = true
|
||||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||
@offset ||= @issue_pages.offset
|
||||
@issues = paginateHelper @issues_filter, @limit
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html { render :template => 'issues/index', :layout => @project_base_tag }#by young
|
||||
format.api {Issue.load_visible_relations(@issues) if include_in_api_response?('relations')}
|
||||
# format.json { render :json => @issues.map { |issue| issue.to_json}} #:json => @issues.map { |issue| issue.to_json}
|
||||
format.atom { render_feed(@issues, :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") }
|
||||
format.csv { send_data(query_to_csv(@issues, @query, params), :type => 'text/csv; header=present', :filename => 'issues.csv') }
|
||||
format.pdf { send_data(issues_to_pdf(@issues, @project, @query), :type => 'application/pdf', :filename => 'issues.pdf') }
|
||||
format.xls {filename = "#{@project.name.to_s}_#{l(:label_issue_list_xls)}.xls"
|
||||
send_data(issue_list_xls(@issues_filter), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||
}
|
||||
end
|
||||
else
|
||||
respond_to do |format|
|
||||
format.html { render(:template => 'issues/index', :layout => @project_base_tag) }#by young
|
||||
format.any(:atom, :csv, :pdf) { render(:nothing => true) }
|
||||
format.api { render_validation_errors(@query) }
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
render_404
|
||||
end
|
||||
|
||||
# 获取issue的开启统计数
|
||||
def open_and_close_num project
|
||||
if User.current.member_of?(project)
|
||||
@issue_open_count = Issue.where("project_id=#{project.id} and status_id in (1,2,3,4,6)").count
|
||||
@issue_close_count = Issue.where(:project_id => project.id, :status_id => 5 ).count
|
||||
else
|
||||
@issue_open_count = Issue.where("project_id=#{project.id} and status_id in (1,2,3,4,6) and is_private = 0").count
|
||||
@issue_close_count = Issue.where(:project_id => project.id, :status_id => 5, :is_private => 0).count
|
||||
end
|
||||
end
|
||||
|
||||
def show
|
||||
# 打开编辑内容
|
||||
@is_edit = true unless params[:edit].nil?
|
||||
|
|
|
@ -34,7 +34,7 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
before_filter :find_project_by_project_id, :only => [:new, :create, :newrepo, :stats, :quality_analysis]
|
||||
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
|
||||
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked, :project_archive]
|
||||
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo, :to_gitlab, :forked, :project_archive, :export_rep_static]
|
||||
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
||||
before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :commit_diff, :project_archive, :quality_analysis]
|
||||
# 链接gitlab
|
||||
|
@ -69,6 +69,20 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
end
|
||||
|
||||
def export_rep_static
|
||||
@project = Project.find(params[:id])
|
||||
gpid = @project.gpid
|
||||
rev = params[:rev]
|
||||
cycle = params[:cycle]
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.xls{
|
||||
filename = "#{@project.name.to_s}_#{l(:label_rep_xls)}.xls"
|
||||
send_data(export_rep_xls(gpid, :rev => rev, :cycle => "1"), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
def forked
|
||||
@project = Project.find(params[:id])
|
||||
@repository = Repository.where("project_id =? and type =?", @project.id, "Repository::Gitlab")
|
||||
|
|
|
@ -106,13 +106,13 @@ class StudentWorkController < ApplicationController
|
|||
rescue Timeout::Error
|
||||
tEndtime = Time.now
|
||||
tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000
|
||||
logger.debug "program_test_ex user wait time = #{tUsedtime} 毫秒"
|
||||
logger.info "program_test_ex user wait time = #{tUsedtime} 毫秒"
|
||||
#status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时
|
||||
resultObj[:status] = -3
|
||||
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id)
|
||||
rescue => e
|
||||
#-4 judge代码 出错
|
||||
logger.debug "program_test_error #{e}"
|
||||
logger.info "program_test_error #{e}"
|
||||
resultObj[:status] = -4
|
||||
tmpstatus = -4
|
||||
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id)
|
||||
|
@ -217,7 +217,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
rescue
|
||||
#-5 program_test_ex 函数出错
|
||||
logger.debug "program_test_error 2"
|
||||
logger.info "program_test_error 2"
|
||||
resultObj[:status] = -5
|
||||
tmpstatus = -5
|
||||
CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id)
|
||||
|
|
|
@ -53,7 +53,6 @@ class VersionsController < ApplicationController
|
|||
@offset ||= @versions_pages.offset
|
||||
@versions = @versions.slice(@offset, @limit)
|
||||
#end by young
|
||||
|
||||
|
||||
@issues_by_version = {}
|
||||
if @selected_tracker_ids.any? && @versions.any?
|
||||
|
@ -81,6 +80,11 @@ class VersionsController < ApplicationController
|
|||
all
|
||||
}
|
||||
format.api
|
||||
# format.xls {
|
||||
# @issues = @version.fixed_issues.visible.includes(:status, :tracker, :priority).reorder("#{Tracker.table_name}.position, #{Issue.table_name}.id").all
|
||||
# filename = "#{@version.name.to_s}_#{l(:label_issue_list_xls)}.xls"
|
||||
# send_data(issue_list_xls(@issues), :type => 'application/octet-stream', :filename => filename_for_content_disposition(filename))
|
||||
# }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -63,6 +63,69 @@ module ApplicationHelper
|
|||
result
|
||||
end
|
||||
|
||||
# 项目版本库导出Excel功能
|
||||
def export_rep_xls(gpid, options = {})
|
||||
g = Gitlab.client
|
||||
cycle = params[:cycle]
|
||||
rev = params[:rev]
|
||||
if cycle == "week"
|
||||
statics = g.rep_stats_week(gpid, :rev => rev)
|
||||
elsif cycle == "month"
|
||||
statics = g.rep_stats_month(gpid, :rev => rev)
|
||||
end
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
sheet1 = book.create_worksheet :name => "版本库"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
sheet1.row(0).concat([l(:rep_branch),l(:rep_author),l(:rep_changeset),l(:rep_code_add),l(:rep_code_delete),l(:rep_code_modified),l(:rep_sode_time),l(:rep_sode_cycle),l(:rep_author_mail)])
|
||||
count_row = 1
|
||||
statics.each do |static|
|
||||
user = User.where(:mail => static.email).first
|
||||
sheet1[count_row,0] = rev
|
||||
sheet1[count_row,1] = user.nil? ? static.uname : user.show_name
|
||||
sheet1[count_row,2] = static.commits_num
|
||||
sheet1[count_row,3] = static.add
|
||||
sheet1[count_row,4] = static.del
|
||||
sheet1[count_row,5] = static.changes
|
||||
sheet1[count_row,6] = Time.now.strftime('%Y-%m-%d %H:%M:%S')
|
||||
sheet1[count_row,7] = cycle == "week" ? "最近1周" : "最近一月"
|
||||
sheet1[count_row,8] = static.email
|
||||
count_row += 1
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
end
|
||||
|
||||
# 项目issue列表导出Excel功能
|
||||
def issue_list_xls issues
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
sheet1 = book.create_worksheet :name => "issues"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
sheet1.row(0).concat([l(:issue_xls_id),l(:issue_xls_tracker_id),l(:issue_xls_title),l(:issue_xls_description),l(:issue_xls_status),l(:issue_xls_assign),l(:issue_xls_priority),l(:issue_xls_author),l(:issue_xls_created_at),l(:milestone),l(:issue_xls_start),l(:issue_xls_due),l(:issue_xls_ratio)])
|
||||
count_row = 1
|
||||
issues.each do |issue|
|
||||
sheet1[count_row,0] = issue.id
|
||||
sheet1[count_row,1] = issue_tracker_change(issue.tracker_id)
|
||||
sheet1[count_row,2] = issue.subject
|
||||
sheet1[count_row,3] = (issue.description.gsub(/<\/?.*?>/,"")).html_safe
|
||||
sheet1[count_row,4] = issue_status_change(issue.status_id)
|
||||
sheet1[count_row,5] = issue.assigned_to.try(:show_name)
|
||||
sheet1[count_row,6] = issue_priority_change(issue.priority_id)
|
||||
sheet1[count_row,7] = issue.author.show_name
|
||||
sheet1[count_row,8] = issue.created_on.nil? ? issue.created_on : issue.created_on.strftime('%Y-%m-%d %H:%M:%S')
|
||||
sheet1[count_row,9] = issue.fixed_version.try(:name)
|
||||
sheet1[count_row,10] = issue.start_date.nil? ? issue.start_date : issue.start_date.strftime('%Y-%m-%d')
|
||||
sheet1[count_row,11] = issue.due_date.nil? ? issue.due_date : issue.due_date.strftime('%Y-%m-%d')
|
||||
sheet1[count_row,12] = issue_ratio_change(issue.done_ratio, issue.status_id)
|
||||
count_row += 1
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
end
|
||||
|
||||
# 获取用户单位
|
||||
# 优先获取高校信息,如果改信息不存在则获取occupation
|
||||
def get_occupation_from_user user
|
||||
|
@ -1799,7 +1862,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def link_to_function(name, function, html_options={})
|
||||
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(:class => " c_purple"))
|
||||
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(:class => "BlueCirBtnMini ml10",:style => "display:inline-block; height:20px; line-height:20px;"))
|
||||
end
|
||||
|
||||
def link_to_function_none(name, function, html_options={})
|
||||
content_tag(:a, name, {:href => '#', :onclick => "#{function}; return false;"}.merge(:style => "display:inline-block; height:20px; line-height:20px;"))
|
||||
end
|
||||
|
||||
# Helper to render JSON in views
|
||||
|
@ -1821,8 +1888,8 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def check_all_links(form_name)
|
||||
link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + " ".html_safe + " | "+ " ".html_safe +
|
||||
link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
||||
link_to_function_none(l(:button_check_all), "checkAll('#{form_name}', true)") + " ".html_safe + " | "+ " ".html_safe +
|
||||
link_to_function_none(l(:button_uncheck_all), "checkAll('#{form_name}', false)")
|
||||
end
|
||||
|
||||
# 本次修改,修改为只显示关闭的所占%比
|
||||
|
|
|
@ -57,6 +57,15 @@ module IssuesHelper
|
|||
"<strong>#{@cached_label_priority}</strong>: #{h(issue.priority.name)}".html_safe
|
||||
end
|
||||
|
||||
def states_done_ratio(issue)
|
||||
done_ratio = issue.done_ratio
|
||||
if done_ratio == 100
|
||||
"<span class='c_green' style='display:inline-block;'>#{l(:label_done_ratio_endding)}</span>".html_safe
|
||||
else
|
||||
"<span class='c_orange' style='display:inline-block;'>#{l(:label_done_ratio_doing)}</span>".html_safe
|
||||
end
|
||||
end
|
||||
|
||||
def issue_heading(issue)
|
||||
#h("#{issue.tracker} ##{issue.id}")
|
||||
# h("#{issue.tracker} #{issue.source_from}")
|
||||
|
@ -117,6 +126,11 @@ module IssuesHelper
|
|||
end
|
||||
end
|
||||
|
||||
def options_for_version_isuue_list(project)
|
||||
versions = Version.where(:project_id => project, :status => "open").map{|version| [version.name, version.id]}.unshift(["里程碑", 0])
|
||||
end
|
||||
|
||||
|
||||
def render_issue_subject_with_tree(issue)
|
||||
s = ''
|
||||
ancestors = issue.root? ? [] : issue.ancestors.visible.all
|
||||
|
|
|
@ -255,16 +255,20 @@ module QueriesHelper
|
|||
# Give it a name, required to be valid
|
||||
@query = IssueQuery.new(:name => "_")
|
||||
@query.project = @project
|
||||
params[:f] = %w(subject status_id priority_id author_id assigned_to_id created_on) unless params[:status_id].nil?
|
||||
params[:f] = %w(subject tracker_id status_id done_ratio author_id assigned_to_id fixed_version_id created_on) unless params[:status_id].nil?
|
||||
params[:op] = {'subject' => "~" ,
|
||||
'status_id' => ( params[:status_id] == '0' ? "!":"=" ),
|
||||
'priority_id' => ( params[:priority_id] == '0' ? "!":"=" ),
|
||||
'author_id' => ( params[:author_id] == '0' ? "!":"=" ),
|
||||
'author_id' =>(params[:author_id] == '0' ? "!":"=" ),
|
||||
'done_ratio' => ( params[:done_ratio]== '-1' ? "!":"="),
|
||||
'tracker_id' => ( params[:tracker_id] == '0' ? "!":"=" ),
|
||||
'fixed_version_id' => ( params[:fixed_version_id] == '0' ? "!":"=" ),
|
||||
'assigned_to_id' => ( params[:assigned_to_id] == '0' ? "!":"=" )} unless params[:status_id].nil?
|
||||
params[:v] = {'subject' => [params[:subject]],
|
||||
'status_id' => [params[:status_id]],
|
||||
'priority_id' => [params[:priority_id]],
|
||||
'author_id' => [params[:author_id]],
|
||||
'done_ratio' => [params[:done_ratio]],
|
||||
'tracker_id' => [params[:tracker_id]],
|
||||
'fixed_version_id' => [params[:fixed_version_id]],
|
||||
'assigned_to_id' => [params[:assigned_to_id]]} unless params[:status_id].nil?
|
||||
if(params[:status_id] != nil)
|
||||
if( params[:issue_create_date_start]!=nil && params[:issue_create_date_start]!='' &&
|
||||
|
|
|
@ -344,7 +344,7 @@ module WatchersHelper
|
|||
def exit_project_link(project)
|
||||
link_to(l(:label_exit_project),exit_cur_project_path(project.id),
|
||||
:remote => true, :confirm => l(:lable_sure_exit_project),
|
||||
:class => "pr_join_a_quit" )
|
||||
:class => "sy_btn_grey mr5" )
|
||||
end
|
||||
|
||||
#项目关注、取消关注
|
||||
|
@ -361,8 +361,8 @@ module WatchersHelper
|
|||
:object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort))
|
||||
method = watched ? 'delete' : 'post'
|
||||
link_to text, url, :remote => true, :method => method,
|
||||
:class => "pr_join_a" ,:id=>id
|
||||
end
|
||||
:class => "sy_btn_pink mr5" ,:id=>id
|
||||
end
|
||||
|
||||
# 申请加入项目
|
||||
def join_in_project_link(project, user, options=[])
|
||||
|
@ -372,9 +372,9 @@ module WatchersHelper
|
|||
method = 'post'
|
||||
@applied_flag = project.instance_of?(Project)
|
||||
if applied
|
||||
link = "<a class ='pr_join_a'>#{text}</a>"
|
||||
link = "<a class ='sy_btn_pink mr5'>#{text}</a>"
|
||||
else
|
||||
link = link_to(text, url, :remote => true, :method => method, :id => "#{project.id}", :class => "pr_join_a")
|
||||
link = link_to(text, url, :remote => true, :method => method, :id => "#{project.id}", :class => "sy_btn_pink mr5")
|
||||
end
|
||||
link.html_safe
|
||||
# if applied
|
||||
|
|
|
@ -305,6 +305,11 @@ class Project < ActiveRecord::Base
|
|||
errors[:identifier].blank? && !(new_record? || identifier.blank?)
|
||||
end
|
||||
|
||||
# returns project's creater
|
||||
def creater
|
||||
User.find(self.user_id).try(:show_name)
|
||||
end
|
||||
|
||||
# returns latest created projects
|
||||
# non public projects will be returned only if user is a member of those
|
||||
def self.latest(user=nil, count=5)
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<p style="float:right;">
|
||||
<%= link_to_previous_month(@year, @month) %> | <%= link_to_next_month(@year, @month) %>
|
||||
</p>
|
||||
|
@ -40,3 +34,7 @@
|
|||
<% end %>
|
||||
|
||||
<% html_title(l(:label_calendar)) -%>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<table class="cal" style="width: 100%;table-layout: fixed;">
|
||||
<table id="calender" class="cal" style="width: 100%;table-layout: fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" title="<%= l(:label_week) %>" class="week-number"></th>
|
||||
|
@ -20,13 +20,13 @@
|
|||
<div class="<%= i.css_classes %> <%= 'starting' if day == i.start_date %> <%= 'ending' if day == i.due_date %> tooltip">
|
||||
<%= h("#{i.project} -") unless @project && @project == i.project %>
|
||||
<%= link_to_issue i, :truncate => 30 %>
|
||||
(<%= states_done_ratio i %>)
|
||||
<span class="tip"><%= render_issue_tooltip i %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<span class="icon icon-package">
|
||||
<%= h("#{i.project} -") unless @project && @project == i.project %>
|
||||
<%= link_to_version i%>
|
||||
</span>
|
||||
<span class="icon icon-package"></span>
|
||||
<%= h("#{i.project} -") unless @project && @project == i.project %>
|
||||
<%= link_to_version i%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.respond-form .reply_btn{margin-left:625px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
div.recall_con .reply_btn{margin-left:585px;margin-top:5px;}
|
||||
/*.ke-container{height: 80px !important;}*/
|
||||
</style>
|
||||
<%= content_for(:header_tags) do %>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<script >
|
||||
init_KindEditor_data('',80);
|
||||
</script>
|
||||
<div class="msg_box fl mb10" id='leave-message'>
|
||||
<div class="msg_box fl mb10" id='leave-message' style="width:730px;">
|
||||
<h4><%= l(:label_leave_message) %></h4>
|
||||
|
||||
<% if !User.current.logged?%>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="ping_dispic">
|
||||
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
|
||||
</div>
|
||||
<div class="ping_discon upload_img" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||
<div class="ping_discon upload_img" style="width: 670px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||
<div class="ping_distop f14">
|
||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span>
|
||||
|
|
|
@ -118,8 +118,8 @@
|
|||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option">
|
||||
<span class=""><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon" alt="编辑"></a>
|
||||
<span class="hidden" style="display:inline-block; vertical-align:middle; max-width:70px;"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon" alt="编辑" style="background-position:0 5px;"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
|
@ -178,14 +178,14 @@
|
|||
$(id).submit();
|
||||
}
|
||||
|
||||
$(".sum_score_tip").each(function(){
|
||||
$(".sy_new_table tr").each(function(){
|
||||
$(this).mouseenter(function(){
|
||||
$(".sy_tips_box_inner").hide();
|
||||
$(this).next().stop();
|
||||
$(this).next().show();
|
||||
$(this).children().eq(6).children().eq(1).stop();
|
||||
$(this).children().eq(6).children().eq(1).show();
|
||||
});
|
||||
$(this).mouseleave(function(){
|
||||
$(this).next().delay(500).hide(0);
|
||||
$(this).children().eq(6).children().eq(1).delay(500).hide(0);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if (User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin? %>
|
||||
<% group_count = @course.course_groups.count %>
|
||||
<% if show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
|
||||
<li>
|
||||
<%=link_to "分班", course_member_path(@course, :role => 2) %>
|
||||
</li>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<!-- <#%= stylesheet_link_tag 'css', :media => 'all' %> -->
|
||||
<div class="courseRSide fl">
|
||||
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= l(:label_contest_userresponse) %></h2>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% if @role == 1 %>
|
||||
<% if @role.to_i == 1 %>
|
||||
<div class="courseRSide fl" id="homework_page_right">
|
||||
<div class="project_r_h">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
|
||||
|
|
|
@ -1,321 +1,323 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2"><% @gantt.view = self %>
|
||||
<%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'gantts', :action => 'show',
|
||||
:project_id => @project, :month => params[:month],
|
||||
:year => params[:year], :months => params[:months]},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<fieldset id="filters" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||||
<div style="<%= @query.new_record? ? "" : "display: none;" %>">
|
||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
||||
<div style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_related_issues) %></legend>
|
||||
<label>
|
||||
<%= check_box_tag "draw_rels", params["draw_rels"], params[:set_filter].blank? || params[:draw_rels] %>
|
||||
<% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
|
||||
<% rels.each do |rel| %>
|
||||
<% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
|
||||
<%= content_tag(:span, ' '.html_safe,
|
||||
:style => "background-color: #{color}") %>
|
||||
<%= l(IssueRelation::TYPES[rel][:name]) %>
|
||||
<% end %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_gantt_progress_line) %></legend>
|
||||
<label>
|
||||
<%= check_box_tag "draw_progress_line", params[:draw_progress_line], params[:draw_progress_line] %>
|
||||
<%= l(:label_display) %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<p class="contextual">
|
||||
<%= gantt_zoom_link(@gantt, :in) %>
|
||||
<%= gantt_zoom_link(@gantt, :out) %>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
<%= text_field_tag 'months', @gantt.months, :size => 2 %>
|
||||
<%= l(:label_months_from) %>
|
||||
<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
|
||||
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
|
||||
<%= hidden_field_tag 'zoom', @gantt.zoom %>
|
||||
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()',
|
||||
:class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
|
||||
:class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%
|
||||
zoom = 1
|
||||
@gantt.zoom.times { zoom = zoom * 2 }
|
||||
|
||||
subject_width = 330
|
||||
header_height = 18
|
||||
|
||||
headers_height = header_height
|
||||
show_weeks = false
|
||||
show_days = false
|
||||
|
||||
if @gantt.zoom > 1
|
||||
show_weeks = true
|
||||
headers_height = 2 * header_height
|
||||
if @gantt.zoom > 2
|
||||
show_days = true
|
||||
headers_height = 3 * header_height
|
||||
end
|
||||
end
|
||||
|
||||
# Width of the entire chart
|
||||
g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
|
||||
@gantt.render(:top => headers_height + 8,
|
||||
:zoom => zoom,
|
||||
:g_width => g_width,
|
||||
:subject_width => subject_width)
|
||||
g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
|
||||
t_height = g_height + headers_height
|
||||
%>
|
||||
|
||||
<% if @gantt.truncated %>
|
||||
<p class="warning"><%= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p>
|
||||
<% end %>
|
||||
|
||||
<table style="width:100%; border:0; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="width:<%= subject_width %>px; padding:0px;">
|
||||
<%
|
||||
style = ""
|
||||
style += "position:relative;"
|
||||
style += "height: #{t_height + 24}px;"
|
||||
style += "width: #{subject_width + 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style) do %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{t_height}px;"
|
||||
style += 'border-left: 1px solid #c0c0c0;'
|
||||
style += 'overflow: hidden;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%= content_tag(:div, :class => "gantt_subjects") do %>
|
||||
<%= @gantt.subjects.html_safe %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
|
||||
<%
|
||||
style = ""
|
||||
style += "width: #{g_width - 1}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :class => "gantt_hdr") %>
|
||||
|
||||
<% ###### Months headers ###### %>
|
||||
<%
|
||||
month_f = @gantt.date_from
|
||||
left = 0
|
||||
height = (show_weeks ? header_height : header_height + g_height)
|
||||
%>
|
||||
<% @gantt.months.times do %>
|
||||
<%
|
||||
width = (((month_f >> 1) - month_f) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= link_to h("#{month_f.year}-#{month_f.month}"),
|
||||
@gantt.params.merge(:year => month_f.year, :month => month_f.month),
|
||||
:title => "#{month_name(month_f.month)} #{month_f.year}" %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
month_f = month_f >> 1
|
||||
%>
|
||||
<% end %>
|
||||
|
||||
<% ###### Weeks headers ###### %>
|
||||
<% if show_weeks %>
|
||||
<%
|
||||
left = 0
|
||||
height = (show_days ? header_height - 1 : header_height - 1 + g_height)
|
||||
%>
|
||||
<% if @gantt.date_from.cwday == 1 %>
|
||||
<%
|
||||
# @date_from is monday
|
||||
week_f = @gantt.date_from
|
||||
%>
|
||||
<% else %>
|
||||
<%
|
||||
# find next monday after @date_from
|
||||
week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
|
||||
width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe,
|
||||
:style => style, :class => "gantt_hdr") %>
|
||||
<% left = left + width + 1 %>
|
||||
<% end %>
|
||||
<% while week_f <= @gantt.date_to %>
|
||||
<%
|
||||
width = ((week_f + 6 <= @gantt.date_to) ?
|
||||
7 * zoom - 1 :
|
||||
(@gantt.date_to - week_f + 1) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= content_tag(:small) do %>
|
||||
<%= week_f.cweek if width >= 16 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
week_f = week_f + 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% ###### Days headers ####### %>
|
||||
<% if show_days %>
|
||||
<%
|
||||
left = 0
|
||||
height = g_height + header_height - 1
|
||||
wday = @gantt.date_from.cwday
|
||||
%>
|
||||
<% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
|
||||
<%
|
||||
width = zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top:37px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
style += "font-size:0.7em;"
|
||||
clss = "gantt_hdr"
|
||||
clss << " nwday" if @gantt.non_working_week_days.include?(wday)
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => clss) do %>
|
||||
<%= day_letter(wday) %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
wday = wday + 1
|
||||
wday = 1 if wday > 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= @gantt.lines.html_safe %>
|
||||
|
||||
<% ###### Today red line (excluded from cache) ###### %>
|
||||
<% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
|
||||
<%
|
||||
today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: #{today_left}px;"
|
||||
style += "width:10px;"
|
||||
style += "border-left: 1px dashed red;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :id => 'today_line') %>
|
||||
<% end %>
|
||||
<%
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: 0px;"
|
||||
style += "width: #{g_width - 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
||||
params.merge(@gantt.params_previous)) %>
|
||||
</td>
|
||||
<td align="right">
|
||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
||||
params.merge(@gantt.params_next)) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'PDF', :url => params.merge(@gantt.params) %>
|
||||
<%= f.link_to('PNG', :url => params.merge(@gantt.params)) if @gantt.respond_to?('to_image') %>
|
||||
<% end %>
|
||||
<% end # query.valid? %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_gantt)) -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'raphael' %>
|
||||
<%= javascript_include_tag 'gantt' %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
var issue_relation_type = <%= raw Redmine::Helpers::Gantt::DRAW_TYPES.to_json %>;
|
||||
$(document).ready(drawGanttHandler);
|
||||
$(window).resize(drawGanttHandler);
|
||||
$(function() {
|
||||
$("#draw_rels").change(drawGanttHandler);
|
||||
$("#draw_progress_line").change(drawGanttHandler);
|
||||
});
|
||||
<% end %>
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><% @gantt.view = self %>
|
||||
<%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
|
||||
</div>
|
||||
|
||||
<%= form_tag({:controller => 'gantts', :action => 'show',
|
||||
:project_id => @project, :month => params[:month],
|
||||
:year => params[:year], :months => params[:months]},
|
||||
:method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<!--<fieldset id="filters" class="collapsible <%#= @query.new_record? ? "" : "collapsed" %>">-->
|
||||
<!--<legend onclick="toggleFieldset(this);"><%#= l(:label_filter_plural) %></legend>-->
|
||||
<!--<div style="<%#= @query.new_record? ? "" : "display: none;" %>">-->
|
||||
<!--<%#= render :partial => 'queries/filters', :locals => {:query => @query} %>-->
|
||||
<!--</div>-->
|
||||
<!--</fieldset>-->
|
||||
<fieldset class="collapsible collapsed">
|
||||
<legend onclick="toggleFieldset(this);"><%= l(:label_options) %></legend>
|
||||
<div style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_related_issues) %></legend>
|
||||
<label style="padding:10px;">
|
||||
<%= check_box_tag "draw_rels", params["draw_rels"], params[:set_filter].blank? || params[:draw_rels] %>
|
||||
<% rels = [IssueRelation::TYPE_BLOCKS, IssueRelation::TYPE_PRECEDES] %>
|
||||
<% rels.each do |rel| %>
|
||||
<% color = Redmine::Helpers::Gantt::DRAW_TYPES[rel][:color] %>
|
||||
<%= content_tag(:span, ' '.html_safe,
|
||||
:style => "background-color: #{color}") %>
|
||||
<%= l(IssueRelation::TYPES[rel][:name]) %>
|
||||
<% end %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
<td>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_gantt_progress_line) %></legend>
|
||||
<label style="padding:10px;">
|
||||
<%= check_box_tag "draw_progress_line", params[:draw_progress_line], params[:draw_progress_line] %>
|
||||
<%= l(:label_display) %>
|
||||
</label>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<!--<p class="contextual">-->
|
||||
<!--<%#= gantt_zoom_link(@gantt, :in) %>-->
|
||||
<!--<%#= gantt_zoom_link(@gantt, :out) %>-->
|
||||
<!--</p>-->
|
||||
|
||||
<p class="buttons">
|
||||
<%= text_field_tag 'months', @gantt.months, :size => 2 %>
|
||||
<%= l(:label_months_from) %>
|
||||
<%= select_month(@gantt.month_from, :prefix => "month", :discard_type => true) %>
|
||||
<%= select_year(@gantt.year_from, :prefix => "year", :discard_type => true) %>
|
||||
<%= hidden_field_tag 'zoom', @gantt.zoom %>
|
||||
|
||||
<%= link_to_function l(:button_apply), '$("#query_form").submit()',
|
||||
:class => 'icon icon-checked' %>
|
||||
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
|
||||
:class => 'icon icon-reload' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
<% if @query.valid? %>
|
||||
<%
|
||||
zoom = 1
|
||||
@gantt.zoom.times { zoom = zoom * 2 }
|
||||
|
||||
subject_width = 330
|
||||
header_height = 18
|
||||
|
||||
headers_height = header_height
|
||||
show_weeks = false
|
||||
show_days = false
|
||||
|
||||
if @gantt.zoom > 1
|
||||
show_weeks = true
|
||||
headers_height = 2 * header_height
|
||||
if @gantt.zoom > 2
|
||||
show_days = true
|
||||
headers_height = 3 * header_height
|
||||
end
|
||||
end
|
||||
|
||||
# Width of the entire chart
|
||||
g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
|
||||
@gantt.render(:top => headers_height + 8,
|
||||
:zoom => zoom,
|
||||
:g_width => g_width,
|
||||
:subject_width => subject_width)
|
||||
g_height = [(20 * (@gantt.number_of_rows + 6)) + 150, 206].max
|
||||
t_height = g_height + headers_height
|
||||
%>
|
||||
|
||||
<%# if @gantt.truncated %>
|
||||
<!--<p class="warning"><%#= l(:notice_gantt_chart_truncated, :max => @gantt.max_rows) %></p>-->
|
||||
<%# end %>
|
||||
|
||||
<table style="width:100%; border:0; border-collapse: collapse;">
|
||||
<tr>
|
||||
<td style="width:<%= subject_width %>px; padding:0px;">
|
||||
<%
|
||||
style = ""
|
||||
style += "position:relative;"
|
||||
style += "height: #{t_height + 24}px;"
|
||||
style += "width: #{subject_width + 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style) do %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
style += 'z-index: 1;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%
|
||||
style = ""
|
||||
style += "right:-2px;"
|
||||
style += "width: #{subject_width}px;"
|
||||
style += "height: #{t_height}px;"
|
||||
style += 'border-left: 1px solid #c0c0c0;'
|
||||
style += 'overflow: hidden;'
|
||||
%>
|
||||
<%= content_tag(:div, "", :style => style, :class => "gantt_hdr") %>
|
||||
<%= content_tag(:div, :class => "gantt_subjects") do %>
|
||||
<%= @gantt.subjects.html_safe %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div style="position:relative;height:<%= t_height + 24 %>px;overflow:auto;" id="gantt_area">
|
||||
<%
|
||||
style = ""
|
||||
style += "width: #{g_width - 1}px;"
|
||||
style += "height: #{headers_height}px;"
|
||||
style += 'background: #eee;'
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :class => "gantt_hdr") %>
|
||||
|
||||
<% ###### Months headers ###### %>
|
||||
<%
|
||||
month_f = @gantt.date_from
|
||||
left = 0
|
||||
height = (show_weeks ? header_height : header_height + g_height)
|
||||
%>
|
||||
<% @gantt.months.times do %>
|
||||
<%
|
||||
width = (((month_f >> 1) - month_f) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= link_to h("#{month_f.year}-#{month_f.month}"),
|
||||
@gantt.params.merge(:year => month_f.year, :month => month_f.month),
|
||||
:title => "#{month_name(month_f.month)} #{month_f.year}" %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
month_f = month_f >> 1
|
||||
%>
|
||||
<% end %>
|
||||
|
||||
<% ###### Weeks headers ###### %>
|
||||
<% if show_weeks %>
|
||||
<%
|
||||
left = 0
|
||||
height = (show_days ? header_height - 1 : header_height - 1 + g_height)
|
||||
%>
|
||||
<% if @gantt.date_from.cwday == 1 %>
|
||||
<%
|
||||
# @date_from is monday
|
||||
week_f = @gantt.date_from
|
||||
%>
|
||||
<% else %>
|
||||
<%
|
||||
# find next monday after @date_from
|
||||
week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
|
||||
width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe,
|
||||
:style => style, :class => "gantt_hdr") %>
|
||||
<% left = left + width + 1 %>
|
||||
<% end %>
|
||||
<% while week_f <= @gantt.date_to %>
|
||||
<%
|
||||
width = ((week_f + 6 <= @gantt.date_to) ?
|
||||
7 * zoom - 1 :
|
||||
(@gantt.date_to - week_f + 1) * zoom - 1).to_i
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top: 19px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => "gantt_hdr") do %>
|
||||
<%= content_tag(:small) do %>
|
||||
<%= week_f.cweek if width >= 16 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
week_f = week_f + 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% ###### Days headers ####### %>
|
||||
<% if show_days %>
|
||||
<%
|
||||
left = 0
|
||||
height = g_height + header_height - 1
|
||||
wday = @gantt.date_from.cwday
|
||||
%>
|
||||
<% (@gantt.date_to - @gantt.date_from + 1).to_i.times do %>
|
||||
<%
|
||||
width = zoom - 1
|
||||
style = ""
|
||||
style += "left: #{left}px;"
|
||||
style += "top:37px;"
|
||||
style += "width: #{width}px;"
|
||||
style += "height: #{height}px;"
|
||||
style += "font-size:0.7em;"
|
||||
clss = "gantt_hdr"
|
||||
clss << " nwday" if @gantt.non_working_week_days.include?(wday)
|
||||
%>
|
||||
<%= content_tag(:div, :style => style, :class => clss) do %>
|
||||
<%= day_letter(wday) %>
|
||||
<% end %>
|
||||
<%
|
||||
left = left + width + 1
|
||||
wday = wday + 1
|
||||
wday = 1 if wday > 7
|
||||
%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= @gantt.lines.html_safe %>
|
||||
|
||||
<% ###### Today red line (excluded from cache) ###### %>
|
||||
<% if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
|
||||
<%
|
||||
today_left = (((Date.today - @gantt.date_from + 1) * zoom).floor() - 1).to_i
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: #{today_left}px;"
|
||||
style += "width:10px;"
|
||||
style += "border-left: 1px dashed red;"
|
||||
%>
|
||||
<%= content_tag(:div, ' '.html_safe, :style => style, :id => 'today_line') %>
|
||||
<% end %>
|
||||
<%
|
||||
style = ""
|
||||
style += "position: absolute;"
|
||||
style += "height: #{g_height}px;"
|
||||
style += "top: #{headers_height + 1}px;"
|
||||
style += "left: 0px;"
|
||||
style += "width: #{g_width - 1}px;"
|
||||
%>
|
||||
<%= content_tag(:div, '', :style => style, :id => "gantt_draw_area") %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<%= link_to_content_update("\xc2\xab " + l(:label_previous),
|
||||
params.merge(@gantt.params_previous)) %>
|
||||
</td>
|
||||
<td align="right">
|
||||
<%= link_to_content_update(l(:label_next) + " \xc2\xbb",
|
||||
params.merge(@gantt.params_next)) %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<% end # query.valid? %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_gantt)) -%>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag 'raphael' %>
|
||||
<%= javascript_include_tag 'gantt' %>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
var issue_relation_type = <%= raw Redmine::Helpers::Gantt::DRAW_TYPES.to_json %>;
|
||||
$(document).ready(drawGanttHandler);
|
||||
$(window).resize(drawGanttHandler);
|
||||
$(function() {
|
||||
$("#draw_rels").change(drawGanttHandler);
|
||||
$("#draw_progress_line").change(drawGanttHandler);
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<% issue_list(issues) do |issue, level| -%>
|
||||
<script>
|
||||
$(function () {
|
||||
sd_create_editor_from_data(<%= issue.id%>, null, "100%", "<%= issue.class.name %>");
|
||||
});
|
||||
</script>
|
||||
<%= render :partial => 'issues/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %>
|
||||
<% end %>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="issue_list_pagination">
|
||||
<%= pagination_links_full @issue_pages, @issue_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -25,6 +25,14 @@
|
|||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label">来源:</label>
|
||||
<select class="w150">
|
||||
<option>客户</option>
|
||||
<option>用户</option>
|
||||
<option>其他</option>
|
||||
</select>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label"><%= l(:field_assigned_to) %>:</label>
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
|
@ -36,7 +44,7 @@
|
|||
<div class="cl"></div>
|
||||
<li>
|
||||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<label class="label"><%= l(:field_fixed_version) %>:</label>
|
||||
<label class="label"><%= l(:milestone) %>:</label>
|
||||
<%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version),
|
||||
{:include_blank => true, :required => @issue.required_attribute?('fixed_version_id'), :no_label => true},
|
||||
:class => "w150" %>
|
||||
|
@ -74,7 +82,13 @@
|
|||
<label class="label02"><%= l(:field_estimated_hours) %>:</label>
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true, :required => @issue.required_attribute?('estimated_hours') %>
|
||||
<span class="mt3 ml5"><%= l(:field_hours) %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<label class="label02">实际工时 (H):</label>
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true %>
|
||||
<% end %>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% unless @issue.disabled_core_fields.include?('fixed_version_id') %>
|
||||
<li><p class="label03" > 目标版本 : </p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
|
||||
<li><p class="label03" > <%=l(:milestone)%> : </p><span class="pro_info_p" style="width:120px;"><%= (@issue.fixed_version ? link_to_version(@issue.fixed_version, :class => "pro_info_p") : "--") %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
<label class="fl ml5 mt3" for="issue_is_private" id="issue_is_private_tips"><%= l(:field_is_private_tips)%></label>
|
||||
<% end %>
|
||||
</li>
|
||||
<!--<li>-->
|
||||
<!--<input type="checkbox" class="ml30">-->
|
||||
<!--<label class="fl ml5 mt3">不需要评审</label>-->
|
||||
<!--</li>-->
|
||||
<div class="cl"></div>
|
||||
<!--<li>-->
|
||||
<!--<%# if @issue.safe_attribute? 'project_id' %>-->
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<span class="issues_nav_tag ml5" ><%= @issues_filter_assign_count %></span>
|
|
@ -0,0 +1 @@
|
|||
<span class="issues_nav_tag ml5" ><%= @issue_count %></span>
|
|
@ -0,0 +1 @@
|
|||
<span class="issues_nav_tag ml5"><%= @issues_filter_author_count %><%#= @project.issues.where(:author_id => User.current.id ).visible.all.count %></span>
|
|
@ -6,6 +6,11 @@
|
|||
</script>
|
||||
<%= render :partial => 'users/project_issue', :locals => {:activity => issue, :user_activity_id => issue.id} %>
|
||||
<% end %>
|
||||
<% if issues.count == 10%>
|
||||
<%= link_to "点击展开更多",project_issues_path({:project_id => project.id}.merge(params)),:id => "show_more_issues",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
||||
<% end%>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="issue_list_pagination">
|
||||
<%= pagination_links_full @issue_pages, @issue_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,93 @@
|
|||
<div class="issues_con fl">
|
||||
<div class="clear mb5">
|
||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fl mr10">新 增</a>
|
||||
<div class="issues_statistics fl">
|
||||
<ul>
|
||||
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @project.project_score.issue_num %></a></li>
|
||||
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @project.issues.where('status_id in (1,2,3,4,6)').visible.all.count %></a></li>
|
||||
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @project.issues.where(:status_id => 5 ).visible.all.count %></a></li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls')%>" class="hw_btn_blue fr" alt="导出EXCEL">导出EXCEL</a>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<div class="clear mb10">
|
||||
<div class="hw_search_box fl ">
|
||||
<input class="hw_search-input" placeholder="请输入问题名称" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="nh_reset_form();">清除</a>
|
||||
<div class="calendar_div fr">
|
||||
<input name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
||||
<input type="text" nhname="date_show" id="issue_create_date_end_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="结束日期">
|
||||
<%= calendar_for('issue_create_date_end_show')%>
|
||||
</div>
|
||||
<div class="calendar_div fr">
|
||||
<input name="issue_create_date_start_show" nhname="date_val" type="hidden"/>
|
||||
<input type="text" nhname="date_show" id="issue_create_date_start_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="开始日期">
|
||||
<%= calendar_for('issue_create_date_start_show')%>
|
||||
</div>
|
||||
|
||||
<!--<input type="text" placeholder="开始日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl" style="border-right:none;"></a>-->
|
||||
<!--<input type="text" placeholder="结束日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl"></a>-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" class="issues_nav_hover" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有<span class="issues_nav_tag ml5"><%= @project.project_score.issue_num %></span></a>
|
||||
</li>
|
||||
<li id="issues_list_nav_2" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" onclick="switch_assign_to(<%= User.current.id %>)" id="issues_type_2" >指派给我<span class="issues_nav_tag ml5"><%= @project.issues.where(:assigned_to_id => User.current.id ).visible.all.count %></span></a>
|
||||
</li>
|
||||
<li id="issues_list_nav_3" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" onclick="createByMe(<%= User.current.id %>)" id="issues_type_3" >我的发布<span class="issues_nav_tag ml5"><%= @project.issues.where(:author_id => User.current.id ).visible.all.count %></span></a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="issues_filter ">
|
||||
<div class="issues_form_filter mt5 mr5">
|
||||
<%= select(:issue, :tracker_id, [["缺陷",1],["功能",2],["支持",3],["任务",4],["周报",5]].unshift(["类型",0]),
|
||||
{:include_blank => false, :selected => @tracker_id ? @tracker_id : 0},
|
||||
{:onchange => "remote_function();", :id => "tracker_id", :name => "tracker_id", :class => "fl issues_filter_select_min"}) %>
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl"})
|
||||
%>
|
||||
|
||||
<%= select(:issue, :fixed_version_id, options_for_version_isuue_list(@project),
|
||||
{:include_blank => false, :selected => @fixed_version_id ? @fixed_version_id : 0},
|
||||
{:onchange => "remote_function();", :id => "fixed_version_id", :name => "fixed_version_id", :class => "f1"}) %>
|
||||
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"fl issues_filter_select_min"}
|
||||
) %>
|
||||
|
||||
<%= select(:issue, :done_ratio, [["10%",1],["20%",2],["30%",3],["40%",4],["50%",5],["60%",6],["70%",7],["80%",8],["90%",9],["10%",10]].unshift(["完成度",0]),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0 },
|
||||
{:onchange => "remote_function();", :id => "done_ratio", :name => "done_ratio", :class => "f1"}) %>
|
||||
|
||||
<%= select(:issue, :test, [["最早创建",1],["最早更新",2]].unshift(["排序",0]),
|
||||
{:include_blank => false, :selected => @order ? @order : 0 },
|
||||
{:onchange => "remote_function();", :id => "test", :name => "test", :class => "fr issues_filter_select_min"}) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%#= 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-->
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
|
@ -0,0 +1,99 @@
|
|||
<% unless activity.author.nil? %>
|
||||
<div class="issues_list_box clear" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="issues_ciricons fl ">
|
||||
<% if activity.status_id.to_i == 5 %>
|
||||
<span class="issues_ciricons_02"></span>
|
||||
<% else %>
|
||||
<span class="issues_ciricons_01"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class=" fl ml5">
|
||||
<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>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="issues_list_small">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "fl issues_list_name" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "fl issues_list_name" %>
|
||||
<% end %>
|
||||
<p class="fl ml10"> <span class="mr5"><%=format_time(activity.created_on) %></span>发布</p>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="issues_list_txt fr">
|
||||
<li class="issues_list_min c_grey">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1%>
|
||||
缺陷
|
||||
<% when 2%>
|
||||
功能
|
||||
<% when 3%>
|
||||
支持
|
||||
<% when 4%>
|
||||
任务
|
||||
<% when 5%>
|
||||
周报
|
||||
<% end %>
|
||||
</li>
|
||||
<!--li class="c_grey">
|
||||
<#% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%#= link_to activity.try(:author), user_path(activity.author_id), :class => "c_grey" %>
|
||||
<#% else %>
|
||||
<%#= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "c_grey" %>
|
||||
<%# end %>
|
||||
</li-->
|
||||
<li class="c_grey">
|
||||
<% unless activity.assigned_to_id.nil? %>
|
||||
<% if activity.try(:assigned_to).try(:realname).empty? %>
|
||||
<%= link_to activity.assigned_to, user_path(activity.assigned_to_id), :class => "c_grey" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "c_grey" %>
|
||||
<% end %>
|
||||
<% end %></li>
|
||||
<li class="c_grey" style="width: 60px; padding-right: 10px" title="<%= activity.fixed_version %>"><%= activity.fixed_version %></li>
|
||||
<li class="issues_list_min c_grey" ><%= activity.status.name%></li>
|
||||
<li class="<%=(activity.done_ratio == 100 ? 'c_red' : 'c_green') %>"><%= activity.done_ratio %>%</li>
|
||||
<li class="issues_list_min pr">
|
||||
<% if activity.journals.count > 0%>
|
||||
<span class="issues_icons_mes fl mr5" style="margin-top:-3px;"></span>
|
||||
<span class="fl mr5"><%= activity.journals.count %></span>
|
||||
<% end %>
|
||||
<div class="undis" style="position: absolute; <%= activity.journals.count >0 ? 'top:15px;' : 'top:-15px;' %>">
|
||||
<%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||||
<% if !defined?(project_id) && !defined?(user_id) %>
|
||||
<%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(project_id) %>
|
||||
<%= link_to "", issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(user_id) %>
|
||||
<%= link_to "", issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(".issues_list_box").mouseover(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(5).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(5).children().eq(iconOrder).show();
|
||||
});
|
||||
$(".issues_list_box").mouseout(function(){
|
||||
var iconOrder;
|
||||
var iconSize = $(this).children().eq(2).children().eq(5).children().size();
|
||||
if(iconSize > 1){
|
||||
iconOrder = 2;
|
||||
} else{
|
||||
iconOrder = 0;
|
||||
}
|
||||
$(this).children().eq(2).children().eq(5).children().eq(iconOrder).hide();
|
||||
});
|
||||
</script>
|
||||
|
|
@ -2,7 +2,20 @@
|
|||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
<script xmlns="http://www.w3.org/1999/html">
|
||||
//issues列表
|
||||
/*function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('issues_list_nav_'+i).className='issues_nav_nomal';
|
||||
|
||||
}
|
||||
|
||||
g('issues_list_nav_'+n).className='issues_nav_hover';
|
||||
}*/
|
||||
$(function(){
|
||||
$("#RSide").removeAttr("id");
|
||||
$("#Container").css("width","1000px");
|
||||
|
@ -14,7 +27,10 @@
|
|||
|
||||
});
|
||||
function remote_function() {
|
||||
$("#issue_query_form").submit();
|
||||
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("开始日期不能大于结束日期!");
|
||||
}
|
||||
$("#issue_query_form").submit();
|
||||
// $.ajax({
|
||||
// url:'<%#= project_issues_path(@project)%>',
|
||||
// data:{
|
||||
|
@ -30,12 +46,39 @@
|
|||
// }
|
||||
// });
|
||||
}
|
||||
function nh_reset_form() {
|
||||
$("#issue_query_form")[0].reset();
|
||||
$("input[nhname='date_val']").val('');//涛哥的火狐reset 清不掉这个值 我擦
|
||||
remote_function();
|
||||
|
||||
function remote_function_export(project_id) {
|
||||
// $("#export_issue_hidden").attr("value","1");
|
||||
// $("#issue_query_form").attr("set_filter","1");
|
||||
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues.xls");
|
||||
// $("#issue_query_form").submit();
|
||||
// $("#issue_query_form").attr("action","/projects/"+project_id+"/issues");
|
||||
// $("#issue_query_form").removeAttr("format");
|
||||
// $("#issue_query_form").attr("set_filter","0");
|
||||
// $("#export_issue_hidden").attr("value","0");
|
||||
|
||||
var tracker_id = $("#tracker_id").attr("value");
|
||||
var subject = $("#v_subject").attr("value");
|
||||
var assigned_to_id = $("#assigned_to_id").attr("value");
|
||||
var fixed_version_id = $("#fixed_version_id").attr("value");
|
||||
var status_id = $("#status_id").attr("value");
|
||||
var done_ratio = $("#done_ratio").attr("value");
|
||||
var test = $("#test").attr("value");
|
||||
var author_id = $("#author_id").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");
|
||||
$("#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);
|
||||
///projects/1811/issues.xls?export=true&set_filter=1
|
||||
|
||||
|
||||
}
|
||||
|
||||
// function nh_reset_form() {
|
||||
// $("#issue_query_form")[0].reset();
|
||||
// $("input[nhname='date_val']").val('');//涛哥的火狐reset 清不掉这个值 我擦
|
||||
// remote_function();
|
||||
// }
|
||||
|
||||
function EnterPress(e){
|
||||
var e = e || window.event;
|
||||
if(e.keyCode == 13){
|
||||
|
@ -43,150 +86,204 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中assign_to
|
||||
function switch_assign_to(assign) {
|
||||
var assign = "option[value =" + assign + "]";
|
||||
$("#issues_type_2").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='assigned_to_id']").find(assign).attr("selected", "selected");
|
||||
$("select[id='author_id']").val('');
|
||||
remote_function();
|
||||
}
|
||||
|
||||
// 点击的时候让过滤条件选中user_id
|
||||
function createByMe(user_id) {
|
||||
var user = "option[value =" + user_id + "]";
|
||||
$("#createByMe").click(function(){
|
||||
|
||||
});
|
||||
$("select[id='author_id']").find(user).attr("selected", "selected");
|
||||
remote_function();
|
||||
}
|
||||
// 清楚表单所有选项
|
||||
function all_reset_form() {
|
||||
$("#issue_query_form")[0].reset();
|
||||
$("select[id='author_id']").val('');
|
||||
$("select[id='assigned_to_id']").val('');
|
||||
$("input[nhname='date_val']").val('');
|
||||
remote_function();
|
||||
}
|
||||
</script>
|
||||
<div class="homepageRight mt0 ml10" >
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName"><%= l(:label_issue_tracking) %></div>
|
||||
</div>
|
||||
<div class="resources mt10" >
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'true', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<div class="problem_search fr" >
|
||||
<input class="problem_search_input fl" id="v_subject" type="text" name="subject" placeholder="请输入问题名称" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0)" class="problem_search_btn fl" onclick="remote_function();" >搜索</a>
|
||||
<a href="javascript:void(0)" class="grey_btn fl ml10 f14" onclick="nh_reset_form();" >清空</a>
|
||||
</div><!--problem_search end-->
|
||||
<%#= link_to '新建问题', new_project_issue_path(@project) , :class => "green_u_btn fr ml10" %>
|
||||
<p class="problem_p fl" ><%= l(:label_issues_sum) %>:<a href="javascript:void(0)" class="c_red"><%= @project.project_score.issue_num %></a>
|
||||
<%= l(:lable_issues_undo) %>:<a href="javascript:void(0)" class="c_red"><%= @project.issues.where('status_id in (1,2,4,6)').visible.all.count %> </a>
|
||||
</p>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div id="filter_form" class="fl">
|
||||
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
<%= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
||||
{ :include_blank => false,:selected=>@priority_id ? @priority_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"priority_id",:name=>"priority_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]),
|
||||
{ :include_blank => false,:selected=>@author_id ? @author_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"author_id",:name=>"author_id",:class=>"w90 mr18"}
|
||||
)
|
||||
%>
|
||||
</div><!--filter_form end-->
|
||||
<div>
|
||||
<div class="fl"> </div>
|
||||
<div>
|
||||
<input name="issue_create_date_start" nhname="date_val" type="hidden"/>
|
||||
<%= text_field_tag 'issue_create_date_start_show', '创建日期起始',:readonly=>true, :size=>13, :nhname=>'date_show',:style=>'float:left;'%>
|
||||
<%= calendar_for('issue_create_date_start_show') %>
|
||||
</div>
|
||||
<div style="float:left;"> - </div>
|
||||
<div>
|
||||
<input name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
||||
<%= text_field_tag 'issue_create_date_end_show', '创建日期结束',:readonly=>true, :size=>13, :nhname=>'date_show',:style=>'float:left;'%>
|
||||
<%= calendar_for('issue_create_date_end_show') %>
|
||||
</div>
|
||||
<div class="homepageRight mt0 ml10" >
|
||||
<div class="issues_con fl">
|
||||
<div class="clear mb5">
|
||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fl mr10">新 增</a>
|
||||
<div class="issues_statistics fl">
|
||||
<ul>
|
||||
<li>所有<a class="issues_greycirbg_btn "><%= @issues_filter.count %></a></li>
|
||||
<li>开启<a class="issues_greycirbg_btn "><%#= @issues_filter_assign_count %><%= @issue_open_count %></a></li>
|
||||
<li>关闭<a class="issues_greycirbg_btn "><%#= @issues_filter_author_count %><%= @issue_close_count %></a></li>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
<!--<input type="button" class="hw_btn_blue fr" value="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">-->
|
||||
<a href="<%=project_issues_path(:project_id => @project, :format => 'xls', :export => true, :set_filter => "1")%>" id="sendexcel" class="hw_btn_blue fr" alt="导出EXCEL" onclick="remote_function_export('<%= @project.id %>')">导出EXCEL</a>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<%= hidden_field_tag 'export_issue_hidden', '0' %>
|
||||
<!--<input id="exprot_issues_hidden" value="0" type="hidden">-->
|
||||
<div class="clear mb10">
|
||||
<div class="hw_search_box fl ">
|
||||
<input class="hw_search-input" placeholder="请输入问题名称" type="text" id="v_subject" name="subject" onkeypress="EnterPress(event)" onkeydown="EnterPress()">
|
||||
<a href="javascript:void(0);" class="hw_btn_search" onclick="remote_function();" ></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl ml5" onclick="all_reset_form();">清除</a>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="contextual">
|
||||
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||
<%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
|
||||
<%= delete_link query_path(@query) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
<div style="clear:right; ">
|
||||
</div>
|
||||
|
||||
<%= error_messages_for 'query' %>
|
||||
|
||||
<% if @query.valid? %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata">
|
||||
<%= l(:label_no_data) %>
|
||||
</p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
<div class="calendar_div fr">
|
||||
<input id="issue_date_end_issue_export" name="issue_create_date_end" nhname="date_val" type="hidden"/>
|
||||
<input type="text" nhname="date_show" id="issue_create_date_end_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="结束日期">
|
||||
<%= calendar_for('issue_create_date_end_show')%>
|
||||
</div>
|
||||
<div class="calendar_div fr">
|
||||
<input id="issue_date_start_issue_export" name="issue_create_date_start" nhname="date_val" type="hidden"/>
|
||||
<input type="text" nhname="date_show" id="issue_create_date_start_show" class="InputBox fl W120 calendar_input" readonly="readonly" size="13" placeholder="开始日期">
|
||||
<%= calendar_for('issue_create_date_start_show')%>
|
||||
</div>
|
||||
<!--<input type="text" placeholder="开始日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl" style="border-right:none;"></a>-->
|
||||
<!--<input type="text" placeholder="结束日期" class="issues_calendar_input fl " ><a href="" class="issues_data_img fl"></a>-->
|
||||
</div>
|
||||
|
||||
<div class="issues_con_list" style="position: relative;">
|
||||
<ul id="issues_list_nav" >
|
||||
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();">
|
||||
<a href="javascript:void(0);" onclick="all_reset_form();" id="issues_type_1" >所有</a>
|
||||
<span id="issue_filter_all"><%= render :partial => "issues/issue_filter_all" %></span>
|
||||
</li>
|
||||
<!--li id="issues_list_nav_2" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" onclick="switch_assign_to(<%#= User.current.id %>)" id="issues_type_2" >指派给我
|
||||
<span id="issue_assigned_count"><%#= render :partial => "issues/issue_filter" %></span>
|
||||
</a>
|
||||
</li>
|
||||
<li id="issues_list_nav_3" onclick="HoverLi(3);">
|
||||
<a href="javascript:void(0);" onclick="createByMe(<%#= User.current.id %>)" id="issues_type_3" >我的发布
|
||||
<span id="issue_author_count"><%#= render :partial => "issues/issue_filter_author" %></span>
|
||||
</a>
|
||||
</li-->
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="issues_filter ">
|
||||
<div class="issues_form_filter mt5 mr5">
|
||||
|
||||
<%= select(:issue, :tracker, [["缺陷",1],["功能",2],["支持",3],["任务",4],["周报",5]].unshift(["类型",0]),
|
||||
{:include_blank => false, :selected => @tracker_id ? @tracker_id : 0},
|
||||
{:onchange => "remote_function();", :id => "tracker_id", :name => "tracker_id", :class => "fl issues_filter_select_min"}) %>
|
||||
|
||||
<%#= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]),
|
||||
{ :include_blank => false,:selected=>@author_id ? @author_id : 0},
|
||||
{:onchange=>"remote_function();",:id=>"author_id",:name=>"author_id",:class=>"fl "}
|
||||
)
|
||||
%>
|
||||
|
||||
<%= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl"}
|
||||
)
|
||||
%>
|
||||
<%= select(:issue, :fixed_version, options_for_version_isuue_list(@project),
|
||||
{:include_blank => false, :selected => @fixed_version_id ? @fixed_version_id : 0},
|
||||
{:onchange => "remote_function();", :id => "fixed_version_id", :name => "fixed_version_id", :class => "fl"}) %>
|
||||
|
||||
<%= select( :issue,:status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"fl issues_filter_select_min"}
|
||||
)
|
||||
%>
|
||||
<%#= select( :issue,:prior, [["低",1],["正常",2],["高",3],["紧急",4],["立刻",5]].unshift(["优先级",0]),
|
||||
{ :include_blank => false,:selected=>@priority_id ? @priority_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"priority_id",:name=>"priority_id",:class=>"fl"}
|
||||
)
|
||||
%>
|
||||
|
||||
<%#= select(:issue, :done_ratio, [["10%",1],["20%",2],["30%",3],["40%",4],["50%",5],["60%",6],["70%",7],["80%",8],["90%",9],["100%",10]].unshift(["完成度",0]),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0 },
|
||||
{:onchange => "remote_function();", :id => "done_ratio", :name => "done_ratio", :class => "f1"}) %>
|
||||
<%= select( :issue,:done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }).unshift(["完成度",-1]),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : -1},
|
||||
{:onchange=>"remote_function();",:id=>"done_ratio",:name=>"done_ratio",:class=>"fl"}) %>
|
||||
|
||||
|
||||
<%#= select(:issue, :test, [["最新创建",1],["最早创建",2],["最近更新",3],["最早更新", 4]].unshift(["排序",0]),
|
||||
{:include_blank => false, :selected => @order ? @order : 0 },
|
||||
{:onchange => "remote_function();", :id => "test", :name => "test", :class => "fr issues_filter_select_min"}) %>
|
||||
|
||||
<%= select(:issue, :test, [["最新创建",1],["最早创建",2],["最近更新",3],["最早更新", 4]].unshift(["排序",0]),
|
||||
{:include_blank => false, :selected => @test ? @test : 0 },
|
||||
{:onchange => "remote_function();", :id => "test", :name => "test", :class => "fr issues_filter_select_min"}) %>
|
||||
|
||||
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [c.name, c.user_id]}.unshift(["作者",0]),
|
||||
{ :include_blank => false,:selected=>@author_id ? @author_id : 0},
|
||||
{:onchange=>"remote_function();",:id=>"author_id",:name=>"author_id",:style=>"display:none;"}
|
||||
)
|
||||
%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%#= select(:issue, :tracker_id, [["缺陷",1],["功能",2],["支持",3],["任务",4],["周报",5]].unshift(["类型",0]),
|
||||
{:include_blank => false, :selected => @tracker_id ? @tracker_id : 0},
|
||||
{:onchange => "remote_function();", :id => "tracker_id", :name => "tracker_id", :class => "fl issues_filter_select_min"}) %>
|
||||
<%#= select( :issue, :user_id, principals_options_for_isuue_list(@project),
|
||||
{ :include_blank => false,:selected=>@assign_to_id ? @assign_to_id : 0},
|
||||
{:onchange=>"remote_function();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl"})
|
||||
%>
|
||||
|
||||
<%#= select(:issue, :fixed_version_id, options_for_version_isuue_list(@project),
|
||||
{:include_blank => false, :selected => @fixed_version_id ? @fixed_version_id : 0},
|
||||
{:onchange => "remote_function();", :id => "fixed_version_id", :name => "fixed_version_id", :class => "f1"}) %>
|
||||
|
||||
<%#= select( :issue, :status, [["新增",1],["正在解决",2],["已解决",3],["反馈",4],["关闭",5],["拒绝",6]].unshift(["状态",0]),
|
||||
{ :include_blank => false,:selected=>@status_id ? @status_id : 0
|
||||
},
|
||||
{:onchange=>"remote_function();",:id=>"status_id",:name=>"status_id",:class=>"fl issues_filter_select_min"}
|
||||
) %>
|
||||
|
||||
<%#= select( :issue,:done_ratio, ((0..10).to_a.collect { |r| ["#{r*10} %", r*10] }),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0},
|
||||
{:onchange=>"remote_function();",:id=>"done_ratio",:name=>"done_ratio",:class=>"fl"}) %>
|
||||
|
||||
<%#= select(:issue, :done_ratio, [["10%",1],["20%",2],["30%",3],["40%",4],["50%",5],["60%",6],["70%",7],["80%",8],["90%",9],["10%",10]].unshift(["完成度",0]),
|
||||
{:include_blank => false, :selected => @done_ratio ? @done_ratio : 0 },
|
||||
{:onchange => "remote_function();", :id => "done_ratio", :name => "done_ratio", :class => "f1"}) %>
|
||||
|
||||
<%#= select(:issue, :test, [["最早创建",1],["最早更新",2]].unshift(["排序",0]),
|
||||
{:include_blank => false, :selected => @order ? @order : 0 },
|
||||
{:onchange => "remote_function();", :id => "test", :name => "test", :class => "fr issues_filter_select_min"}) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<% end %>
|
||||
|
||||
<!--<div style="float: left; padding-top: 30px">-->
|
||||
<!--<%# other_formats_links do |f| %>-->
|
||||
<!--<%#= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %>-->
|
||||
<!--<%#= f.link_to 'CSV', :url => params, :onclick => "showModal('csv-export-options', '330px'); return false;" %>-->
|
||||
<!--<%#= f.link_to 'PDF', :url => params %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(params.merge({:format => 'csv', :page => nil}), :method => :get, :id => 'csv-export-form') do %>
|
||||
<p>
|
||||
<label>
|
||||
<%= radio_button_tag 'columns', 'all' %>
|
||||
<%= l(:description_all_columns) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>
|
||||
<%= check_box_tag 'description', '1', @query.has_column?(:description) %>
|
||||
<%= l(:field_description) %>
|
||||
</label>
|
||||
</p>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<div id="issue_list">
|
||||
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= call_hook(:view_issues_index_bottom, {:issues => @issues, :project => @project, :query => @query}) %>
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
<%#= 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-->
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_issue_plural)) %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:controller => 'journals', :action => 'index',
|
||||
:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_changes_details)) %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
//$("#issue_list").html("<%#= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count})%>");
|
||||
<% if @set_filter && @issue_pages.page == 1%> //只有搜索的第一页才需要替换整个issue_list,其余的都是替换show_more_issues
|
||||
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/list',:locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project})%>");
|
||||
<%else%>
|
||||
$("#show_more_issues").replaceWith("<%= escape_javascript( render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project} )%>");
|
||||
<%end%>
|
||||
//$("#issue_assigned_count").html("<%#= escape_javascript(render :partial => 'issues/issue_filter') %>");
|
||||
$("#issue_filter_all").html("<%= escape_javascript(render :partial => 'issues/issue_filter_all') %>");
|
||||
//$("#issue_author_count").html("<%#= escape_javascript(render :partial => 'issues/issue_filter_author') %>");
|
||||
$("#issue_list").html("<%= escape_javascript(render :partial => 'issues/all_list',:locals => {:issues => @issues, :query => @query, :issue_pages=> @issue_pages, :issue_count => @issue_count, :project=> @project})%>");
|
||||
$("#issue_list_pagination").html('<%= pagination_links_full @issue_pages, @issue_count, :issues => @issues, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
||||
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
<div class="sy_class_infobox mb10 clear">
|
||||
<div class="sy_class_logo fl">
|
||||
<div class="pr" style="width: 110px; height:110px;">
|
||||
<% if User.current.logged? && (User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) || User.current.admin?) %>
|
||||
<%=link_to image_tag(url_to_avatar(@project), width:"110", height: "110", :id => 'nh_source_tx'), my_clear_user_avatar_temp_path(:course => @project.id), :remote => true%>
|
||||
<div class="homepageEditProfile undis">
|
||||
<%=link_to '', my_clear_user_avatar_temp_path(:project => @project.id), :class => 'homepageEditProfileIcon', :title => '点击编辑头像', :remote => true %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(@project), :width => "110", :height => "110", :alt => "项目logo") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @project %>
|
||||
<div class="sy_class_id fl"><p><%= l(:label_project_ivite_code)%><br /><span class="sy_corange"><%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %></span></p></div>
|
||||
<div class="sy_class_info fl ml15">
|
||||
<div class="sy_class_titbox clear">
|
||||
<h3 class="fl sy_class_title">
|
||||
<a href="javascript:void(0);"class="mr5 c_dark"><%= @project.creater %></a>/
|
||||
<a href="javascript:void(0);"class=" ml5 c_dark"><%= @project.name %></a>
|
||||
</h3>
|
||||
<span class="sy_new_orange fl ml10 mt5"><%= @project.is_public? ? l(:label_public) : l(:label_private) %></span>
|
||||
</div>
|
||||
<p class="sy_cgrey">
|
||||
<span class=" mr15">项目评分:
|
||||
<% if @project.project_type == 0 %>
|
||||
<%# unless static_project_score(@project.project_score) == 0 %>
|
||||
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
|
||||
{:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id}, :class => "sy_cblue" ) %>
|
||||
<%# end %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class=" mr15">浏览:<a class="sy_corange"><%= @project.visits.to_i %></a></span>
|
||||
<span class=" mr15">关注:<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'sy_corange' %></span>
|
||||
<span class=" mr15">成员:<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'sy_corange', :id => 'project_members_number' %></span>
|
||||
</p>
|
||||
<div class="mt15 clear" id="join_exit_project_div">
|
||||
<%= render 'layouts/join_exit_project' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -1,19 +1,18 @@
|
|||
<div class="pr_info_join fl">
|
||||
|
||||
<!--关注:非项目成员-->
|
||||
<div id="join_in_project_applied">
|
||||
<%= render :partial => "projects/applied_status" %>
|
||||
</div>
|
||||
<%= render :partial => "projects/applied_status" %>
|
||||
|
||||
<!--配置项目-->
|
||||
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
|
||||
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
|
||||
<%= link_to "#{l(:button_configure)}", settings_project_path(@project), :class => "sy_btn_blue mr5" %>
|
||||
<% end %>
|
||||
<!--项目类型-->
|
||||
<% if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager")) || User.current.admin? %>
|
||||
<%= link_to "<span class='#{typeclass}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
|
||||
<% end %>
|
||||
<!--<%# if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager")) || User.current.admin? %>-->
|
||||
<!--<%#= link_to "<span class='#{typeclass}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>-->
|
||||
<!--<%# end %>-->
|
||||
<!--退出项目-->
|
||||
<% if (User.current.member_of? @project) && User.current.login? && !User.current.admin &&
|
||||
!Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
|
||||
<%= exit_project_link(@project) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<!--<%#= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>-->
|
||||
<!--</li>-->
|
||||
<li class="navHomepageMenu fl mr40">
|
||||
<a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="c_white f16 db p10" > 贴吧交流</a>
|
||||
<a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="c_white f16 db p10" >帮助中心</a>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<!--<%#= link_to "帮助中心", "https://#{Setting.host_name}/forums/1/memos/1168", :class =>"c_white f16 db p10" %>-->
|
||||
<!--</li>-->
|
||||
<li class="navHomepageMenu fl mr40">
|
||||
<a href="<%= forums_path(:reorder_complex=>'desc')%>" target="_blank" class="c_white f16 db p10" > 贴吧交流</a>
|
||||
<a href="http://forge.trustie.net/forums/1/memos/1168" target="_blank" class="c_white f16 db p10" >帮助中心</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -110,9 +110,16 @@
|
|||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'sy_class_add', :title =>"新建试卷") if is_teacher %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% group_count = @course.course_groups.count %>
|
||||
<% if !show_nav?(group_count) && ((User.current.logged? && @course.open_student == 1) || (User.current.member_of_course?(@course)) || User.current.admin?) %>
|
||||
<li id="sy_09" class="sy_icons_group">
|
||||
<a href="<%=course_member_path(@course, :role => 2) %>">分班<span><%=group_count %></span></a>
|
||||
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
|
||||
</li>
|
||||
<% end %>
|
||||
<% statistics_count = 0 %>
|
||||
<% unless show_nav?(statistics_count) %>
|
||||
<li id="sy_09" class="sy_icons_st">
|
||||
<li id="sy_10" class="sy_icons_st">
|
||||
<a href="<%=statistics_course_course_path(@course) %>">统计<span></span></a>
|
||||
<!--<a href="javascript:void(0);" class="sy_class_add"></a>-->
|
||||
</li>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','prettify','repository' %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','prettify','repository','css/gantt', 'css/calendar' %>
|
||||
<%= javascript_include_tag 'cookie','project',"avatars", 'header','prettify','select_list_move','attachments' %>
|
||||
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
|
@ -47,88 +47,17 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div id="content">
|
||||
<%= render :partial => 'layouts/base_project_top' %>
|
||||
<div id="LSide" class="fl">
|
||||
<div class="project_info">
|
||||
<div class="pr_info_logo fl mr10 mb5">
|
||||
<div class="pr" style="width: 64px; height:64px;">
|
||||
<% if User.current.logged? && (User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) || User.current.admin?)%>
|
||||
<%=link_to image_tag(url_to_avatar(@project),width:"60", height: "60", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:project => @project.id), :remote => true%>
|
||||
<div class="homepageEditProfile undis">
|
||||
<%=link_to '', my_clear_user_avatar_temp_path(:project => @project.id), :remote => true, :class => 'homepageEditProfileIcon', :title => '点击编辑Logo' %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60", :alt => "项目logo") %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pr_info_id fl mb5 f14">
|
||||
<%= l(:label_project_ivite_code)%>
|
||||
<%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %>
|
||||
</div>
|
||||
<!--关注、申请加入/退出项目-->
|
||||
<div id="join_exit_project_div">
|
||||
<% text = @project.project_new_type == 1 ? l(:label_development_team) : (@project.project_new_type == 2 ? l(:label_research_group) : l(:label_friend_organization))%>
|
||||
<% typeclass = @project.project_new_type == 1 ? "pr_kafa" : (@project.project_new_type == 2 ? "pr_keyan" : "pr_friend")%>
|
||||
<%= render 'layouts/join_exit_project',{:text => text, :typeclass => typeclass} %>
|
||||
</div>
|
||||
<!-- 项目得分 -->
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<%= link_to "#{@project.name}", project_path(@project.id), :class=>"pr_info_name fl c_dark fb break_word" %>
|
||||
<% if @project.is_public? %>
|
||||
<span class="img_private"><%= l(:label_public)%></span>
|
||||
<% else %>
|
||||
<span class="img_private"><%= l(:label_private)%></span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @project %>
|
||||
<%# over %>
|
||||
<div>
|
||||
<% if @project.project_type == 0 %>
|
||||
<% unless static_project_score(@project.project_score) == 0 %>
|
||||
<span class="fb f14 "><%= l(:label_project_score)%> :</span>
|
||||
<%= link_to(format("%.2f" ,static_project_score(@project.project_score)).to_i,
|
||||
{:controller => 'projects',
|
||||
:action => 'show_projects_score',
|
||||
:remote => true,
|
||||
:id => @project.id}, :class => "c_orange f14" ) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<!--参数-->
|
||||
<div class="pr_info_foot">
|
||||
<%= l(:label_member) %>(<%= link_to "#{@project.members.count}", project_member_path(@project), :class => 'info_foot_num c_blue', :id => 'project_members_number' %>)
|
||||
<span>| </span>
|
||||
<%= l(:label_user_watcher) %>(<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id}, :class => 'info_foot_num c_blue' %>)
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<span>| </span>
|
||||
<%= l(:project_module_attachments) %>(
|
||||
<% @project.project_score.attach_num %>
|
||||
<%= link_to "#{@project.project_score.attach_num }", project_files_path(@project), :class => 'info_foot_num c_blue', :id=>'project_files_count_info' %></span>)
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--参数 end-->
|
||||
|
||||
<!--邀请加入-->
|
||||
<div class="subNavBox">
|
||||
<div class="subNavBoxProject">
|
||||
<div id="project_memu_list">
|
||||
<% if @project.project_new_type == 1 || @project.project_new_type.nil? %>
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project} %>
|
||||
<% elsif @project.project_new_type == 2 %>
|
||||
<%= render :partial => 'projects/research_team', :locals => {:project => @project} %>
|
||||
<% else %>
|
||||
<%= render :partial => 'projects/friend_group', :locals => {:project => @project} %>
|
||||
<% end %>
|
||||
<%= render :partial => 'projects/development_group', :locals => {:project => @project} %>
|
||||
</div>
|
||||
|
||||
<!-- end -->
|
||||
</div><!--项目侧导航 end-->
|
||||
</div>
|
||||
<!--项目侧导航 end-->
|
||||
<div class="cl"></div>
|
||||
|
||||
<!-- 项目描述 -->
|
||||
<div class="project_intro">
|
||||
<div id="course_description" class="course_description">
|
||||
|
@ -155,7 +84,6 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--项目标签 end-->
|
||||
|
||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @project.visits.to_i %> (自2016年5月)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@ if($("#course_avatar_form").length > 0) {
|
|||
window.location.href = "<%=settings_course_path(@course) %>";
|
||||
}
|
||||
<% elsif @project %>
|
||||
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:60px;height:60px;overflow:hidden",:alt=>"项目logo") %>');
|
||||
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:110px;height:110px;overflow:hidden",:alt=>"项目logo") %>');
|
||||
if($("#project_avatar_form").length > 0) {
|
||||
window.location.href = "<%=settings_project_path(@project) %>";
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<% if AppliedProject.where(:user_id => User.current, :project_id => @project_id).first.nil? %>
|
||||
<%= join_in_project_link(@project, User.current) %>
|
||||
<% else %>
|
||||
等待审批
|
||||
<a class="sy_btn_blue mr5">等待审批</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% project_file_num = Attachment.where(:container_type => "Project", :container_id => @project.id).count %>
|
||||
<% project_issue_count =Issue.where(:project_id => @project.id).count%>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
|
@ -8,8 +9,8 @@
|
|||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "f14 c_blue02" %>
|
||||
<% if @project.project_score.issue_num > 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.issue_num %>)</a>
|
||||
<% if project_issue_count > 0 %>
|
||||
<a class="subnav_num">(<%= project_issue_count %>)</a>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.member_of?(@project) %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<% for journal in journals %>
|
||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %></div>
|
||||
<div class="ping_discon" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||
<div class="ping_discon" style="width: 670px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||
<div class="ping_distop f14">
|
||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span><%= link_to journal.user.show_name, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
|
||||
|
|
|
@ -1,214 +1,214 @@
|
|||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||
</style>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="msg_box" id='leave-message' nhname='new_message' style="height:auto;">
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<h4><%= l(:label_user_response) %></h4>
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_for('new_form', :method => :post, :html => {:id => 'project_feedback_form', :multipart => true},
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
||||
<p nhname="contentmsg"></p>
|
||||
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%#= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
||||
<a href="javascript:void(0);" class="blue_btn fr ml10 mt10" id="submit_feedback_project" >留言</a>
|
||||
<%#= link_to l(:button_leave_meassge), "javascript:void(0)", :onclick => 'submitProjectFeedback();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fr mt10 mb10' %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
|
||||
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#submit_feedback_project").one('click',function() {
|
||||
$("#project_feedback_form").submit();
|
||||
});
|
||||
|
||||
function init_editor(params){
|
||||
params.textarea.removeAttr('placeholder');
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
params.submit_btn.one('click', function(){
|
||||
params.form.submit();
|
||||
});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
// var flag = false;
|
||||
// if(params.form.attr('data-remote') != undefined ){
|
||||
// flag = true
|
||||
// }
|
||||
// params.form[0].onsubmit = function(){
|
||||
// if(flag){
|
||||
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
|
||||
// }
|
||||
// var is_checked = nh_check_field({
|
||||
// issubmit:true,
|
||||
// content:params.editor,
|
||||
// contentmsg:params.contentmsg,
|
||||
// textarea:params.textarea
|
||||
// });
|
||||
// if(is_checked){
|
||||
// if(flag){
|
||||
// alert('add')
|
||||
// $(this).attr('data-remote','true');
|
||||
// }
|
||||
// alert('ok')
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea,
|
||||
submit_btn:params.submit_btn,
|
||||
form:params.form
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
// return true; //这个涛哥的firefox不能提交
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
params.submit_btn = $("input[nhname='submit_btn']",params.div_form);
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.submit_btn.one('click', function () {
|
||||
params.form.submit();
|
||||
});
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
|
||||
// $("#nhjump")[0].click();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
// nh_reset_form(params);
|
||||
// });
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||
div.ke-toolbar .ke-outline{border:none;}
|
||||
|
||||
div.respond-form .reply_btn{margin-left:626px;margin-top:5px;}
|
||||
div.recall_con{width:570px;}
|
||||
div.recall_con .reply_btn{margin-left:585px;margin-top:5px;}
|
||||
</style>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
|
||||
<% end %>
|
||||
|
||||
<div class="msg_box" id='leave-message' nhname='new_message' style="height:auto; width:728px;">
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
<h4><%= l(:label_user_response) %></h4>
|
||||
<% if !User.current.logged?%>
|
||||
<div style="font-size: 14px;margin:20px;">
|
||||
<%= l(:label_user_login_tips) %>
|
||||
<%= link_to l(:label_user_login_new), signin_path %>
|
||||
<hr/>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_for('new_form', :method => :post, :html => {:id => 'project_feedback_form', :multipart => true},
|
||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65, :style => "width:718px",
|
||||
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
||||
<p nhname="contentmsg"></p>
|
||||
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||
<%#= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
||||
<a href="javascript:void(0);" class="blue_btn fr ml10 mt10" id="submit_feedback_project" >留言</a>
|
||||
<%#= link_to l(:button_leave_meassge), "javascript:void(0)", :onclick => 'submitProjectFeedback();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fr mt10 mb10' %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="history">
|
||||
<%= render :partial => 'history',:locals => { :journals => @jour, :state => false} %>
|
||||
</div>
|
||||
<ul class="wlist"><%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%></ul>
|
||||
|
||||
<div style="display:none;"><a href="#" id="nhjump"></a></div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#submit_feedback_project").one('click',function() {
|
||||
$("#project_feedback_form").submit();
|
||||
});
|
||||
|
||||
function init_editor(params){
|
||||
params.textarea.removeAttr('placeholder');
|
||||
var editor = params.kindutil.create(params.textarea, {
|
||||
resizeType : 1,minWidth:"1px",width:"100%",height:"150px",
|
||||
items:['emoticons'],
|
||||
afterChange:function(){//按键事件
|
||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||
},
|
||||
afterCreate:function(){
|
||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||
params.toolbar_container.append(toolbar);
|
||||
}
|
||||
}).loadPlugin('paste');
|
||||
return editor;
|
||||
}
|
||||
|
||||
function nh_check_field(params){
|
||||
var result=true;
|
||||
if(params.content!=undefined){
|
||||
if(params.content.isEmpty()){
|
||||
result=false;
|
||||
}
|
||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||
params.textarea.html(params.content.html());
|
||||
params.content.sync();
|
||||
if(params.content.isEmpty()){
|
||||
params.contentmsg.html('内容不能为空');
|
||||
params.contentmsg.css({color:'#ff0000'});
|
||||
params.submit_btn.one('click', function(){
|
||||
params.form.submit();
|
||||
});
|
||||
}else{
|
||||
params.contentmsg.html('填写正确');
|
||||
params.contentmsg.css({color:'#008000'});
|
||||
}
|
||||
params.contentmsg.show();
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
function init_form(params){
|
||||
// var flag = false;
|
||||
// if(params.form.attr('data-remote') != undefined ){
|
||||
// flag = true
|
||||
// }
|
||||
// params.form[0].onsubmit = function(){
|
||||
// if(flag){
|
||||
// $(this).removeAttr('data-remote');//不这么搞return false没用 花擦花擦
|
||||
// }
|
||||
// var is_checked = nh_check_field({
|
||||
// issubmit:true,
|
||||
// content:params.editor,
|
||||
// contentmsg:params.contentmsg,
|
||||
// textarea:params.textarea
|
||||
// });
|
||||
// if(is_checked){
|
||||
// if(flag){
|
||||
// alert('add')
|
||||
// $(this).attr('data-remote','true');
|
||||
// }
|
||||
// alert('ok')
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
params.form.submit(function(){
|
||||
var flag = false;
|
||||
if(params.form.attr('data-remote') != undefined ){
|
||||
flag = true
|
||||
}
|
||||
var is_checked = nh_check_field({
|
||||
issubmit:true,
|
||||
content:params.editor,
|
||||
contentmsg:params.contentmsg,
|
||||
textarea:params.textarea,
|
||||
submit_btn:params.submit_btn,
|
||||
form:params.form
|
||||
});
|
||||
if(is_checked){
|
||||
if(flag){
|
||||
return true;
|
||||
}else{
|
||||
$(this)[0].submit();
|
||||
return false;
|
||||
}
|
||||
// return true; //这个涛哥的firefox不能提交
|
||||
//$(this).trigger('submit'); //这个虽然能提交 但是他是个死循环
|
||||
//$(this)[0].submit(); //用这个form的data-remote='true'没效果了
|
||||
//肿么破阿 我滴个神 实在不行就用$.ajax()算了
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
function nh_reset_form(params){
|
||||
params.form[0].reset();
|
||||
params.textarea.empty();
|
||||
if(params.editor != undefined){
|
||||
params.editor.html(params.textarea.html());
|
||||
}
|
||||
params.contentmsg.hide();
|
||||
}
|
||||
|
||||
KindEditor.ready(function(K){
|
||||
$("a[nhname='reply_btn']").live('click',function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.container = $(this).parent('div').parent('div');
|
||||
params.div_form = $(">.respond-form",params.container);
|
||||
params.form = $("form",params.div_form);
|
||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
|
||||
params.submit_btn = $("input[nhname='submit_btn']",params.div_form);
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
params.submit_btn.one('click', function () {
|
||||
params.form.submit();
|
||||
});
|
||||
params.cancel_btn.click(function(){
|
||||
nh_reset_form(params);
|
||||
});
|
||||
params.cancel_btn.click();
|
||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||
setTimeout(function(){
|
||||
if(!params.div_form.is(':hidden')){
|
||||
params.textarea.show();
|
||||
params.textarea.focus();
|
||||
params.textarea.hide();
|
||||
// $("#nhjump").attr('href','#'+params.div_form.attr('id'));
|
||||
// $("#nhjump")[0].click();
|
||||
}
|
||||
},300);
|
||||
params.textarea.data('init',1);
|
||||
});
|
||||
|
||||
$("div[nhname='new_message']").each(function(){
|
||||
var params = {};
|
||||
params.kindutil = K;
|
||||
params.div_form = $(this);
|
||||
params.form = $("form",params.div_form);
|
||||
if(params.form==undefined || params.form.length==0){
|
||||
return;
|
||||
}
|
||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||
if(params.textarea.data('init') == undefined){
|
||||
params.editor = init_editor(params);
|
||||
init_form(params);
|
||||
// $("a[nhname='cancel_btn']",params.div_form).click(function(){
|
||||
// nh_reset_form(params);
|
||||
// });
|
||||
params.textarea.data('init',1);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="st_list">
|
||||
<div class="st_list2">
|
||||
<div class="st_box">
|
||||
<a href="#" class="fr fb mb5" >加入时间</a>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
|
|
@ -18,16 +18,16 @@
|
|||
<!--<%#= link_to l(:project_module_code_review), {controller: 'code_review', action: 'index', id: @project.id} %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--<li>-->
|
||||
<!--<%# unless @project.enabled_modules.where("name = 'calendar'").empty? %>-->
|
||||
<!--<%#= link_to l(:project_module_calendar),project_calendar_path(@project) %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--<li>-->
|
||||
<!--<%# unless @project.enabled_modules.where("name = 'gantt'").empty? %>-->
|
||||
<!--<%#= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<li>
|
||||
<% unless @project.enabled_modules.where("name = 'calendar'").empty? %>
|
||||
<%= link_to l(:project_module_calendar),project_calendar_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<% unless @project.enabled_modules.where("name = 'gantt'").empty? %>
|
||||
<%= link_to l(:project_module_gantt) ,project_gantt_path(@project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<!--<li>-->
|
||||
<!--<%# unless @project.enabled_modules.where("name = 'documents'").empty? %>-->
|
||||
<!--<%#= link_to l(:project_module_documents), project_documents_path(@project) %>-->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= l(:label_project_tool_response)%></h2>
|
||||
</div>
|
||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
||||
|
@ -47,4 +47,8 @@ function checkMaxLength() {
|
|||
|
||||
</script>
|
||||
|
||||
<% html_title(l(:label_project_tool_response)) -%>
|
||||
<% html_title(l(:label_project_tool_response)) -%>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
|
@ -1,4 +1,4 @@
|
|||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title %></h2>
|
||||
<% if is_project_manager?(User.current, @project) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
|
@ -11,3 +11,7 @@
|
|||
<%= render :partial => @render_file, :locals => {:members => @members} %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
||||
|
|
|
@ -16,15 +16,16 @@
|
|||
<% end%>
|
||||
<% end%>
|
||||
$("div[nhname='pro_setting']").show();
|
||||
$("#RSide").css('width',"730px");
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2">配置</h2>
|
||||
</div>
|
||||
|
||||
<!--通过admin界面配置,不同角色显示不同的模块-->
|
||||
<div class=" pro_setting" nhname="pro_setting" style="display:none;">
|
||||
<div nhname="pro_setting" style="display:none; width:730px;">
|
||||
<div id="pro_st_tb_" class="pro_st_tb_">
|
||||
<ul>
|
||||
<% show_memu = show_project_memu User.current%>
|
||||
|
@ -39,7 +40,7 @@
|
|||
<% end %>
|
||||
<li id="pro_st_tb_5" class="<%= show_memu == 'join_org' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(5);">组织</li>
|
||||
<% if User.current.allowed_to?(:manage_versions, @project) %>
|
||||
<li id="pro_st_tb_4" class="<%= show_memu == 'manage_versions' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(4);">版本</li>
|
||||
<li id="pro_st_tb_4" class="<%= show_memu == 'manage_versions' ? 'pro_st_hovertab' : 'pro_st_normaltab'%>" onclick="project_setting(4);"><%= l(:milestone) %></li>
|
||||
<% end %>
|
||||
<!--<li id="pro_st_tb_5" class="pro_st_normaltab" onclick="project_setting(5);">问题类别</li>-->
|
||||
<% if User.current.allowed_to?(:manage_repository, @project) %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= l(:label_user_watcher)%></h2>
|
||||
</div>
|
||||
<div class="st_list">
|
||||
<div class="st_list2">
|
||||
<div class="st_box">
|
||||
<a href="#" class="fr fb mb5" >加入时间</a>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
@ -23,4 +23,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_followers)) -%>
|
||||
<% html_title(l(:label_followers)) -%>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
|
@ -2,7 +2,7 @@
|
|||
// $("#ajax-indicator span").text("载入中...");
|
||||
$("#ajax-indicator").show();
|
||||
</script>
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2">分析结果</h2>
|
||||
</div>
|
||||
<ul class="analysis-result-list">
|
||||
|
@ -35,4 +35,8 @@
|
|||
<%#= 数据为空时候界面,待完善 %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%= javascript_include_tag 'highcharts','highcharts-more' %>
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2" style="width:180px;">质量分析</h2>
|
||||
</div>
|
||||
|
||||
|
@ -161,3 +161,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,25 +1,29 @@
|
|||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="project_r_h">
|
||||
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
||||
</div>
|
||||
|
||||
<div class="repository_con " style="line-height:1.9;">
|
||||
<%= render :partial => 'navigation' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<div class="mt10">
|
||||
|
||||
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
|
||||
|
||||
</div>
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_change_plural)) -%>
|
||||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
||||
</div>
|
||||
|
||||
<div class="repository_con " style="line-height:1.9;">
|
||||
<%= render :partial => 'navigation' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'link_to_functions' %>
|
||||
|
||||
<%= render_properties(@properties) %>
|
||||
|
||||
<div class="mt10">
|
||||
|
||||
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
|
||||
|
||||
</div>
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "scm" %>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_change_plural)) -%>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<%#= call_hook(:view_repositories_show_contextual, {:repository => @repository, :project => @project}) %>
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<div class="fl"><h2 class="project_h2_repository"><%= render :partial => 'breadcrumbs', :locals => {:path => @path, :kind => 'dir', :revision => @rev} %></h2></div>
|
||||
<% unless @entries.nil? %>
|
||||
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<% end %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="recordBanner mt10">
|
||||
<div class="recordBanner mt10" style="width:730px;">
|
||||
<% if @changesets && !@changesets.empty? %>
|
||||
<% if !user_commit_rep(@changesets_latest_coimmit.author_email).nil? %>
|
||||
<%= image_tag(url_to_avatar(user_commit_rep(@changesets_latest_coimmit.author_email)), :width => "25", :height => "25", :class => "fl portraitRadius mt2 ml4 mr5") %>
|
||||
|
@ -77,10 +77,22 @@
|
|||
<%= render :partial => 'dir_list' %>
|
||||
<% end %>
|
||||
|
||||
<a href="https://<%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
|
||||
<a href="<%= Setting.protocol + "://" %><%=Setting.host_name %>/forums/1/memos/1232" >如何提交代码</a>
|
||||
<div class="fr">
|
||||
<a style="color: #7f7f7f;">导出统计结果:</a>
|
||||
<%= link_to "最近一周", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "week" } %> <a style="color: #7f7f7f;">|</a>
|
||||
<%= link_to "最近一月", {:controller => 'repositories', :action => 'export_rep_static', :format => 'xls', :rev => @rev, :cycle => "month" } %>
|
||||
</div>
|
||||
|
||||
<%#= link_to "导出excel", {:controller => 'repositories', :action => 'export_rep_static', :rev => @rev}, :format => 'xls' %>
|
||||
<!--<a href="<%#=project_issues_path(:project_id => @project, :format => 'xls')%>" class="hw_btn_blue fr" alt="导出EXCEL">导出EXCEL</a>-->
|
||||
</div>
|
||||
<%# content_for :header_tags do %>
|
||||
<%#= stylesheet_link_tag "scm" %>
|
||||
<%# end %>
|
||||
|
||||
<% html_title(l(:label_repository)) -%>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<% score = st.work_score %>
|
||||
<div class="<%= score_color score%> student_final_scor_info ml35 pr" style="display: inline">
|
||||
<% if is_expand %>
|
||||
<span style="position: absolute;top: -33px; color: #3b94d6" onclick = "show_student_work(<%= student_work_path(st)%>)">评分</span>
|
||||
<span style="position: absolute;top: -33px; color: #3b94d6; white-space:nowrap;" onclick = "show_student_work(<%= student_work_path(st)%>)">评分</span>
|
||||
<% end %>
|
||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||
<% unless score.nil?%>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<% end %>
|
||||
|
||||
<% is_pro = homework.homework_type == 2 && is_teacher %>
|
||||
<% is_base_group = homework.homework_type == 3 && homework.homework_detail_group.base_on_project == 1 && !is_teacher %>
|
||||
<% is_base_group = homework.homework_type == 3 && (homework.homework_detail_group.base_on_project == 1 || !(cur_user_works_for_homework(homework).nil?)) && !is_teacher %>
|
||||
<div class="mt8 mb5">
|
||||
<%= render :partial => 'users/homework_opr', :locals => {:activity => homework, :is_teacher => is_teacher, :hw_status => 5, :user_activity_id => homework.id} %>
|
||||
<% if is_pro || is_base_group %>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<%= user_for_homework_common activity,is_teacher %>
|
||||
</div>
|
||||
<% work = cur_user_works_for_homework activity %>
|
||||
<% if activity.end_time < Date.today && !is_teacher && !work.nil? && work.user == User.current %>
|
||||
<% if !is_teacher && !work.nil? && work.user == User.current && activity.end_time < Date.today %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "追加附件", student_work_index_url_in_org(activity.id, 2, 1), :class => 'c_blue', :title => "可追加作品修订附件" %>
|
||||
</div>
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<span class="proInfoP" style="width:100px;"><span><%= format_date(activity.due_date)? format_date(activity.due_date) : "--" %></span></span> </li>
|
||||
<div class="cl"></div>
|
||||
<li>
|
||||
<p class="label03"> 目标版本 : </p>
|
||||
<p class="label03"> <%=l(:milestone)%> : </p>
|
||||
<span class="proInfoP" style="width:100px;"><%= (activity.fixed_version ? link_to_user_version(activity.fixed_version) : "--") %> </span> </li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="homepagePostReplyBannerCount">
|
||||
<span>回复</span>
|
||||
<span class="reply_iconup" > ︿</span>
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span class="mr15"><%= count>0 ? "(#{count})" : "" %></span><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
}
|
||||
line.children().css("background-color", 'white');
|
||||
id = line.children().last().html();
|
||||
user_id = line.children().eq(5).html();
|
||||
user_id = line.children().eq(4).html();
|
||||
if(user_id === '<%= User.current.id%>') {
|
||||
if(line.children().first().children().data('hasHistory') == 'Y'){
|
||||
alert('该资源存在历史版本,不能删除');
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
document.oncontextmenu = function() {return true;}
|
||||
line.children().css("background-color",'white');
|
||||
id = line.children().last().html();
|
||||
user_id = line.children().eq(5).html();
|
||||
user_id = line.children().eq(4).html();
|
||||
if(user_id === '<%= User.current.id %>') {
|
||||
res_name = line.children().eq(1).children().attr('title');
|
||||
res_link = line.children().eq(1).html();
|
||||
|
|
|
@ -3,14 +3,20 @@
|
|||
<p class="f14 mb5">»<%= l(:label_versions_progress)%></p>
|
||||
<%= progress_bar([version.closed_percent], :width => '648px;', :legend => ('%0.0f%' % version.completed_percent)) %>
|
||||
<p class="progress-info">
|
||||
<%= link_to(l(:label_x_issues, :count => version.issues_count),
|
||||
<%#= link_to(l(:label_x_issues, :count => version.issues_count),
|
||||
project_issues_path(version.project, :status_id => '*', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue",) %>
|
||||
<a class="c_dblue" target="_blank"><%=version.issues_count%> 问题</a>
|
||||
|
||||
(<%= link_to_if(version.closed_issues_count > 0, l(:label_x_closed_issues_abbr, :count => version.closed_issues_count),
|
||||
(<%#= link_to_if(version.closed_issues_count > 0, l(:label_x_closed_issues_abbr, :count => version.closed_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>
|
||||
<% if version.closed_issues_count > 0 %>
|
||||
<a class="c_dblue" target="_blank"><%end%><%=version.closed_issues_count%> 已关闭</a>
|
||||
—
|
||||
<%= link_to_if(version.open_issues_count > 0, l(:label_x_open_issues_abbr, :count => version.open_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>)
|
||||
<%#= link_to_if(version.open_issues_count > 0, l(:label_x_open_issues_abbr, :count => version.open_issues_count),
|
||||
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>
|
||||
<% if version.open_issues_count > 0%>
|
||||
<a class="c_dblue" target="_blank"><%end%><%=version.open_issues_count%> 打开</a>
|
||||
)
|
||||
</p>
|
||||
<% else %>
|
||||
<div class="flash error"><%= l(:label_roadmap_no_issues) %></div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2"><%= l(:label_roadmap) %></h2>
|
||||
</div>
|
||||
<div class="roadmap">
|
||||
|
@ -9,7 +9,7 @@
|
|||
<label><%= check_box_tag "tracker_ids[]", tracker.id, (@selected_tracker_ids.include? tracker.id.to_s), :id => nil %>
|
||||
<%=h tracker.name %></label>
|
||||
<% end %>
|
||||
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
|
||||
<!--label for="completed"><%#= check_box_tag "completed", 1, params[:completed] %> <%#= l(:label_show_completed_versions) %></label-->
|
||||
<% if @project.descendants.active.any? %>
|
||||
<%= hidden_field_tag 'with_subprojects', 0 %>
|
||||
<label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
|
||||
|
@ -24,9 +24,10 @@
|
|||
<% else %>
|
||||
<% @versions.each do |version| %>
|
||||
|
||||
<div class="roadmap_box">
|
||||
<p><a href="javascript:void(0)" class=" f16 fb c_dblue " target="_blank">
|
||||
<%= link_to_version_show version, :name => version_anchor(version) %>
|
||||
<div class="roadmap_box" style="width:710px;">
|
||||
<p><a class=" f16 fb c_dblue ">
|
||||
<a class=" f16 fb c_dblue " ><%= version_anchor(version)%></a>
|
||||
<%#= link_to_version_show version, :name => version_anchor(version) %>
|
||||
<% if version.completed? %>
|
||||
<span style="color: #E8770D;float:right;"><%= format_date(version.effective_date) %></span>
|
||||
<% elsif version.effective_date %>
|
||||
|
@ -57,10 +58,10 @@
|
|||
<div class="roadmap_list">
|
||||
<p class="f14 mb5">»<%= l(:label_versions_description)%></p>
|
||||
<p><%=h version.description %></p>
|
||||
<!--p class="f14 mb5">»<%#= link_to "导出:Excel", version_path(version, :format => 'xls') %></p-->
|
||||
</div><!--roadmap_list end-->
|
||||
</div><!--roadmap_box end-->
|
||||
<% end %>
|
||||
|
||||
<ul class="wlist" >
|
||||
<%= pagination_links_full @versions_pages%>
|
||||
</ul>
|
||||
|
@ -71,3 +72,7 @@
|
|||
<% html_title(l(:label_roadmap)) %>
|
||||
|
||||
<%= context_menu issues_context_menu_path %>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= wiki_page_breadcrumb(@page) %>
|
||||
|
||||
<script src="http://<%= Setting.host_name%>/javascripts/ckeditor/ckeditor.js?1404953555" type="text/javascript"></script>
|
||||
<div class="project_r_h">
|
||||
<div class="project_r_h" style="width:730px;">
|
||||
<h2 class="project_h2">Wiki</h2>
|
||||
</div>
|
||||
<!--<h3 style="word-break: break-all;word-wrap: break-word;">-->
|
||||
|
@ -21,8 +21,8 @@
|
|||
|
||||
|
||||
<div class="wiki_new">
|
||||
<div class="actions" style="max-width:680px">
|
||||
<p style="max-width:680px;">
|
||||
<div class="actions" style="max-width:730px">
|
||||
<p style="max-width:730px;">
|
||||
<%=text_area_tag 'content[text]', @text, :required => true, :id => 'editor02', :cols => 100, :rows => 25 %>
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
|
@ -66,3 +66,7 @@
|
|||
<%= robot_exclusion_tag %>
|
||||
<% end %>
|
||||
<% html_title @page.pretty_title %>
|
||||
|
||||
<script>
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="project_r_h" xmlns="http://www.w3.org/1999/html">
|
||||
<div class="project_r_h" xmlns="http://www.w3.org/1999/html" style="width:730px;">
|
||||
<h2 class="project_h2">Wiki</h2>
|
||||
</div>
|
||||
<div class="wiki_page">
|
||||
|
@ -94,5 +94,7 @@
|
|||
}
|
||||
});
|
||||
};
|
||||
|
||||
$("#RSide").css("width","730px");
|
||||
</script>
|
||||
</div>
|
|
@ -11,7 +11,7 @@
|
|||
<%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="recall_con f14">
|
||||
<div class="recall_con f14" style="width:630px;">
|
||||
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
||||
<%= link_to reply.user.show_name, user_path(reply.user) %>
|
||||
<%= l(:label_reply_to)%>
|
||||
|
|
|
@ -48,10 +48,10 @@ zh:
|
|||
# 左边栏
|
||||
#
|
||||
label_project_id: "项目ID:"
|
||||
label_project_ivite_code: "邀请码:"
|
||||
label_project_ivite_code: "邀请码"
|
||||
|
||||
label_agree_join_project: 同意加入
|
||||
label_apply_project: "+申请加入"
|
||||
label_apply_project: "+加入"
|
||||
label_button_following: "+添加关注"
|
||||
label_exit_project: 退出项目
|
||||
label_apply_project_waiting: 已处理申请,请等待管理员审核
|
||||
|
@ -199,7 +199,36 @@ zh:
|
|||
lable_issues_undo: "未解决"
|
||||
label_issue_new: 新建问题
|
||||
label_query: 自定义查询
|
||||
|
||||
label_issue_list_xls: Issue列表
|
||||
label_rep_xls: 版本库代码统计
|
||||
label_rep_branch: 分支
|
||||
|
||||
# Issue列表 excel导出参数
|
||||
issue_xls_id: ID
|
||||
issue_xls_title: 标题
|
||||
issue_xls_description: 描述
|
||||
issue_xls_created_at: 创建时间
|
||||
issue_xls_tracker_id: 类型
|
||||
issue_xls_author: 发布人
|
||||
issue_xls_assign: 指派给
|
||||
issue_xls_status: 状态
|
||||
issue_xls_priority: 优先级
|
||||
issue_xls_version: 目标版本
|
||||
issue_xls_start: 开始时间
|
||||
issue_xls_due: 截止时间
|
||||
issue_xls_ratio: 完成度
|
||||
|
||||
# 版本库excel导出
|
||||
rep_branch: 分支
|
||||
rep_author: 作者
|
||||
rep_author_mail: 邮箱
|
||||
rep_changeset: 提交次数
|
||||
rep_code_add: 添加行数
|
||||
rep_code_delete: 删除代码
|
||||
rep_code_modified: 总行数
|
||||
rep_sode_time: 导出时间
|
||||
rep_sode_cycle: 时间区间
|
||||
|
||||
# 自定义查询
|
||||
label_query_plural: 自定义查询
|
||||
label_query_new: 新建查询
|
||||
|
@ -208,6 +237,7 @@ zh:
|
|||
# 自定义查询> 过滤器类别
|
||||
field_status: 状态
|
||||
field_fixed_version: 目标版本
|
||||
milestone: 里程碑
|
||||
field_assigned_to_role: 角色的成员
|
||||
field_category: 类别
|
||||
field_created_on: 创建于
|
||||
|
@ -215,7 +245,7 @@ zh:
|
|||
field_closed_on: 已关闭
|
||||
field_start_date: 开始日期
|
||||
field_due_date: 计划完成日期
|
||||
field_estimated_hours: 预期时间
|
||||
field_estimated_hours: 预计工时 (H)
|
||||
field_assigned_to: 指派给
|
||||
field_priority: 优先级
|
||||
field_done_ratio: "% 完成"
|
||||
|
@ -462,3 +492,6 @@ zh:
|
|||
label_state_open: 待处理
|
||||
label_state_closed: 关闭
|
||||
label_state_merged: 已合并
|
||||
|
||||
label_done_ratio_endding: 已完成
|
||||
label_done_ratio_doing: 未完成
|
||||
|
|
|
@ -623,7 +623,7 @@ zh:
|
|||
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
|
||||
label_course_board: 讨论区
|
||||
label_version: 版本
|
||||
label_version_new: 新建版本
|
||||
label_version_new: 新建里程碑
|
||||
|
||||
label_close_versions: 关闭已完成的版本
|
||||
label_confirmation: 确认
|
||||
|
|
|
@ -982,6 +982,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'projects/:id/repository/changes(/*path(.:ext))', :to => 'repositories#changes'
|
||||
|
||||
get 'projects/:id/repository/forked', :to => 'repositories#forked'
|
||||
get 'projects/:id/repository/export_rep_static', :to => 'repositories#export_rep_static'
|
||||
get 'projects/:id/repository/project_archive', :to => 'repositories#project_archive', :as => 'project_archive'
|
||||
get 'projects/:id/repository/revisions', :to => 'repositories#revisions'
|
||||
get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision'
|
||||
|
|
|
@ -198,7 +198,7 @@ default_projects_modules:
|
|||
- calendar
|
||||
- gantt
|
||||
- course
|
||||
- dts
|
||||
# - dts
|
||||
default_projects_tracker_ids:
|
||||
serialized: true
|
||||
default:
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class ChangePorojectType < ActiveRecord::Migration
|
||||
def up
|
||||
projects = Project.where("project_new_type !=?", 1)
|
||||
projects.update_all(:project_new_type => 1)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -117,6 +117,16 @@ class Gitlab::Client
|
|||
end
|
||||
alias_method :repo_rep_stats, :rep_stats
|
||||
|
||||
def rep_stats_week(project, options={})
|
||||
get("/projects/#{project}/repository/rep_stats_week", :query => options)
|
||||
end
|
||||
alias_method :repo_rep_stats, :rep_stats
|
||||
|
||||
def rep_stats_month(project, options={})
|
||||
get("/projects/#{project}/repository/rep_stats_month", :query => options)
|
||||
end
|
||||
alias_method :repo_rep_stats, :rep_stats
|
||||
|
||||
def rep_user_stats(project, options={})
|
||||
get("/projects/#{project}/repository/rep_user_stats", :query => options)
|
||||
end
|
||||
|
|
|
@ -187,13 +187,13 @@ Redmine::AccessControl.map do |map|
|
|||
map.permission :delete_issue_watchers, {:watchers => :destroy}
|
||||
end
|
||||
|
||||
map.project_module :time_tracking do |map|
|
||||
map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
|
||||
map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true
|
||||
map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member
|
||||
map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
|
||||
map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
|
||||
end
|
||||
# map.project_module :time_tracking do |map|
|
||||
# map.permission :log_time, {:timelog => [:new, :create]}, :require => :loggedin
|
||||
# map.permission :view_time_entries, {:timelog => [:index, :report, :show]}, :read => true
|
||||
# map.permission :edit_time_entries, {:timelog => [:edit, :update, :destroy, :bulk_edit, :bulk_update]}, :require => :member
|
||||
# map.permission :edit_own_time_entries, {:timelog => [:edit, :update, :destroy,:bulk_edit, :bulk_update]}, :require => :loggedin
|
||||
# map.permission :manage_project_activities, {:project_enumerations => [:update, :destroy]}, :require => :member
|
||||
# end
|
||||
|
||||
map.project_module :news do |map|
|
||||
map.permission :manage_news, {:news => [:new, :create, :edit, :update, :destroy], :comments => [:destroy]}, :require => :member
|
||||
|
@ -207,12 +207,12 @@ Redmine::AccessControl.map do |map|
|
|||
map.permission :notificationcomment_contestnotifications, {:notificationcomments => :create},:belong_to_contest => true
|
||||
end
|
||||
|
||||
map.project_module :documents do |map|
|
||||
map.permission :add_documents, {:documents => [:new, :create, :add_attachment]}, :require => :loggedin
|
||||
map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment]}, :require => :loggedin
|
||||
map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin
|
||||
map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true
|
||||
end
|
||||
# map.project_module :documents do |map|
|
||||
# map.permission :add_documents, {:documents => [:new, :create, :add_attachment]}, :require => :loggedin
|
||||
# map.permission :edit_documents, {:documents => [:edit, :update, :add_attachment]}, :require => :loggedin
|
||||
# map.permission :delete_documents, {:documents => [:destroy]}, :require => :loggedin
|
||||
# map.permission :view_documents, {:documents => [:index, :show, :download]}, :read => true
|
||||
# end
|
||||
|
||||
map.project_module :files do |map|
|
||||
map.permission :manage_files, {:files => [:new, :create]}, :require => :loggedin
|
||||
|
@ -257,9 +257,9 @@ Redmine::AccessControl.map do |map|
|
|||
map.permission :view_gantt, {:gantts => [:show, :update]}, :read => true
|
||||
end
|
||||
|
||||
map.project_module :dts do |map|
|
||||
map.permission :do_dts, {:dts => :show}, :read => true
|
||||
end
|
||||
# map.project_module :dts do |map|
|
||||
# map.permission :do_dts, {:dts => :show}, :read => true
|
||||
# end
|
||||
# map.project_module :journals do |map|
|
||||
# map.permission :view_journals_for_messages, {:gantts => [:show, :update]}, :read => true
|
||||
# end
|
||||
|
|
|
@ -61,7 +61,7 @@ module Redmine
|
|||
end
|
||||
end
|
||||
|
||||
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil)
|
||||
def initialize(url, root_url=nil, login=nil, password=nil, path_encoding=nil, project_id)
|
||||
super
|
||||
@path_encoding = path_encoding.blank? ? 'UTF-8' : path_encoding
|
||||
end
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 4.2 KiB |
|
@ -1054,10 +1054,12 @@ function showNormalImage(id) {
|
|||
|
||||
//无格式的图片不让点击显示大图,显示的话会有问题
|
||||
var tmpsrc = image.attr('src');
|
||||
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
|
||||
var element = $("<a></a>").attr("href", image.attr('src'));
|
||||
image.wrap(element);
|
||||
$(image).parent().colorbox({rel: 'nofollow', close: "关闭", returnFocus: false});
|
||||
if(tmpsrc){
|
||||
if (tmpsrc.indexOf('.gif') >= 0 || tmpsrc.indexOf('.jpg') >= 0 || tmpsrc.indexOf('.jpeg') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.bmp') >= 0 || tmpsrc.indexOf('.png') >= 0 || tmpsrc.indexOf('.BMP') >= 0 || tmpsrc.indexOf('.JPEG') >= 0 || tmpsrc.indexOf('.JPG') >= 0 || tmpsrc.indexOf('.PNG') >= 0 || tmpsrc.indexOf('.GIF') >= 0) {
|
||||
var element = $("<a></a>").attr("href", image.attr('src'));
|
||||
image.wrap(element);
|
||||
$(image).parent().colorbox({rel: 'nofollow', close: "关闭", returnFocus: false});
|
||||
}
|
||||
}
|
||||
}
|
||||
//$('#'+id+' a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false}); //有图片才将链接变为弹出框
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
/***** Calendar *****/
|
||||
table#calender td{padding: 2px;}
|
||||
table.cal {border-collapse: collapse; width: 100%; margin: 0px 0 6px 0;border: 1px solid #d7d7d7;}
|
||||
table.cal thead th {width: 14%; background-color:#EEEEEE; padding: 4px; }
|
||||
table.cal thead th.week-number {width: auto;}
|
||||
table.cal tbody tr {height: 100px;}
|
||||
table.cal td {border: 1px solid #d7d7d7; vertical-align: top; font-size: 0.9em;}
|
||||
table.cal td.week-number { background-color:#EEEEEE; padding: 4px; border:none; font-size: 1em;}
|
||||
table.cal td p.day-num {font-size: 1.1em; text-align:right;}
|
||||
table.cal td.odd p.day-num {color: #bbb;}
|
||||
table.cal td.today {background:#ffffdd;}
|
||||
table.cal td.today p.day-num {font-weight: bold;}
|
||||
table.cal .starting a, p.cal.legend .starting {background: url(/images/bullet_go.png) no-repeat -1px -2px; padding-left:16px;}
|
||||
table.cal .ending a, p.cal.legend .ending {background: url(/images/bullet_end.png) no-repeat -1px -2px; padding-left:16px;}
|
||||
table.cal .starting.ending a, p.cal.legend .starting.ending {background: url(/images/bullet_diamond.png) no-repeat -1px -2px; padding-left:16px;}
|
||||
p.cal.legend span {display:block;}
|
||||
|
||||
/***** Tooltips ******/
|
||||
.tooltip{position:relative;z-index:24;}
|
||||
.tooltip:hover{z-index:25;color:#000;}
|
||||
.tooltip span.tip{display: none; text-align:left;}
|
||||
|
||||
div.tooltip:hover span.tip{
|
||||
display:block;
|
||||
position:absolute;
|
||||
top:12px; left:24px; width:270px;
|
||||
border:1px solid #555;
|
||||
background-color:#fff;
|
||||
padding: 4px;
|
||||
font-size: 0.8em;
|
||||
color:#505050;
|
||||
}
|
||||
|
||||
img.ui-datepicker-trigger {
|
||||
display: block;
|
||||
background: url(/images/public_icon.png) -31px 0 no-repeat;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
margin-left: 5px;
|
||||
margin-top: 5px;
|
||||
width: 16px;
|
||||
height: 15px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.issue {background:#FFFFEC; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
|
||||
.tooltip{position:relative;z-index:24;}
|
||||
.tooltip:hover{z-index:25;color:#000;}
|
||||
.tooltip span.tip{display: none; text-align:left;}
|
||||
.task.parent.marker.starting { position: absolute; background: url(/images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; left: 0px; top: -1px;}
|
||||
|
||||
/*.icon*/
|
||||
.icon-package { background-image: url(/images/package.png); }
|
|
@ -521,15 +521,13 @@ a:hover.bgreen_n_btn{background:#08a384;}
|
|||
.red-cir-btn{ background:#e74c3c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.green-cir-btn{ background:#28be6c; padding:1px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.button-rep { color: #888;display: inline-block;background: #eee;padding: 2px 5px;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
|
||||
.green_btn_share{ background:#28be6c; padding:2px 5px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;}
|
||||
.borderRadius {border-radius:5px;}
|
||||
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.Blue-btn{ background:#3598db; color:#fff;}
|
||||
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtn{ background:#3598db; color:#fff;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:24px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;}
|
||||
|
||||
/*20160725 项目申请按钮*/
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
fieldset.collapsible { border-width: 1px 0 0 0; font-size: 0.9em; }
|
||||
fieldset.collapsible>legend { padding-left: 16px; background: url(/images/arrow_expanded.png) no-repeat 0% 40%; cursor:pointer; }
|
||||
fieldset.collapsible.collapsed>legend { background-image: url(/images/arrow_collapsed.png); }
|
||||
|
||||
/***** Gantt chart *****/
|
||||
.gantt_hdr {
|
||||
position:absolute;
|
||||
top:0;
|
||||
height:16px;
|
||||
border-top: 1px solid #c0c0c0;
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
border-right: 1px solid #c0c0c0;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.gantt_hdr.nwday {background-color:#f1f1f1;}
|
||||
|
||||
.gantt_subjects { font-size: 0.8em; }
|
||||
.gantt_subjects div { line-height:16px;height:16px;overflow:hidden;white-space:nowrap;text-overflow: ellipsis; }
|
||||
|
||||
.task {
|
||||
position: absolute;
|
||||
height:8px;
|
||||
font-size:0.8em;
|
||||
color:#888;
|
||||
padding:0;
|
||||
margin:0;
|
||||
line-height:16px;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.task.label {width:100%;}
|
||||
.task.label.project, .task.label.version { font-weight: bold; }
|
||||
|
||||
.task_late { background:#f66 url(/images/task_late.png); border: 1px solid #f66; }
|
||||
.task_done { background:#00c600 url(/images/task_done.png); border: 1px solid #00c600; }
|
||||
.task_todo { background:#aaa url(/images/task_todo.png); border: 1px solid #aaa; }
|
||||
|
||||
.task_todo.parent { background: #888; border: 1px solid #888; height: 3px;}
|
||||
.task_late.parent, .task_done.parent { height: 3px;}
|
||||
.task.parent.marker.starting { position: absolute; background: url(/images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; left: 0px; top: -1px;}
|
||||
.task.parent.marker.ending { position: absolute; background: url(/images/task_parent_end.png) no-repeat 0 0; width: 8px; height: 16px; margin-left: -4px; right: 0px; top: -1px;}
|
||||
|
||||
.version.task_late { background:#f66 url(/images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
|
||||
.version.task_done { background:#00c600 url(/images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
|
||||
.version.task_todo { background:#fff url(/images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
|
||||
.version.marker { background-image:url(/images/version_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }
|
||||
|
||||
.project.task_late { background:#f66 url(/images/milestone_late.png); border: 1px solid #f66; height: 2px; margin-top: 3px;}
|
||||
.project.task_done { background:#00c600 url(/images/milestone_done.png); border: 1px solid #00c600; height: 2px; margin-top: 3px;}
|
||||
.project.task_todo { background:#fff url(/images/milestone_todo.png); border: 1px solid #fff; height: 2px; margin-top: 3px;}
|
||||
.project.marker { background-image:url(/images/project_marker.png); background-repeat: no-repeat; border: 0; margin-left: -4px; margin-top: 1px; }
|
||||
|
||||
.version-behind-schedule a, .issue-behind-schedule a {color: #f66914;}
|
||||
.version-overdue a, .issue-overdue a, .project-overdue a {color: #f00;}
|
||||
/*end*/
|
||||
|
||||
dt.issue { background-image: url(/images/ticket.png); }
|
||||
dt.issue-edit { background-image: url(/images/ticket_edit.png); }
|
||||
dt.issue-closed { background-image: url(/images/ticket_checked.png); }
|
||||
dt.issue-note { background-image: url(/images/ticket_note.png); }
|
||||
dt.changeset { background-image: url(/images/changeset.png); }
|
||||
dt.news { background-image: url(/images/news.png); }
|
||||
dt.message { background-image: url(/images/message.png); }
|
||||
dt.reply { background-image: url(/images/comments.png); }
|
||||
dt.wiki-page { background-image: url(/images/wiki_edit.png); }
|
||||
dt.attachment { background-image: url(/images/attachment.png); }
|
||||
dt.document { background-image: url(/images/document.png); }
|
||||
dt.project { background-image: url(/images/projects.png); }
|
||||
dt.time-entry { background-image: url(/images/time.png); }
|
||||
|
||||
/***** Icons *****/
|
||||
.icon {
|
||||
background-position: 0% 50%;
|
||||
background-repeat: no-repeat;
|
||||
font-family: '微软雅黑'; /*modify by men*/
|
||||
padding-left: 20px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.icon_enterprise {
|
||||
background-position: 0% 50%;
|
||||
background-repeat: no-repeat;
|
||||
font-family: '微软雅黑'; /*modify by men*/
|
||||
padding-left: 20px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.icon_enterprise-add { background-image: url(/images/add_enterprise.png); }
|
||||
.icon-add { background-image: url(/images/add.png); }
|
||||
.icon-edit { /*background-image: url(../images/edit.png);*/ }
|
||||
.icon-copy { background-image: url(/images/copy.png); }
|
||||
.icon-duplicate { background-image: url(/images/duplicate.png); }
|
||||
.icon-del { /*background-image: url(../images/delete.png); */}
|
||||
.icon-move { background-image: url(/images/move.png); }
|
||||
.icon-save { background-image: url(/images/save.png); }
|
||||
.icon-cancel { background-image: url(/images/cancel.png); }
|
||||
.icon-multiple { background-image: url(/images/table_multiple.png); }
|
||||
.icon-folder { background-image: url(/images/folder.png); }
|
||||
.open .icon-folder { background-image: url(/images/folder_open.png); }
|
||||
.icon-package { background-image: url(/images/package.png); }
|
||||
.icon-user { background-image: url(/images/user.png); }
|
||||
.icon-projects { background-image: url(/images/projects.png); }
|
||||
.icon-help { background-image: url(/images/help.png); }
|
||||
.icon-attachment { background-image: url(/images/attachment.png);padding-left: 20px !important; }
|
||||
.icon-history { background-image: url(/images/history.png); }
|
||||
.icon-time { background-image: url(/images/time.png); }
|
||||
.icon-time-add { background-image: url(/images/time_add.png); }
|
||||
.icon-stats { background-image: url(/images/stats.png); }
|
||||
.icon-warning { background-image: url(/images/warning.png); }
|
||||
.icon-fav { background-image: url(/images/fav.png); }
|
||||
.icon-fav-off { background-image: url(/images/fav_off.png); }
|
||||
.icon-reload { background-image: url(/images/reload.png); }
|
||||
.icon-lock { background-image: url(/images/locked.png); }
|
||||
.icon-unlock { background-image: url(/images/unlock.png); }
|
||||
.icon-checked { background-image: url(/images/true.png); }
|
||||
.icon-details { background-image: url(/images/zoom_in.png); }
|
||||
.icon-report { background-image: url(/images/report.png); }
|
||||
.icon-comment { /*background-image: url(../images/comment.png); */}
|
||||
.icon-summary { background-image: url(/images/lightning.png); }
|
||||
.icon-server-authentication { background-image: url(/images/server_key.png); }
|
||||
.icon-issue { background-image: url(/images/ticket.png); }
|
||||
.icon-zoom-in { background-image: url(/images/zoom_in.png); }
|
||||
.icon-zoom-out { background-image: url(/images/zoom_out.png); }
|
||||
.icon-passwd { background-image: url(/images/textfield_key.png); }
|
||||
.icon-test { background-image: url(/images/bullet_go.png); }
|
||||
|
||||
.icon-file { background-image: url(/images/files/default.png); }
|
||||
.icon-file.text-plain { background-image: url(/images/files/text.png); }
|
||||
.icon-file.text-x-c { background-image: url(/images/files/c.png); }
|
||||
.icon-file.text-x-csharp { background-image: url(/images/files/csharp.png); }
|
||||
.icon-file.text-x-java { background-image: url(/images/files/java.png); }
|
||||
.icon-file.text-x-javascript { background-image: url(/images/files/js.png); }
|
||||
.icon-file.text-x-php { background-image: url(/images/files/php.png); }
|
||||
.icon-file.text-x-ruby { background-image: url(/images/files/ruby.png); }
|
||||
.icon-file.text-xml { background-image: url(/images/files/xml.png); }
|
||||
.icon-file.text-css { background-image: url(/images/files/css.png); }
|
||||
.icon-file.text-html { background-image: url(/images/files/html.png); }
|
||||
.icon-file.image-gif { background-image: url(/images/files/image.png); }
|
||||
.icon-file.image-jpeg { background-image: url(/images/files/image.png); }
|
||||
.icon-file.image-png { background-image: url(/images/files/image.png); }
|
||||
.icon-file.image-tiff { background-image: url(/images/files/image.png); }
|
||||
.icon-file.application-pdf { background-image: url(/images/files/pdf.png); }
|
||||
.icon-file.application-zip { background-image: url(/images/files/zip.png); }
|
||||
.icon-file.application-x-gzip { background-image: url(/images/files/zip.png); }
|
||||
|
||||
img.gravatar {
|
||||
padding: 2px;
|
||||
border: solid 1px #d5d5d5;
|
||||
background: #fff;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.issue img.gravatar {
|
||||
float: left;
|
||||
margin: 0 6px 0 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
div.issue table img.gravatar {
|
||||
height: 14px;
|
||||
width: 14px;
|
||||
padding: 2px;
|
||||
float: left;
|
||||
margin: 0 0.5em 0 0;
|
||||
}
|
||||
|
||||
h2 img.gravatar {margin: -2px 4px -4px 0;}
|
||||
h3 img.gravatar {margin: -4px 4px -4px 0;}
|
||||
h4 img.gravatar {margin: -6px 4px -4px 0;}
|
||||
td.username img.gravatar {margin: 0 0.5em 0 0; vertical-align: top;}
|
||||
#activity dt img.gravatar {float: left; margin: 0 1em 1em 0;}
|
||||
/* Used on 12px Gravatar img tags without the icon background */
|
||||
.icon-gravatar {float: left; margin-right: 4px;}
|
||||
|
||||
.buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; }
|
|
@ -167,7 +167,7 @@ div.thumbnails div {background:#fff;display:inline-block;margin-right:2px;}
|
|||
/* 里程碑 */
|
||||
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
|
||||
.progress{ width:648px; height:20px; margin-bottom:5px; background:#e9e9e9;}
|
||||
.closed{ background:#bae0ba; height:20px;}
|
||||
.closed{ background:#bae0ba;}
|
||||
.done{ background:#d3edd3; display:block;height:20px;float:left;}
|
||||
.roadmap_box{ margin-bottom:10px;}
|
||||
.roadmap_list_ul{border:1px solid #ddd; border-bottom:none; margin-bottom:10px;}
|
||||
|
@ -559,3 +559,339 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
|
|||
/*发布新样式*/
|
||||
.publish-icon {background:url("/images/new_project/icons_issue.png") 0px -82px no-repeat; width:18px; height:18px; display:block;}
|
||||
.publish-icon:hover {background:url("/images/new_project/icons_issue.png") -25px -82px no-repeat;}
|
||||
|
||||
/* 班级主页 */
|
||||
.sy_class_infobox{
|
||||
padding:15px;
|
||||
background:#fff;
|
||||
margin:12px auto 0;
|
||||
width:968px;
|
||||
border:1px solid #e5e5e5;
|
||||
position: relative;
|
||||
}
|
||||
.homepagePostSetting {
|
||||
position:absolute;
|
||||
width:20px;
|
||||
height:20px;
|
||||
right:10px;
|
||||
top:10px;
|
||||
}
|
||||
.homepagePostSetting ul li:hover ul {
|
||||
display:block;
|
||||
}
|
||||
|
||||
.homepagePostSettiongText {
|
||||
width:75px;
|
||||
text-align: center;
|
||||
line-height:2;
|
||||
font-size:12px;
|
||||
color:#616060;
|
||||
background-color:#ffffff;
|
||||
border:1px solid #eaeaea;
|
||||
border-radius:3px;
|
||||
position:absolute;
|
||||
left:-60px;
|
||||
top:20px;
|
||||
padding:5px 0px;
|
||||
display:none;
|
||||
box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);
|
||||
}
|
||||
|
||||
a.postOptionLink {
|
||||
color:#616060;
|
||||
display:block;
|
||||
width:55px;
|
||||
padding:0px 10px;
|
||||
}
|
||||
a.postOptionLink:hover {
|
||||
color:#fff;
|
||||
background-color:#3b94d6;
|
||||
}
|
||||
|
||||
.sy_class_logo{
|
||||
width:110px;
|
||||
height:110px;
|
||||
}
|
||||
.sy_class_id{
|
||||
width:110px;
|
||||
height:80px;
|
||||
background:#fff;
|
||||
border: 1px solid #f1f1f1;
|
||||
text-align:center;
|
||||
padding-top:30px;
|
||||
}
|
||||
.sy_class_id p{
|
||||
font-size:16px;
|
||||
color:#333;
|
||||
}
|
||||
.sy_class_title{
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
margin-bottom: 5px;
|
||||
max-width:440px;
|
||||
overflow:hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
|
||||
.sy_class_titbox{margin-bottom:5px; padding-top:10px; }
|
||||
|
||||
/*旧版课程大纲新建编辑*/
|
||||
.sy_tab_con{width:740px; padding:20px; position:relative;}
|
||||
.syllabuscon_title{
|
||||
color:#000; text-align:center;
|
||||
}
|
||||
.syllabuscon_txt p{
|
||||
font-size:14px;
|
||||
line-height:1.9;
|
||||
color:#000;
|
||||
}
|
||||
.syllabuscon_txt_title{
|
||||
font-weight:bold;
|
||||
margin:10px 0;
|
||||
}
|
||||
.syllabusbox_tishi{
|
||||
font-size:14px;
|
||||
width:733px;
|
||||
color:#cb7c01;
|
||||
padding:10px 0 0 15px;
|
||||
margin-bottom:10px;
|
||||
background:#fff7d1;
|
||||
border:1px solid #fcd9b4;
|
||||
height:34px;
|
||||
}
|
||||
a.syllabusbox_a_blue{
|
||||
color:#3b94d6;
|
||||
}
|
||||
.syllabus_leftinfo p{
|
||||
line-height:25px;
|
||||
width:150px;
|
||||
overflow:hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
.syllabus_info_tishi{
|
||||
font-size:16px;
|
||||
width:400px;
|
||||
margin:100px auto;
|
||||
}
|
||||
.syllabus_info_tishi a{
|
||||
color:#3b94d6;
|
||||
}
|
||||
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px; }
|
||||
.homepagePostSettiongText {width:75px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-48px; top:20px; padding:5px 0px; display:none;}
|
||||
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||
a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat !important; height:20px; display:block; padding-left:20px; color:#888888; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
|
||||
a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat !important; color:#3598db; -moz-transition :all 0s linear 0s; -webkit-transition :all 0s linear 0s; -o-transition:all 0s linear 0s; transition:all 0s linear 0s;}
|
||||
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3b94d6; color:#3b94d6; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||
a:hover.BlueCirBtnMini{ background:#3b94d6; color:#fff;}
|
||||
|
||||
/* 按钮 复制课程大纲*/
|
||||
a.btn_orange_big{
|
||||
border: 1px solid #ee4a1f;
|
||||
color: #ee4a1f;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
padding:0 10px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.btn_orange_big{
|
||||
background: #ee4a1f;
|
||||
color: #fff;
|
||||
}
|
||||
a.btn_green_big{
|
||||
border: 1px solid #60b25e;
|
||||
color: #60b25e;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
padding:0 10px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.btn_green_big{
|
||||
background: #60b25e;
|
||||
color: #fff;
|
||||
}
|
||||
a.sy_btn_green{
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
background: #60b25e;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding:0 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.sy_btn_green{ background: #51a74f;}
|
||||
a.sy_btn_grey{
|
||||
color: #333;
|
||||
background: #e1e1e1;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding:0 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.sy_btn_grey{ background: #c3c3c3;}
|
||||
a.sy_btn_blue{
|
||||
color: #fff;
|
||||
background: #3b94d6;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding:0 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.sy_btn_blue{ background: #2788d0;}
|
||||
a.hw_btn_blue{
|
||||
display: inline-block;
|
||||
color: #3b94d6;
|
||||
border:1px solid #3b94d6;
|
||||
background:#fff;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding:0 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
|
||||
|
||||
/* 缺陷列表 */
|
||||
.issues_greycirbg_btn{ background-color:#dedede; padding:1px 5px;-webkit-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px; }
|
||||
.issues_greycirbg_btn:hover{background-color:#cbcbcb;}
|
||||
.issues_con{ width:718px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; }
|
||||
.issues_statistics{ line-height:35px;}
|
||||
.issues_statistics ul li{ float:left; }
|
||||
.issues_statistics ul li a{ font-size:12px; margin:5px; color:#888; }
|
||||
.issues_statistics ul li a.act{}
|
||||
|
||||
.issues_form_filter select{ width:84px; height:35px; font-size:14px; border:1px solid #c8c8c8; border-right:none; background-color:#fff; margin-bottom: 10px; color: #888;}
|
||||
.issues_form_filter input{ height:33px;width:91px; border:1px solid #c8c8c8;background-color:#fff;}
|
||||
.issues_form_filter select:focus,.issues_form_filter input:focus{border:1px solid #c8c8c8; border-right:none;}
|
||||
.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("/images/project/arrow.png") no-repeat scroll right center transparent;}
|
||||
.issues_form_filter select:focus {outline:none; border:none;}
|
||||
input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
|
||||
.issues_data_img{ display:block; width:25px; height:33px; border:1px solid #c8c8c8; border-left:none; background: url("/images/public_icon.png") -29px 9px no-repeat; }
|
||||
/* 缺陷Tab */
|
||||
.issues_con_list{border:1px solid #e5e3da; }
|
||||
#issues_list_nav {border-bottom:1px solid #e5e3da;}
|
||||
#issues_list_nav li {float:left; padding:10px 15px; text-align:center; }
|
||||
#issues_list_nav li a{font-size:12px; color:#444;}
|
||||
.issues_nav_hover{border-bottom:3px solid #3498db; font-weight:bold; }
|
||||
.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;}
|
||||
.undis {display:none;}
|
||||
.dis {display:block;}
|
||||
.issues_form_filter{ position: absolute; top:0; right: 0;}
|
||||
.issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; padding-right:10px;}
|
||||
.issues_form_filter select.issues_filter_select_min{width:50px; }
|
||||
.issues_form_filter select:focus,.issues_form_filter input:focus{border:none; }
|
||||
.issues_filter_data input{height:28px;width:91px; border:1px solid #c8c8c8;background-color:#fff;}
|
||||
.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;}
|
||||
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_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #e5e3da;}
|
||||
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
|
||||
a.issues_list_title{ color:#444; max-width:300px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
|
||||
a:hover.issues_list_title{color:#3b94d6;}
|
||||
.issues_list_titlebox span{ font-size: 12px;color: #888; font-weight: normal; }
|
||||
.issues_ciricons_01{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 0 no-repeat;}
|
||||
.issues_ciricons_02{ width: 22px; height: 22px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -30px no-repeat;}
|
||||
.issues_icons_mes{width: 17px; height: 19px; display: inline-block; background: url("/images/new_project/icons_issue.png") 0 -56px no-repeat; }
|
||||
.issues_list_name{ font-size: 12px;}
|
||||
.issues_list_name:hover{ color: #3b94d6;}
|
||||
.issues_list_small{ font-size: 12px; color: #666;}
|
||||
.issues_list_txt li{ height: 50px; float: left; font-size: 12px; width: 70px; text-align: center; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap;}
|
||||
.issues_list_txt li.issues_list_min{ width: 52px;}
|
||||
|
||||
|
||||
/* 搜索 与课程相同 */
|
||||
.hw_search_box{ position:relative; }
|
||||
.hw_search_box input.hw_search-input{ width:293px; height:28px; border:none; border:1px solid #e7e7e7; background:#fff; padding-left:5px;}
|
||||
.hw_search_box a.hw_btn_search{display:block; width:20px; height:20px; background:url(/images/hw/icons_hw.png) 0 -57px no-repeat; position:absolute; right:5px; top:5px; cursor:pointer;}
|
||||
.hw_search_box a:hover.hw_btn_search{background:url(/images/hw/icons_hw.png) -40px -57px no-repeat;}
|
||||
.hw_files_icon{display:block; width:17px; height:14px; background:url(/images/hw/icons_hw.png) 0 -135px no-repeat;}
|
||||
/* 编辑删除 与课程相同 */
|
||||
.sy_icons_edit{ display: inline-block; padding:9px;background:url(/images/sy/sy_icons02.png) 0 1px no-repeat; }
|
||||
.sy_icons_del{ padding:9px;background:url(/images/sy/sy_icons02.png) 0 -21px no-repeat;}
|
||||
.sy_icons_edit:hover{ background:url(/images/sy/sy_icons02.png) -20px 1px no-repeat; }
|
||||
.sy_icons_del:hover{ background:url(/images/sy/sy_icons02.png) -20px -21px no-repeat;}
|
||||
/* 翻页 与课程相同*/
|
||||
.pages a{
|
||||
display:block;
|
||||
border:1px solid #d1d1d1;
|
||||
color:#888;
|
||||
float:left;
|
||||
width:30px;
|
||||
text-align:center;
|
||||
padding:3px 0;
|
||||
line-height:1.9;
|
||||
margin-right:5px;
|
||||
}
|
||||
.pages a:hover{
|
||||
background-color:#3b94d6;
|
||||
border:1px solid #3b94d6;
|
||||
color:#fff;
|
||||
}
|
||||
a.pages-big{
|
||||
width:50px;
|
||||
}
|
||||
.pages .active{
|
||||
background-color:#3b94d6;
|
||||
border:1px solid #3b94d6;
|
||||
color:#fff;
|
||||
}
|
||||
.pages{
|
||||
width:330px;
|
||||
|
||||
margin:20px auto 10px;
|
||||
}
|
||||
.sy_corange{ color: #ee4a1f;}
|
||||
.sy_new_orange{font-size: 12px;padding: 0 5px;border-radius: 3px;line-height: 14px;color: #ff4a1b;border: 1px solid #ff4a1b;}
|
||||
.sy_cgrey{ color: #888;}
|
||||
a.sy_cgrey{ color: #888;}
|
||||
.sy_corange{ color: #ee4a1f;}
|
||||
a.sy_corange{ color: #ee4a1f;}
|
||||
a.sy_cblue{ color: #3b94d6;}
|
||||
/* 新增粉色关注按钮*/
|
||||
a.sy_btn_pink{
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
background: #ff7d7d;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
padding:0 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
-webkit-border-radius:3px;
|
||||
-moz-border-radius:3px;
|
||||
-o-border-radius:3px;
|
||||
border-radius:3px;
|
||||
}
|
||||
a:hover.sy_btn_pink{ background: #e64c4c;}
|
|
@ -722,6 +722,7 @@ a.wzan_visited{background:url(../images/pic_zan.png) 0 0 no-repeat;}
|
|||
|
||||
/* 学生列表*/
|
||||
.st_list{ width:670px;}
|
||||
.st_list2{ width:730px;}
|
||||
.st_search{ }
|
||||
.st_search span{ font-size:14px; font-weight:bold; color:#606060; margin-right:35px;}
|
||||
.st_search_input{ border:1px solid #1c9ec7; background:#fff; height:20px; color:#c4c4c4; width:220px; padding-left:5px; margin-bottom:5px;}
|
||||
|
|
|
@ -375,6 +375,7 @@ ul.subNavArrow:hover li ul {display:block;}
|
|||
|
||||
/*左侧导航*/
|
||||
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
|
||||
.subNavBoxProject{width:240px; background:#fff;}
|
||||
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
|
||||
.subNav_jiantou{background:url(/images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
|
||||
.subNav_jiantou:hover{color:#0781b4; }
|
||||
|
|
|
@ -498,6 +498,11 @@ a:hover.sy_btn_orange{
|
|||
.accordion li.sy_icons_exercise:target > a:before,
|
||||
.accordion li.ssy_icons_exercise > a.active:before { background-position: -23px -290px; }
|
||||
|
||||
.accordion li.sy_icons_group > a:before { background-position: 7px -570px; }
|
||||
.accordion li.sy_icons_group:hover > a:before,
|
||||
.accordion li.sy_icons_group:target > a:before,
|
||||
.accordion li.sy_icons_group > a.active:before { background-position: -23px -570px; }
|
||||
|
||||
.accordion li.sy_icons_st > a:before { background-position: 5px -330px; }
|
||||
.accordion li.sy_icons_st:hover > a:before,
|
||||
.accordion li.sy_icons_st:target > a:before,
|
||||
|
|
Loading…
Reference in New Issue