Merge branch 'develop' into cxt_course

This commit is contained in:
cxt 2016-11-21 09:57:26 +08:00
commit c822892e46
75 changed files with 1151 additions and 370 deletions

View File

@ -564,6 +564,7 @@ class CoursesController < ApplicationController
def delete_member
member = @course.members.find params[:member_id]
student_role = member.member_roles.where("role_id = 10").first
teacher_role = member.member_roles.where("role_id = 7 || role_id = 9").first
if member && member.deletable? && student_role
user_admin = CourseInfos.where("user_id = ? and course_id = ?", member.user_id, @course.id)
if user_admin.size > 0
@ -572,8 +573,9 @@ class CoursesController < ApplicationController
joined = StudentsForCourse.where('student_id = ? and course_id = ?', member.user_id,@course.id)
joined.destroy_all
if member.member_roles.count > 1
if member.member_roles.count > 1&& student_role && teacher_role
student_role.destroy
teacher_role.update_attribute("is_current", 1)
member.update_attribute("course_group_id", 0)
else
member.destroy

View File

@ -261,20 +261,20 @@ class HomeworkCommonController < ApplicationController
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
if @homework.homework_type != 3
@homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
else
@homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
pros = student_work.student_work_projects.where("is_leader = 0")
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
student_works = @homework.student_works.where("user_id in #{user_ids}")
student_works.each do |st_work|
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
st_work.save
end

View File

@ -769,6 +769,14 @@ class ProjectsController < ApplicationController
end
end
# 配置成员弹框
def delete_member_pop
@member = Member.find(params[:member].to_i)
respond_to do |format|
format.js
end
end
def close
@project.close
redirect_to project_url(@project)

View File

@ -1,9 +1,10 @@
# 如果你对改模块任何功能不清楚,请不要随便改
# @Hjqreturn
class PullRequestsController < ApplicationController
before_filter :authorize_logged
before_filter :find_project_and_repository
before_filter :connect_gitlab, :only => [:index, :show, :create, :accept_pull_request, :pull_request_commits, :pull_request_changes, :new,
:update_pull_request, :pull_request_comments, :create_pull_request_comment]
:update_pull_request, :pull_request_comments, :create_pull_request_comment, :compare_pull_request]
layout "base_projects"
include PullRequestsHelper
@ -46,10 +47,11 @@ class PullRequestsController < ApplicationController
end
# 主要取源项目和目标项目分支及标识(用户名/版本库名)
# @tip 为空的时候表明发送的pr请求有改动为1的时候源分支和目标分支没有改动则不能成功创建
def new
# project_menu_type 为了控制base顶部导航
@project_menu_type = 6
@tip = params[:show_tip]
identifier = get_rep_identifier_by_project @project
@source_project_name = "#{get_user_name(@project.user_id)}/#{identifier}"
@source_rev = @g.branches(@project.gpid).map{|b| b.name}
@ -84,17 +86,26 @@ class PullRequestsController < ApplicationController
description = params[:description]
source_branch = params[:source_branch]
target_branch = params[:target_branch]
target_project_id = params[:target_project_id]
begin
# 如果传送了目标项目ID则PR请求发至目标项目
if params[:forked_project_id] && params[:source_project] == "forked_project_name"
target_project_id = params[:forked_project_id].to_i
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
@fork_project_name = Project.find(@project.forked_from_project_id).try(:name)
@fork_pr_message = true if @fork_project_name
# 如果分支有改动
if compare_pull_request(source_branch, target_project_id, target_branch)
# 如果传送了目标项目ID即向fork源项目发送请求
if params[:forked_project_id] && params[:source_project] == "forked_project_name"
target_project_id = params[:forked_project_id].to_i
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
@fork_project_name = Project.find(@project.forked_from_project_id).try(:name)
@fork_pr_message = true if @fork_project_name
else
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)
respond_to do |format|
format.js{redirect_to project_pull_request_path(request.id, :project_id => @project.id)}
end
end
else
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)
tip = 1
respond_to do |format|
format.js{redirect_to project_pull_request_path(request.id, :project_id => @project.id)}
format.js{redirect_to new_project_pull_request_path(:show_tip => tip)}
end
end
rescue Exception => e
@ -102,8 +113,31 @@ class PullRequestsController < ApplicationController
end
end
# Compare branch for MR
# 判断源分支和目标分支是否有改动
# status 为true 表示有改动; false:便是没有改动
def compare_pull_request source_branch, target_project, target_branch
user_name_source = @project.owner.try(:login)
identifier = @repository.identifier.downcase
git_source_tree = '--git-dir=/home/git/repositories/' + user_name_source + '/' + identifier + '.git'
if target_project
forked_source_project = Project.find(target_project)
user_name_target = forked_source_project.owner.try(:login)
git_target_tree = '--git-dir=/home/git/repositories/' + user_name_target + '/' + identifier + '.git'
git_sourse_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, source_branch)
git_target_commit_id = @g.get_branch_commit_id(forked_source_project.gpid, git_target_tree, target_branch)
else
git_sourse_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, source_branch)
git_target_commit_id = @g.get_branch_commit_id(@project.gpid, git_source_tree, target_branch)
end
status = (git_sourse_commit_id.try(:commit_id) == git_target_commit_id.try(:commit_id) ? false : true)
end
# @project_menu_type 为了控制base顶部导航
# merge_when_succeeds
def show
# project_menu_type 为了控制base顶部导航
# compare_pull_request source_project, source_branch, target_project, target_branch
# compare_pull_request
@project_menu_type = 6
@type = params[:type]
@request = @g.merge_request(@project.gpid, params[:id])
@ -266,7 +300,7 @@ class PullRequestsController < ApplicationController
def find_project_and_repository
@project = Project.find(params[:project_id])
render_404 if @project.gpid.blank?
@repository = Repository.where(:project_id => @project.id, :type => "Repository::Gitlab")
@repository = Repository.where(:project_id => @project.id, :type => "Repository::Gitlab").first
rescue ActiveRecord::RecordNotFound
render_404
end

View File

@ -102,7 +102,8 @@ class RepositoriesController < ApplicationController
g = Gitlab.client
if User.current.gid.nil?
begin
g.sync_user(User.current)
s = Trustie::Gitlab::Sync.new
s.sync_user(User.current)
ensure
logger.error "Synv user failed ==>#{User.current.id}"
end

View File

@ -988,20 +988,20 @@ class StudentWorkController < ApplicationController
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
if @homework.homework_type != 3
@homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save
end
else
@homework.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save
pros = student_work.student_work_projects.where("is_leader = 0")
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
student_works = @homework.student_works.where("user_id in #{user_ids}")
student_works.each do |st_work|
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
st_work.save
end

View File

@ -42,7 +42,7 @@ class UsersController < ApplicationController
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list,
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage]
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage, :user_issues]
before_filter :auth_user_extension, only: :show
#before_filter :rest_user_score, only: :show
#before_filter :select_entry, only: :user_projects
@ -86,6 +86,60 @@ class UsersController < ApplicationController
helper :issues
include UsersHelper
# 获取我的任务
# order 排序条件
# subject 主题搜索用注意搜索和列表调用同一方法通过参数或者remote区分
def user_issues
@subject = params[:subject]
# author_id = params[:author_id]
params[:assigned_to_id].to_i == 0 ? @assigned_to = nil : @assigned_to = params[:assigned_to_id].to_i
params[:author_id].to_i == 0 ? author_id = nil : author_id = params[:author_id].to_i
params[:project_id].to_i == 0 ? @project_id = nil : @project_id = params[:project_id]
if @project_id.nil?
if @assigned_to.nil?
if author_id.nil?
@issues = Issue.where("(author_id =? or assigned_to_id =? ) and subject like ?",
@user.id , @user.id, "%#{@subject}%").order('updated_on desc')
else
@issues = Issue.where("author_id =? and subject like ?",
author_id , "%#{@subject}%").order('updated_on desc')
end
else
@issues = Issue.where("assigned_to_id =? and subject like ?", @assigned_to, "%#{@subject}%").order('updated_on desc')
end
else
if @assigned_to.nil?
if author_id.nil?
@issues = Issue.where("(author_id =? or assigned_to_id =? ) and project_id=? and subject like ?",
(author_id ? author_id : @user.id) , @user.id, @project_id, "%#{@subject}%").order('updated_on desc')
else
@issues = Issue.where("author_id =? and project_id=? and subject like ?",
author_id , @project_id, "%#{@subject}%").order('updated_on desc')
end
else
@issues = Issue.where("assigned_to_id =? and project_id=? and subject like ?",
@assigned_to, @project_id, "%#{@subject}%").order('updated_on desc')
end
end
@issues_filter = Issue.where("author_id =? or assigned_to_id =?", (author_id ? author_id : @user.id) , @user).order('updated_on desc')
@issues_assigned_count = Issue.where("assigned_to_id =? and subject like ?", @user.id, "%#{@subject}%").count
@issues_author_count = Issue.where("author_id =? and subject like ?", @user.id, "%#{@subject}%").count
@issue_open_count = Issue.where(" (author_id =? or assigned_to_id =?) and status_id in (1,2,3,4,6)", (author_id ? author_id : @user.id) , @user).count
@issue_close_count = Issue.where("(author_id =? or assigned_to_id =?) and status_id = 5", (author_id ? author_id : @user.id) , @user.id).count
@issue_count = @issues.count
@limit = 10
@is_remote = true
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
@offset ||= @issue_pages.offset
@issues = paginateHelper @issues, @limit
respond_to do |format|
format.html{render :layout => 'static_base'}
format.api
format.js
end
end
#展开所有回复
def show_all_replies
case params[:type]

View File

@ -931,7 +931,10 @@ module ApplicationHelper
def allow_pull_request project
return 0 if project.gpid.nil?
g = Gitlab.client
count = g.user_static(project.gpid, :rev => "master").count
# 之所以这样比较是为了解决gitlab本身的bug
commit_count = g.project(project.gpid).try(:commit_count).to_i
git_commit_cout = g.user_static(project.gpid, :rev => "master").count
count = commit_count > git_commit_cout ? commit_count : git_commit_cout
count
end
@ -3725,7 +3728,7 @@ end
def homework_type_option
type = []
option0 = []
option0 << "请选择"
option0 << "请选择作业类型"
option0 << 0
option1 = []
option1 << "普通作业"

View File

@ -20,6 +20,8 @@
module IssuesHelper
include ApplicationHelper
include TagsHelper
require 'iconv'
def issue_list(issues, &block)
ancestors = []
issues.each do |issue|
@ -119,10 +121,11 @@ module IssuesHelper
end
def principals_options_for_isuue_list(project)
conv = Iconv.new("GBK", "utf-8")
if User.current.member_of?(project)
project.members.includes(:user).order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0])
project.members.includes(:user).sort{|x, y| conv.iconv(x.user.lastname) <=> conv.iconv(y.user.lastname)}.map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["<< #{l(:label_me)} >>", User.current.id]).unshift(["指派给", 0])
else
project.members.includes(:user).order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["指派给", 0])
project.members.includes(:user).sort{|x, y| conv.iconv(x.user.lastname) <=> conv.iconv(y.user.lastname)}.map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["指派给", 0])
end
end
@ -130,7 +133,6 @@ module IssuesHelper
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

View File

@ -264,7 +264,9 @@ module ProjectsHelper
# Returns a set of options for a select field, grouped by project.
def version_options_for_select(versions, selected=nil)
project_name = versions.blank? ? "" : versions.first.project.name
grouped = Hash.new {|h,k| h[k] = []}
grouped[project_name] << ["请选择里程碑", 0]
versions.each do |version|
grouped[version.project.name] << [version.name, version.id]
end

View File

@ -29,6 +29,30 @@ module UsersHelper
["#{l(:status_locked)} (#{user_count_by_status[3].to_i})", '3']], selected.to_s)
end
def issue_list(issues, &block)
ancestors = []
issues.each do |issue|
while (ancestors.any? && !issue.is_descendant_of?(ancestors.last))
ancestors.pop
end
yield issue, ancestors.size
ancestors << issue unless issue.leaf?
end
end
# 我的issue 来源
def options_for_issue_project_list( issues )
issues = issues.group_by{|issue| issue.project_id}
issues.map{ |issue| [Project.find(issue[0]).name, issue[0]]}.unshift(["来源", 0])
end
# 我的issue指派给我
def options_for_my_issue_list(issues)
# issues = issues.group_by{|issue| issue.assigned_to_id }
# issues.map{ |issue| [User.find(issue[0]).show_name, issue[0]]}.unshift(["指派给", 0])
end
def get_resource_type type
case type
when 'Course'

View File

@ -1,5 +1,5 @@
class Dts < ActiveRecord::Base
attr_accessible :Category, :Defect, :Description, :File, :IPLine, :IPLineCode, :Method, :Num, :PreConditions, :Review, :StartLine, :TraceInfo, :Variable, :project_id
belongs_to :project
# belongs_to :project
end

View File

@ -15,7 +15,7 @@ class HomeworkCommon < ActiveRecord::Base
has_one :homework_detail_group, :dependent => :destroy
has_many :student_work_projects, :dependent => :destroy
has_many :homework_tests, :dependent => :destroy
has_many :student_works, :dependent => :destroy, :conditions => "is_test=0"
has_many :student_works, :dependent => :destroy, :conditions => "is_test=0 and is_delete != 1"
has_many :student_works_evaluation_distributions, :through => :student_works #一个作业的分配的匿评列表
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
has_many :apply_homeworks, :dependent => :destroy

View File

@ -853,7 +853,8 @@ class Issue < ActiveRecord::Base
def assignable_versions
return @assignable_versions if @assignable_versions
versions = project.shared_versions.open.all
# versions = project.shared_versions.open.all
versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc")
if fixed_version
if fixed_version_id_changed?
# nothing to do
@ -865,7 +866,7 @@ class Issue < ActiveRecord::Base
versions << fixed_version
end
end
@assignable_versions = versions.uniq.sort
@assignable_versions = versions.uniq
end
# Returns true if this issue is blocked by another issue that is still open

View File

@ -82,7 +82,7 @@ class Project < ActiveRecord::Base
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
has_many :applied_projects, :dependent => :destroy
has_many :invite_lists, :dependent => :destroy
has_one :dts
# has_one :dts
has_many :organizations,:through => :org_projects
# end

View File

@ -9,11 +9,21 @@ class StudentsForCourse < ActiveRecord::Base
validates_uniqueness_of :student_id, :scope => :course_id
after_destroy :delete_student_works
after_create :recovery_student_works
#退出班级或删除学生时隐藏学生的作品
def delete_student_works
course = self.course
homework_ids = course.homework_commons.blank? ? "(-1)" : "(" + course.homework_commons.map{|hw| hw.id}.join(",") + ")"
student_works = StudentWork.where("user_id = #{self.student_id} && homework_common_id in #{homework_ids}")
student_works.destroy_all
student_works.update_all(:is_delete => 1)
end
#加入班级时还原作品
def recovery_student_works
course = self.course
homework_ids = course.homework_commons.blank? ? "(-1)" : "(" + course.homework_commons.map{|hw| hw.id}.join(",") + ")"
student_works = StudentWork.where("user_id = #{self.student_id} && homework_common_id in #{homework_ids}")
student_works.update_all(:is_delete => 0)
end
end

View File

@ -323,6 +323,7 @@ class User < Principal
# id 转换成 登录名
# 如果是整数就去ID否则就取login
# 含有特殊符号的则显示ID
def to_param
(self.login.to_i.to_s == self.login || self.login.include?(".") || self.login.include?("%") || self.login.include?("?")) ? id : login
end

View File

@ -452,12 +452,20 @@ class CoursesService
@state = 2
return @state
end
@member = Member.where('course_id = ? and user_id = ?', params[:object_id], user.id)
if @member.nil? || @member.count == 0
@member = Member.where('course_id = ? and user_id = ?', params[:object_id], user.id).first
if @member.nil?
@state = 1
return @state
end
@member.first.destroy
student_role = @member.member_roles.where("role_id = 10").first
teacher_role = @member.member_roles.where("role_id = 7 || role_id = 9").first
if @member.member_roles.count > 1 && student_role && teacher_role
student_role.destroy
teacher_role.update_attribute("is_current", 1)
@member.update_attribute("course_group_id", 0)
else
@member.destroy
end
joined = StudentsForCourse.where('student_id = ? and course_id = ?', user.id, params[:object_id])
joined.each do |join|
join.destroy

View File

@ -17,7 +17,8 @@
$(function(){
if(window.history.length == 1)
{
$("#history_back").css("background","#CCC");
$("#history_back").css("color","#CCC");
$("#history_back").css("cursor","default");
}
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
@ -50,7 +51,7 @@
您没有访问权限,请先获取相应权限。
<a href="javascript:history.back()" id="history_back" class="linkBlue2 ml5 mr10">返回上页>></a>
<a href="javascript:void(0)" class="linkBlue2 ml5 mr10" onclick="$('#feedback_div').toggle();"> 给我留言>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=fb938b1f6f991fc100f3d32b6ef38b7888dd4097c71d0eb8b239eaa8749a6afd" target="_blank" class="linkBlue2">QQ反馈>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151" target="_blank" class="linkBlue2">QQ反馈>></a>
</p>
<div style="display:none;" class="ml10 mt10" id="feedback_div">
<% get_memo %>

View File

@ -15,6 +15,11 @@ a:hover{ }
</style>
<script type="text/javascript">
$(function(){
if(window.history.length == 1)
{
$("#history_back").css("color","#CCC");
$("#history_back").css("cursor","default");
}
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
@ -44,9 +49,9 @@ a:hover{ }
<img src="/images/404/pic_404.jpg" >
<p class="pages_new_404_txt mt40">
非常抱歉,您访问的页面不存在或已删除。
<a href="javascript:history.back()" class="linkBlue2 mr10">返回上页>></a>
<a href="javascript:history.back()" id="history_back" class="linkBlue2 mr10">返回上页>></a>
<a href="javascript:void(0)" class="linkBlue2 mr10" onclick="$('#feedback_div').toggle();"> 给我留言>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=fb938b1f6f991fc100f3d32b6ef38b7888dd4097c71d0eb8b239eaa8749a6afd" target="_blank" class="linkBlue2">QQ反馈>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151" target="_blank" class="linkBlue2">QQ反馈>></a>
</p>
<div style="display:none;" class="mt10" id="feedback_div">

View File

@ -1,3 +1,4 @@
hideModal();
<% if object_id && @state != 6%>
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(course, user)) %>");
<% end %>

View File

@ -1,52 +1,87 @@
<% if @object_id && @state != 6 && @state !=4 %>
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(@course, @user)) %>");
<% end %>
<%# if @object_id && @state != 6 && @state !=4 %>
//$("#join_in_course_header").html("<%#= escape_javascript(join_in_course_header(@course, @user)) %>");
<%# end %>
<% if @state %>
<% if @state == 0 %>
alert("加入成功");
hideModal();
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>@course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>");
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">加入成功</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 1 %>
alert("密码错误");
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">密码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 2 %>
alert("班级已过期\n请联系班级管理员重启班级。(在配置班级处)");
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">班级已过期<br/>请联系班级管理员重启班级。(在配置班级处)</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 3 %>
alert("您已经加入了班级");
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经加入了班级</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 4 %>
alert("您输入的邀请码错误");
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您输入的邀请码错误</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 5 %>
alert("您还未登录");
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您还未登录</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 6 %>
alert("申请成功,请等待审核");
hidden_join_course_form();
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 7%>
alert("您已经发送过申请了,请耐心等待");
hidden_join_course_form();
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 8%>
alert("您已经是该班级的教师了");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的教师了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 9%>
alert("您已经是该班级的教辅了");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的教辅了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 10%>
alert("您已经是该班级的管理员了");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经是该班级的管理员了</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 11%>
alert("该班级已被删除");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">该班级已被删除</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 12 %>
alert("您已经发送过申请了,请耐心等待");
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您已经发送过申请了,请耐心等待</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% elsif @state == 13 %>
alert("申请成功,请等待审核");
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">申请成功,请等待审核</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="refresh_current_course();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% else %>
alert("未知错误,请稍后再试");
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">未知错误,请稍后再试</p><div class="cl"></div>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10" style="margin-right: 119px;" onclick="hideModal();">确&nbsp;&nbsp;定</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
<% end %>
<% end %>
function refresh_current_course(){
hideModal();
<% if @course %>
window.location.href= "<%=course_path(@course.id) %>";
<% end %>
}

View File

@ -41,7 +41,7 @@
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
</div>
<%= form_tag(edit_file_description_project_file_path(file, :project_id => project.id),:remote=>'true', :method => :post, :id=>"files_query_form_#{file.id}") do %>
<textarea style="resize: none;max-width: none;margin-left: 0" class="homepageSignatureTextarea W600 none " placeholder="请编辑资源描述" name="file_description_edit" id="file_description_edit_<%= file.id %>"
<textarea style="resize: none;max-width: none;margin-left: 0" class="homepageSignatureTextarea W800 none " placeholder="请编辑资源描述" name="file_description_edit" id="file_description_edit_<%= file.id %>"
onblur="commit_files_description('#files_query_form_<%= file.id %>','#file_description_edit_<%= file.id %>','#file_description_show_<%= file.id %>','#file_description_tip_<%= file.id %>');"><%= file.description %></textarea>
<% end %>
</div>

View File

@ -12,7 +12,7 @@
$("#homework_end_time_span").text("");
$("#homework_course_id_span").text("");
$("#homework_editor").toggle();
$("#select_type_nitice").show();
//$("#select_type_nitice").show();
document.getElementById("homework_type_option").options[0].selected = true;
}

View File

@ -63,7 +63,7 @@
<% end %>
<!--<a href="javascript:void(0);" class="sy_btn_blue mr5 fr"> 保存并继续</a>-->
<!--<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue mr5 fr" id="issue_confirm"> 保存</a>-->
<input onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue fr mr5" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
<input onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="sy_btn_blue fr mr5" onfocus="this.blur()" id="issue_confirm" style="width: 28px;color: #FFF" value="保存">
</li>
</ul>
<ul class="fl pro_new_conbox_right ml10 mb10">
@ -90,7 +90,7 @@
{:onchange => "change_milestone_tip();", :class => "w150"} %>
</li>
<li class=" clear" id="milestone_option_tips">
<%= @issue.fixed_version.nil? ? "无里程碑" : "已指派里程碑" %>
<%= @issue.fixed_version.nil? ? "未选择里程碑" : "已选择里程碑" %>
<% if params[:action] == "new" %>
<%= link_to "", new_project_version_path(@project, :is_issue => true, :issue_project_id => @project.id), :class => "pic_add mt5 ml5 fr", :remote => true %>
<% end %>
@ -147,9 +147,9 @@
}
function change_milestone_tip(version_id){
if( document.getElementById('issue_fixed_version_id').options[document.getElementById('issue_fixed_version_id').selectedIndex].value == 0 ){
$('#milestone_option_tips').html("未指派里程碑")}
$('#milestone_option_tips').html("未选择里程碑")}
else{
$('#milestone_option_tips').html("已指派里程碑")
$('#milestone_option_tips').html("已选择里程碑")
};
}
function issue_start_date_change(){
@ -160,5 +160,9 @@
}
// 里程碑添加默认选项
$("#issue_fixed_version_id option[value='']").remove();
$('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>")
<%# if params[:action] == "new" %>
// $('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>");
<%# else %>
// $('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>");
<%# end %>
</script>

View File

@ -1 +1 @@
<span class="issues_nav_tag ml5" ><%= @issues_filter_assign_count %><%= @project.issues.where(:assigned_to_id => User.current.id ).visible.all.count %></span>
<span class="issues_nav_tag ml5" ><%= @project.issues.where(:assigned_to_id => User.current.id ).visible.all.count %></span>

View File

@ -69,13 +69,13 @@
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
<li class="issues_list_min">
<% if activity.journals.count > 0 %>
<span class="issues_icons_mes fl mr5"></span>
<span class="issues_icons_mes fl mr5" style="margin-top:15px;" ></span>
<span class="fl mr5"><%= activity.journals.count %></span>
<% end %>
<div class="undis" style="position: absolute; <%= activity.journals.count > 0 ? 'top:25px;' : 'top:0px' %>">
<%= 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) %>
<div class="undis" style="position: absolute; <%= activity.journals.count > 0 ? 'top:25px;' : 'top:7px' %>">
<%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :style => "margin-top:25px;", :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) %>
<%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15', :style => "margin-top:25px;" 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) %>

View File

@ -18,6 +18,7 @@
<div class="mt10 mb10" id =issue_show_total"">
<div class="banner-big f16 fontGrey3">
问题跟踪
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr" >新建</a>
</div>
<div class="resources mt10" style="float:left;">

View File

@ -9,7 +9,6 @@
<div class="pro_new_top clear mb10">
<div class="fl pro_new_name ml15 clear">
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
</div>

View File

@ -26,6 +26,18 @@
</li>
</ul>
</div>
<% elsif User.current.logged? && User.current.member_of_course?(@course) %>
<div class="sy_class_setting" >
<ul>
<li class="sy_class_setting_icon">
<ul class="sy_class_setting_text">
<li>
<a href="javascript:void(0)" onclick="delete_confirm();" class="sy_class_option">退出班级</a>
</li>
</ul>
</li>
</ul>
</div>
<% end %>
<div class="cl"></div>
@ -84,7 +96,7 @@
<% elsif is_teacher && is_ST %>
<%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %>
<% end %>
<% unless (is_teacher || is_TA || is_TE) %>
<% unless (is_teacher || is_TA || is_TE || is_ST) %>
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
<% end %>
</div>

View File

@ -276,6 +276,13 @@
$("#expand_tools_expand a").addClass('active');
$("#navContentCourse").toggle();
});
function delete_confirm(){
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
'<div class="clear mt15"><p class="text_c f14">您确认要退出该班级吗?</p><div class="cl"></div><a href="<%=join_path(:object_id => @course.id) %>" class="fr sy_btn_blue mr85 mt10" data-method="delete" data-remote="true">确&nbsp;&nbsp;定</a>'+
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取&nbsp;&nbsp;消</a></div></div>';
pop_box_new(htmlvalue, 300, 140);
}
</script>
</html>

View File

@ -204,9 +204,9 @@
<li id="user_08" class="user_icons_addproject">
<%= link_to "加入项目", applied_join_project_path, :remote => true, :method => "post", :style => "font-size:14px;" %>
</li>
<!--<li id="user_09" class="user_icons_myissues">-->
<!--<a href="#user_09" >我的任务</a>-->
<!--</li>-->
<li id="user_09" class="user_icons_myissues">
<%= link_to "我的Issue", user_issues_user_path(@user), :style => "font-size:14px;" %>
</li>
<% end %>
</ul>
<ul class="users_accordion mb10">

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan','prettify','css/project', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min",'prettify' %>

View File

@ -106,7 +106,7 @@
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
<% else %>
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" class="w210 fl" type="text"value="<%= User.current.user_extensions.school %>" >
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.school.id %>" /> <!-- 单位名称的test框选中下拉列表框的id -->
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.school.try(:id) %>" /> <!-- 单位名称的test框选中下拉列表框的id -->
<% end %>
<p class="fl ml10">
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->

View File

@ -0,0 +1,19 @@
<div style="width:460px;">
<div class="sy_popup_top">
<h3 class="fl">提示</h3>
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
<div class="cl"></div>
</div>
<div class="sy_popup_con" style="width:380px;">
<ul class="sy_popup_add center" >
<%=l(:label_delete_confirm) %>
<li class="mt10">
<label class="mr27">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>-->
<%= link_to "确 定", membership_path(member), :method => "delete", :remote => true, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
<div class="cl"></div>
</li>
</ul>
</div>
</div>

View File

@ -0,0 +1,2 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'projects/delete_member_pop', :locals => { :member => @member }) %>";
pop_box_new(htmlvalue,460,316);

View File

@ -1,3 +1,3 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'repositories/forked_popbox') %>";
pop_box_new(htmlvalue,320,316);
pop_box_new(htmlvalue,460,316);

View File

@ -12,7 +12,7 @@
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
<label><span class="c_red">*</span>&nbsp;<%= l(:label_projects_new_name)%>&nbsp;&nbsp;:</label>
<input type="text" name="project[name]" id="project_name" class="project_new_input" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();">
<input type="text" name="project[name]" id="project_name" class="project_new_input project_new_input_project_new" maxlength="100" placeholder="例如:团队协作方法与机制研究" onkeyup="regex_project_name();">
<p class="c_orange ml70" id="project_name_notice" style="display: none;">项目名称不能为空</p>
</li>
<div class="cl"></div>

View File

@ -102,11 +102,14 @@
<th>
<% unless member.user_id == @project.user_id %>
<a href="javascript:void(0);" class=" sy_btn_blue mr5 " onclick="$('#members-<%= member.id%>-roles-form').show();$('#members_<%= member.id %>_role_show').hide();">编辑</a>
<%= delete_link membership_path(member),
<%#= delete_link membership_path(member),
:remote => true,
:class => "sy_btn_grey mr5",
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
<% if member.deletable? %>
<%= link_to "删除", delete_member_pop_project_path(@project, :member => member), :remote => true, :class => "sy_btn_grey mr5"%>
<% end %>
<% end %>
</th>
</tr>
<% end %>

View File

@ -12,9 +12,9 @@
<% if @forked_project.nil? %>
<%= select_tag :branch, options_for_select(@source_rev), :id => "pull_request_branch", :name => "target_branch", :value => "target_branch",:class => "fl PullReques_minselect ml5" %>
<% else %>
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" id="pull_request_project" name="source_project" value="source_project" class="fl PullReques_minselect">
<option name="<%= @project.id %>" value="source_project_name" ><%= @source_project_name %></option>
<option name="<%= @forked_project.id %>" value="forked_project_name" ><%= @forked_project_name %></option>
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" id="target_project_id" name="target_project_id" value="target_project_id" class="fl PullReques_minselect">
<option id="source_project_name" name="<%= @project.id %>" value="<%= @project.id %>" ><%= @source_project_name %></option>
<option id="target_project_name" name="<%= @forked_project.id %>" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
</select>
<select name="target_branch" id="pull_request_branch" class = "fl PullReques_minselect ml5" >
<% @source_rev.each do |rev| %>
@ -23,7 +23,11 @@
</select>
<% end %>
<p id="pull_request_project_hidden" style="display: none"><%= @forked_project.nil? ? "" : @project.id %></p>
<p id="pull_request_compare_result" style="display: none"><%= @no_updates %></p>
</li>
<div id="pull_request_branch_tip">
<%= render :partial => "tip" %>
</div>
<div class="alert alert-blue mb10" id ="pull_request_branch_error" style="display: none">
<span class="c_orange">您选择的源分支和目标分支为似乎没有差异,请将新改动提交至源分支或者切换到其它目标分支</span>
</div>
@ -63,28 +67,41 @@
}
}
function regex_branch()
{
var source_branch = $.trim($("#source_branch").val());
var target_branch = $.trim($("#pull_request_branch").val());
var target_project = $.trim($("#pull_request_project").children().attr("name"));
var target_forked_project = $.trim($("#pull_request_project_hidden").text());
if(target_project == target_forked_project && source_branch == target_branch)
{
$("#pull_request_branch_error").show();
return false;
}
else
{
$("#pull_request_branch_error").hide();
return true;
}
}
// function regex_branch()
// {
// var source_branch = $.trim($("#source_branch").val());
// var target_branch = $.trim($("#pull_request_branch").val());
// var target_project = $.trim($("#target_project_id").children().attr("name"));
// var target_forked_project = $.trim($("#pull_request_project_hidden").text());
// if(target_project == target_forked_project && source_branch == target_branch)
// {
// $("#pull_request_branch_error").show();
// return false;
// }
// else
// {
// $("#pull_request_branch_error").hide();
// return true;
// }
// }
// function compare_can_create(){
// var compare_result = $.trim($("#pull_request_compare_result").text());
// alert(compare_result);
// if(compare_result == 1){
// alert(compare_result);
// $("#pull_request_branch_error").show();
// return false;
// }else{
// $("#pull_request_branch_error").hide();
// return true;
// }
// }
//提交pull request
function pull_request_commit()
{
if(regex_branch() && regex_pr_name())
if(regex_pr_name())
{
$("#pull_request_form").submit();
}

View File

@ -0,0 +1,5 @@
<% if @tip %>
<div class="alert alert-blue mb10">
<span class="c_orange">您选择的源分支和目标分支为似乎没有差异,请将新改动提交至源分支或者切换到其它目标分支</span>
</div>
<% end %>

View File

@ -0,0 +1 @@
$("#pull_request_branch_tip").html('<%= escape_javascript(render :partial => "pull_requests/tip") %>');

View File

@ -0,0 +1,10 @@
<div class="quality_info mb10">
<h2>
<% if @name_flag || params[:action] == "error_list" %>
<%= link_to "<span class='new_roadmap_icons_back mr5'></span>返回".html_safe, {:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}, :class => "fl linkBlue2 mr5 mt1" %>
<% else %>
<%= link_to "<span class='new_roadmap_icons_back mr5'></span>返回".html_safe, project_quality_analysis_path(:project_id => @project.id), :class => "fl linkBlue2 mr5 mt1" %>
<% end %>
<span class="fl mr5">|</span> <span class="fl mt1">分析结果</span>
</h2>
</div>

View File

@ -2,37 +2,39 @@
// $("#ajax-indicator span").text("载入中...");
$("#ajax-indicator").show();
</script>
<%= render :partial => "header" %>
<div class="container-big mb10">
<div class="project_r_h" style="width:970px;">
<h2 class="project_h2">分析结果</h2>
</div>
<ul class="analysis-result-list">
<li class="analysis-result-name fl fontBlue2" >名称</li>
<li class="analysis-result-version fl fontBlue2" >分支</li>
<li class="analysis-result-loc fl fontBlue2" >语言</li>
<li class="analysis-result-debt fl fontBlue2" >路径</li>
<li class="analysis-result-time fl fontBlue2" >最近更新</li>
<li class="analysis-result-edit fl fontBlue2" ></li>
<div class="cl"></div>
</ul>
<% if @quality_analyses && @quality_analyses.count >0 %>
<table class="sy_new_table " cellpadding="0" cellspacing="0">
<thead>
<tr>
<td style="width:15%;">名称</td>
<td style="width:10%;">分支</td>
<td style="width:10%;">语言</td>
<td style="width:25%;">路径</td>
<td style="width:20%;">时间</td>
<td style="width:10%;"></td>
</tr>
</thead>
<tbody>
<% if @quality_analyses && @quality_analyses.count > 0 %>
<% @quality_analyses.each do |qa| %>
<ul class="analysis-result-list">
<li title="<%= qa.author_login+ ':' +qa.rep_identifier %>"><%=link_to "#{qa.author_login}:#{qa.rep_identifier}", project_quality_analysis_path(:resource_id => qa.sonar_name, :branch => (qa.branch.nil? ? "master" : qa.branch)), :class => "analysis-result-name fl fontBlue2 hidden" %></li>
<li class="analysis-result-version fl fontBlue2 hidden" title="<%= qa.branch %>"><%= qa.branch %></li>
<li class="analysis-result-loc fl fontBlue2 hidden" title="<%= qa.language %>"><%= qa.language %></li>
<li class="analysis-result-debt fl fontBlue2 hidden" title="<%= qa.path %>"><%= qa.path %></li>
<li class="analysis-result-time fl fontBlue2 hidden" title="<%= sonar_time(qa.sonar_name).blank? ? qa.created_at : sonar_time(qa.sonar_name) %>"><%= format_time(sonar_time(qa.sonar_name).blank? ? qa.created_at : sonar_time(qa.sonar_name)) %></li>
<tr>
<td style="width:15%;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" title="<%= qa.sonar_name %>"><%=link_to qa.sonar_name, project_quality_analysis_path(:resource_id => qa.sonar_name, :branch => (qa.branch.nil? ? "master" : qa.branch)), :class => "analysis-result-name fl fontBlue2 hidden" %></td>
<td style="width:10%;"><%= qa.branch %></td>
<td style="width:10%;"><%= qa.language %></td>
<td style="width:25%;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" title="<%= qa.path %>"><%= qa.path %></td>
<td style="width:20%;"><%= format_time(qa.created_at) %></td>
<% if User.current.try(:login) == qa.author_login || User.current.admin? || is_project_manager?(User.current.id, @project.id) %>
<li class="analysis-result-edit fl fontBlue2 hidden" title="<%= qa.path %>">
<%=link_to "删除", delete_project_quality_analysi_path(qa, :project_id => @project.id), :method => "delete", :confirm => "删除会一并删除分析结果,确定删除吗?", :class => "fontBlue2" %>
</li>
<td style="width:10%;"><%=link_to "删除", delete_project_quality_analysi_path(qa, :project_id => @project.id), :method => "delete", :confirm => "删除会一并删除分析结果,确定删除吗?", :class => "fontBlue2" %></td>
<% else %>
<td style="width:10%;" class="c_grey"><%= "删除" %></td>
<% end %>
<div class="cl"></div>
</ul>
</tr>
<% end %>
<% else %>
<%#= 数据为空时候界面,待完善 %>
<% end %>
</tbody>
</table>
</div>

View File

@ -1,63 +1,61 @@
<%= javascript_include_tag 'highcharts','highcharts-more' %>
<%= render :partial => "header" %>
<div class="container-big mb10">
<div class="project_r_h" style="width:970px;">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
</div>
<div class="button-rep">当前分支:<%= params[:branch] %></div>
<div class="cl"></div>
<div class="tac f20 fb mt35 mb30">项目代码质量分析报告</div>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">概要信息</span></div>
<%= render :partial => "hightchars" %>
<div class="analysis-block mt10 mb40 f14">
<div class="flex mb10">
<div class="analysis-genral">
<p id="container_sqale_rating" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">质量等级</p>
<p class="fontBlue2 pr"><%= sqale_rating_status(@ha["sqale_rating"].to_i)[2] %>
<span class="f10 c_white analysis-genral-icon <%= sqale_rating_status(@ha["sqale_rating"].to_i)[1] %> borderRadius">
<div class="button-rep">当前分支:<%= params[:branch] %></div>
<div class="cl"></div>
<div class="tac f20 fb mt35 mb30">项目代码质量分析报告</div>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">概要信息</span></div>
<%= render :partial => "hightchars" %>
<div class="analysis-block mt10 mb40 f14">
<div class="flex mb10">
<div class="analysis-genral">
<p id="container_sqale_rating" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">质量等级</p>
<p class="fontBlue2 pr"><%= sqale_rating_status(@ha["sqale_rating"].to_i)[2] %>
<span class="f10 c_white analysis-genral-icon <%= sqale_rating_status(@ha["sqale_rating"].to_i)[1] %> borderRadius">
<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral" >
<p id="container_function_complexity" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">复杂度</p>
<p class="fontBlue2 pr"><%= @ha["function_complexity"].to_i == 0 ? 0 : @ha["function_complexity"] %>
<span class="f10 c_white analysis-genral-icon <%= complexity_status(@ha["function_complexity"].to_i)[1] %> borderRadius">
</p>
</div>
<div class="analysis-genral" >
<p id="container_function_complexity" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">复杂度</p>
<p class="fontBlue2 pr"><%= @ha["function_complexity"].to_i == 0 ? 0 : @ha["function_complexity"] %>
<span class="f10 c_white analysis-genral-icon <%= complexity_status(@ha["function_complexity"].to_i)[1] %> borderRadius">
<%= @ha["function_complexity"].nil? ? "良好" : complexity_status(@ha["function_complexity"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral">
<p id="container_duplicated_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">代码重复度</p>
<p class="fontBlue2 pr"><%= @ha["duplicated_lines_density"].to_i == 0 ? 0 : @ha["duplicated_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[1] %> borderRadius">
</p>
</div>
<div class="analysis-genral">
<p id="container_duplicated_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">代码重复度</p>
<p class="fontBlue2 pr"><%= @ha["duplicated_lines_density"].to_i == 0 ? 0 : @ha["duplicated_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[1] %> borderRadius">
<%= @ha["duplicated_lines_density"].nil? ? "良好" : duplicated_lines_density_status(@ha["duplicated_lines_density"].to_i)[0] %>
</span>
</p>
</div>
<div class="analysis-genral">
<p id="container_comment_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">注释率</p>
<p class="fontBlue2 pr"><%= @ha["comment_lines_density"].to_i == 0 ? 0 : @ha["comment_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= comment_lines_density_status(@ha["comment_lines_density"].to_i)[1] %> borderRadius">
</p>
</div>
<div class="analysis-genral">
<p id="container_comment_lines_density" style="max-width:200px;min-height:200px;width:200px; margin:0 auto;"></p>
<p class="fontGrey3">注释率</p>
<p class="fontBlue2 pr"><%= @ha["comment_lines_density"].to_i == 0 ? 0 : @ha["comment_lines_density"] %>
<span class="f10 c_white analysis-genral-icon <%= comment_lines_density_status(@ha["comment_lines_density"].to_i)[1] %> borderRadius">
<%= @ha["comment_lines_density"].nil? ? "较低" : comment_lines_density_status(@ha["comment_lines_density"].to_i)[0] %>
</span>
</p>
</div>
</p>
</div>
</div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">质量等级</span>
<span class="mr10 fontGrey2"><span class="c_red f18" style="margin-top:-5px; display:inline-block;"><%= @ha["sqale_rating"].nil? ? 0 : score_sqale_rating(@ha["sqale_rating"].to_i) %></span>/5分</span>
<span class="fontGrey2">可定性评价为:<span class="c_red">质量<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %></span></span></div>
<div class="analysis-block mt10 mb40 f14">
<div><span class="fontGrey3 mr30">技术债务</span>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">质量等级</span>
<span class="mr10 fontGrey2"><span class="c_red f18" style="margin-top:-5px; display:inline-block;"><%= @ha["sqale_rating"].nil? ? 0 : score_sqale_rating(@ha["sqale_rating"].to_i) %></span>/5分</span>
<span class="fontGrey2">可定性评价为:<span class="c_red">质量<%= @ha["sqale_rating"].nil? ? "很好" : sqale_rating_status(@ha["sqale_rating"].to_i)[0] %></span></span></div>
<div class="analysis-block mt10 mb40 f14">
<div><span class="fontGrey3 mr30">技术债务</span>
<span class="w100 pInline">
<% if @ha["sqale_index"].to_i == 0 %>
0天
@ -66,97 +64,97 @@
<%= / [0-9]*/.match(@ha["sqale_index"]).nil? ? "" : (/ [0-9]*/.match(@ha["sqale_index"]).to_s + "小时") %>
<% end %>
</span>
<span class="fontGrey2"><a class="linkBlue2" target="_blank" href="<%= @sonar_address %>/drilldown/measures/<%= @resource_id %>?metric=sqale_index">查看详情</a></span></div>
<div><span class="fontGrey3 mr30 fl">&nbsp;质量问题</span>
<span class="fontGrey2"><a class="linkBlue2" target="_blank" href="<%= @sonar_address %>/drilldown/measures/<%= @resource_id %>?metric=sqale_index">查看详情</a></span></div>
<div><span class="fontGrey3 mr30 fl">&nbsp;质量问题</span>
<span class="fontBlue2 w100 pInline">
<a class="fontBlue2 w70 pInline" target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false">
<%= @ha["violations"].to_i %>
</a>
</span><span class="fontGrey2">&nbsp;问题分类如下:</span></div>
<div class="ml90 mt15">
<div class="mb10"><span class="analysis-block-icon mr5"></span><span class="fontGrey3 mr45">阻断</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=BLOCKER" class="fontBlue2 w70 pInline">
<%= @ha["blocker_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%=@ha["blocker_violations"].nil? ? 0 : statistics_result_percentage(@ha["blocker_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=CRITICAL" class="fontBlue2 w70 pInline">
<%= @ha["critical_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["critical_violations"].nil? ? 0 : statistics_result_percentage(@ha["critical_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-main-icon mr5"></span><span class="fontGrey3 mr45">主要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MAJOR" class="fontBlue2 w70 pInline">
<%= @ha["major_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["major_violations"].nil? ? 0 : statistics_result_percentage(@ha["major_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-secondary-icon mr5"></span><span class="fontGrey3 mr45">次要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MINOR" class="fontBlue2 w70 pInline">
<%= @ha["minor_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["minor_violations"].nil? ? 0 : statistics_result_percentage(@ha["minor_violations"].to_i, 3000) %>%;"></span></span></div>
<div><span class="analysis-info-icon mr5"></span><span class="fontGrey3 mr45">信息</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=INFO" class="fontBlue2 w70 pInline">
<%= @ha["info_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["info_violations"].nil? ? 0 : statistics_result_percentage(@ha["info_violations"].to_i, 3000) %>%;"></span></span></div>
</div>
<div class="ml90 mt15">
<div class="mb10"><span class="analysis-block-icon mr5"></span><span class="fontGrey3 mr45">阻断</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=BLOCKER" class="fontBlue2 w70 pInline">
<%= @ha["blocker_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%=@ha["blocker_violations"].nil? ? 0 : statistics_result_percentage(@ha["blocker_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-serious-icon mr5"></span><span class="fontGrey3 mr45">严重</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=CRITICAL" class="fontBlue2 w70 pInline">
<%= @ha["critical_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["critical_violations"].nil? ? 0 : statistics_result_percentage(@ha["critical_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-main-icon mr5"></span><span class="fontGrey3 mr45">主要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MAJOR" class="fontBlue2 w70 pInline">
<%= @ha["major_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["major_violations"].nil? ? 0 : statistics_result_percentage(@ha["major_violations"].to_i, 3000) %>%;"></span></span></div>
<div class="mb10"><span class="analysis-secondary-icon mr5"></span><span class="fontGrey3 mr45">次要</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=MINOR" class="fontBlue2 w70 pInline">
<%= @ha["minor_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["minor_violations"].nil? ? 0 : statistics_result_percentage(@ha["minor_violations"].to_i, 3000) %>%;"></span></span></div>
<div><span class="analysis-info-icon mr5"></span><span class="fontGrey3 mr45">信息</span>
<a target="_blank" href="<%= @sonar_address %>/component_issues?id=<%= @resource_id %>#resolved=false|severities=INFO" class="fontBlue2 w70 pInline">
<%= @ha["info_violations"].to_i %>
</a>
<span class="quality-percentage"><span class="quality-percentage-rate" style="width:<%= @ha["info_violations"].nil? ? 0 : statistics_result_percentage(@ha["info_violations"].to_i, 3000) %>%;"></span></span></div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">代码规模</span><span class="fontGrey2">可定性评价为:<span class="c_red"><%= @ha["lines"].nil? ? 0 : lines_scale(@ha["lines"].to_i) %></span></span></div>
<div class="analysis-block mt10 mb40 flex f14">
<div class="analysis-genral">
<p class="fontGrey3">代码行数</p>
<p class="fontBlue2"><%= @ha["lines"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">文件</p>
<p class="fontBlue2"><%= @ha["files"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">目录</p>
<p class="fontBlue2"><%= @ha["directories"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">类</p>
<p class="fontBlue2"><%= @ha["classes"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">方法</p>
<p class="fontBlue2"><%= @ha["functions"].to_i %></p>
</div>
</div>
<div class="analysis-tag-wrap f16">
<span class="analysis-tag fl mr15"></span>
<span class="fb fl mr10">代码规模</span><span class="fontGrey2">可定性评价为:<span class="c_red"><%= @ha["lines"].nil? ? 0 : lines_scale(@ha["lines"].to_i) %></span></span></div>
<div class="analysis-block mt10 mb40 flex f14">
<div class="analysis-genral">
<p class="fontGrey3">代码行数</p>
<p class="fontBlue2"><%= @ha["lines"].to_i %></p>
</div>
<% if !@user_quality_infos.blank? %>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">贡献统计</span></div>
<div class="analysis-block mt10 f12">
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar">&nbsp;</li>
<li class="fl fontGrey2 contribute-list-code">代码行数</li>
<li class="fl fontGrey2 contribute-list-problem">引入质量问题总数</li>
<li class="fl fontGrey2 contribute-list-problem">未解决质量问题数</li>
<li class="fl fontGrey2 contribute-list-rate">引入质量问题数/代码行数</li>
<div class="cl"></div>
</ul>
<div class="analysis-genral">
<p class="fontGrey3">文件</p>
<p class="fontBlue2"><%= @ha["files"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">目录</p>
<p class="fontBlue2"><%= @ha["directories"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">类</p>
<p class="fontBlue2"><%= @ha["classes"].to_i %></p>
</div>
<div class="analysis-genral">
<p class="fontGrey3">方法</p>
<p class="fontBlue2"><%= @ha["functions"].to_i %></p>
</div>
</div>
<% if !@user_quality_infos.blank? %>
<div class="analysis-tag-wrap f16"> <span class="analysis-tag fl mr15"></span> <span class="fb fl">贡献统计</span></div>
<div class="analysis-block mt10 f12">
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar">&nbsp;</li>
<li class="fl fontGrey2 contribute-list-code">代码行数</li>
<li class="fl fontGrey2 contribute-list-problem">引入质量问题总数</li>
<li class="fl fontGrey2 contribute-list-problem">未解决质量问题数</li>
<li class="fl fontGrey2 contribute-list-rate">引入质量问题数/代码行数</li>
<div class="cl"></div>
</ul>
<% @user_quality_infos.each do |author_info| %>
<% user = get_user_by_mail(author_info[:email]) %>
<%# unless author_info[:changes] == 0 %>
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
<div class="mt8">
<%=link_to image_tag(url_to_avatar(user), :width => "50", :height => "50", :class => "image-cir"), user_path(user), :target => '_blank' %>
<p class="fontGrey2 hidden"><%=link_to (user.id == 2 ? author_info[:email] : user.show_name), user_path(user) %></p>
</div>
</li>
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height"><%= author_info[:changes] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:all_issue_count] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height c_red"><%= author_info[:unresolved_issue_count] %></li>
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height"><%= author_info[:ratio] %></li>
<div class="cl"></div>
</ul>
<%# end %>
<% end %>
<% @user_quality_infos.each do |author_info| %>
<% user = get_user_by_mail(author_info[:email]) %>
<%# unless author_info[:changes] == 0 %>
<ul class="contribute-list">
<li class="fl fontGrey2 contribute-list-avatar contribute-list-height">
<div class="mt8">
<%=link_to image_tag(url_to_avatar(user), :width => "50", :height => "50", :class => "image-cir"), user_path(user), :target => '_blank' %>
<p class="fontGrey2 hidden"><%=link_to (user.id == 2 ? author_info[:email] : user.show_name), user_path(user) %></p>
</div>
</li>
<li class="fl fontGrey2 contribute-list-code contribute-list-height contribute-list-line-height"><%= author_info[:changes] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height"><%= author_info[:all_issue_count] %></li>
<li class="fl fontGrey2 contribute-list-problem contribute-list-height contribute-list-line-height c_red"><%= author_info[:unresolved_issue_count] %></li>
<li class="fl contribute-list-rate fontBlue2 contribute-list-height contribute-list-line-height"><%= author_info[:ratio] %></li>
<div class="cl"></div>
</ul>
<%# end %>
<% end %>
</div>
<% end %>
</div>
<% end %>
</div>

View File

@ -1,7 +1,5 @@
<%= render :partial => "header" %>
<div class="container-big mb10">
<div class="project_r_h">
<h2 class="project_h2" style="width:180px;">质量分析</h2>
</div>
<div>
<div class="c_red">本次分析失败,原因如下:</div>
<% if @build_console_result == false %>

View File

@ -17,7 +17,7 @@
<label class="mr27">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取&nbsp;&nbsp;消</a>
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确&nbsp;&nbsp;定</a>-->
<%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
<%= link_to "确 定", {:controller => 'repositories', :action => 'forked'}, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();", :target => "_blank" %>
<div class="cl"></div>
</li>
</ul>

View File

@ -1,5 +1,6 @@
<div class="fl"><h2 class="project_h2_repository">
<div class="git_usr_title">
<%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> / <%= link_to @project.name, project_path(@project), :class => "repository-title-dec" %>
<%=link_to @project.owner, user_path(@project.owner), :class => "repository-title-dec" %> /
<%=link_to @repository.identifier,({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "repository-title-dec" %>
</div></h2>
</div>

View File

@ -67,11 +67,11 @@
<% else %>
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "hw_btn_green fr mt5",:method => "post"%>
<% end %>
<% if User.current.allowed_to?(:as_teacher, course) || User.current.admin? %>
<% if User.current == course.teacher || User.current.admin? %>
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 0);" class="btn_grey_big fr mt5 mr5" style="width: 56px;">归档</a>
<% end %>
<% else %>
<% if User.current.allowed_to?(:as_teacher, course) || User.current.admin? %>
<% if User.current == course.teacher || User.current.admin? %>
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 1);" class="btn_grey_big fr mt5" style="width: 56px;">恢复</a>
<% end %>
<% end %>

View File

@ -0,0 +1,23 @@
<% issue_list(issues) do |issue| -%>
<script>
$(function () {
sd_create_editor_from_data(<%= issue.id%>, null, "100%", "<%= issue.class.name %>");
});
</script>
<%= render :partial => 'users/my_issue_list', :locals => {:activity => issue, :user_activity_id => issue.id} %>
<% end %>
<div style="text-align:left;">
<div style="width:auto; display:inline-block;">
<ul>
<a href="javascript:void(0)" class="hw_btn_blue ml10 mt10 mb10" style="visibility:hidden;" alt="导出EXCEL">导出EXCEL</a>
</ul>
</div>
<div class="pages fr" style="width:auto; display:inline-block;margin-top:10px">
<ul id="issue_list_pagination" class="fr">
<%= 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>

View File

@ -1,7 +1,7 @@
<% member = Member.where("user_id = #{@user.id} and project_id = #{project.id}").first %>
<% if User.current == @user %>
<% if member %>
<%= link_to "", cancel_or_collect_user_path(@user, :project => project.id), :class => "#{member.is_collect == 1 ? 'icons_project_favorite mt3' : 'icons_project_star mt3'}",:target => '_blank', :remote => true, :title => "#{member.is_collect == 1 ? '点击将其从个人主页的班级列表中移除' : '点击将其添加至个人主页的班级列表中'}" %>
<%= link_to "", cancel_or_collect_user_path(@user, :project => project.id), :class => "#{member.is_collect == 1 ? 'icons_project_favorite mt3' : 'icons_project_star mt3'}",:target => '_blank', :remote => true, :title => "#{member.is_collect == 1 ? '点击将其从个人主页的项目列表中移除' : '点击将其添加至个人主页的项目列表中'}" %>
<% end %>
<% else %>
<% if member %>

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5" ><%= @issues_assigned_count %></span>

View File

@ -0,0 +1 @@
<span class="issues_nav_tag ml5" ><%= @issue_count %></span>

View File

@ -0,0 +1,98 @@
<% 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-->
<p class="fl issues_list_name" ><span class="mr5"><%= format_time(activity.created_on) %> </span>发布</p>
<p class="fl ml10"> <span class="mr5"><%= format_time(activity.updated_on) %> </span>更新</p>
</div>
</div>
<ul class="issues_list_txt fr">
<li class=" c_grey issues_list_max mr5">
<%= Project.find(activity.project_id).name %>
</li>
<li class="c_grey">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id)%>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id)%>
<% end %>
</li>
<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.assigned_to_id.nil? && activity.assigned_to_id != 0 %>
<% if activity.try(:assigned_to).try(:realname).empty? %>
<%= link_to activity.assigned_to, user_path(activity.assigned_to_id)%>
<% else %>
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id)%>
<% end %>
<% end %></li>
<li class="issues_list_min c_grey">
<%= activity.priority.name %>
</li>
<li class="c_grey issues_list_max" title="<%= activity.fixed_version %>"><%= activity.fixed_version %></li>
<li class="issues_list_min c_grey mr5" ><%= activity.status.name %></li>
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
<li class="issues_list_min">
<% if activity.journals.count > 0 %>
<span class="issues_icons_mes fl mr5 mt12"></span>
<span class="fl mr5"><%= activity.journals.count %></span>
<% end %>
</li>
</ul>
</div>
<% end %>
<script>
$(".issues_list_box").mouseover(function(){
var iconOrder;
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
if(iconSize > 1){
iconOrder = 2;
} else{
iconOrder = 0;
}
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).show();
});
$(".issues_list_box").mouseout(function(){
var iconOrder;
var iconSize = $(this).children().eq(2).children().eq(7).children().size();
if(iconSize > 1){
iconOrder = 2;
} else{
iconOrder = 0;
}
$(this).children().eq(2).children().eq(7).children().eq(iconOrder).hide();
});
</script>

View File

@ -19,7 +19,7 @@
<li class="f14"><strong>项目消息</strong></li>
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "homepageTypePTask postTypeGrey" %></li>
<li><%= link_to "项目讨论", user_message_path(User.current, :type => 'forge_message'), :class => "homepagePostTypeForum postTypeGrey" %></li>
<li><%= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "homepageTypePNews postTypeGrey" %></li>
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "homepageTypePNews postTypeGrey" %></li>-->
<li><%= link_to "加入项目", user_message_path(User.current, :type => 'apply'), :class => "homepageTypeUApply postTypeGrey" %></li>
</ul>
</li>

View File

@ -4,10 +4,17 @@
<%= javascript_include_tag 'homework','baiduTemplate' %>
<script type="text/javascript">
function homework_name_focus(){
$('#homework_editor').show();
var type = $("#homework_type_option").children('option:selected').val();
if(type == "0"){
$('#select_type_nitice').show();
}
}
var first_click = true;
$(function(){
$("#homework_type_option").on("change",function(){
$('#homework_editor').show();
//$('#homework_editor').show();
var type = $(this).children('option:selected').val();
if(type == "0"){
$('#select_type_nitice').show();
@ -192,22 +199,21 @@
<% if not_allow_select || group_pro %>
<input type="text" style="display: none" name="homework_type" value="<%=homework.homework_type %>"/>
<% end %>
<span class="c_red fl ml10 mt5 <%= edit_mode ? 'none' : '' %>" id="select_type_nitice">发布作业,请先选择作业类型</span>
<span class="c_red fl ml10 mt5 none" id="select_type_nitice">发布作业,请先选择作业类型</span>
</div>
<div class="cl"></div>
<div class="mt10">
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox fl w701 <%= edit_mode ? 'w701' : 'w603' %>" maxlength="255" onfocus="homework_name_focus();" onkeyup="regex_homework_name();" placeholder="发布作业,请先输入作业标题" value="<%= homework.name%>" >
<%= link_to("从题库选用", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fr",:remote => true,:title=>"导入自己发布过的作业,或者共享题库中的作业") unless edit_mode%>
<% unless edit_mode %>
<input type="hidden" name="quotes" id="ref_homework_id" value=""/>
<% end %>
<div class="cl"></div>
<p id="homework_name_span" class="c_red mt5"></p>
</div>
<div class="cl"></div>
<div id="homework_editor" class="mt10" style="display: <%= edit_mode ? 'block':'none'%>">
<div>
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox fl w701" maxlength="255" onkeyup="regex_homework_name();" placeholder="发布作业,请先输入作业标题" value="<%= homework.name%>" >
<% unless edit_mode %>
<input type="hidden" name="quotes" id="ref_homework_id" value=""/>
<% end %>
<div class="cl"></div>
<p id="homework_name_span" class="c_red mt5"></p>
</div>
<div class="cl"></div>
<div id="homework_editor" style="display: <%= edit_mode ? 'block':'none'%>">
<div class="mt10">
<label class="fl c_grey f14 mt5">截止日期:</label>
<div class="calendar_div fl mr70">

View File

@ -164,25 +164,6 @@
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
<!--:onmouseover => "message_titile_show($(this),event)",-->
<!--:onmouseout => "message_titile_hide($(this))" %>-->
</a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %></a></li>

View File

@ -1,4 +1,3 @@
$("#subject_count_homework_<%=@homework.id %>").html(<%= @homework.quotes %>);
hideModal();
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_post_notice') %>";
pop_box_new(htmlvalue,380,182);

View File

@ -0,0 +1,290 @@
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: true,init_activity: true) %>
<% end %>
<script xmlns="http://www.w3.org/1999/html">
function add_style(){
// $("#proeject_id").val("来源");
if($("select[id='tracker_id']").val() != 0){
$("#tracker_id").addClass('issues_filter_active');
}
if($("select[id='author_id']").val() != 0){
$("#author_id").addClass('issues_filter_active');
}
if($("select[id='assigned_to_id']").val() !=0){
$("#assigned_to_id").addClass('issues_filter_active');
}
if($("select[id='priority_id']").val() !=0){
$("#priority_id").addClass('issues_filter_active');
}
if($("select[id='fixed_version_id']").val() !=0){
$("#fixed_version_id").addClass('issues_filter_active');
}
if($("select[id='status_id']").val() != 0 ){
$("#status_id").addClass('issues_filter_active');
}
if($("select[id='done_ratio']").val() != -1){
$("#done_ratio").addClass('issues_filter_active');
}
if($("select[id='test']").val() != 0 ){
$("#test").addClass('issues_filter_active');
}
if($("select[id='tracker_id']").val() == 0){
$("#tracker_id").removeClass('issues_filter_active');
}
if($("select[id='author_id']").val() == 0){
$("#author_id").removeClass('issues_filter_active');
}
if($("select[id='assigned_to_id']").val() ==0){
$("#assigned_to_id").removeClass('issues_filter_active');
}
if($("select[id='priority_id']").val() ==0){
$("#priority_id").removeClass('issues_filter_active');
}
if($("select[id='fixed_version_id']").val() ==0){
$("#fixed_version_id").removeClass('issues_filter_active');
}
if($("select[id='status_id']").val() == 0 ){
$("#status_id").removeClass('issues_filter_active');
}
if($("select[id='done_ratio']").val() == -1){
$("#done_ratio").removeClass('issues_filter_active');
}
if($("select[id='test']").val() == 0 ){
$("#test").removeClass('issues_filter_active');
}
};
//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_content_'+i).className='undis';
}
g('issues_list_content_'+n).className='dis';
g('issues_list_nav_'+n).className='issues_nav_hover';
}
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
$("input[nhname='date_show']").change(function(){
if($(this).val()=='创建日期起始' || $(this).val()=='创建日期结束')return;
$("input[nhname='date_val']",$(this).parent('div')).val($(this).val());
remote_function();
});
});
function remote_function() {
$("#issue_query_form").submit();
}
function remote_function_export(project_id) {
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 priority_id = $("#priority_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+"&priority_id="+priority_id);
///projects/1811/issues.xls?export=true&set_filter=1
}
function EnterPress(e){
var e = e || window.event;
if(e.keyCode == 13){
remote_function();
}
}
// 点击的时候让过滤条件选中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('');
$("select[id='priority_id']").val('');
$("select[id='tracker_id']").val('');
$("select[id='fixed_version_id']").val('');
$("select[id='status_id']").val('');
$("select[id='done_ratio']").val('');
$("select[id='test']").val('');
$("#tracker_id").removeClass('issues_filter_active');
$("#author_id").removeClass('issues_filter_active');
$("#assigned_to_id").addClass('issues_filter_active');
$("#priority_id").removeClass('issues_filter_active');
$("#fixed_version_id").removeClass('issues_filter_active');
$("#status_id").removeClass('issues_filter_active');
$("#done_ratio").removeClass('issues_filter_active');
$("#test").removeClass('issues_filter_active');
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");
$("select[id='assigned_to_id']").val('');
$("select[id='priority_id']").val('');
$("select[id='tracker_id']").val('');
$("select[id='fixed_version_id']").val('');
$("select[id='status_id']").val('');
$("select[id='done_ratio']").val('');
$("select[id='test']").val('');
$("#tracker_id").removeClass('issues_filter_active');
$("#author_id").addClass('issues_filter_active');
$("#assigned_to_id").removeClass('issues_filter_active');
$("#priority_id").removeClass('issues_filter_active');
$("#fixed_version_id").removeClass('issues_filter_active');
$("#status_id").removeClass('issues_filter_active');
$("#done_ratio").removeClass('issues_filter_active');
$("#test").removeClass('issues_filter_active');
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('');
$("#tracker_id").removeClass('issues_filter_active');
$("#author_id").removeClass('issues_filter_active');
$("#assigned_to_id").removeClass('issues_filter_active');
$("#priority_id").removeClass('issues_filter_active');
$("#fixed_version_id").removeClass('issues_filter_active');
$("#status_id").removeClass('issues_filter_active');
$("#done_ratio").removeClass('issues_filter_active');
$("#test").removeClass('issues_filter_active');
remote_function();
}
</script>
<!--缺陷列表开始-->
<div id="myissues_con" class="myissues_con mb10">
<div class="myissues_head mb5">
<h2 class="ml15">我的Issue</h2>
</div>
<div class="clear mb5">
<div class="issues_statistics fl">
<ul>
<li>所有<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issues_filter.count %></a></li>
<li>开启<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_open_count %></a></li>
<li>关闭<a href="javascript:void(0);" class="issues_greycirbg_btn "><%= @issue_close_count %></a></li>
</ul>
</div><!--issues_statistics end-->
</div>
<%= form_tag( user_issues_user_path(@user), :remote=>'xls', :method => "post", :id=>"issue_query_form", :class => 'query_form') do %>
<div class="clear mb10">
<div class="hw_search_box fl ">
<input class="hw_search-input" placeholder="输入Issue名称进行搜索" 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="all_reset_form();">清除</a>
<!-- <div class="issues_filter_data fr">
<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>
<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);all_reset_form();">
<a href="javascript:void(0);" id="issues_type_1" onclick="all_reset_form();" >搜索结果</a>
<span id="issue_filter_all"><%= render :partial => "users/my_issue_filter_all" %></span>
</li>
<li id="issues_list_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" id="issues_type_2" onclick="switch_assign_to(<%= User.current.id %>)">指派给我
<span id="issue_assigned_count"><%= render :partial => "users/my_issue_assigned_filter" %></span>
</a>
</li>
<li id="issues_list_nav_3" onclick="HoverLi(3);">
<a href="javascript:void(0);" id="issues_type_3" onclick="createByMe(<%= User.current.id %>)">我的发布<span class="issues_nav_tag ml5">
<%= @issues_author_count %>
</span></a>
</li>
<div class="cl"></div>
</ul>
<div class="issues_filter">
<div class="issues_form_filter mt5 mr5">
<!-- <select placeholder=" 来源" class="fl mr10" >
<option value="0" selected="selected">来源</option>
<option value="8166">123</option>
<option value="8166">123s</option>
</select>-->
<%= select( :project, :project_id, options_for_issue_project_list(@issues_filter),
{ :include_blank => false,:selected => @project_id ? @project_id : 0 },
{ :onchange => "remote_function();add_style();",:id => "proeject_id", :name => "project_id", :class => "fl", :style=>"width: 80px; margin-right:20px;"}
)%>
<select placeholder=" 发布人" class="fl my_issues_filter" disabled="disabled" style="padding:0px;width: 50px;margin-right: 15px;">
<option value="0" selected="selected">发布人</option>
</select>
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["发布人",0]),
{ :include_blank => false,:selected => @author_id ? @author_id : 0},
{:onchange => "remote_function();add_style();",:id => "author_id", :name => "author_id", :class => "fl", :style => "visibility:hidden;width: 0px;margin:0px;padding:0px;"}
)
%>
<select placeholder=" 类型" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px;width:35px; margin-right:10px;">
<option value="0" selected="selected">类型</option>
</select>
<select placeholder=" 指派给" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right: 15px;">
<option value="0" selected="selected">指派给</option>
</select>
<%= select( :issue, :user_id, [[@user.show_name, @user.id]].unshift(["指派给",0]),
{ :include_blank => false, :selected => @assigned_to ? @assigned_to : 0},
{:onchange=>"remote_function();add_style();",:id=>"assigned_to_id",:name=>"assigned_to_id",:class=>"fl", :style => "visibility:hidden; width:0px;margin:0px;padding:0px;"} )
%>
<select placeholder=" 优先度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
<option value="0" selected="selected">优先度</option>
</select>
<select placeholder=" 里程碑" class="fl my_issues_filter" disabled="disabled" style="padding:0px;margin-left: 20px; margin-right: 10px">
<option value="0" selected="selected">里程碑</option>
</select>
<select placeholder=" 状态" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin-right:10px;width:35px;">
<option value="0" selected="selected">状态</option>
</select>
<select placeholder=" 完成度" class="fl my_issues_filter" disabled="disabled" style="padding:0px; margin:0px">
<option value="0" selected="selected">完成度</option>
</select>
<select placeholder=" 排序" class="fl my_issues_filter" disabled="disabled" style="width:50px;visibility:hidden;margin-left: 0px;margin-right: 0px;">
<option value="0" selected="selected">排序</option>
</select>
</div>
<div class="cl"></div>
</div>
<% end %>
<% if @issues.empty? %>
<p class="nodata mt10"><%= l(:label_no_data) %></p>
<% else %>
<div id="issue_list">
<%= render :partial => 'users/all_issue_list', :locals => {:issues => @issues, :issue_pages => @issue_pages,:issue_count => @issue_count, :subject => @subject } %>
</div>
<% end %>
</div>
<div class="cl"></div>
</div><!--issues_filter end-->
<div id="issues_list_content_1">
</div><!--issues_list_content_1 end-->
<div id="issues_list_content_2" class="undis">
</div><!--issues_list_content_2 end-->
<div id="issues_list_content_3" class="undis">
</div><!--issues_list_content_3 end-->
<!--issues_con_list end-->
<!--缺陷列表结束-->
<!--缺陷列表结束-->

View File

@ -0,0 +1,3 @@
$("#issue_filter_all").html("<%= escape_javascript(render :partial => 'users/my_issue_filter_all') %>");
$("#issue_list").html("<%= escape_javascript(render :partial => 'users/all_issue_list',:locals => {:issues => @issues, :issue_pages=> @issue_pages, :issue_count => @issue_count })%>");
$("#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 %>');

View File

@ -1020,7 +1020,7 @@ zh:
text_wiki_page_destroy_children: 删除子页面及其所有下级页面
text_wiki_page_reassign_children: 将子页面的上级页面设置为
text_own_membership_delete_confirmation: 你正在删除你现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该课程了。你确定要继续吗?
text_own_membership_for_project_confirmation: 你正在删除现有的某些或全部权限,如果这样做了你可能将会再也无法编辑该项目了。你确定要继续吗?
text_own_membership_for_project_confirmation: 您正要将自己从项目中删除,如果继续,您将失去编辑该项目的权限。您是否确定要继续
text_zoom_in: 放大
text_zoom_out: 缩小
text_applied_project: "用户 %{id} 申请加入项目 %{project}"
@ -1270,7 +1270,7 @@ zh:
#added by liuping
label_delete_confirm: 确认删除?
label_delete_confirm: 您是否确认删除?
label_tags_bid: 需求名称
label_tags_syllabus_name: 课程名称
label_tags_course_name: 班级名称

View File

@ -641,6 +641,7 @@ RedmineApp::Application.routes.draw do
get 'edit_brief_introduction'
get "user_resource"
match "user_issues", :to => 'users#user_issues', :via => [:get, :post], :as => "user_issues"
get "import_resources"
get "import_resources_search"
post "import_into_container"
@ -799,6 +800,7 @@ RedmineApp::Application.routes.draw do
post 'close'
post 'reopen'
get 'forked_pop'
get 'delete_member_pop', :to => 'projects#delete_member_pop', :via => :get, :as => "delete_member_pop"
get 'search_public_orgs_not_in_project'
match 'copy', :via => [:get, :post]
match 'set_public_or_private', :via => [:post]

View File

@ -0,0 +1,8 @@
class RemoveColumnToProjects < ActiveRecord::Migration
def up
remove_column :projects, :commits_count, :issues_count, :attachments_count, :boards_count, :news_count, :acts_count, :journals_count, :boards_reply_count
end
def down
end
end

View File

@ -0,0 +1,5 @@
class AddIsDeleteToStudentWorks < ActiveRecord::Migration
def change
add_column :student_works, :is_delete, :integer, :default => 0
end
end

View File

@ -325,14 +325,16 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids"
create_table "changesets", :force => true do |t|
t.integer "repository_id", :null => false
t.string "revision", :null => false
t.integer "repository_id", :null => false
t.string "revision", :null => false
t.string "committer"
t.datetime "committed_on", :null => false
t.datetime "committed_on", :null => false
t.text "comments"
t.date "commit_date"
t.string "scmid"
t.integer "user_id"
t.integer "project_id"
t.integer "type", :default => 0
end
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
@ -516,20 +518,6 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.integer "container_id", :default => 0
end
create_table "course_class_post", :id => false, :force => true do |t|
t.integer "班级id", :default => 0, :null => false
t.string "班级名"
t.integer "帖子id", :default => 0, :null => false
t.integer "主贴id"
t.string "帖子标题", :default => "", :null => false
t.text "帖子内容"
t.integer "帖子用户id"
t.integer "帖子回复数", :default => 0, :null => false
t.integer "最后回帖id"
t.datetime "发帖时间", :null => false
t.datetime "帖子更新时间", :null => false
end
create_table "course_contributor_scores", :force => true do |t|
t.integer "course_id"
t.integer "user_id"
@ -1008,6 +996,10 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.datetime "updated_at", :null => false
end
create_table "innodb_monitor", :id => false, :force => true do |t|
t.integer "a"
end
create_table "invite_lists", :force => true do |t|
t.integer "project_id"
t.integer "user_id"
@ -1595,17 +1587,13 @@ ActiveRecord::Schema.define(:version => 20161117060138) do
t.boolean "hidden_repo", :default => false, :null => false
t.integer "attachmenttype", :default => 1
t.integer "user_id"
t.integer "dts_test", :default => 0
t.string "enterprise_name"
t.integer "organization_id"
t.integer "project_new_type"
t.integer "gpid"
t.integer "forked_from_project_id"
t.integer "forked_count"
t.integer "commits_count", :default => 0
t.integer "publish_resource", :default => 0
t.integer "issues_count", :default => 0
t.integer "attachments_count", :default => 0
t.integer "boards_count", :default => 0
t.integer "news_count", :default => 0
t.integer "acts_count", :default => 0

View File

@ -86,6 +86,11 @@ class Gitlab::Client
get("/projects/#{project}/repository/user_static", :query => options)
end
def get_branch_commit_id(project, git_tree, ref_name)
get("/projects/#{project}/repository/get_branch_commit_id?git_tree=#{git_tree}&ref_name=#{ref_name}")
end
# Gets a specific commit identified by the commit hash or name of a branch or tag.
#
# @example

View File

@ -84,13 +84,13 @@ namespace :homework_evaluation do
work_ids = "(" + homework_common.student_works.has_committed.map(&:id).join(",") + ")"
if homework_common.homework_type != 3
homework_common.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save
end
else
homework_common.student_works.has_committed.each do |student_work|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
student_work.save
if student_work.absence_penalty != 0
@ -98,7 +98,7 @@ namespace :homework_evaluation do
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
student_works = homework_common.student_works.where("user_id in #{user_ids}")
student_works.each do |st_work|
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
st_work.save
end

View File

@ -1,8 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Trustie 500 error</title>
<style type="text/css">
<link type="text/css" rel="stylesheet" href="/stylesheets/css/common.css" />
<link type="text/css" rel="stylesheet" href="/stylesheets/css/public.css" />
<script src="/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js"></script>
<style type="text/css">
body {
font-family: Trebuchet MS, Georgia, "Times New Roman", serif;
background: #fff;
@ -22,9 +27,14 @@
font-size: 24px;
color: #ff0077;
}
</style>
</style>
<script type="text/javascript">
$(function(){
if(window.history.length == 1)
{
$("#history_back").css("color","#CCC");
$("#history_back").css("cursor","default");
}
$("#subject").keydown(function(){
var curLength=$("#subject").val().length;
if(curLength>50){
@ -46,6 +56,7 @@
});
});
</script>
</head>
<body>
<!-- <h1>Internal error</h1>
<p>An error occurred on the page you were trying to access.<br />
@ -53,24 +64,11 @@
<p>If you are the Trustie administrator, check your log files for details about the error.</p> -->
<div class="muban_conbox_max">
<div class="pages_new_404">
<img src="images/404/pic_500.jpg" >
<p class="pages_new_404_txt mt40">网站正在维护,请稍后重试。
<a href="javascript:history.back()" class="linkBlue2 mr10">返回上页>></a>
<a href="javascript:void(0)" class="linkBlue2 mr10" onclick="$('#feedback_div').toggle();"> 给我留言>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=fb938b1f6f991fc100f3d32b6ef38b7888dd4097c71d0eb8b239eaa8749a6afd" target="_blank" class="linkBlue2">QQ反馈>></a>
<img src="/images/404/pic_500.jpg" >
<p class="pages_new_404_txt" style="margin-top: 40px;">网站正在维护,请稍后重试。
<a href="javascript:history.back()" id="history_back" class="linkBlue2 mr10">返回上页>></a>
<a href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151" target="_blank" class="linkBlue2">QQ反馈>></a>
</p>
<div style="display:none;" class="mt10" id="feedback_div">
<% get_memo %>
<%= form_for(@new_memo, :url => create_feedback_forum_path(@public_forum)) do |f| %>
<%= f.text_area :subject, :id=>"subject", :style => "width: 570px;", :class => "feedbackText mb5", :placeholder => "请在此输入平台的问题和建议您也可以通过QQ留言谢谢" %>
<%= f.hidden_field :content,:id => 'hidden', :required => true , :value => l(:label_feedback_value) %>
<span class="c_grey fl">还能输入<span id="textCount" class="c_orange">50</span>个字符</span>
<a href="javascript:void(0);" class="sy_btn_blue_mini f12 fr mr10" onclick="$('#new_memo').submit();">&nbsp;&nbsp;</a>
<a href="javascript:void(0);" class="sy_btn_grey_mini f12 fr mr10" onclick="$('#feedback_div').hide();">&nbsp;&nbsp;</a>
<div class="cl"></div>
<% end %>
</div>
</div>
</div>
</body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -766,6 +766,12 @@ function submit_homework(id){
//验证新建作业的名字
function regex_homework_name()
{
var type = $("#homework_type_option").children('option:selected').val();
if(type == "0"){
$('#select_type_nitice').show();
return false;
}
var name = $.trim($("#homework_name").val());
if(name=="")

View File

@ -169,6 +169,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.mr70{margin-right: 70px;}
.mr75{margin-right: 75px;}
.mr80{margin-right: 80px;}
.mr85{margin-right: 85px;}
.mr95 {margin-right:95px !important;}
.mr100 {margin-right:100px !important;}
.mr118 {margin-right:118px !important;}
@ -330,6 +331,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.W600{ width:600px !important;}
.W700{ width:700px; max-width:700px; min-width:700px;}
.W710{ width:708px;}
.W800{ width:800px !important;}
.maxwidth150{max-width: 150px;}
.m_w460{max-width: 460px;}
.m_w500{max-width: 500px;}
@ -728,4 +730,85 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
#popupWrap ul{cursor: default;}
.bg_checked{background-color: #64bdd9;}
.bg_checked{background-color: #64bdd9;}
/* 搜索 与课程相同 */
.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;}
/* 我的缺陷列表*/
.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; margin: 0 auto; }
.myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; }
.myissues_head h2{ font-size: 14px;}
select.issues_filter_active { font-weight: bold; color: #333;}
.issues_form_filter select.issues_filter_select_min02{width:60px; }
.issues_form_filter select.issues_filter_select_max{width:90px; }
.issues_list_txt li.issues_list_max{ width:90px }
.btn_newpro_grey{display: inline-block;color: #7b7b7b; border:1px solid #dbdbdb;background:#fff;text-align: center;font-size: 12px; padding:0 15px; height:24px; line-height: 24px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px;}
a:hover.btn_newpro_grey,a:active.btn_newpro_grey{ background: #eaeaea;}
.my_issues_form_filter{ position: absolute; top:0; right: 0;}
.my_issues_form_filter select{ width:70px; height:30px; border:none; font-size:14px; border:none;border-right:none; color: #888; font-size: 12px; line-height: 30px; text-align:center}
.my_issues_form_filter select.issues_filter_select_min{width:50px; }
.my_issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none;}

View File

@ -548,7 +548,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
#worksDescription p {word-wrap:break-word;}
/*20160907作业详情更改*/
.homework-type-option {border:1px solid #d9d9d9; width:98px; height:28px; color:#888; font-size:14px;}
.homework-type-option {border:1px solid #d9d9d9; width:138px; height:28px; color:#888; font-size:14px;}
.homework-detail-tab {font-size:14px; color:#484848; overflow:hidden;}
.homework-detail-tab li {float:left; width:100px; text-align:center; padding:3px 0; border-bottom:2px solid #ddd;}
.homework-detail-tab li.selected {border-bottom:2px solid #f00;}

View File

@ -550,7 +550,7 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
/* 缺陷列表 */
.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_greycirbg_btn:hover{ background-color:#cbcbcb; cursor:default; }
.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; }
@ -742,14 +742,15 @@ a:hover.hw_btn_blue,a:active.hw_btn_blue{ background: #3b94d6; color:#fff;}
.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/new_project/arrow.png") no-repeat scroll right center transparent;}
.issues_form_filter select{appearance:none;-moz-appearance:none;-webkit-appearance:none; background: url("../images/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:33px; border:1px solid #c8c8c8; border-left:none; background:url("/images/public_icon.png") -29px 9px no-repeat; }
.issues_data_img{ display:block; width:25px; height: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 #dbdbdb; }
.issues_con_list{border:1px solid #c8c8c8; }
#issues_list_nav {border-bottom:1px solid #d0d0d0;}
#issues_list_nav li {float:left; padding:10px 15px; text-align:center; }
#issues_list_nav li a{font-size:12px; color:#444;}
@ -764,12 +765,13 @@ input.issues_calendar_input{ padding-left:5px; color:#444; border-right:none;}
.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;}
.issues_form_filter select.my_issues_filter{ background:none; width:50px; margin-left: 10px;margin-right: 10px;}
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") -27px 7px no-repeat; }
.issues_data_img{ display:block; width:25px; height:28px; border:1px solid #c8c8c8; border-left:none; background: url("../images/public_icon.png") -29px 9px no-repeat; }
.issues_list_box{ padding:15px; padding-right: 0px; border-bottom:1px dashed #c8c8c8;}
.issues_list_titlebox{ font-size:14px; font-weight:bold; margin-bottom:8px;}
a.issues_list_title{ color:#444; max-width:380px; overflow:hidden; text-overflow:ellipsis; -o-text-overflow:ellipsis; white-space:nowrap; }
a.issues_list_title{ color:#444; max-width:260px; 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;}
@ -778,10 +780,9 @@ a:hover.issues_list_title{color:#3b94d6;}
.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: 24px; line-height: 24px; 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{ height: 50px; line-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: 50px;}
/* 搜索 与课程相同 */
.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;padding-right: 25px;}
@ -832,7 +833,7 @@ a.sy_corange{ color: #ee4a1f;}
a.sy_cblue{ color: #3b94d6;}
/* 我的缺陷列表*/
.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444; }
.myissues_con{ width:968px; padding:15px; border:1px solid #ddd; background-color:#fff; color:#444;}
.myissues_head{ width: 100%; height: 40px; line-height: 40px; background: #f4f4f4; }
.myissues_head h2{ font-size: 14px;}
select.issues_filter_active { font-weight: bold; color: #333;}
@ -1031,3 +1032,13 @@ a.pro_new_users { max-width:80px; overflow:hidden;overflow:hidden;text-overflow:
a:hover.pro_new_users {color: #3b94d6}
.pro_new_users img{ width:40px;height:40px; border: 3px solid #fff;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
.pro_new_users img:hover{border: 3px solid #e6e6e6;}
/*质量分析*/
.quality_info{ border:1px solid #ddd; background-color:#fff; width: 998px;}
.quality_info h2{ background: #fff; font-size: 14px; color: #333; height: 40px; line-height: 40px; padding-left: 15px; border-bottom:1px solid #e5e5e5;}
table.quality_list{ border:none; border-collapse: collapse; width: 100%; margin-bottom: 4px; }
table.quality_list tbody td, table.quality_list tbody tr td {
border-bottom: solid 1px #ddd;
font-size: 11px;
padding: 4px 10px 4px 3px;
}

View File

@ -1530,6 +1530,7 @@ a.syllabusbox_a_blue{
.simulation-title {position:absolute; background-color:#fff; padding:5px 10px; z-index:99; white-space:nowrap; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); display:none; color:#666; border:1px solid #666; line-height:1;}
/*项目创建*/
.project_new_input {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;}
.project_new_input_project_new:focus {border: 1px solid #ddd;height: 20px;width: 794px;background: #fff;padding: 5px;}
/*新版项目列表新增*/
.new_project_title{ font-size:16px; color:#333; max-width:480px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

View File

@ -1289,3 +1289,4 @@ a.pages-big{ width:50px;}
.W420 {width:420px;}
.W300 {width:300px !important;}
.W600{ width:600px;}