Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
d0bca180ca
|
@ -1,6 +1,7 @@
|
||||||
class HomeworkCommonController < ApplicationController
|
class HomeworkCommonController < ApplicationController
|
||||||
require 'net/http'
|
require 'net/http'
|
||||||
require 'json'
|
require 'json'
|
||||||
|
require "base64"
|
||||||
layout "base_courses"
|
layout "base_courses"
|
||||||
before_filter :find_course, :only => [:index,:new,:create,:next_step]
|
before_filter :find_course, :only => [:index,:new,:create,:next_step]
|
||||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
|
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy]
|
||||||
|
@ -22,7 +23,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
#
|
#
|
||||||
# @homework = HomeworkCommon.new
|
# @homework = HomeworkCommon.new
|
||||||
# @homework.safe_attributes = params[:homework_common]
|
# @homework.safe_attributes = params[:homework_common]
|
||||||
# @homework.late_penalty = 0
|
# @homework.late_penalty = 2
|
||||||
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
# @homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||||
# @homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
# @homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||||
#
|
#
|
||||||
|
@ -30,7 +31,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
# #匿评作业相关属性
|
# #匿评作业相关属性
|
||||||
# @homework_detail_manual = HomeworkDetailManual.new
|
# @homework_detail_manual = HomeworkDetailManual.new
|
||||||
# @homework_detail_manual.ta_proportion = 0.6
|
# @homework_detail_manual.ta_proportion = 0.6
|
||||||
# @homework_detail_manual.absence_penalty = 0
|
# @homework_detail_manual.absence_penalty = 2
|
||||||
# @homework_detail_manual.evaluation_num = 3
|
# @homework_detail_manual.evaluation_num = 3
|
||||||
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
# @homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||||
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
# @homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||||
|
@ -51,7 +52,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
|
|
||||||
@homework = HomeworkCommon.new
|
@homework = HomeworkCommon.new
|
||||||
@homework.safe_attributes = params[:homework_common]
|
@homework.safe_attributes = params[:homework_common]
|
||||||
@homework.late_penalty = 0
|
@homework.late_penalty = 2
|
||||||
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||||
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||||
|
|
||||||
|
@ -59,7 +60,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
#匿评作业相关属性
|
#匿评作业相关属性
|
||||||
@homework_detail_manual = HomeworkDetailManual.new
|
@homework_detail_manual = HomeworkDetailManual.new
|
||||||
@homework_detail_manual.ta_proportion = 0.6
|
@homework_detail_manual.ta_proportion = 0.6
|
||||||
@homework_detail_manual.absence_penalty = 0
|
@homework_detail_manual.absence_penalty = 2
|
||||||
@homework_detail_manual.evaluation_num = 3
|
@homework_detail_manual.evaluation_num = 3
|
||||||
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||||
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||||
|
@ -99,12 +100,14 @@ class HomeworkCommonController < ApplicationController
|
||||||
question = {title:homework.name,content:homework.description}
|
question = {title:homework.name,content:homework.description}
|
||||||
question[:input] = []
|
question[:input] = []
|
||||||
question[:output] = []
|
question[:output] = []
|
||||||
if params[:input] && params[:output]
|
if params[:input] && params[:output] && params[:result]
|
||||||
params[:input].each do |k,v|
|
params[:input].each do |k,v|
|
||||||
if params[:output].include? k
|
if params[:output].include? k
|
||||||
homework_test = HomeworkTest.new
|
homework_test = HomeworkTest.new
|
||||||
homework_test.input = v
|
homework_test.input = v
|
||||||
homework_test.output = params[:output][k]
|
homework_test.output = params[:output][k]
|
||||||
|
homework_test.result = params[:result][k]
|
||||||
|
homework_test.error_msg = params[:error_msg]
|
||||||
homework.homework_tests << homework_test
|
homework.homework_tests << homework_test
|
||||||
question[:input] << homework_test.input
|
question[:input] << homework_test.input
|
||||||
question[:output] << homework_test.output
|
question[:output] << homework_test.output
|
||||||
|
@ -221,17 +224,21 @@ class HomeworkCommonController < ApplicationController
|
||||||
homework_test = HomeworkTest.find id
|
homework_test = HomeworkTest.find id
|
||||||
homework_test.destroy if homework_test
|
homework_test.destroy if homework_test
|
||||||
end
|
end
|
||||||
if params[:input] && params[:output]
|
if params[:input] && params[:output] && params[:result]
|
||||||
params[:input].each do |k,v|
|
params[:input].each do |k,v|
|
||||||
if params[:output].include? k
|
if params[:output].include? k
|
||||||
homework_test = HomeworkTest.find_by_id k
|
homework_test = HomeworkTest.find_by_id k
|
||||||
if homework_test #已存在的测试,修改
|
if homework_test #已存在的测试,修改
|
||||||
homework_test.input = v
|
homework_test.input = v
|
||||||
homework_test.output = params[:output][k]
|
homework_test.output = params[:output][k]
|
||||||
|
homework_test.result = params[:result][k]
|
||||||
|
homework_test.error_msg = params[:error_msg]
|
||||||
else #不存在的测试,增加
|
else #不存在的测试,增加
|
||||||
homework_test = HomeworkTest.new
|
homework_test = HomeworkTest.new
|
||||||
homework_test.input = v
|
homework_test.input = v
|
||||||
homework_test.output = params[:output][k]
|
homework_test.output = params[:output][k]
|
||||||
|
homework_test.result = params[:result][k]
|
||||||
|
homework_test.error_msg = params[:error_msg]
|
||||||
homework_test.homework_common = @homework
|
homework_test.homework_common = @homework
|
||||||
end
|
end
|
||||||
homework_test.save
|
homework_test.save
|
||||||
|
@ -351,6 +358,24 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def programing_test
|
||||||
|
test = {language:params[:language],src:Base64.encode64(params[:src]),input:[params[:input]],output:[params[:output]]}
|
||||||
|
@index = params[:index]
|
||||||
|
uri = URI('http://192.168.80.21:8080/api/realtime.json')
|
||||||
|
body = test.to_json
|
||||||
|
res = Net::HTTP.new(uri.host, uri.port).start do |client|
|
||||||
|
request = Net::HTTP::Post.new(uri.path)
|
||||||
|
request.body = body
|
||||||
|
request["Content-Type"] = "application/json"
|
||||||
|
client.request(request)
|
||||||
|
end
|
||||||
|
result = JSON.parse(res.body)
|
||||||
|
@err_msg = result["compile_error_msg"]
|
||||||
|
result["results"].each do |re|
|
||||||
|
@result = re["status"]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
#获取课程
|
#获取课程
|
||||||
def find_course
|
def find_course
|
||||||
|
|
|
@ -150,11 +150,15 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
if User.current.login?
|
||||||
@issue_custom_fields = IssueCustomField.sorted.all
|
@issue_custom_fields = IssueCustomField.sorted.all
|
||||||
@trackers = Tracker.sorted.all
|
@trackers = Tracker.sorted.all
|
||||||
@project = Project.new
|
@project = Project.new
|
||||||
@project.safe_attributes = params[:project]
|
@project.safe_attributes = params[:project]
|
||||||
render :layout => 'base'
|
render :layout => 'base'
|
||||||
|
else
|
||||||
|
redirect_to signin_url
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def share
|
def share
|
||||||
|
@ -167,6 +171,10 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
unless User.current.login?
|
||||||
|
redirect_to signin_url
|
||||||
|
return
|
||||||
|
end
|
||||||
@issue_custom_fields = IssueCustomField.sorted.all
|
@issue_custom_fields = IssueCustomField.sorted.all
|
||||||
@trackers = Tracker.sorted.all
|
@trackers = Tracker.sorted.all
|
||||||
@project = Project.new
|
@project = Project.new
|
||||||
|
@ -280,11 +288,11 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
# 根据私密性,取出符合条件的所有数据
|
# 根据私密性,取出符合条件的所有数据
|
||||||
if User.current.member_of?(@project) || User.current.admin?
|
if User.current.member_of?(@project) || User.current.admin?
|
||||||
@events_pages = ForgeActivity.where("project_id = ?",@project).order("created_at desc").page(params['page'|| 1]).per(20);
|
@events_pages = ForgeActivity.where("project_id = ? and forge_act_type != ?",@project, "Document" ).order("created_at desc").page(params['page'|| 1]).per(20);
|
||||||
#events = @activity.events(@date_from, @date_to)
|
#events = @activity.events(@date_from, @date_to)
|
||||||
else
|
else
|
||||||
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
|
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
|
||||||
= ?",@project,1).order("created_at desc")
|
= ? and forge_act_type != ? ",@project,1, "Document").order("created_at desc")
|
||||||
.page(params['page'|| 1]).per(10);
|
.page(params['page'|| 1]).per(10);
|
||||||
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
|
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
|
||||||
end
|
end
|
||||||
|
@ -361,37 +369,6 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# dts测试工具
|
|
||||||
def dts_dep
|
|
||||||
render_403 unless User.current.admin?
|
|
||||||
@dts = Dts.all
|
|
||||||
end
|
|
||||||
|
|
||||||
# dts云部署
|
|
||||||
def yun_dep
|
|
||||||
render_403 unless User.current.admin?
|
|
||||||
end
|
|
||||||
|
|
||||||
# 软件知识库
|
|
||||||
def soft_knowledge
|
|
||||||
render_403 unless User.current.admin?
|
|
||||||
end
|
|
||||||
|
|
||||||
# 在线开发平台
|
|
||||||
def online_dev
|
|
||||||
render_403 unless User.current.admin?
|
|
||||||
end
|
|
||||||
|
|
||||||
# 软件资源库
|
|
||||||
def soft_file
|
|
||||||
render_403 unless User.current.admin?
|
|
||||||
end
|
|
||||||
|
|
||||||
# 软件服务
|
|
||||||
def soft_service
|
|
||||||
render_403 unless User.current.admin?
|
|
||||||
end
|
|
||||||
|
|
||||||
#发送邮件邀请新用户
|
#发送邮件邀请新用户
|
||||||
def invite_members_by_mail
|
def invite_members_by_mail
|
||||||
if User.current.member_of?(@project) || User.current.admin?
|
if User.current.member_of?(@project) || User.current.admin?
|
||||||
|
|
|
@ -387,8 +387,8 @@ class StudentWorkController < ApplicationController
|
||||||
if stundet_work && params[:results] && params[:results].class.to_s == "Array"
|
if stundet_work && params[:results] && params[:results].class.to_s == "Array"
|
||||||
homework_common = stundet_work.homework_common
|
homework_common = stundet_work.homework_common
|
||||||
params[:results].each do |result|
|
params[:results].each do |result|
|
||||||
homework_test = homework_common.homework_tests.where("input = '#{result[:input]}' AND output = '#{result[:output]}'").first
|
homework_tests = homework_common.homework_tests.where("input = '#{result[:input]}' AND output = '#{result[:output]}'")
|
||||||
if homework_test
|
homework_tests.each do |homework_test|
|
||||||
student_work_test = StudentWorkTest.new
|
student_work_test = StudentWorkTest.new
|
||||||
student_work_test.student_work = stundet_work
|
student_work_test.student_work = stundet_work
|
||||||
student_work_test.homework_test = homework_test
|
student_work_test.homework_test = homework_test
|
||||||
|
|
|
@ -120,9 +120,9 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
projects = @user.projects.visible.order("updated_on desc")
|
projects = @user.projects.visible.order("updated_on desc")
|
||||||
if(params[:status] == '1')
|
if(params[:status] == '1')
|
||||||
projects = projects.where("user_id = ?",@user.id)
|
projects = projects.where("projects.user_id = ?",@user.id)
|
||||||
elsif(params[:status] == '2')
|
elsif(params[:status] == '2')
|
||||||
projects = projects.where("user_id <> ?",@user.id)
|
projects = projects.where("projects.user_id <> ?",@user.id)
|
||||||
end
|
end
|
||||||
@list = paginateHelper projects,10
|
@list = paginateHelper projects,10
|
||||||
@params = params[:status]
|
@params = params[:status]
|
||||||
|
@ -261,20 +261,15 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
# modified by fq
|
# modified by fq
|
||||||
def user_newfeedback
|
def user_newfeedback
|
||||||
@jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
@jours.update_all(:is_readed => true, :status => false)
|
jours.update_all(:is_readed => true, :status => false)
|
||||||
@jours.each do |journal|
|
jours.each do |journal|
|
||||||
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||||
end
|
end
|
||||||
|
@jour = paginateHelper jours,10
|
||||||
#@limit = 10
|
|
||||||
#@feedback_count = @jours.count
|
|
||||||
#@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
|
||||||
#@offset ||= @feedback_pages.offset
|
|
||||||
@jour = paginateHelper @jours,10
|
|
||||||
@state = false
|
@state = false
|
||||||
|
render :layout=>'base_users_new'
|
||||||
end
|
end
|
||||||
# end
|
|
||||||
|
|
||||||
def user_comments
|
def user_comments
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ class WordsController < ApplicationController
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
before_filter :find_user, :only => [:new, :create, :destroy, :more, :back]
|
before_filter :find_user, :only => [:new, :create, :destroy, :more, :back]
|
||||||
def create
|
def create
|
||||||
if params[:new_form][:user_message].size>0
|
if params[:new_form][:user_message].size>0 && User.current.logged?
|
||||||
unless params[:user_id].nil?
|
unless params[:user_id].nil?
|
||||||
if params[:reference_content]
|
if params[:reference_content]
|
||||||
message = params[:new_form][:user_message] + "\n" + params[:reference_content]
|
message = params[:new_form][:user_message] + "\n" + params[:reference_content]
|
||||||
|
@ -18,22 +18,13 @@ class WordsController < ApplicationController
|
||||||
list = User.find(refer_user_id).add_jour(User.current, message, refer_user_id)
|
list = User.find(refer_user_id).add_jour(User.current, message, refer_user_id)
|
||||||
end
|
end
|
||||||
@jour = list.last
|
@jour = list.last
|
||||||
# @user.count_new_jour
|
|
||||||
# if a_message.size > 5
|
|
||||||
# @message = a_message[-5, 5]
|
|
||||||
# else
|
|
||||||
# @message = a_message
|
|
||||||
# end
|
|
||||||
# @message_count = a_message.count
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# @jours = @user.journals_for_messages.where('m_parent_id IS NULL').reverse
|
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
|
||||||
# @jour = paginateHelper @jours,10
|
@jour = paginateHelper jours,10
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
# format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
|
|
||||||
format.js
|
format.js
|
||||||
#format.api { render_api_ok }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -93,7 +84,6 @@ class WordsController < ApplicationController
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
#format.api { render_api_ok }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -206,7 +196,15 @@ class WordsController < ApplicationController
|
||||||
flash[:error] = feedback.errors.full_messages[0]
|
flash[:error] = feedback.errors.full_messages[0]
|
||||||
redirect_to project_feedback_url(params[:id])
|
redirect_to project_feedback_url(params[:id])
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#给用户留言
|
||||||
|
def leave_user_message
|
||||||
|
@user = User.find(params[:id])
|
||||||
|
if params[:new_form][:user_message].size>0 && User.current.logged? && @user
|
||||||
|
@user.add_jour(User.current, params[:new_form][:user_message])
|
||||||
|
end
|
||||||
|
redirect_to feedback_path(@user)
|
||||||
end
|
end
|
||||||
|
|
||||||
# add by nwb
|
# add by nwb
|
||||||
|
|
|
@ -2378,4 +2378,26 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
notice.html_safe
|
notice.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def stantard_code
|
||||||
|
"// 这是一个C语言的样例程序
|
||||||
|
// 功能:输入两个整数,输出两者之和
|
||||||
|
// 测试:老师可以给出以下测试集:
|
||||||
|
// 输入1和2,输出3
|
||||||
|
// 输入3和4,输出7
|
||||||
|
// 那么下面这段代码将得到满分
|
||||||
|
|
||||||
|
// 注意:编程作业采用命令行传参方式
|
||||||
|
// 程序的所有输入都通过argv传入
|
||||||
|
// 否则您的程序将被判错
|
||||||
|
|
||||||
|
#include <stdio.h> //引用必须头文件
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
int a = atoi(argv[1]); //将第一个输入转成整型
|
||||||
|
int b = atoi(argv[2]); //将第二个输入转换为整型
|
||||||
|
|
||||||
|
printf(\"%d\",a+b); //输出a+b
|
||||||
|
return 0;
|
||||||
|
}".html_safe
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -66,4 +66,31 @@ module HomeworkCommonHelper
|
||||||
link
|
link
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#将状态转换为错误信息
|
||||||
|
def status_to_err_msg status
|
||||||
|
case status.to_i
|
||||||
|
when -1
|
||||||
|
'编译出错'
|
||||||
|
when -2
|
||||||
|
'输入和输出不匹配'
|
||||||
|
when -3
|
||||||
|
'输入和输出不匹配'
|
||||||
|
when 1
|
||||||
|
'运行出错'
|
||||||
|
when 2
|
||||||
|
'超时'
|
||||||
|
when 3
|
||||||
|
'内存超出'
|
||||||
|
when 4
|
||||||
|
'输出超出'
|
||||||
|
when 5
|
||||||
|
'禁用函数'
|
||||||
|
when 6
|
||||||
|
'其他错误'
|
||||||
|
when 0
|
||||||
|
'成功'
|
||||||
|
else
|
||||||
|
'未知错误'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -321,6 +321,7 @@ module UsersHelper
|
||||||
list = obj.watcher_users.order("#{Watcher.table_name}.id desc").limit(10).all
|
list = obj.watcher_users.order("#{Watcher.table_name}.id desc").limit(10).all
|
||||||
return [count,list];
|
return [count,list];
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_visitor_users(obj)
|
def get_visitor_users(obj)
|
||||||
query = Visitor.where("master_id=?",obj.id)
|
query = Visitor.where("master_id=?",obj.id)
|
||||||
count = query.count
|
count = query.count
|
||||||
|
@ -332,33 +333,45 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_create_course_count(user)
|
def get_create_course_count(user)
|
||||||
if user == User.current
|
user.courses.visible.where("tea_id = ?",user.id).count
|
||||||
user.courses.count
|
|
||||||
else
|
|
||||||
user.courses.where("is_public = 1").count
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#获取加入课程数
|
||||||
def get_join_course_count(user)
|
def get_join_course_count(user)
|
||||||
user.coursememberships.count - get_create_course_count(user)
|
user.courses.visible.count - get_create_course_count(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#发布作业数
|
||||||
def get_homework_commons_count(user)
|
def get_homework_commons_count(user)
|
||||||
HomeworkCommon.where("user_id = ?",user.id).count
|
HomeworkCommon.where("user_id = ?",user.id).count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#资源数
|
||||||
def get_projectandcourse_attachment_count(user)
|
def get_projectandcourse_attachment_count(user)
|
||||||
Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count
|
Attachment.where("author_id = ? and container_type in ('Project','Course')",user.id).count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#创建项目数
|
||||||
def get_create_project_count(user)
|
def get_create_project_count(user)
|
||||||
Project.where("user_id = ? and project_type = ?",user.id,Project::ProjectType_project).count
|
user.projects.visible.where("projects.user_id=#{user.id}").count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#加入项目数
|
||||||
def get_join_project_count(user)
|
def get_join_project_count(user)
|
||||||
user.memberships.count(conditions: "projects.project_type = #{Project::ProjectType_project}") - get_create_project_count(user)
|
user.projects.visible.count - get_create_project_count(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#创建缺陷数
|
||||||
def get_create_issue_count(user)
|
def get_create_issue_count(user)
|
||||||
Issue.where("author_id = ?",user.id).count
|
Issue.where("author_id = ?",user.id).count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#解决缺陷数
|
||||||
def get_resolve_issue_count(user)
|
def get_resolve_issue_count(user)
|
||||||
Issue.where("assigned_to_id = ? and status_id=3",user.id).count
|
Issue.where("assigned_to_id = ? and status_id=3",user.id).count
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#参与匿评数
|
||||||
def get_anonymous_evaluation_count(user)
|
def get_anonymous_evaluation_count(user)
|
||||||
StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count
|
StudentWorksScore.where("user_id = ? and reviewer_role=3",user.id).count
|
||||||
end
|
end
|
||||||
|
@ -388,6 +401,7 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
return str.html_safe
|
return str.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_activity_act_showname(activity)
|
def get_activity_act_showname(activity)
|
||||||
case activity.act_type
|
case activity.act_type
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
|
@ -418,6 +432,7 @@ module UsersHelper
|
||||||
return activity.act_type
|
return activity.act_type
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_activity_act_createtime(activity)
|
def get_activity_act_createtime(activity)
|
||||||
case activity.act_type
|
case activity.act_type
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
|
@ -428,6 +443,7 @@ module UsersHelper
|
||||||
return activity.act.created_on
|
return activity.act.created_on
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_activity_container_url e
|
def get_activity_container_url e
|
||||||
if !e.visible?
|
if !e.visible?
|
||||||
return "javascript:;"
|
return "javascript:;"
|
||||||
|
@ -438,6 +454,7 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
return url_for(:controller => 'projects', :action=>"show", :id=>e.id, :host=>Setting.host_name)
|
return url_for(:controller => 'projects', :action=>"show", :id=>e.id, :host=>Setting.host_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_activity_url(activity,e)
|
def get_activity_url(activity,e)
|
||||||
if !e.visible?
|
if !e.visible?
|
||||||
return "javascript:;"
|
return "javascript:;"
|
||||||
|
@ -466,6 +483,7 @@ module UsersHelper
|
||||||
return 'javascript:;'
|
return 'javascript:;'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_activity_opt(activity,e)
|
def get_activity_opt(activity,e)
|
||||||
case activity.act_type
|
case activity.act_type
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
|
@ -475,14 +493,14 @@ module UsersHelper
|
||||||
when "Issue"
|
when "Issue"
|
||||||
return '发表了问题'
|
return '发表了问题'
|
||||||
when "Journal"
|
when "Journal"
|
||||||
return '回复了问题'
|
return '更新了问题'
|
||||||
when "JournalsForMessage"
|
when "JournalsForMessage"
|
||||||
return e.class.to_s == 'Course' ? '发表了留言' : '提交了反馈'
|
return e.class.to_s == 'Course' ? '发表了留言' : '提交了反馈'
|
||||||
#return ( activity.act.reply_id == nil || activity.act.reply_id == 0 ) ? '' : ''
|
#return ( activity.act.reply_id == nil || activity.act.reply_id == 0 ) ? '' : ''
|
||||||
when "Message"
|
when "Message"
|
||||||
return ( activity.act.parent_id == nil || activity.act.parent_id == '' ) ? '发布了帖子' : '回复了帖子'
|
return ( activity.act.parent_id == nil || activity.act.parent_id == '' ) ? '发布了帖子' : '回复了帖子'
|
||||||
when "Poll"
|
when "Poll"
|
||||||
return '发布了问卷'
|
return '创建了问卷'
|
||||||
else
|
else
|
||||||
return '有了新动态'
|
return '有了新动态'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class HomeworkTest < ActiveRecord::Base
|
class HomeworkTest < ActiveRecord::Base
|
||||||
attr_accessible :input, :output, :homework_common_id
|
attr_accessible :input, :output, :homework_common_id,:result,:error_msg
|
||||||
|
|
||||||
belongs_to :homework_common
|
belongs_to :homework_common
|
||||||
has_many :student_work_test
|
has_many :student_work_test
|
||||||
|
|
|
@ -235,9 +235,10 @@ class Issue < ActiveRecord::Base
|
||||||
base_reload(*args)
|
base_reload(*args)
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_param
|
# 之所以注释是以为最终以id形式显示,另外如果项目名称带点号或者纯数字会出现问题
|
||||||
@to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
|
# def to_param
|
||||||
end
|
# @to_param ||= "#{id}_#{self.project.name}(#{self.project.issues.index(self).to_i+1}-#{self.project.issues.count})"#.parameterize
|
||||||
|
# end
|
||||||
|
|
||||||
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
|
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
|
||||||
def available_custom_fields
|
def available_custom_fields
|
||||||
|
|
|
@ -388,7 +388,8 @@ class Mailer < ActionMailer::Base
|
||||||
@user = applied.user
|
@user = applied.user
|
||||||
recipients = @project.manager_recipients
|
recipients = @project.manager_recipients
|
||||||
s = l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name)
|
s = l(:text_applied_project, :id => "##{@user.show_name}", :project => @project.name)
|
||||||
@applied_url = url_for(:controller => 'projects', :action => 'settings', :id => @project.id,:tab=>'members')
|
@token = Token.get_token_from_user(@user, 'autologin')
|
||||||
|
@applied_url = url_for(:controller => 'projects', :action => 'settings', :id => @project.id,:tab=>'members', :token => @token.value)
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:subject => s
|
:subject => s
|
||||||
end
|
end
|
||||||
|
|
|
@ -418,7 +418,7 @@ class User < Principal
|
||||||
end
|
end
|
||||||
|
|
||||||
def nickname(formatter = nil)
|
def nickname(formatter = nil)
|
||||||
login
|
login.nil? || (login && login.empty?) ? "AnonymousUser" : login
|
||||||
end
|
end
|
||||||
|
|
||||||
def name(formatter = nil)
|
def name(formatter = nil)
|
||||||
|
|
|
@ -17,6 +17,8 @@ if (window.Messenger) {
|
||||||
Messenger().post({
|
Messenger().post({
|
||||||
id: "label_apply_project_waiting",
|
id: "label_apply_project_waiting",
|
||||||
message: "<%= l(:label_apply_project_waiting) %>",
|
message: "<%= l(:label_apply_project_waiting) %>",
|
||||||
showCloseButton: true,
|
showCloseButton: true
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$("#applied_project_link_<%= @project.id%>").replaceWith("<%= escape_javascript(link_to "加入项目",appliedproject_path(:user_id => User.current.id,:project_id => @project.id,:project_join => true),:class => "blue_n_btn fr mt20", :remote => "true",:method => "post",:id => "applied_project_link_#{@project.id}") %>");
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<% elsif @status == 2%>
|
<% elsif @status == 2%>
|
||||||
alert("<%= l('project.join.tips.success') %>");
|
alert("<%= l('project.join.tips.success') %>");
|
||||||
hideModal($("#popbox"));
|
hideModal($("#popbox"));
|
||||||
|
$("#applied_project_link_<%= @project.id%>").replaceWith("<%=escape_javascript(link_to '取消申请',appliedproject_applied_path(:project_id => @project.id,:user_id => User.current.id),:class => "blue_n_btn fr mt20", :remote => "true",:method => "delete",:id => "applied_project_link_#{@project.id}")%>");
|
||||||
<% elsif @status == 3%>
|
<% elsif @status == 3%>
|
||||||
alert("<%= l('project.join.tips.has') %>");
|
alert("<%= l('project.join.tips.has') %>");
|
||||||
<%else%>
|
<%else%>
|
||||||
|
|
|
@ -66,6 +66,16 @@
|
||||||
:class => 'delete delete-homework-icon',
|
:class => 'delete delete-homework-icon',
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:title => l(:button_delete) %>
|
:title => l(:button_delete) %>
|
||||||
|
<% elsif attachment.container_type == 'Issue' %>
|
||||||
|
<% if User.current == attachment.author %>
|
||||||
|
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||||
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
|
:method => :delete,
|
||||||
|
:class => 'delete',
|
||||||
|
#:remote => true,
|
||||||
|
#:id => "attachments_" + attachment.id.to_s,
|
||||||
|
:title => l(:button_delete) %>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
<!--gcm-->
|
<!--gcm-->
|
||||||
<p class="stats">
|
<p class="stats">
|
||||||
<%= content_tag('span', link_to("#{@course_activity_count[@course.id]}", course_path(@course)), :class => "info") %>
|
<%= content_tag('span', link_to("#{course_activity_count @course}", course_path(@course)), :class => "info") %>
|
||||||
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
|
<%= content_tag('span', l(:label_x_activity, :count => @course_activity_count[@course.id])) %>
|
||||||
</p>
|
</p>
|
||||||
<!--gcm-->
|
<!--gcm-->
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<% if @state %>
|
<% if @state %>
|
||||||
<% if @state == 0 %>
|
<% if @state == 0 %>
|
||||||
alert("加入成功");
|
alert("加入成功");
|
||||||
hideModal($("#popbox"));
|
hideModal($("#popbox02"));
|
||||||
|
$("#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>");
|
||||||
<% elsif @state == 1 %>
|
<% elsif @state == 1 %>
|
||||||
alert("密码错误");
|
alert("密码错误");
|
||||||
<% elsif @state == 2 %>
|
<% elsif @state == 2 %>
|
||||||
|
|
|
@ -24,6 +24,8 @@ $('#upload_file_div').slideToggle('slow');
|
||||||
<% if @project %>
|
<% if @project %>
|
||||||
closeModal();
|
closeModal();
|
||||||
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
$("#resource_list").html('<%= j(render partial: "project_file_new" ,locals: {project: @project}) %>');
|
||||||
|
$("#project_files_count_info").html("<%= @all_attachments.count%>");
|
||||||
|
$("#project_files_count_nav").html("(<%= @all_attachments.count%>)")
|
||||||
// 添加文件上传成功提示
|
// 添加文件上传成功提示
|
||||||
<% unless params[:attachments].nil? %>
|
<% unless params[:attachments].nil? %>
|
||||||
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
var div = $('<div id="addBox" class="flash notice">文件上传成功!</div>');
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
|
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"> 标准代码: </label>
|
<label class="label02"> 标准代码: </label>
|
||||||
<textarea name="standard_code" class=" w547 h150 mb10 fl"><%= homework.homework_detail_programing.standard_code%></textarea>
|
<textarea name="standard_code" class=" w547 h350 mb10 fl" oninput="init_programing_test();" onpropertychange="init_programing_test()"><%= homework.homework_detail_programing.standard_code || stantard_code%></textarea>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
@ -87,16 +87,25 @@
|
||||||
<div>
|
<div>
|
||||||
<li>
|
<li>
|
||||||
<label class="label02"> 测试输入: </label>
|
<label class="label02"> 测试输入: </label>
|
||||||
<input type="text" class="fl h26 w200 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
|
<input type="text" class="fl h26 w190 mb10" name="input[<%= homework_test.id%>]" value="<%= homework_test.input%>"/>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class=" fl f14 ml10"> 输出: </label>
|
<label class=" fl f14 ml10"> 输出: </label>
|
||||||
<input type="text" class="fl h26 w200 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
|
<input type="text" class="fl h26 w190 mb10" name="output[<%= homework_test.id%>]" value="<%= homework_test.output%>"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
||||||
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
|
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
|
||||||
<!--span class="green_btn fl ml5 mt1">测试</span-->
|
<% if homework_test.result && !homework_test.result.to_s.empty?%>
|
||||||
|
<% if homework_test.result == 0%>
|
||||||
|
<a class="green_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">正确</a>
|
||||||
|
<% else%>
|
||||||
|
<a class="red_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">错误</a>
|
||||||
|
<% end%>
|
||||||
|
<% else%>
|
||||||
|
<a class="blue_btn fl ml5 mt1 programing_test" onclick="programing_test('<%= homework_test.id%>')" id="test_send_<%= homework_test.id%>">测试</a>
|
||||||
|
<% end%>
|
||||||
|
<input type="hidden" id="test_result_<%= homework_test.id%>" name="result[<%= homework_test.id%>]" value="<%= homework_test.result%>"/>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -105,19 +114,63 @@
|
||||||
<div>
|
<div>
|
||||||
<li>
|
<li>
|
||||||
<label class="label02"> 测试输入: </label>
|
<label class="label02"> 测试输入: </label>
|
||||||
<input type="text" class="fl h26 w200 mb10" name="input[0]" />
|
<input type="text" class="fl h26 w190 mb10" name="input[0]" value="1 2"/>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class=" fl f14 ml10"> 输出: </label>
|
<label class=" fl f14 ml10"> 输出: </label>
|
||||||
<input type="text" class="fl h26 w200 mb10" name="output[0]" />
|
<input type="text" class="fl h26 w190 mb10" name="output[0]" value="3"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
<a class="icon_add ml10 " href="javascript:void(0);" title="添加测试" onclick="add_programing_test($(this).parent().parent())"></a>
|
||||||
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
|
<a class="icon_remove" href="javascript:void(0);" title="删除测试" onclick="remove_programing_test($(this).parent().parent())"></a>
|
||||||
<!--span class="green_btn fl ml5 mt1">测试</span-->
|
<a class="blue_btn fl ml5 mt programing_test" onclick="programing_test('0')" id="test_send_0">测试</a>
|
||||||
|
<input type="hidden" id="test_result_0" name="result[0]" />
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<input type="hidden" name="error_msg" id="homework_test_error_msg" value="<%= homework.homework_tests.first.error_msg if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg%>">
|
||||||
|
<table class="border_ce" cellpadding="0" cellspacing="0" id="homework_work_test_show" style="display: <%= homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg && !homework.homework_tests.first.error_msg.empty? ? "block" : "none"%>">
|
||||||
|
<tbody>
|
||||||
|
<tr class="border_t" >
|
||||||
|
<td class="td_end fb c_red w60 td_board_left">
|
||||||
|
错误信息:
|
||||||
|
</td>
|
||||||
|
<td class="td_end wl" id="homework_work_test_desc">
|
||||||
|
<% if homework.homework_tests.first && homework.homework_tests.first && homework.homework_tests.first.error_msg %>
|
||||||
|
<%= homework.homework_tests.first.error_msg%>
|
||||||
|
<% end%>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
//点击测试,发送
|
||||||
|
function programing_test(obj) {
|
||||||
|
$.post(
|
||||||
|
'<%= programing_test_homework_common_index_path%>',
|
||||||
|
{
|
||||||
|
src: $("textarea[name='standard_code']").val(),
|
||||||
|
input: $("input[name='input[" + obj +"]']").val(),
|
||||||
|
output: $("input[name='output[" + obj + "]']").val(),
|
||||||
|
language: $("select[name='language']").val(),
|
||||||
|
index: obj
|
||||||
|
},
|
||||||
|
function (data) {
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function init_programing_test()
|
||||||
|
{
|
||||||
|
$(".programing_test").each(function(){
|
||||||
|
$(this).removeClass("green_btn red_btn").addClass("blue_btn").text("测试");
|
||||||
|
$(this).next("input").val("");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -48,7 +48,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<% if homework.homework_type == 2 && homework.homework_detail_programing && @is_teacher%>
|
<% if homework.homework_type == 2 && homework.homework_detail_programing%>
|
||||||
|
<% if @is_teacher%>
|
||||||
<table class="border_ce" cellpadding="0" cellspacing="0">
|
<table class="border_ce" cellpadding="0" cellspacing="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="<%= cycle("", "b_grey") %>">
|
<tr class="<%= cycle("", "b_grey") %>">
|
||||||
|
@ -72,6 +73,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
<div class="mt5">
|
<div class="mt5">
|
||||||
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
|
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
$("#test_send_<%= @index%>").replaceWith("<a class='<%= @result == 0 ? 'green_btn' : 'red_btn'%> fl ml5 mt1 programing_test' onclick='programing_test(<%= @index%>)' id='test_send_<%= @index%>'><%= @result == 0 ? '正确' : '错误'%></a>");
|
||||||
|
$("#test_result_<%= @index%>").val("<%= @result%>");
|
||||||
|
<% if @err_msg || @result != 0%>
|
||||||
|
$("#homework_work_test_show").show();
|
||||||
|
$("#homework_work_test_desc").text("<%= escape_javascript(@err_msg || status_to_err_msg(@result))%>");
|
||||||
|
<% if @err_msg%>
|
||||||
|
$("#homework_test_error_msg").val("<%= escape_javascript(@err_msg)%>");
|
||||||
|
<% end%>
|
||||||
|
<% else%>
|
||||||
|
$("#homework_work_test_show").hide();
|
||||||
|
$("#homework_test_error_msg").val("");
|
||||||
|
<% end%>
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="pro_page_box">
|
<div class="pro_page_box">
|
||||||
<div class="pro_page_top break_word">
|
<div class="pro_page_top break_word">
|
||||||
<%= link_to "#{@issue.project.name}"+">", project_issues_path(@issue.project) %>
|
<%= link_to "#{@issue.project.name}"+">", project_issues_path(@issue.project) %>
|
||||||
<a href="javascript:void(0)"><%= "#" + @issue.project_index %></a>
|
<a href="javascript:void(0)"><%= "#" + @issue.id.to_s %></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="problem_main">
|
<div class="problem_main">
|
||||||
<div class="ping_dispic">
|
<div class="ping_dispic">
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
<div id="Footer">
|
||||||
|
<div class="footerAboutContainer">
|
||||||
|
<ul class="footerAbout">
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/projects/2/feedback" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_recruitment_information)%></a>|</li>
|
||||||
|
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey mw20" target="_blank"><%= l(:label_forums)%></a>|</li>
|
||||||
|
<li class="fl"><a href="javascript:void:(0);" class="f_grey ml20" target="_blank"><%= l(:label_language)%></a>
|
||||||
|
<select class="languageBox">
|
||||||
|
<option value="Chinese" selected="selected">中文</option>
|
||||||
|
<option value="English">英文</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="departments">
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%= l(:label_hosted_by)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%= l(:label_sponsor)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl mr10">
|
||||||
|
<strong><%= l(:label_partners)%></strong><a href="http://eecs.pku.edu.cn" class="ml10 f_grey" target="_blank"><%= l(:label_co_organizer_EECS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://scse.buaa.edu.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_BHU)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.iscas.ac.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_CAS)%></a>
|
||||||
|
</li>
|
||||||
|
<li class="fl">
|
||||||
|
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%= l(:label_co_organizer_InforS)%></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<ul class="copyright">
|
||||||
|
<li class="fl"><%= l(:label_rights_reserved)%></li>
|
||||||
|
<span class="fl mw15">|</span>
|
||||||
|
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
|
||||||
|
</ul>
|
||||||
|
</div><!--Footer end-->
|
||||||
|
<div class="cl"></div>
|
|
@ -34,7 +34,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
<li style="padding:0 0; margin:0 0;display:inline;border-bottom: 0;">
|
||||||
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')',
|
<%=link_to l(:label_my_message)+'('+User.current.count_new_jour.to_s+')',
|
||||||
{:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user},
|
{:controller=> 'users', :action => 'user_newfeedback', id: User.current.id, host: Setting.host_user},
|
||||||
{:class => 'my-message'} if User.current.logged?%>
|
{:class => 'my-message'} if User.current.logged?%>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<% if(User.current.logged? && User.current!=target)%>
|
<% if User.current.logged?%>
|
||||||
<%if(target.watched_by?(User.current))%>
|
<% if User.current == target%>
|
||||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>
|
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class="fr gz_btn mr10 ">编辑资料</a>
|
||||||
'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
|
|
||||||
<%else%>
|
<%else%>
|
||||||
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">关注</a>
|
<%if(target.watched_by?(User.current))%>
|
||||||
|
<a id="user_watch_id" href="<%= watch_path(:object_type=> 'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr qx_btn mr10" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
|
||||||
|
<% else %>
|
||||||
|
<a id="user_watch_id" href="<%= watch_path(:object_type=>'user',:object_id=>target.id,:target_id=>target.id) %>" class="fr gz_btn mr10" data-method="post" data-remote="true" title="添加关注">添加关注</a>
|
||||||
|
<% end %>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,5 +1,5 @@
|
||||||
<% watcher_count,watcher_list = get_watcher_users(user) %>
|
<% watcher_count,watcher_list = get_watcher_users(user) %>
|
||||||
<div id="watcher_nav_list" class="leftbox mt10" style="display:<%= watcher_count==0 ? 'none' : 'block' %>">
|
<div id="watcher_nav_list" class="leftbox" style="display:<%= watcher_count==0 ? 'none' : 'block' %>">
|
||||||
<h4 class="fl">关注</h4><a href="<%=url_for(:controller => 'users', :action => 'user_watchlist', :id=>user.id)%>" data-count="<%= watcher_count %>" style="display:<%= watcher_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
<h4 class="fl">关注</h4><a href="<%=url_for(:controller => 'users', :action => 'user_watchlist', :id=>user.id)%>" data-count="<%= watcher_count %>" style="display:<%= watcher_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5">
|
<div class="mt5">
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
<span>| </span>
|
<span>| </span>
|
||||||
<%= l(:project_module_attachments) %>(
|
<%= l(:project_module_attachments) %>(
|
||||||
<% attaments_num %>
|
<% attaments_num %>
|
||||||
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue' %></span>)
|
<%= link_to "#{attaments_num}", project_files_path(@project), :class => 'info_foot_num c_blue', :id=>'project_files_count_info' %></span>)
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','users', :media => 'all' %>
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'public_new', 'leftside_new','users', :media => 'all' %>
|
||||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
|
<%= javascript_include_tag "avatars"%>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
<%= yield :header_tags -%>
|
<%= yield :header_tags -%>
|
||||||
|
@ -69,7 +70,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div><!--uers_info end-->
|
</div><!--uers_info end-->
|
||||||
|
|
||||||
<div class="leftbox mt10">
|
<div class="leftbox">
|
||||||
<ul class="leftbox_ul_left">
|
<ul class="leftbox_ul_left">
|
||||||
<li>最近登录 :</li> <!--加入时间修改为最近登录 -->
|
<li>最近登录 :</li> <!--加入时间修改为最近登录 -->
|
||||||
<% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %>
|
<% if @user.user_extensions!=nil && @user.user_extensions.identity == 2 %>
|
||||||
|
@ -145,9 +146,7 @@
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav ">
|
|
||||||
<a href="<%= url_for(:controller => 'my', :action => 'account') %>" class=" f14 c_blue02">编辑资料</a>
|
|
||||||
</div>
|
|
||||||
<% else%>
|
<% else%>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_courses',:id=>@user.id)%>" class=" f14 c_blue02">
|
||||||
|
@ -162,7 +161,9 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="subNav "><a href="javascirpt:void(0);" class=" f14 c_blue02">留言</a></div>
|
<div class="subNav ">
|
||||||
|
<%= link_to "留言",feedback_path(@user),:class => "f14 c_blue02"%>
|
||||||
|
</div>
|
||||||
</div><!--侧导航 end-->
|
</div><!--侧导航 end-->
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,18 +171,18 @@
|
||||||
|
|
||||||
<div class="leftbox mt10">
|
<div class="leftbox mt10">
|
||||||
<ul class="leftbox_ul_left">
|
<ul class="leftbox_ul_left">
|
||||||
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
|
<% if @user.user_extensions && @user.user_extensions.identity == 0 %>
|
||||||
<% if(get_create_course_count(@user)) == 0 %>
|
<% if(get_create_course_count(@user)) != 0 %>
|
||||||
<li>创建课程 :</li>
|
<li>创建课程 :</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if(get_homework_commons_count(@user)) == 0 %>
|
<% if(get_homework_commons_count(@user)) != 0 %>
|
||||||
<li>发布作业 :</li>
|
<li>发布作业 :</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (get_join_course_count(@user) != 0) %>
|
<% if (get_join_course_count(@user) != 0) %>
|
||||||
<li>加入课程 :</li>
|
<li>加入课程 :</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @user.user_extensions.identity == 0 %>
|
<% if @user.user_extensions.identity == 1 %>
|
||||||
<li>参加匿评 :</li>
|
<li>参加匿评 :</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
|
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
|
||||||
|
@ -201,18 +202,18 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="leftbox_ul_right c_dgrey">
|
<ul class="leftbox_ul_right c_dgrey">
|
||||||
<% if !@user.user_extensions.nil? && @user.user_extensions.identity == 0 %>
|
<% if @user.user_extensions && @user.user_extensions.identity == 0 %>
|
||||||
<% if(get_create_course_count(@user)) == 0 %>
|
<% if(get_create_course_count(@user)) != 0 %>
|
||||||
<li><%= get_create_course_count(@user) %></li>
|
<li><%= get_create_course_count(@user) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if(get_homework_commons_count(@user)) == 0 %>
|
<% if(get_homework_commons_count(@user)) != 0 %>
|
||||||
<li><%= get_homework_commons_count(@user) %></li>
|
<li><%= get_homework_commons_count(@user) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (get_join_course_count(@user) != 0) %>
|
<% if (get_join_course_count(@user) != 0) %>
|
||||||
<li><%= get_join_course_count(@user) %></li>
|
<li><%= get_join_course_count(@user) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @user.user_extensions.identity == 0 %>
|
<% if @user.user_extensions.identity == 1 %>
|
||||||
<li><%= get_anonymous_evaluation_count(@user) %></li>
|
<li><%= get_anonymous_evaluation_count(@user) %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
|
<% if (get_projectandcourse_attachment_count(@user) != 0) %>
|
||||||
|
@ -234,13 +235,24 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--<div class="cl"></div>-->
|
||||||
|
|
||||||
|
<!-- tag模块 -->
|
||||||
|
<div class="project_Label">
|
||||||
|
<h4 class="mb5"><%= l(:label_tag)%>:</h4>
|
||||||
|
<div class="tag_h">
|
||||||
|
<div id="tags">
|
||||||
|
<%= render :partial => 'tags/user_tag', :locals => {:obj => @user,:object_flag => "1"}%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
</div><!--项目标签 end-->
|
||||||
|
|
||||||
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
|
<%= render :partial => 'layouts/user_watch_list', :locals => {:user => @user} %>
|
||||||
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
|
<%= render :partial => 'layouts/user_fans_list', :locals => {:user => @user} %>
|
||||||
<% visitor_count,visitor_list = get_visitor_users(@user) %>
|
<% visitor_count,visitor_list = get_visitor_users(@user) %>
|
||||||
<% if(User.current.admin?) %>
|
<% if(User.current.admin?) %>
|
||||||
<div class="leftbox mt10" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
<div class="leftbox" style="display:<%= visitor_count==0 ? 'none' : 'block' %>">
|
||||||
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
<h4 class="fl">访客</h4><a href="<%=url_for(:controller => 'users', :action => 'user_visitorlist', :id=>@user.id)%>" data-count="<%= visitor_count %>" style="display:<%= visitor_count>10 ? 'block' : 'block' %>" class="more fr mr10">更多</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="mt5">
|
<div class="mt5">
|
||||||
|
@ -266,7 +278,9 @@
|
||||||
<%= render :partial => 'layouts/new_feedback' %>
|
<%= render :partial => 'layouts/new_feedback' %>
|
||||||
|
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
<%= javascript_include_tag '/javascripts/avatars.js' %>
|
<div id="ajax-indicator" style="display:none;">
|
||||||
|
<span><%= l(:label_loading) %></span>
|
||||||
|
</div>
|
||||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||||
<div>
|
<div>
|
||||||
<div><a href="javascript:hideModal();" class="box_close"></a></div>
|
<div><a href="javascript:hideModal();" class="box_close"></a></div>
|
||||||
|
@ -313,5 +327,17 @@
|
||||||
</div><!--floatbox end-->
|
</div><!--floatbox end-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
if($(".top_new").length==0){
|
||||||
|
$("#RSide").css("min-height",$("#LSide").height()-30);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$("#RSide").css("min-height",$("#LSide").height()-87);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_course_homework) %></span>
|
||||||
|
|
||||||
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_path(:homework => bid.id,:token => @token.value),
|
<%= link_to truncate(bid.name.html_safe,length: 30,omission: '...'), student_work_index_url(:homework => bid.id,:token => @token.value),
|
||||||
:class => 'wmail_info',
|
:class => 'wmail_info',
|
||||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
%>
|
%>
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
:style => "color:#2E8DD7; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#ACAEB1;"><%= l(:label_project_issue_update) %></span>
|
||||||
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
|
<% if issues_journal.notes.blank? || issues_journal.notes.nil? %>
|
||||||
<%= link_to truncate(l(:label_isuue_mail_status),length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
<%= link_to truncate(issues_journal.issue.subject.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||||
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
:style => "color:#2E8DD7;float:left; font-weight:normal;margin-right:5px; display:block;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to truncate(issues_journal.notes.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
<%= link_to truncate(issues_journal.notes.html_safe, length: 30,omission: '...'),issue_url(issues_journal.issue, :token => @token.value),
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||||
<% unless attaments_num == 0 %>
|
<% unless attaments_num == 0 %>
|
||||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||||
<% unless attaments_num == 0 %>
|
<% unless attaments_num == 0 %>
|
||||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||||
|
|
|
@ -22,14 +22,14 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<%= form_for('new_form', :method => :post, :html => {:id => 'project_feedback_form', :multipart => true},
|
||||||
<%= form_for('new_form', :method => :post,
|
|
||||||
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
:url => {:controller => 'words', :action => 'leave_project_message'}) do |f|%>
|
||||||
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
<%= f.text_area 'project_message', :rows => 3, :cols => 65,
|
||||||
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
:placeholder => "#{l(:label_welcome_my_respond)}",:nhname=>'new_message_textarea' %>
|
||||||
<p nhname="contentmsg"></p>
|
<p nhname="contentmsg"></p>
|
||||||
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
<div class="fl mt10" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||||
<%= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
<%#= submit_tag l(:button_leave_meassge), :name => nil , :class => "blue_btn fr mt10 mb10" %>
|
||||||
|
<%= link_to l(:button_leave_meassge), "javascript:void(0)", :onclick => 'submitProjectFeedback();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fr mt10 mb10' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||||
<% unless attaments_num == 0 %>
|
<% unless attaments_num == 0 %>
|
||||||
<a class="subnav_num">(<%= attaments_num %>)</a>
|
<%= link_to "(#{attaments_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current.member_of?(@project) %>
|
<% if User.current.member_of?(@project) %>
|
||||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||||
|
|
|
@ -36,74 +36,6 @@
|
||||||
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
|
<%= link_to l(:label_project_tool_response) ,project_feedback_path(@project)%>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<%= link_to l(:label_project_dts_yun) ,yun_dep_project_path(@project), data: { confirm:'你确定要对本项目进行云化部署吗?' } %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS评估工具</a>
|
|
||||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据采集工具</a>
|
|
||||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://202.197.34.33:3005/wsManagement/" target="_Blank">QoS证据评估统计分析工具</a>
|
|
||||||
<%#= link_to l(:label_project_soft_service) ,soft_service_project_path(@project) %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<%= link_to "代码缺陷测试工具(DTS)" ,dts_dep_project_path(@project), data: { confirm:'你确定要对本项目进行代码缺陷测试分析吗?' } %>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://www.seforge.org/sase/" target="_Blank">软工服务平台(SASSP)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://tsr.sei.pku.edu.cn/home.action" target="_Blank">软件知识库(KnowledgeBase)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">可信评估工具(Evaluator)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">在线验证工具(BACH-Online)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://segdev.nju.edu.cn:8080/internetware/main.jsp" target="_Blank">软件测试工具(SSCC-Web)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://www.service4all.org.cn/servicexchange/" target="_Blank">服务资源共享平台(ServiceXchange)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://www.service4all.org.cn/repository/ServiceCloud/MyServiceContainer.jsp" target="_Blank">在线服务开发平台(ServiceFoundry)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<% if User.current.admin? %>
|
|
||||||
<a href="http://www.service4all.org.cn" target="_Blank">组合开发和运行演化平台(Service4All)</a>
|
|
||||||
<% end %>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_dts_new) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
td.redBox {border:1px solid #b0b0b0; width:80px; background-color:#EAEAEA; }
|
|
||||||
td.redBox2 {border:1px solid #b0b0b0; width:120px; }
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">代码上传分析中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">1%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",70);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="fr f14 " style="padding-right: 32px;padding-bottom: 10px;">语言:<span style="color: red">Java</span> 总文件数:<span style="color: red">361</span> 代码行数:<span style="color: red">48662</span></p>
|
|
||||||
|
|
||||||
<% @dts.each do |dt| %>
|
|
||||||
<div style="padding-left: 35px;padding-top: 10px;">
|
|
||||||
<table width="600" border="0" style="padding-left: 30px;padding-top: 100px; border-spacing:0; border-collapse:collapse; border: 1px solid #b0b0b0;">
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">错误变量</td>
|
|
||||||
<td class="redBox2"> <%= dt.Variable %></td>
|
|
||||||
<td align="center" class="redBox">起始行</td>
|
|
||||||
<td class="redBox2"> <%= dt.StartLine %></td>
|
|
||||||
<td align="center" class="redBox">IP行</td>
|
|
||||||
<td class="redBox2"> <%= dt.IPLine %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">缺陷代码</td>
|
|
||||||
<td colspan="5" class="redBox2"> <%= dt.IPLineCode %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">错误描述</td>
|
|
||||||
<td colspan="5" class="redBox2"> <%= dt.Description %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center" class="redBox">文件</td>
|
|
||||||
<td colspan="5" class="redBox2"> <%= dt.File %></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
</div>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h2"><%= l(:label_project_dts) %></h2>
|
|
||||||
</div>
|
|
|
@ -13,8 +13,8 @@
|
||||||
<td class="w90" > <%= l(:field_effective_date) %></td>
|
<td class="w90" > <%= l(:field_effective_date) %></td>
|
||||||
<td class="w150"><%= l(:field_description) %> </td>
|
<td class="w150"><%= l(:field_description) %> </td>
|
||||||
<td class="w90"><%= l(:field_status) %></td>
|
<td class="w90"><%= l(:field_status) %></td>
|
||||||
<td class="w90"><%= l(:field_sharing) %></td>
|
<!--<td class="w90"><%#= l(:field_sharing) %></td>-->
|
||||||
<td class="w150"><%= l(:label_wiki_page) %></td>
|
<!--<td class="w150"><%#= l(:label_wiki_page) %></td>-->
|
||||||
<td class="w150"></td>
|
<td class="w150"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% for version in @project.shared_versions.sort %>
|
<% for version in @project.shared_versions.sort %>
|
||||||
|
@ -25,13 +25,13 @@
|
||||||
<td class="description"><%= format_date(version.effective_date) %></td>
|
<td class="description"><%= format_date(version.effective_date) %></td>
|
||||||
<td class="description tl" style="word-break:break-all;"><%=h version.description %></td>
|
<td class="description tl" style="word-break:break-all;"><%=h version.description %></td>
|
||||||
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
<td class="status"><%= l("version_status_#{version.status}") %></td>
|
||||||
<td class="sharing"><%=h format_version_sharing(version.sharing) %></td>
|
<!--<td class="sharing"><%#=h format_version_sharing(version.sharing) %></td>-->
|
||||||
<td class="tl" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">
|
<!--<td class="tl" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;" title="">-->
|
||||||
<%= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
|
<%#= link_to_if_authorized(h(truncate(version.wiki_page_title,:length=>20)), {:controller => 'wiki',
|
||||||
:action => 'show',
|
# :action => 'show',
|
||||||
:project_id => version.project,
|
# :project_id => version.project,
|
||||||
:id => Wiki.titleize(version.wiki_page_title)},:class=>"c_blue02") || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
:id => Wiki.titleize(version.wiki_page_title)},:class=>"c_blue02") || h(version.wiki_page_title) unless version.wiki_page_title.blank? || version.project.wiki.nil? %>
|
||||||
</td>
|
<!--</td>-->
|
||||||
<td >
|
<td >
|
||||||
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
<% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
|
||||||
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %></a>
|
<%= link_to l(:button_edit), edit_version_path(version), :class => 'c_purple' %></a>
|
||||||
|
@ -68,20 +68,20 @@
|
||||||
<label class="label02"><%=l(:field_status)%>:</label>
|
<label class="label02"><%=l(:field_status)%>:</label>
|
||||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]} %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<!--<li >-->
|
||||||
<label class="label02"><%=l(:label_wiki_page)%>:</label>
|
<!--<label class="label02"><%#=l(:label_wiki_page)%>:</label>-->
|
||||||
<%= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>
|
<!--<%#= f.text_field :wiki_page_title, :size =>60, :label => :label_wiki_page, :disabled => @project.wiki.nil? %>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"><%=l(:label_date)%>:</label>
|
<label class="label02"><%=l(:label_date)%>:</label>
|
||||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
|
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>" fl" %>
|
||||||
<%= calendar_for('version_effective_date') %>
|
<%= calendar_for('version_effective_date') %>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl mb10"></div>
|
<div class="cl mb10"></div>
|
||||||
<li >
|
<!--<li >-->
|
||||||
<label class="label02"><%=l(:field_sharing)%>:</label>
|
<!--<label class="label02"><%#=l(:field_sharing)%>:</label>-->
|
||||||
<%= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>
|
<!--<%#= f.select :sharing, @project.versions.build.allowed_sharings.collect {|v| [format_version_sharing(v), v]} %>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
|
<a href="#" onclick="$('#new_project_version_form').submit();" class="blue_btn ml110"><%=l(:button_save)%></a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
@ -93,21 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<!--Document-->
|
|
||||||
<% elsif e.forge_act_type == "Document" %>
|
|
||||||
<div class="problem_main">
|
|
||||||
<a class="problem_pic fl"><%= image_tag(url_to_avatar(e.user), :width => "42", :height => "42") %></a>
|
|
||||||
<div class="problem_txt fl mt5 break_word">
|
|
||||||
<a class="problem_name fl ">
|
|
||||||
<%= h(e.project) if @project.nil? || @project.id != e.project_id %>
|
|
||||||
<%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%= l(:label_new_activity) %> :</span>
|
|
||||||
|
|
||||||
<%= link_to format_activity_title("#{l(:label_document)}: #{act.title}"), {:controller => 'documents', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %><br />
|
|
||||||
<p class="mt5 break_word"><%= textAreailizable act,:description %><br />
|
|
||||||
<%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %></p>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<!--Attachment -->
|
<!--Attachment -->
|
||||||
<% elsif e.forge_act_type == "Attachment" %>
|
<% elsif e.forge_act_type == "Attachment" %>
|
||||||
<div class="problem_main">
|
<div class="problem_main">
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_soft_file) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;">软件资源库部署中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">0%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
|
||||||
</div>
|
|
|
@ -1,46 +0,0 @@
|
||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_soft_knowledge) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">0%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
|
||||||
</div>
|
|
|
@ -1,46 +0,0 @@
|
||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_soft_service) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{width:10px; height:20px;background:#15BCCF;color:white;text-align:center;}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 120px;padding-bottom: 10px;font-size: 14px;">云化部署中...</p>
|
|
||||||
<div style="width:300px;height:20px;background:#EEE;">
|
|
||||||
<div id="in" style="width:1%">0%</div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",30);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width=i+"%";
|
|
||||||
document.getElementById("in").innerHTML=i+"%";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px;">
|
|
||||||
<p class="pl10 f14 "><a href="http://rubyblog.forge.trustie.net/myblog">云化部署工具部署完后的网址</a></p>
|
|
||||||
</div>
|
|
|
@ -1,47 +0,0 @@
|
||||||
<div class="project_r_h">
|
|
||||||
<h2 class="project_h22"><%= l(:label_project_dts_yun) %></h2>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!--JS进度条-->
|
|
||||||
<style type="text/css">
|
|
||||||
#out{}
|
|
||||||
#in{}
|
|
||||||
#font_color{background:yellow;text-align:center;color:white;}
|
|
||||||
</style>
|
|
||||||
<div style="padding-left: 200px;">
|
|
||||||
<div id='out'>
|
|
||||||
<p style="padding-left: 100px;padding-bottom: 10px;font-size: 14px;padding-top: 10px;">云化部署中....</p>
|
|
||||||
<div>
|
|
||||||
<div id="in" style="width:0%"></div>
|
|
||||||
<div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
i=0;
|
|
||||||
$(function(){
|
|
||||||
ba=setInterval("begin()",60);//setInterval 返回的是一个全局变量,一个间隔数值.这个数值是表示调用setInterval的次数
|
|
||||||
});
|
|
||||||
function begin()
|
|
||||||
{
|
|
||||||
i+=1;
|
|
||||||
if(i<=100)
|
|
||||||
{
|
|
||||||
document.getElementById("in").style.width="";
|
|
||||||
document.getElementById("in").innerHTML="";}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clearInterval(ba);
|
|
||||||
$("#show_content_div").show();
|
|
||||||
$("#out").hide();
|
|
||||||
// document.getElementById("out").style.display="none";
|
|
||||||
// document.write("<span style='background:yellow;text-align:center;color:white;'>Successs!</span>");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="show_content_div" style="display: none;padding-top: 0px; ">
|
|
||||||
<p class="pl10 f14 "><span style="color: #7f7f7f;font-size: 14px; ">所部署服务的网址:</span>
|
|
||||||
<span><a href="http://rubyblog.forge.trustie.net/accounts/login" target="_Blank" style="color: #15BCCF;font-size: 14px;">http://rubyblog.forge.trustie.net/accounts/login</a></span></p>
|
|
||||||
</div>
|
|
|
@ -48,8 +48,10 @@
|
||||||
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
<span class="c_red"> <%= student_work.final_score%> </span>分。
|
||||||
迟交扣分
|
迟交扣分
|
||||||
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
<span class="c_red"> <%= student_work.late_penalty%> </span>分,
|
||||||
|
<% if student_work.homework_common.homework_type == 1%>
|
||||||
缺评扣分
|
缺评扣分
|
||||||
<span class="c_red"> <%= student_work.absence_penalty%> </span>分,
|
<span class="c_red"> <%= student_work.absence_penalty%> </span>分,
|
||||||
|
<% end%>
|
||||||
最终成绩为
|
最终成绩为
|
||||||
<span class="c_red"> <%= format("%.1f",score)%> </span>分。
|
<span class="c_red"> <%= format("%.1f",score)%> </span>分。
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
||||||
|
<% if @is_teacher%>
|
||||||
<table class="border_ce" cellpadding="0" cellspacing="0">
|
<table class="border_ce" cellpadding="0" cellspacing="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="<%= cycle("", "b_grey") %>">
|
<tr class="<%= cycle("", "b_grey") %>">
|
||||||
|
@ -160,6 +161,7 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
<div class="mt5">
|
<div class="mt5">
|
||||||
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
|
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p id="about_project" class="about_project" >
|
<p id="about_project" class="about_project" >
|
||||||
<label class="fl"> 关联项目 :</label>
|
<label class="fl"> 选择项目 :</label>
|
||||||
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
|
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -54,7 +54,11 @@
|
||||||
<%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
|
<%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
|
||||||
:
|
:
|
||||||
</label>
|
</label>
|
||||||
|
<% if @homework.homework_type == 2%>
|
||||||
|
<%= f.text_area "description", :class => "w620 hwork_txt h350", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => stantard_code%>
|
||||||
|
<% else %>
|
||||||
<%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
|
<%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
|
||||||
|
<% end%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
|
<div id="tags">
|
||||||
<div id="tags_show">
|
<div id="tags_show">
|
||||||
<%= render :partial => "tags/tag_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
<%= render :partial => "tags/tag_project_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if User.current.logged?%>
|
|
||||||
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();"><%= l(:label_add_tag)%></a>
|
|
||||||
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
|
||||||
<%= form_for "tag_for_save",:remote=>true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
|
||||||
<%= f.text_field :name ,:id => "tags_name",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
|
||||||
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
|
||||||
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
|
||||||
<input type="button" class="submit f_l" onclick="$('#tags_name').parent().submit();" />
|
|
||||||
<% end %>
|
|
||||||
</span>
|
|
||||||
<% end%>
|
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
</span>
|
</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div id="tag">
|
<div id="tag">
|
||||||
<span class="tag_show">
|
<span class="re_tag f_l">
|
||||||
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
|
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id %>
|
||||||
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
|
<!-- 对用户主页 是本人 ,对项目,需求,问题是管理员 -->
|
||||||
<% case object_flag %>
|
<% case object_flag %>
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<% @tags = obj.reload.tag_list %>
|
||||||
|
<% if non_list_all && @tags.size > 0 %>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||||
|
<% if @tags.size > 0 %>
|
||||||
|
<% @tags.each do |tag| %>
|
||||||
|
<span class="re_tag f_l " id="tag">
|
||||||
|
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||||
|
<span class="del">
|
||||||
|
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if (ProjectInfo.find_by_project_id(obj.id)).try(:user_id) == User.current.id %>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if User.current.logged?%>
|
||||||
|
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag02').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||||
|
<span id="add_tag02" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||||
|
<%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||||
|
<%= f.text_field :name ,:id => "tags_name2",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||||
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
|
<input type="button" class="submit f_l" onclick="$('#tags_name2').parent().submit();" />
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<% @tags = obj.reload.tag_list %>
|
||||||
|
<% if non_list_all && @tags.size > 0 %>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<!-- 用来显示三大对象的主页中的tag 故是全部显示 -->
|
||||||
|
<% if @tags.size > 0 %>
|
||||||
|
<% @tags.each do |tag| %>
|
||||||
|
<span class="re_tag f_l " id="tag">
|
||||||
|
<%= link_to tag, :controller => "tags", :action => "index", :q => tag, :object_flag => object_flag, :obj_id => obj.id, :class => 'pt5' %>
|
||||||
|
<span class="del">
|
||||||
|
<%= link_to('x', remove_tag_path(:tag_name => tag,:taggable_id => obj.id, :taggable_type => object_flag), :remote => true, :confirm => l(:text_are_you_sure) ) if User.current.eql?(obj) %>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if User.current.logged?%>
|
||||||
|
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag03').slideToggle();"><%= l(:label_add_tag)%></a>
|
||||||
|
<span id="add_tag03" style="display:none; vertical-align: middle;" class="ml10 f_l">
|
||||||
|
<%= form_for "tag_for_save",:remote => true,:url=>save_tag_path,:update => "tags_show",:complete => '$("#put-tag-form").slideUp();' do |f| %>
|
||||||
|
<%= f.text_field :name ,:id => "tags_name3",:size=>"20",:require=>true,:maxlength => Setting.tags_max_length,:minlength=>Setting.tags_min_length,:class =>"isTxt w90 f_l" %>
|
||||||
|
<%= f.text_field :object_id,:value=> obj.id,:style=>"display:none"%>
|
||||||
|
<%= f.text_field :object_flag,:value=> object_flag,:style=>"display:none"%>
|
||||||
|
<input type="button" class="submit f_l" onclick="$('#tags_name3').parent().submit();" />
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<div id="tags">
|
||||||
|
<div id="tags_show">
|
||||||
|
<%= render :partial => "tags/tag_user_new_name",:locals => {:obj => obj,:non_list_all => false ,:object_flag => object_flag} %>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -2,6 +2,12 @@
|
||||||
<% if @object_flag == '3'%>
|
<% if @object_flag == '3'%>
|
||||||
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||||
|
<% elsif @object_flag == '1'%>
|
||||||
|
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_user_new_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||||
|
<% elsif @object_flag == '2'%>
|
||||||
|
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @object_flag}) %>');
|
||||||
<% elsif @object_flag == '6'%>
|
<% elsif @object_flag == '6'%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").html('<%= escape_javascript(render :partial => 'tags/tag_name',
|
||||||
|
|
|
@ -4,6 +4,14 @@ $('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_n
|
||||||
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
//$('#put-tag-form-issue').hide();
|
//$('#put-tag-form-issue').hide();
|
||||||
$('#name-issue').val("");
|
$('#name-issue').val("");
|
||||||
|
<% elsif @obj_flag == '1'%>
|
||||||
|
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_user_new_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
|
$('#tags_name3').val("");
|
||||||
|
<% elsif @obj_flag == '2'%>
|
||||||
|
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_project_new_name',
|
||||||
|
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
|
||||||
|
$('#tags_name2').val("");
|
||||||
<% elsif @obj_flag == '6'%>
|
<% elsif @obj_flag == '6'%>
|
||||||
<%if @course%>
|
<%if @course%>
|
||||||
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
$("#tags_show-<%=@obj.class%>-<%=@obj.id%>").empty();
|
||||||
|
|
|
@ -30,7 +30,10 @@
|
||||||
<td>学生人数:</td>
|
<td>学生人数:</td>
|
||||||
<td><a href="<%= url_for(:controller => 'courses', :action=>"member", :id=>item.id,:role=>2, :host=>Setting.host_course) %>"><%= studentCount(item) %></a></td>
|
<td><a href="<%= url_for(:controller => 'courses', :action=>"member", :id=>item.id,:role=>2, :host=>Setting.host_course) %>"><%= studentCount(item) %></a></td>
|
||||||
<td>开课学期:</td>
|
<td>开课学期:</td>
|
||||||
<td><%= item.time %><%= get_course_term_locales item %></td>
|
<td>
|
||||||
|
<%= item.time %>
|
||||||
|
<%= get_course_term_locales item %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -39,8 +42,10 @@
|
||||||
<span class="grey_n_btn fr mt20">课程结束</span>
|
<span class="grey_n_btn fr mt20">课程结束</span>
|
||||||
<% elsif(can_edit_flag) %>
|
<% elsif(can_edit_flag) %>
|
||||||
<a href="<%=url_for(:controller => 'homework_common', :action => 'new',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">发布作业</a>
|
<a href="<%=url_for(:controller => 'homework_common', :action => 'new',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">发布作业</a>
|
||||||
<% else %>
|
<% elsif User.current.member_of_course? item %>
|
||||||
<a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">提交作品</a>
|
<a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>" target="_blank" class="blue_n_btn fr mt20">提交作品</a>
|
||||||
|
<% elsif User.current.logged?%>
|
||||||
|
<%= link_to "加入课程",try_join_path(:object_id => item.id), :class => "blue_n_btn fr mt20", :remote => "true",:id => "try_join_course_link"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,40 @@
|
||||||
|
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
|
||||||
|
<% if parent_jour%>
|
||||||
|
<div class="mes_box02" id = '<%= reply.id %>'>
|
||||||
|
<%= link_to image_tag(url_to_avatar(reply.user),:width => '32',:height => '32'), user_path(reply.user),:class => "users_pic_sub fl mr5" %>
|
||||||
|
<div class=" mes_box02_info fl">
|
||||||
|
<%= link_to "#{reply.user.nickname} ".html_safe, user_path(reply.user),:class => 'course_name fl c_blue02 ', :target => "_blank"%>
|
||||||
|
<span class="fl c_grey"> 回复 </span>
|
||||||
|
<%= link_to "#{parent_jour.user.nickname} : ".html_safe, user_path(parent_jour.user),:class => 'course_name fl c_blue02 mr5 ', :target => "_blank"%>
|
||||||
|
<div class="cl">
|
||||||
|
<%= reply.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="c_grey fr">
|
||||||
|
<%= time_tag(reply.created_on).html_safe%>
|
||||||
|
</span>
|
||||||
|
<div class="fr cr">
|
||||||
|
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"sub_reply_btn", :class => "ml5 c_purple" %>
|
||||||
|
<% if User.current.admin? || reply.user == User.current%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "c_purple ml5", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div nhname='sub_div_form' class="mt10 ml40" style="display:none;">
|
||||||
|
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
|
||||||
|
<input id="reference_id" name="reference_id" type="hidden" value="<%= (reply.m_parent_id.nil? || reply.m_parent_id==0 ) ? reply.id : reply.m_parent_id %>">
|
||||||
|
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= reply.user.id %>">
|
||||||
|
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= reply.id %>">
|
||||||
|
<input id="show_name" name="show_name" type="hidden" value="true">
|
||||||
|
<textarea name='user_notes' style="display:none;"></textarea>
|
||||||
|
<p nhname='sub_contentmsg'></p>
|
||||||
|
<div nhname='sub_toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a nhname="sub_cancel_btn" href="javascript:void(0);" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
|
||||||
|
<a nhname="sub_submit_btn" href="javascript:void(0);" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
|
||||||
|
</form>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--mes_box02 end-->
|
||||||
|
<% end%>
|
|
@ -0,0 +1,44 @@
|
||||||
|
<div class="message_list break_word" id="<%= jour.id %>" nhname="rec" data-id="<%= jour.id %>">
|
||||||
|
<%= link_to image_tag(url_to_avatar(jour.user),:width => '46',:height => '46'), user_path(jour.user),:class => "users_pic fl" %>
|
||||||
|
<div class="fl ml5 mes_box mb10" >
|
||||||
|
<div>
|
||||||
|
<%= link_to "#{jour.user.nickname} : ".html_safe, user_path(jour.user),:class => 'fl c_blue02 f14 fb mb5', :target => "_blank"%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div>
|
||||||
|
<%= jour.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
</div><!--mes_box end-->
|
||||||
|
<span class="c_grey fr mb10">
|
||||||
|
<%= time_tag(jour.created_on).html_safe %>
|
||||||
|
</span>
|
||||||
|
<div class="fr cr">
|
||||||
|
<%= link_to l(:button_reply),'javascript:void(0);',:nhname=>"reply_btn", :class => "ml5 c_purple" %>
|
||||||
|
<% if User.current.admin? || jour.user == User.current%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => jour, :user_id => jour.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "ml5 c_purple", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div nhname='div_form' class="mt10 ml80" style="display:none;">
|
||||||
|
<form action="<%= url_for(:controller => 'words', :action => 'create_reply') %>" data-remote="true" method="post">
|
||||||
|
<input id="reference_id" name="reference_id" type="hidden" value="<%= (jour.m_parent_id.nil? || jour.m_parent_id==0 ) ? jour.id : jour.m_parent_id %>">
|
||||||
|
<input id="reference_user_id" name="reference_user_id" type="hidden" value="<%= jour.user.id %>">
|
||||||
|
<input id="reference_message_id" name="reference_message_id" type="hidden" value="<%= jour.id %>">
|
||||||
|
<input id="show_name" name="show_name" type="hidden" value="true">
|
||||||
|
<textarea name='user_notes' style="display:none;"></textarea>
|
||||||
|
<p nhname='contentmsg'></p>
|
||||||
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a nhname="cancel_btn" href="javascript:;" class="grey_n_btn fr" style="margin-top:3px;">取消</a>
|
||||||
|
<a nhname="submit_btn" href="javascript:;" class="blue_n_btn fr mr5" style="margin-top:3px;">发布</a>
|
||||||
|
</form>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<div nhname="reply_list">
|
||||||
|
<% fetch_user_leaveWord_reply(jour).each do |reply|%>
|
||||||
|
<%= render :partial => 'user_jour_reply', :locals => {:reply => reply} %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div><!--message_list end-->
|
|
@ -1,15 +1,5 @@
|
||||||
<style type="text/css">
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
|
||||||
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
|
||||||
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
|
||||||
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
|
||||||
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
|
||||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
|
||||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
|
||||||
div.ke-toolbar .ke-outline{border:none;}
|
|
||||||
</style>
|
|
||||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
|
||||||
<% @center_flag = (User.current == @user) %>
|
<% @center_flag = (User.current == @user) %>
|
||||||
<% if @center_flag %>
|
|
||||||
<div class="top_new">
|
<div class="top_new">
|
||||||
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
||||||
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
|
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
|
||||||
|
@ -26,7 +16,6 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div id="RSide" class="fl">
|
<div id="RSide" class="fl">
|
||||||
|
|
||||||
|
@ -49,233 +38,3 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
|
||||||
$(function(){
|
|
||||||
|
|
||||||
function init_editor(params){
|
|
||||||
var editor = params.kindutil.create(params.textarea, {
|
|
||||||
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
|
||||||
items:['emoticons'],
|
|
||||||
afterChange:function(){//按键事件
|
|
||||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
|
||||||
},
|
|
||||||
afterCreate:function(){
|
|
||||||
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
|
||||||
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
|
||||||
params.toolbar_container.append(toolbar);
|
|
||||||
}
|
|
||||||
}).loadPlugin('paste');
|
|
||||||
return editor;
|
|
||||||
}
|
|
||||||
|
|
||||||
function nh_check_field(params){
|
|
||||||
var result=true;
|
|
||||||
if(params.content!=undefined){
|
|
||||||
if(params.content.isEmpty()){
|
|
||||||
result=false;
|
|
||||||
}
|
|
||||||
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
|
||||||
params.textarea.html(params.content.html());
|
|
||||||
params.content.sync();
|
|
||||||
if(params.content.isEmpty()){
|
|
||||||
params.contentmsg.html('内容不能为空');
|
|
||||||
params.contentmsg.css({color:'#ff0000'});
|
|
||||||
}else{
|
|
||||||
params.contentmsg.html('填写正确');
|
|
||||||
params.contentmsg.css({color:'#008000'});
|
|
||||||
}
|
|
||||||
params.contentmsg.show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
function init_form(params){
|
|
||||||
params.form.submit(function(){
|
|
||||||
var flag = false;
|
|
||||||
if(params.form.attr('data-remote') != undefined ){
|
|
||||||
flag = true
|
|
||||||
}
|
|
||||||
var is_checked = nh_check_field({
|
|
||||||
issubmit:true,
|
|
||||||
content:params.editor,
|
|
||||||
contentmsg:params.contentmsg,
|
|
||||||
textarea:params.textarea
|
|
||||||
});
|
|
||||||
if(is_checked){
|
|
||||||
if(flag){
|
|
||||||
return true;
|
|
||||||
}else{
|
|
||||||
$(this)[0].submit();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function nh_reset_form(params){
|
|
||||||
params.form[0].reset();
|
|
||||||
params.textarea.empty();
|
|
||||||
if(params.editor != undefined){
|
|
||||||
params.editor.html(params.textarea.html());
|
|
||||||
}
|
|
||||||
params.contentmsg.hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
KindEditor.ready(function(K){
|
|
||||||
$("a[nhname='reply_btn']").live('click',function(){
|
|
||||||
var params = {};
|
|
||||||
params.kindutil = K;
|
|
||||||
params.container = $(this).parent('div');
|
|
||||||
params.div_form = $("div[nhname='div_form']",params.container);
|
|
||||||
params.form = $("form",params.div_form);
|
|
||||||
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
|
||||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
|
||||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
|
||||||
params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
|
|
||||||
params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
|
|
||||||
if(params.textarea.data('init') == undefined){
|
|
||||||
params.editor = init_editor(params);
|
|
||||||
init_form(params);
|
|
||||||
params.cancel_btn.click(function(){
|
|
||||||
nh_reset_form(params);
|
|
||||||
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
|
||||||
});
|
|
||||||
params.submit_btn.click(function(){
|
|
||||||
params.form.submit();
|
|
||||||
});
|
|
||||||
params.textarea.data('init',1);
|
|
||||||
}
|
|
||||||
params.cancel_btn.click();
|
|
||||||
setTimeout(function(){
|
|
||||||
if(!params.div_form.is(':hidden')){
|
|
||||||
params.textarea.show();
|
|
||||||
params.textarea.focus();
|
|
||||||
params.textarea.hide();
|
|
||||||
}
|
|
||||||
},300);
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
$("div[nhname='new_message']").each(function(){
|
|
||||||
var params = {};
|
|
||||||
params.kindutil = K;
|
|
||||||
params.div_form = $(this);
|
|
||||||
params.form = $("form",params.div_form);
|
|
||||||
if(params.form==undefined || params.form.length==0){
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
|
||||||
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
|
||||||
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
|
||||||
params.cancel_btn = $("#new_message_cancel_btn");
|
|
||||||
params.submit_btn = $("#new_message_submit_btn");
|
|
||||||
|
|
||||||
if(params.textarea.data('init') == undefined){
|
|
||||||
params.editor = init_editor(params);
|
|
||||||
init_form(params);
|
|
||||||
params.cancel_btn.click(function(){
|
|
||||||
nh_reset_form(params);
|
|
||||||
});
|
|
||||||
params.submit_btn.click(function(){
|
|
||||||
params.form.submit();
|
|
||||||
});
|
|
||||||
params.textarea.data('init',1);
|
|
||||||
$(this).show();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function init_list_more_div(params){
|
|
||||||
var p=params;
|
|
||||||
p.exbtn.click(function(){
|
|
||||||
var isclose = p.container.data('isclose');
|
|
||||||
var hasmore = p.container.data('hasmore');
|
|
||||||
if(isclose == '1'){
|
|
||||||
$("div[nhname='rec']",p.container).show();
|
|
||||||
p.container.data('isclose','0');
|
|
||||||
change_status_4_list_more_div(params);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if(hasmore == '0'){
|
|
||||||
change_status_4_list_more_div(params,'get');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var url = p.container.data('url');
|
|
||||||
if($("div[nhname='rec']",p.container).length > 0){
|
|
||||||
var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
|
|
||||||
url += "?lastid="+lastid;
|
|
||||||
var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
|
|
||||||
if(lasttime != undefined){
|
|
||||||
url += "&lasttime="+lasttime;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$.ajax( {url:url,dataType:'text',success:function(data){
|
|
||||||
var html = $("<div>"+data+"</div>");
|
|
||||||
var lens = $("div[nhname='rec']",html).length;
|
|
||||||
if(lens < p.size){
|
|
||||||
p.container.data('hasmore','0');
|
|
||||||
}
|
|
||||||
if(lens>0){
|
|
||||||
var currpage = parseInt(p.container.data('currpage'))+1;
|
|
||||||
p.container.data('currpage',currpage);
|
|
||||||
p.container.append(html.html())
|
|
||||||
}
|
|
||||||
change_status_4_list_more_div(params,'get');
|
|
||||||
p.div.show();
|
|
||||||
}} );
|
|
||||||
});
|
|
||||||
p.clbtn.click(function(){
|
|
||||||
var i=0;
|
|
||||||
$("div[nhname='rec']",p.container).each(function(){
|
|
||||||
i++;
|
|
||||||
if(i> p.size){
|
|
||||||
$(this).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
p.container.data('isclose','1');
|
|
||||||
change_status_4_list_more_div(params);
|
|
||||||
});
|
|
||||||
p.exbtn.click();
|
|
||||||
}
|
|
||||||
function change_status_4_list_more_div(params,opt){
|
|
||||||
var p=params;
|
|
||||||
if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
|
|
||||||
p.exbtn.click();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
|
|
||||||
if( show_lens > p.size ){
|
|
||||||
p.clbtn.show();
|
|
||||||
}else{
|
|
||||||
p.clbtn.hide();
|
|
||||||
}
|
|
||||||
if($("div[nhname='rec']",p.container).length == 0){
|
|
||||||
p.exbtn.html(p.nodatamsg);
|
|
||||||
}else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
|
|
||||||
p.exbtn.html('点击展开更多');
|
|
||||||
}else{
|
|
||||||
p.exbtn.html('没有更多了');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function init_list_more_div_params(div){
|
|
||||||
var params = {};
|
|
||||||
params.div = div;
|
|
||||||
params.container = $("div[nhname='container']",div);
|
|
||||||
params.exbtn = $("a[nhname='expand']",div);
|
|
||||||
params.clbtn = $("a[nhname='close']",div);
|
|
||||||
params.size = params.container.data('pagesize');
|
|
||||||
params.nodatamsg = params.container.data('nodatamsg');
|
|
||||||
if( params.size == undefined ){
|
|
||||||
params.size = 8;
|
|
||||||
}
|
|
||||||
return params;
|
|
||||||
}
|
|
||||||
$(function(){
|
|
||||||
$("div[nhname='list_more_div']").each(function(){
|
|
||||||
var params = init_list_more_div_params($(this));
|
|
||||||
init_list_more_div(params)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
|
@ -10,10 +10,19 @@
|
||||||
</span>
|
</span>
|
||||||
<a href="<%= user_path(rec[:item].user.id) %>" class="c_orange course_name fl mr5" title="<%= rec[:item].user.show_name %>"><%= rec[:item].user.show_name %></a>
|
<a href="<%= user_path(rec[:item].user.id) %>" class="c_orange course_name fl mr5" title="<%= rec[:item].user.show_name %>"><%= rec[:item].user.show_name %></a>
|
||||||
<span class="fl mr5 c_grey"><%= get_activity_opt(rec[:item],rec[:e]) %></span>
|
<span class="fl mr5 c_grey"><%= get_activity_opt(rec[:item],rec[:e]) %></span>
|
||||||
|
<% if(( rec[:e].is_public == false || rec[:e].is_public == 0 )&& !rec[:e].visible?)%>
|
||||||
|
<a href="<%= get_activity_url(rec[:item],rec[:e]) %>"
|
||||||
|
class="c_grey fl users_courses_txt hidepic"
|
||||||
|
title="<% if(rec[:item].activity_container_type=='Project')%><%='该项目是私有的,您无权查看。'%><% else %><%='该课程是私有的,您无权查看。' %><% end %>">
|
||||||
|
<%= get_activity_act_showname_htmlclear(rec[:item]) %>
|
||||||
|
</a>
|
||||||
|
<% else %>
|
||||||
<a href="<%= get_activity_url(rec[:item],rec[:e]) %>"
|
<a href="<%= get_activity_url(rec[:item],rec[:e]) %>"
|
||||||
class="c_blue02 fl users_courses_txt hidepic" title="<%= get_activity_act_showname(rec[:item]) %>">
|
class="c_blue02 fl users_courses_txt hidepic" title="<%= get_activity_act_showname(rec[:item]) %>">
|
||||||
<%= get_activity_act_showname_htmlclear(rec[:item]) %>
|
<%= get_activity_act_showname_htmlclear(rec[:item]) %>
|
||||||
</a>
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<span class="fr c_grey mr10"><%= time_tag(get_activity_act_createtime(rec[:item])).html_safe %></span>
|
<span class="fr c_grey mr10"><%= time_tag(get_activity_act_createtime(rec[:item])).html_safe %></span>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
|
@ -2,8 +2,6 @@
|
||||||
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
||||||
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
||||||
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
|
||||||
<% else %>
|
|
||||||
<a href="<%= join_private_courses_courses_path %>" data-remote ="true" class="green_n_btn fr mt2">加入课程</a>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,40 @@
|
||||||
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
<div class="top_new">
|
||||||
<%= stylesheet_link_tag 'css', :media => 'all' %>
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
||||||
|
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
|
||||||
|
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= render :partial => 'user_jours',
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
|
||||||
:locals => { :journals => @jour, :state => false}
|
<div id="RSide" class="fl">
|
||||||
%>
|
<!--<div class="users_r_top">-->
|
||||||
<% html_title(l(:label_responses)) -%>
|
<!--<h2 class="users_r_h2">用户留言</h2>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<div class="message_box mb10">
|
||||||
|
<div nhname='new_message' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
|
||||||
|
<p nhname='contentmsg'></p>
|
||||||
|
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
|
||||||
|
<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:3px;">取消</a>
|
||||||
|
<a id="new_message_submit_btn" href="javascript:void(0)" class="blue_n_btn fr mr5 " style="margin-top:3px;">留言</a>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<div class="message_list_box " id="user_jour_list">
|
||||||
|
<%if @jour%>
|
||||||
|
<% @jour.each do |jour|%>
|
||||||
|
<%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
|
||||||
|
<%end%>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<ul class="wlist" style=" border:none;">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--message_box end-->
|
||||||
|
</div>
|
|
@ -2,8 +2,6 @@
|
||||||
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
|
||||||
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
|
<% if @user.allowed_to?(:add_project, nil, :global => true) %>
|
||||||
<a href="<%= url_for(:controller => 'projects', :action => 'new') %>" class="bgreen_n_btn fr ml10 mt2" target="_blank">新建项目</a>
|
<a href="<%= url_for(:controller => 'projects', :action => 'new') %>" class="bgreen_n_btn fr ml10 mt2" target="_blank">新建项目</a>
|
||||||
<% else %>
|
|
||||||
<a href="<%= join_project_projects_path %>" data-remote ="true" class="green_n_btn fr mt2">加入项目</a>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,9 +11,16 @@
|
||||||
<div class="courses_top mb10">
|
<div class="courses_top mb10">
|
||||||
<h2 class="courses_h2 fl">全部项目</h2>
|
<h2 class="courses_h2 fl">全部项目</h2>
|
||||||
<div class="courses_select fr">
|
<div class="courses_select fr">
|
||||||
<a href="<%= url_for(:controller => 'users', :action => 'user_projects')%>" class="select_btn <%= (@params!='1' && @params!='2') ? 'select_btn_select' : '' %> fl "> 全部</a>
|
<a href="<%= url_for(:controller => 'users', :action => 'user_projects')%>" class="select_btn <%= (@params!='1' && @params!='2') ? 'select_btn_select' : '' %> fl ">
|
||||||
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'1')%>" class="select_btn <%= (@params=='1') ? 'select_btn_select' : '' %> fl ">我创建</a>
|
全部
|
||||||
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'2')%>" class="select_btn <%= (@params=='2') ? 'select_btn_select' : '' %> fl "> 我参与</a>
|
</a>
|
||||||
|
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'1')%>" class="select_btn <%= (@params=='1') ? 'select_btn_select' : '' %> fl ">
|
||||||
|
|
||||||
|
<%= User.current == @user ? "我创建" : "TA创建"%>
|
||||||
|
</a>
|
||||||
|
<a href="<%= url_for(:controller => 'users', :action => 'user_projects', :status=>'2')%>" class="select_btn <%= (@params=='2') ? 'select_btn_select' : '' %> fl ">
|
||||||
|
<%= User.current == @user ? "我参与" : "TA参与"%>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +48,16 @@
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% if User.current.member_of? item%>
|
||||||
<a href="<%= url_for(:controller => 'issues', :action=>"new", :project_id=>item.id, :host=>Setting.host_name) %>" target="_blank" class="blue_n_btn fr mt20">发布问题</a>
|
<a href="<%= url_for(:controller => 'issues', :action=>"new", :project_id=>item.id, :host=>Setting.host_name) %>" target="_blank" class="blue_n_btn fr mt20">发布问题</a>
|
||||||
|
<% elsif User.current.logged?%>
|
||||||
|
<% if item.applied_projects.find_by_user_id(User.current.id)%>
|
||||||
|
<%= link_to '取消申请',appliedproject_applied_path(:project_id => item.id,:user_id => User.current.id),:class => "blue_n_btn fr mt20", :remote => "true",:method => "delete",:id => "applied_project_link_#{item.id}"%>
|
||||||
|
<% else%>
|
||||||
|
<%= link_to "加入项目",appliedproject_path(:user_id => User.current.id,:project_id => item.id,:project_join => true),:class => "blue_n_btn fr mt20", :remote => "true",:method => "post",:id => "applied_project_link_#{item.id}" %>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
<% end%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -14,20 +14,20 @@
|
||||||
<label class="label02"><%=l(:field_status)%>:</label>
|
<label class="label02"><%=l(:field_status)%>:</label>
|
||||||
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
|
<%= f.select :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]}, :label => "" %>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<!--<li >-->
|
||||||
<label class="label02"><%=l(:label_wiki_page)%>:</label>
|
<!--<label class="label02"><%#=l(:label_wiki_page)%>:</label>-->
|
||||||
<%= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>
|
<!--<%#= f.text_field :wiki_page_title, :size =>60, :label => "", :disabled => @project.wiki.nil? %>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"><%=l(:label_date)%>:</label>
|
<label class="label02"><%=l(:label_date)%>:</label>
|
||||||
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
|
<%= f.text_field :effective_date, :size => 10, :readonly => true,:class=>"fl" ,:style=>"margin-left:7px;",:label=>""%>
|
||||||
<%= calendar_for('version_effective_date') %>
|
<%= calendar_for('version_effective_date') %>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl mb10"></div>
|
<div class="cl mb10"></div>
|
||||||
<li >
|
<!--<li >-->
|
||||||
<label class="label02"><%=l(:field_sharing)%>:</label>
|
<!--<label class="label02"><%#=l(:field_sharing)%>:</label>-->
|
||||||
<%= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>
|
<!--<%#= f.select :sharing, @version.allowed_sharings.collect {|v| [format_version_sharing(v), v]},:label=>"" %>-->
|
||||||
</li>
|
<!--</li>-->
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<% @version.custom_field_values.each do |value| %>
|
<% @version.custom_field_values.each do |value| %>
|
||||||
|
|
|
@ -13,5 +13,5 @@
|
||||||
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>)
|
project_issues_path(version.project, :status_id => 'o', :fixed_version_id => version, :set_filter => 1), :class =>"c_dblue") %>)
|
||||||
</p>
|
</p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p><%= l(:label_roadmap_no_issues) %></p>
|
<div class="flash error"><%= l(:label_roadmap_no_issues) %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="contextual" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
<div class="contextual" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
|
||||||
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
<%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
|
||||||
<%= link_to_if_authorized(l(:button_edit_associated_wikipage,
|
<%#= link_to_if_authorized(l(:button_edit_associated_wikipage,
|
||||||
:page_title => @version.wiki_page_title.truncate(30, omission: '...')),
|
:page_title => @version.wiki_page_title.truncate(30, omission: '...')),
|
||||||
{:controller => 'wiki',
|
{:controller => 'wiki',
|
||||||
:action => 'edit',
|
:action => 'edit',
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
|
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3 style="word-break: break-all;word-wrap: break-word;">
|
<h3 style="word-break: break-all;word-wrap: break-word;color: #64BDD9;">
|
||||||
<%= h(@version.name) %>
|
<%= h(@version.name) %>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@
|
||||||
|
|
||||||
<div class="splitcontent">
|
<div class="splitcontent">
|
||||||
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
|
<% if @version.estimated_hours > 0 || User.current.allowed_to?(:view_time_entries, @project) %>
|
||||||
<fieldset class="time-tracking"><legend><%= l(:label_time_tracking) %></legend>
|
<fieldset class="time_tracter f14"><legend><%= l(:label_time_tracking) %></legend>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<p class="fl c_blue f14 fb"><%= l(:field_estimated_hours) %>:</p>
|
<p class="fl c_grey f12"><%= l(:field_estimated_hours) %>:</p>
|
||||||
</th>
|
</th>
|
||||||
<td class="total-hours">
|
<td class="total-hours">
|
||||||
<%= html_hours(l_hours(@version.estimated_hours)) %>
|
<%= html_hours(l_hours(@version.estimated_hours)) %>
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
<% if User.current.allowed_to?(:view_time_entries, @project) %>
|
<% if User.current.allowed_to?(:view_time_entries, @project) %>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
<p class="fr c_blue f14 fb"><%= l(:label_spent_time) %>:</p>
|
<p class="fr c_grey f12"><%= l(:label_spent_time) %>:</p>
|
||||||
</th>
|
</th>
|
||||||
<td class="total-hours">
|
<td class="total-hours">
|
||||||
<%= html_hours(l_hours(@version.spent_hours)) %>
|
<%= html_hours(l_hours(@version.spent_hours)) %>
|
||||||
|
|
|
@ -74,11 +74,11 @@
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<% other_formats_links do |f| %>
|
<%# other_formats_links do |f| %>
|
||||||
<%= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
<%#= f.link_to 'PDF', :url => {:id => @page.title, :version => params[:version]} %>
|
||||||
<%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
<%#= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %>
|
||||||
<%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
<%#= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %>
|
||||||
<% end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
<%# end if User.current.allowed_to?(:export_wiki_pages, @project) %>
|
||||||
<% content_for :sidebar do %>
|
<% content_for :sidebar do %>
|
||||||
<%= render :partial => 'sidebar' %>
|
<%= render :partial => 'sidebar' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
<% if @save_succ %>
|
<% if @save_succ %>
|
||||||
<% if !@jfm.nil? && @jfm.jour_type == 'Principal' %>
|
<% if !@jfm.nil? && @jfm.jour_type == 'Principal' %>
|
||||||
var html = $("<div>"+"<%= escape_javascript( render(:template => 'users/user_feedback4show',:locals => {:feed_list=>[@jfm]} )) %>"+"</div>");
|
$("#<%= @jfm.m_parent_id%>").children("div[nhname='reply_list']").prepend("<%= escape_javascript( render(:partial => 'users/user_jour_reply',:locals => {:reply=>@jfm} )) %>");
|
||||||
$("div[nhname='container']",$("#nh_messages")).prepend(html.html());
|
div_1 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='div_form']");
|
||||||
// $('#new_message_cancel_btn').click();
|
div_1.hide();
|
||||||
$("a[nhname='reply_btn']",$("#nh_jours_<%= @jfm.m_reply_id %>")).click();
|
div_2 = $("#<%= @jfm.m_reply_id%>").children("div[nhname='sub_div_form']");
|
||||||
var params = init_list_more_div_params($("#nh_messages"));
|
div_2.hide();
|
||||||
change_status_4_list_more_div(params);
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
var pre_append = $('<%= j(
|
var pre_append = $('<%= j(
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication'].include? @journal_destroyed.jour_type)%>
|
||||||
<% if @is_user%>
|
<% if @is_user%>
|
||||||
$("#nh_jours_<%= @journal_destroyed.id %>",$("div[nhname='container']",$("#nh_messages"))).remove();
|
var destroyedItem = $('#<%=@journal_destroyed.id%>');
|
||||||
var params = init_list_more_div_params($("#nh_messages"));
|
destroyedItem.fadeOut(600,function(){
|
||||||
change_status_4_list_more_div(params);
|
destroyedItem.remove();
|
||||||
|
});
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @bid && @jours_count %>
|
<% if @bid && @jours_count %>
|
||||||
$('#jours_count').html("<%= @jours_count %>");
|
$('#jours_count').html("<%= @jours_count %>");
|
||||||
|
|
|
@ -37,7 +37,7 @@ zh:
|
||||||
label_password_lost: "忘记密码?"
|
label_password_lost: "忘记密码?"
|
||||||
button_login: 登录
|
button_login: 登录
|
||||||
# account_controller中判断用户名或密码输入有误的提示信息
|
# account_controller中判断用户名或密码输入有误的提示信息
|
||||||
notice_account_invalid_creditentials: "无效的用户名或密码"
|
notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写,谢谢!"
|
||||||
# account_controller中判断未激活的提示信息
|
# account_controller中判断未激活的提示信息
|
||||||
notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"
|
notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"
|
||||||
|
|
||||||
|
|
|
@ -690,7 +690,7 @@ zh:
|
||||||
label_sort_lowest: 置底
|
label_sort_lowest: 置底
|
||||||
label_roadmap_due_in: "截止日期到 %{value}"
|
label_roadmap_due_in: "截止日期到 %{value}"
|
||||||
label_roadmap_overdue: "%{value} 延期"
|
label_roadmap_overdue: "%{value} 延期"
|
||||||
label_roadmap_no_issues: 该版本没有问题
|
label_roadmap_no_issues: 该版本还没有对应的缺陷,可以在“发布问题”的“目标版本”中设置!
|
||||||
label_user_search_type: 搜索类型
|
label_user_search_type: 搜索类型
|
||||||
label_search_by_login: 登录名
|
label_search_by_login: 登录名
|
||||||
label_search_by_name: 名字
|
label_search_by_name: 名字
|
||||||
|
@ -2058,5 +2058,22 @@ zh:
|
||||||
lable_unset: 未设置
|
lable_unset: 未设置
|
||||||
label_chose_group: 请选择分班
|
label_chose_group: 请选择分班
|
||||||
|
|
||||||
|
# label_hosted_organization: 主办单位
|
||||||
|
# label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
|
||||||
|
# label_sponsor: 计算机科学与技术系
|
||||||
|
# label_partners: 合作单位
|
||||||
|
# label_co_organizer_NUDT: 国防科学技术大学计算机学院
|
||||||
|
# label_co_organizer_EECS: 北京大学
|
||||||
|
# label_co_organizer_BHU: 北京航空航天大学
|
||||||
|
# label_co_organizer_CAS: 中国科学院软件研究所
|
||||||
|
# label_co_organizer_InforS: 中创软件
|
||||||
|
# label_rights_reserved: Copyright 2007~2015, All Rights Riserved
|
||||||
|
# label_about_us: 关于我们
|
||||||
|
# label_contact_us: 联系我们
|
||||||
|
# label_recruitment_information: 招聘信息
|
||||||
|
# label_surpport_group: 帮助中心
|
||||||
|
# label_forums: 论坛反馈
|
||||||
|
# label_language: 语言
|
||||||
|
# label_license: 湘ICP备09019772
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -101,6 +101,7 @@ RedmineApp::Application.routes.draw do
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
post 'next_step'
|
post 'next_step'
|
||||||
|
post 'programing_test'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -308,7 +309,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
|
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
|
||||||
match 'user_projects', :to => 'users#user_projects', :via => :get
|
match 'user_projects', :to => 'users#user_projects', :via => :get
|
||||||
match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities"
|
match 'user_activities', :to => 'users#user_activities', :via => :get, :as => "user_activities"
|
||||||
match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
|
# match 'user_newfeedback', :to => 'users#user_newfeedback', :via => :get, :as => "user_newfeedback"
|
||||||
match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info'
|
match 'info', :to => 'users#info', :via => [:get , :post], :as => 'user_info'
|
||||||
match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang
|
match 'user_watchlist', :to => 'users#user_watchlist', :via => :get, :as => "user_watchlist" #add by huang
|
||||||
match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang
|
match 'user_fanslist', :to => 'users#user_fanslist', :via => :get, :as => "user_fanslist" #add by huang
|
||||||
|
@ -401,14 +402,6 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
||||||
get 'watcherlist', :action=> 'watcherlist'
|
get 'watcherlist', :action=> 'watcherlist'
|
||||||
|
|
||||||
# 添加dts测试工具
|
|
||||||
get 'dts_dep', :action=> 'dts_dep'
|
|
||||||
get 'yun_dep', :action=> 'yun_dep'
|
|
||||||
get 'soft_knowledge', :action=> 'soft_knowledge'
|
|
||||||
get 'soft_file', :action=> 'soft_file'
|
|
||||||
get 'online_dev', :action=> 'online_dev'
|
|
||||||
get 'soft_service', :action=> 'soft_service'
|
|
||||||
|
|
||||||
get 'invite_members', :action=> 'invite_members'
|
get 'invite_members', :action=> 'invite_members'
|
||||||
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
||||||
# get 'dts_repos', :aciton => 'dts_repos'
|
# get 'dts_repos', :aciton => 'dts_repos'
|
||||||
|
@ -795,6 +788,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'words/:id/leave_project_message', :to => 'words#leave_project_message'
|
match 'words/:id/leave_project_message', :to => 'words#leave_project_message'
|
||||||
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
|
match 'projects/:id/feedback', :to => 'projects#feedback', :via => :get, :as => 'project_feedback'
|
||||||
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
|
match 'project/:id/share', :to => 'projects#share', :as => 'share_show' #share
|
||||||
|
post 'words/:id/leave_user_message', :to => 'words#leave_user_message', :as => "leave_user_message"
|
||||||
|
|
||||||
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
||||||
delete 'join_in/join', :to => 'courses#unjoin'
|
delete 'join_in/join', :to => 'courses#unjoin'
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
class AddResultToTest < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :homework_tests, :result, :integer,default: 0
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :homework_tests,:result
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,9 @@
|
||||||
|
class AddErrormsgToTest < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :homework_tests,:error_msg,:text
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
remove_column :homework_tests,:error_msg
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,9 @@
|
||||||
|
class ChangeResultDefault < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
change_column :homework_tests,:result,:integer,:default => nil
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
change_column :homework_tests,:result,:integer,:default => 0
|
||||||
|
end
|
||||||
|
end
|
14
db/schema.rb
14
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20150722015428) do
|
ActiveRecord::Schema.define(:version => 20150801034945) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -634,6 +634,8 @@ ActiveRecord::Schema.define(:version => 20150722015428) do
|
||||||
t.integer "homework_common_id"
|
t.integer "homework_common_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "result"
|
||||||
|
t.text "error_msg"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "homework_users", :force => true do |t|
|
create_table "homework_users", :force => true do |t|
|
||||||
|
@ -744,16 +746,6 @@ ActiveRecord::Schema.define(:version => 20150722015428) do
|
||||||
|
|
||||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
||||||
|
|
||||||
create_table "journal_details_copy", :force => true do |t|
|
|
||||||
t.integer "journal_id", :default => 0, :null => false
|
|
||||||
t.string "property", :limit => 30, :default => "", :null => false
|
|
||||||
t.string "prop_key", :limit => 30, :default => "", :null => false
|
|
||||||
t.text "old_value"
|
|
||||||
t.text "value"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id"
|
|
||||||
|
|
||||||
create_table "journal_replies", :id => false, :force => true do |t|
|
create_table "journal_replies", :id => false, :force => true do |t|
|
||||||
t.integer "journal_id"
|
t.integer "journal_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
|
|
@ -546,10 +546,12 @@ function submit_homework_form(){if(regexHomeworkCommonName()&®exHomeworkCommo
|
||||||
//增加测试结果
|
//增加测试结果
|
||||||
function add_programing_test(obj) {
|
function add_programing_test(obj) {
|
||||||
var now = new Date().getTime();
|
var now = new Date().getTime();
|
||||||
obj.after("<div><li><label class='label02'> 测试输入: </label><input type='text' class='fl h26 w200 mb10' name='input[" + now +"]'' />" +
|
obj.after("<div><li><label class='label02'> 测试输入: </label><input type='text' class='fl h26 w190 mb10' name='input[" + now +"]'' />" +
|
||||||
"</li><li ><label class='fl f14 ml10'> 输出: </label><input type='text' class='fl h26 w200 mb10' name='output[" + now +"]' />" +
|
"</li><li ><label class='fl f14 ml10'> 输出: </label><input type='text' class='fl h26 w190 mb10' name='output[" + now +"]' />" +
|
||||||
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
|
"</li><li><a class='icon_add ml10' href='javascript:void(0);' title='添加测试' onclick='add_programing_test($(this).parent().parent())'></a>" +
|
||||||
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
|
"<a class='icon_remove' href='javascript:void(0);' title='删除测试' onclick='remove_programing_test($(this).parent().parent())'></a>" +
|
||||||
|
"<a class='blue_btn fl ml5 mt1 programing_test' onclick='programing_test("+ now +")' id='test_send_" + now + "'>测试</a>" +
|
||||||
|
"<input type='hidden' id='test_result_" + now +"' name='result[" + now +"]'/>" +
|
||||||
"</li><div class='cl'></div></div>");
|
"</li><div class='cl'></div></div>");
|
||||||
}
|
}
|
||||||
//删除测试结果
|
//删除测试结果
|
||||||
|
|
|
@ -491,3 +491,8 @@ function judgeprojectname(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//用户反馈
|
||||||
|
function submitProjectFeedback() {
|
||||||
|
$("#project_feedback_form").submit();
|
||||||
|
}
|
|
@ -0,0 +1,261 @@
|
||||||
|
//个人动态
|
||||||
|
$(function(){
|
||||||
|
function init_editor(params){
|
||||||
|
var editor = params.kindutil.create(params.textarea, {
|
||||||
|
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||||
|
items:['emoticons'],
|
||||||
|
afterChange:function(){//按键事件
|
||||||
|
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||||
|
},
|
||||||
|
afterCreate:function(){
|
||||||
|
var toolbar = $("div[class='ke-toolbar']",params.div_form);
|
||||||
|
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
|
||||||
|
params.toolbar_container.append(toolbar);
|
||||||
|
}
|
||||||
|
}).loadPlugin('paste');
|
||||||
|
return editor;
|
||||||
|
}
|
||||||
|
|
||||||
|
function nh_check_field(params){
|
||||||
|
var result=true;
|
||||||
|
if(params.content!=undefined){
|
||||||
|
if(params.content.isEmpty()){
|
||||||
|
result=false;
|
||||||
|
}
|
||||||
|
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
|
||||||
|
params.textarea.html(params.content.html());
|
||||||
|
params.content.sync();
|
||||||
|
if(params.content.isEmpty()){
|
||||||
|
params.contentmsg.html('内容不能为空');
|
||||||
|
params.contentmsg.css({color:'#ff0000'});
|
||||||
|
}else{
|
||||||
|
params.contentmsg.html('填写正确');
|
||||||
|
params.contentmsg.css({color:'#008000'});
|
||||||
|
}
|
||||||
|
params.contentmsg.show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
function init_form(params){
|
||||||
|
params.form.submit(function(){
|
||||||
|
var flag = false;
|
||||||
|
if(params.form.attr('data-remote') != undefined ){
|
||||||
|
flag = true
|
||||||
|
}
|
||||||
|
var is_checked = nh_check_field({
|
||||||
|
issubmit:true,
|
||||||
|
content:params.editor,
|
||||||
|
contentmsg:params.contentmsg,
|
||||||
|
textarea:params.textarea
|
||||||
|
});
|
||||||
|
if(is_checked){
|
||||||
|
if(flag){
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
$(this)[0].submit();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function nh_reset_form(params){
|
||||||
|
params.form[0].reset();
|
||||||
|
params.textarea.empty();
|
||||||
|
if(params.editor != undefined){
|
||||||
|
params.editor.html(params.textarea.html());
|
||||||
|
}
|
||||||
|
params.contentmsg.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
KindEditor.ready(function(K){
|
||||||
|
$("a[nhname='reply_btn']").live('click',function(){
|
||||||
|
var params = {};
|
||||||
|
params.kindutil = K;
|
||||||
|
params.container = $(this).parent().parent('div');
|
||||||
|
params.div_form = $("div[nhname='div_form']",params.container);
|
||||||
|
params.form = $("form",params.div_form);
|
||||||
|
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||||
|
params.textarea.prev('div').css("height","60px");
|
||||||
|
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||||
|
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||||
|
params.cancel_btn = $("a[nhname='cancel_btn']",params.div_form);
|
||||||
|
params.submit_btn = $("a[nhname='submit_btn']",params.div_form);
|
||||||
|
if(params.textarea.data('init') == undefined){
|
||||||
|
params.editor = init_editor(params);
|
||||||
|
init_form(params);
|
||||||
|
params.cancel_btn.click(function(){
|
||||||
|
nh_reset_form(params);
|
||||||
|
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||||
|
});
|
||||||
|
params.submit_btn.click(function(){
|
||||||
|
params.form.submit();
|
||||||
|
});
|
||||||
|
params.textarea.data('init',1);
|
||||||
|
}
|
||||||
|
params.cancel_btn.click();
|
||||||
|
setTimeout(function(){
|
||||||
|
if(!params.div_form.is(':hidden')){
|
||||||
|
params.textarea.show();
|
||||||
|
params.textarea.focus();
|
||||||
|
params.textarea.hide();
|
||||||
|
}
|
||||||
|
},300);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("a[nhname='sub_reply_btn']").live('click',function(){
|
||||||
|
var params = {};
|
||||||
|
params.kindutil = K;
|
||||||
|
params.container = $(this).parent().parent('div');
|
||||||
|
params.div_form = $("div[nhname='sub_div_form']",params.container);
|
||||||
|
params.form = $("form",params.div_form);
|
||||||
|
params.textarea = $("textarea[name='user_notes']",params.div_form);
|
||||||
|
params.textarea.prev('div').css("height","60px");
|
||||||
|
params.contentmsg = $("p[nhname='sub_contentmsg']",params.div_form);
|
||||||
|
params.toolbar_container = $("div[nhname='sub_toolbar_container']",params.div_form);
|
||||||
|
params.cancel_btn = $("a[nhname='sub_cancel_btn']",params.div_form);
|
||||||
|
params.submit_btn = $("a[nhname='sub_submit_btn']",params.div_form);
|
||||||
|
if(params.textarea.data('init') == undefined){
|
||||||
|
params.editor = init_editor(params);
|
||||||
|
init_form(params);
|
||||||
|
params.cancel_btn.click(function(){
|
||||||
|
nh_reset_form(params);
|
||||||
|
toggleAndSettingWordsVal(params.div_form, params.textarea);
|
||||||
|
});
|
||||||
|
params.submit_btn.click(function(){
|
||||||
|
params.form.submit();
|
||||||
|
});
|
||||||
|
params.textarea.data('init',1);
|
||||||
|
}
|
||||||
|
params.cancel_btn.click();
|
||||||
|
setTimeout(function(){
|
||||||
|
if(!params.div_form.is(':hidden')){
|
||||||
|
params.textarea.show();
|
||||||
|
params.textarea.focus();
|
||||||
|
params.textarea.hide();
|
||||||
|
}
|
||||||
|
},300);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("div[nhname='new_message']").each(function(){
|
||||||
|
var params = {};
|
||||||
|
params.kindutil = K;
|
||||||
|
params.div_form = $(this);
|
||||||
|
params.form = $("form",params.div_form);
|
||||||
|
if(params.form==undefined || params.form.length==0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
|
||||||
|
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
|
||||||
|
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
|
||||||
|
params.cancel_btn = $("#new_message_cancel_btn");
|
||||||
|
params.submit_btn = $("#new_message_submit_btn");
|
||||||
|
|
||||||
|
if(params.textarea.data('init') == undefined){
|
||||||
|
params.editor = init_editor(params);
|
||||||
|
init_form(params);
|
||||||
|
params.cancel_btn.click(function(){
|
||||||
|
nh_reset_form(params);
|
||||||
|
});
|
||||||
|
params.submit_btn.click(function(){
|
||||||
|
params.form.submit();
|
||||||
|
});
|
||||||
|
params.textarea.data('init',1);
|
||||||
|
$(this).show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
function init_list_more_div(params){
|
||||||
|
var p=params;
|
||||||
|
p.exbtn.click(function(){
|
||||||
|
var isclose = p.container.data('isclose');
|
||||||
|
var hasmore = p.container.data('hasmore');
|
||||||
|
if(isclose == '1'){
|
||||||
|
$("div[nhname='rec']",p.container).show();
|
||||||
|
p.container.data('isclose','0');
|
||||||
|
change_status_4_list_more_div(params);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(hasmore == '0'){
|
||||||
|
change_status_4_list_more_div(params,'get');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var url = p.container.data('url');
|
||||||
|
if($("div[nhname='rec']",p.container).length > 0){
|
||||||
|
var lastid = $("div[nhname='rec']",p.container).filter(':last').data('id');
|
||||||
|
url += "?lastid="+lastid;
|
||||||
|
var lasttime = $("div[nhname='rec']",p.container).filter(':last').data('time');
|
||||||
|
if(lasttime != undefined){
|
||||||
|
url += "&lasttime="+lasttime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$.ajax( {url:url,dataType:'text',success:function(data){
|
||||||
|
var html = $("<div>"+data+"</div>");
|
||||||
|
var lens = $("div[nhname='rec']",html).length;
|
||||||
|
if(lens < p.size){
|
||||||
|
p.container.data('hasmore','0');
|
||||||
|
}
|
||||||
|
if(lens>0){
|
||||||
|
var currpage = parseInt(p.container.data('currpage'))+1;
|
||||||
|
p.container.data('currpage',currpage);
|
||||||
|
p.container.append(html.html())
|
||||||
|
}
|
||||||
|
change_status_4_list_more_div(params,'get');
|
||||||
|
p.div.show();
|
||||||
|
}} );
|
||||||
|
});
|
||||||
|
p.clbtn.click(function(){
|
||||||
|
var i=0;
|
||||||
|
$("div[nhname='rec']",p.container).each(function(){
|
||||||
|
i++;
|
||||||
|
if(i> p.size){
|
||||||
|
$(this).hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
p.container.data('isclose','1');
|
||||||
|
change_status_4_list_more_div(params);
|
||||||
|
});
|
||||||
|
p.exbtn.click();
|
||||||
|
}
|
||||||
|
function change_status_4_list_more_div(params,opt){
|
||||||
|
var p=params;
|
||||||
|
if($("div[nhname='rec']",p.container).length == 0 && opt != 'get'){
|
||||||
|
p.exbtn.click();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var show_lens = $("div[nhname='rec']",p.container).length - $("div[nhname='rec']",p.container).filter(':hidden').length;
|
||||||
|
if( show_lens > p.size ){
|
||||||
|
p.clbtn.show();
|
||||||
|
}else{
|
||||||
|
p.clbtn.hide();
|
||||||
|
}
|
||||||
|
if($("div[nhname='rec']",p.container).length == 0){
|
||||||
|
p.exbtn.html(p.nodatamsg);
|
||||||
|
}else if( p.container.data('hasmore') == '1' || p.container.data('isclose')=='1' ){
|
||||||
|
p.exbtn.html('点击展开更多');
|
||||||
|
}else{
|
||||||
|
p.exbtn.html('没有更多了');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function init_list_more_div_params(div){
|
||||||
|
var params = {};
|
||||||
|
params.div = div;
|
||||||
|
params.container = $("div[nhname='container']",div);
|
||||||
|
params.exbtn = $("a[nhname='expand']",div);
|
||||||
|
params.clbtn = $("a[nhname='close']",div);
|
||||||
|
params.size = params.container.data('pagesize');
|
||||||
|
params.nodatamsg = params.container.data('nodatamsg');
|
||||||
|
if( params.size == undefined ){
|
||||||
|
params.size = 13;
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
$("div[nhname='list_more_div']").each(function(){
|
||||||
|
var params = init_list_more_div_params($(this));
|
||||||
|
init_list_more_div(params)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
//个人动态 end
|
|
@ -88,8 +88,6 @@ a:hover.talk_edit{ color:#ff5722;}
|
||||||
.talk_text{ border:1px solid #64bdd9; height:100px;width:550px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
|
.talk_text{ border:1px solid #64bdd9; height:100px;width:550px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
|
||||||
.talk_new ul li{ }
|
.talk_new ul li{ }
|
||||||
.sb{width:70px; height:26px; color:#606060; cursor:pointer;}
|
.sb{width:70px; height:26px; color:#606060; cursor:pointer;}
|
||||||
a.blue_btn{ background:#64bdd9; display:block; font-size:14px;color:#fff; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
|
|
||||||
a:hover.blue_btn{ background:#329cbd;}
|
|
||||||
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
|
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
|
||||||
a:hover.grey_btn{ background:#717171; color:#fff;}
|
a:hover.grey_btn{ background:#717171; color:#fff;}
|
||||||
/****资源库***/
|
/****资源库***/
|
||||||
|
@ -228,6 +226,7 @@ a:hover.ping_sub{ background:#14a8b9;}
|
||||||
.w430{ width:470px;}
|
.w430{ width:470px;}
|
||||||
.w557{ width:557px;}
|
.w557{ width:557px;}
|
||||||
.w350{ width:350px;}
|
.w350{ width:350px;}
|
||||||
|
.h350{height: 350px !important;}
|
||||||
.w620{ width:480px; height:160px; border:1px solid #CCC;}
|
.w620{ width:480px; height:160px; border:1px solid #CCC;}
|
||||||
.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:470px; }
|
.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:470px; }
|
||||||
.bo02{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:480px; margin-left:2px; color: #999; }
|
.bo02{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:480px; margin-left:2px; color: #999; }
|
||||||
|
@ -609,6 +608,7 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
||||||
.w547{ width:544px;}
|
.w547{ width:544px;}
|
||||||
.w196{ width:196px;}
|
.w196{ width:196px;}
|
||||||
.w186{ width:186px;}
|
.w186{ width:186px;}
|
||||||
|
.w190{width: 190px;}
|
||||||
.w200{width: 200px;}
|
.w200{width: 200px;}
|
||||||
.w459{ width:459px;}
|
.w459{ width:459px;}
|
||||||
.hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;}
|
.hwork_new_set{border:1px dashed #CCC; background:#f5f5f5; text-align:center; padding:10px 0; margin-bottom:10px;}
|
||||||
|
@ -695,6 +695,9 @@ a.work_list_tit{width:580px; display:block; overflow:hidden; font-size:14px; f
|
||||||
.border_l{border-left:1px solid #e4e4e4;}
|
.border_l{border-left:1px solid #e4e4e4;}
|
||||||
.border_t{ border-top:1px solid #e4e4e4;}
|
.border_t{ border-top:1px solid #e4e4e4;}
|
||||||
.td_end{border-top:1px solid #e4e4e4; height:auto; padding:5px; }
|
.td_end{border-top:1px solid #e4e4e4; height:auto; padding:5px; }
|
||||||
|
.wl{text-align: left;}
|
||||||
|
.vt{vertical-align: top;}
|
||||||
|
.td_board_left{border-right: 1px solid #e4e4e4;}
|
||||||
.c_w{ color:#fff;}
|
.c_w{ color:#fff;}
|
||||||
|
|
||||||
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
|
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px; white-space: nowrap; text-overflow:ellipsis;}
|
||||||
|
@ -710,6 +713,7 @@ a:hover.about_me{ color:#0781b4;}
|
||||||
.mb5 li{width:200px;word-wrap: break-word;
|
.mb5 li{width:200px;word-wrap: break-word;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
}
|
}
|
||||||
|
#homework_work_test_show{margin-left: 35px;width: 94%;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ a:hover.pr_join_a{ background:#41a8c8;}
|
||||||
|
|
||||||
/*左侧导航*/
|
/*左侧导航*/
|
||||||
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
|
.subNavBox{width:240px; background:#fff;margin:10px 10px 0 0;}
|
||||||
.subNav{border-bottom:solid 1px #e5e3da;cursor:pointer;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
|
.subNav{border-bottom:solid 1px #e5e3da;cursor:auto;font-weight:bold;font-size:14px;color:#3ca5c6; height:26px;padding-left:10px;background-color:#fff; padding-top:2px;}
|
||||||
.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
|
.subNav_jiantou{background:url(../images/jiantou1.jpg) no-repeat;background-position:95% 50%; background-color:#fff;}
|
||||||
.subNav_jiantou:hover{color:#0781b4; }
|
.subNav_jiantou:hover{color:#0781b4; }
|
||||||
.currentDd{color:#0781b4;}
|
.currentDd{color:#0781b4;}
|
||||||
|
|
|
@ -74,7 +74,11 @@ a:hover.problem_pic{border:1px solid #64bdd9;}
|
||||||
.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;}
|
.issues_icon{ background:url(../images/public_icon.png) 0 -342px no-repeat; width:16px; height:21px;}
|
||||||
.problem_txt{ width:600px; margin-left:10px; color:#777777; }
|
.problem_txt{ width:600px; margin-left:10px; color:#777777; }
|
||||||
.pro_txt_w{width:610px;}
|
.pro_txt_w{width:610px;}
|
||||||
a.problem_name{ color:#ff5722; }
|
a.problem_name{ color:#ff5722;max-width: 80px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
a:hover.problem_name{ color:#d33503;}
|
a:hover.problem_name{ color:#d33503;}
|
||||||
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
a.problem_tit{ color:#0781b4; max-width:430px; font-weight:bold; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||||
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
|
a.problem_tit02{ color:#0781b4; font-weight:bold;max-width:400px;}
|
||||||
|
@ -690,9 +694,10 @@ table.list thead th
|
||||||
|
|
||||||
tr.changeset { height: 20px }
|
tr.changeset { height: 20px }
|
||||||
tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
|
tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
|
||||||
tr.changeset td.revision_graph { width: 15%; background-color: #fffffb; }
|
tr.changeset td.revision_graph { width: 1%; background-color: #fffffb; }
|
||||||
tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;}
|
tr.changeset td.author { text-align: center; width: 15%; white-space:nowrap;}
|
||||||
tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;}
|
tr.changeset td.committed_on { text-align: center; width: 15%; white-space:nowrap;}
|
||||||
|
tr.changeset td.comments { text-align: center; word-break:break-all; word-wrap: break-word;;}
|
||||||
|
|
||||||
div.changeset { padding: 4px;}
|
div.changeset { padding: 4px;}
|
||||||
div.changeset { border-bottom: 1px solid #ddd; }
|
div.changeset { border-bottom: 1px solid #ddd; }
|
||||||
|
@ -770,4 +775,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
||||||
|
|
||||||
#about_newtalk{ display:none;}
|
#about_newtalk{ display:none;}
|
||||||
|
|
||||||
|
/*version*/
|
||||||
|
.time_tracter{color: #64BDD9;padding: 5px;}
|
||||||
|
|
||||||
|
|
|
@ -77,9 +77,12 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.mr20{ margin-right:20px;}
|
.mr20{ margin-right:20px;}
|
||||||
.mr30{ margin-right:30px;}
|
.mr30{ margin-right:30px;}
|
||||||
.mr40{ margin-right:40px;}
|
.mr40{ margin-right:40px;}
|
||||||
|
.mr45{margin-right: 45px;}
|
||||||
.mr50{margin-right: 50px;}
|
.mr50{margin-right: 50px;}
|
||||||
.mr55{margin-right: 55px;}
|
.mr55{margin-right: 55px;}
|
||||||
.mr70{margin-right: 70px;}
|
.mr70{margin-right: 70px;}
|
||||||
|
.mw15{margin:0 15px;}
|
||||||
|
.mw20{margin:0 20px;}
|
||||||
.mt1{margin-top: 1px;}
|
.mt1{margin-top: 1px;}
|
||||||
.mt3{ margin-top:3px;}
|
.mt3{ margin-top:3px;}
|
||||||
.mt5{ margin-top:5px;}
|
.mt5{ margin-top:5px;}
|
||||||
|
@ -87,6 +90,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.mt10{ margin-top:10px;}
|
.mt10{ margin-top:10px;}
|
||||||
.mt30{ margin-top: 30px;}
|
.mt30{ margin-top: 30px;}
|
||||||
.mb5{ margin-bottom:5px;}
|
.mb5{ margin-bottom:5px;}
|
||||||
|
.mb8{ margin-bottom:8px;}
|
||||||
.mb10{ margin-bottom:10px;}
|
.mb10{ margin-bottom:10px;}
|
||||||
.mb20{ margin-bottom:20px;}
|
.mb20{ margin-bottom:20px;}
|
||||||
.pl15{ padding-left:15px;}
|
.pl15{ padding-left:15px;}
|
||||||
|
@ -165,11 +169,13 @@ a.c_green{ color:#28be6c;}
|
||||||
.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
|
.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
|
||||||
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
|
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center;padding:2px 10px;}
|
||||||
a:hover.grey_btn{ background:#717171; color:#fff;}
|
a:hover.grey_btn{ background:#717171; color:#fff;}
|
||||||
.green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;}
|
.green_btn{ background:#28be6c; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
|
||||||
a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
|
a.green_btn{background:#28be6c;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
|
||||||
a:hover.green_btn{ background:#14ad5a;}
|
a:hover.green_btn{ background:#14ad5a;}
|
||||||
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 10px; text-align:center;}
|
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
|
||||||
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
|
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
|
||||||
|
.red_btn{ background:red; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
|
||||||
|
a.red_btn{background:red; color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
|
||||||
a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
|
a.orange_btn_homework{background:#d63502;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||||
a:hover.blue_btn{ background:#329cbd;cursor: pointer;}
|
a:hover.blue_btn{ background:#329cbd;cursor: pointer;}
|
||||||
a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; }
|
a.orange_btn{ background:#ff5722;color:#fff;font-size:14px; font-weight:normal; padding:2px 10px; text-align:center; }
|
||||||
|
@ -451,3 +457,13 @@ img,embed{max-width: 100%;}
|
||||||
.is_public_checkbox{margin-left: 15px;margin-right: 10px;}
|
.is_public_checkbox{margin-left: 15px;margin-right: 10px;}
|
||||||
.author_name{color: #3ca5c6 !important;}
|
.author_name{color: #3ca5c6 !important;}
|
||||||
.ke-container-default{max-width: 100%;}
|
.ke-container-default{max-width: 100%;}
|
||||||
|
|
||||||
|
/*底部*/
|
||||||
|
/*#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;}*/
|
||||||
|
/*.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}*/
|
||||||
|
/*.footerAbout{ width:585px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; }*/
|
||||||
|
/*.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}*/
|
||||||
|
/*.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;}*/
|
||||||
|
/*.copyright{ width:390px; margin:0 auto;height:20px;line-height:20px;}*/
|
||||||
|
/*a.f_grey {color:#666666;}*/
|
||||||
|
/*a.f_grey:hover {color:#000000;}*/
|
||||||
|
|
|
@ -7,6 +7,7 @@ table,tr,td{border:0;cellspacing:0; cellpadding:0;}
|
||||||
ol,ul,li{ list-style-type:none}
|
ol,ul,li{ list-style-type:none}
|
||||||
a:link,a:visited{color:#7f7f7f;text-decoration:none;}
|
a:link,a:visited{color:#7f7f7f;text-decoration:none;}
|
||||||
a:hover,a:active{color:#000;}
|
a:hover,a:active{color:#000;}
|
||||||
|
img{max-width: 100%;}
|
||||||
|
|
||||||
/*常用*/
|
/*常用*/
|
||||||
select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; }
|
select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; }
|
||||||
|
@ -71,6 +72,9 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.mr20{ margin-right:20px;}
|
.mr20{ margin-right:20px;}
|
||||||
.mr30{ margin-right:30px;}
|
.mr30{ margin-right:30px;}
|
||||||
.mr40{ margin-right:40px;}
|
.mr40{ margin-right:40px;}
|
||||||
|
.mr45{margin-right: 45px;}
|
||||||
|
.mw15{margin:0 15px;}
|
||||||
|
.mw20{margin:0 20px;}
|
||||||
.mt3{ margin-top:3px;}
|
.mt3{ margin-top:3px;}
|
||||||
.mt5{ margin-top:5px;}
|
.mt5{ margin-top:5px;}
|
||||||
.mt8{ margin-top:8px;}
|
.mt8{ margin-top:8px;}
|
||||||
|
@ -430,3 +434,14 @@ a.box_close{ display:block; float:right; width:16px; height:16px; background:url
|
||||||
a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
a:hover.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
||||||
|
|
||||||
div.ke-statusbar{height:1px; border-top:none;}
|
div.ke-statusbar{height:1px; border-top:none;}
|
||||||
|
|
||||||
|
/*底部*/
|
||||||
|
/*#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;}*/
|
||||||
|
/*.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}*/
|
||||||
|
/*.footerAbout{ width:585px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; }*/
|
||||||
|
/*.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}*/
|
||||||
|
/*.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;}*/
|
||||||
|
/*.copyright{ width:390px; margin:0 auto;height:20px;line-height:20px;}*/
|
||||||
|
/*a.f_grey {color:#666666;}*/
|
||||||
|
/*a.f_grey:hover {color:#000000;}*/
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
.icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;}
|
.icon_female{ background:url(../images/pic_uersall.png) 0 -24px no-repeat; width:15px; height:15px;}
|
||||||
.pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; }
|
.pf_intro{ width:222px; margin-top:5px; color:#696969;word-break: break-all; }
|
||||||
.leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;}
|
.leftbox{ width:230px; padding:10px; padding-right:0px; padding-bottom:5px;background:#fff; margin-bottom:10px; margin-right:10px;}
|
||||||
.pic_members{ background:url(../images/pic_users.jpg) 0 0 no-repeat; display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;}
|
.pic_members{ display:block; width:38px; height:38px; border:1px solid #e9edf0; margin-right:5px; margin-bottom:5px;float:left;}
|
||||||
.pic_members:hover{border:1px solid #c9c9c9;}
|
.pic_members:hover{border:1px solid #c9c9c9;}
|
||||||
/*新建*/
|
/*新建*/
|
||||||
.top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; }
|
.top_new{ height:26px; border-bottom:10px solid #eaebed; padding:10px; background:#fff; float:left; margin-left:10px; width:730px; }
|
||||||
|
@ -24,12 +24,14 @@ a.icon_face{background:url(../images/public_icon.png) 0px -671px no-repeat; dis
|
||||||
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
|
a:hover.icon_face{background:url(../images/public_icon.png) -79px -671px no-repeat; }
|
||||||
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
|
.inputUsers_message{ border:1px solid #d2d2d2; width:718px; height:48px; color:#666; padding:5px; margin-bottom:5px;}
|
||||||
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
|
.inputUsers_message02{ border:1px solid #d2d2d2; width:618px; height:26px; color:#666; padding:5px; margin-bottom:5px; }
|
||||||
.message_list_box{ background:#f5f5f5; padding:10px;}
|
.message_list_box{ background:#f5f5f5; padding:10px;margin-top: 10px;}
|
||||||
.users_pic{ width:27px; height:27px; border:1px solid #e3e3e3;}
|
.users_pic{ width:46px; height:46px; border:1px solid #e3e3e3;}
|
||||||
.users_pic:hover{ border:1px solid #a5a5a5;}
|
.users_pic:hover{ border:1px solid #a5a5a5;}
|
||||||
|
.users_pic_sub{width:32px; height:32px; border:1px solid #e3e3e3;}
|
||||||
|
.users_pic_sub:hover{ border:1px solid #a5a5a5;}
|
||||||
.massage_txt{ max-width:360px; color: #666;word-break:break-all;}
|
.massage_txt{ max-width:360px; color: #666;word-break:break-all;}
|
||||||
.massage_time{ color:#8d8d8d; margin-top:5px;}
|
.massage_time{ color:#8d8d8d; margin-top:5px;}
|
||||||
.message_list{ border-bottom:1px dashed #c9c9c9; padding-bottom:10px; margin-bottom:10px;}
|
.message_list{ border-bottom:1px dashed #c9c9c9; margin-bottom:10px;color: #5f5f5f;}
|
||||||
.message_list_more{ text-align:center; width:720px;}
|
.message_list_more{ text-align:center; width:720px;}
|
||||||
/*课程动态*/
|
/*课程动态*/
|
||||||
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
|
.line_box{ width:728px; border:1px solid #d9d9d9; padding-bottom:10px;}
|
||||||
|
@ -89,13 +91,15 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
|
||||||
.users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;}
|
.users_ctt input,.users_ctt select,.users_ctt textarea{ border:1px solid #CCC;}
|
||||||
.users_ctt input,.users_ctt select,.users_ctt option{ height:26px;}
|
.users_ctt input,.users_ctt select,.users_ctt option{ height:26px;}
|
||||||
.users_ctt input,.users_ctt textarea{ margin-left:2px;}
|
.users_ctt input,.users_ctt textarea{ margin-left:2px;}
|
||||||
.users_ctt textarea{ margin-bottom:none;}
|
/*.users_ctt textarea{ margin-bottom:nor;}*/
|
||||||
.w450{ width:450px;}
|
.w450{ width:450px;}
|
||||||
.w210{ width:200px;}
|
.w210{ width:200px;}
|
||||||
.w70{ width:70px;}
|
.w70{ width:70px;}
|
||||||
.h200{ height:200px;}
|
.h200{ height:200px;}
|
||||||
/* 个人主页*/
|
/* 个人主页*/
|
||||||
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
a.edit_btn{display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:33px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
||||||
|
a:hover.edit_btn{ color:#ff5722;}
|
||||||
|
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
||||||
a:hover.gz_btn{ color:#ff5722;}
|
a:hover.gz_btn{ color:#ff5722;}
|
||||||
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
a.qx_btn{display:block; background:url(../images/pic_uersall.png) -318px -47px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;}
|
||||||
a:hover.qx_btn{color:#64bdd9;}
|
a:hover.qx_btn{color:#64bdd9;}
|
||||||
|
@ -123,5 +127,21 @@ a:hover.c_lgrey{ color:#3ca5c6;}
|
||||||
.newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; }
|
.newhwork_div input,.newhwork_div select{ height:26px;border:1px solid #CCC; }
|
||||||
.newhwork_div textarea{border:1px solid #CCC;}
|
.newhwork_div textarea{border:1px solid #CCC;}
|
||||||
.w460{ width:460px;}
|
.w460{ width:460px;}
|
||||||
|
/* 留言新增*/
|
||||||
|
.mes_box{ width:580px;}
|
||||||
|
.mes_box02{ margin-left:50px; border-top:1px dashed #c9c9c9; padding-top:10px;margin-bottom: 10px;}
|
||||||
|
.mes_box02_info{ width:540px; margin-left:5px;}
|
||||||
|
.users_r_top{ width:730px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||||
|
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
|
||||||
|
|
||||||
|
|
||||||
a.hidepic>img{display:none;}
|
a.hidepic>img{display:none;}
|
||||||
|
|
||||||
|
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||||
|
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||||
|
span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
|
||||||
|
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||||
|
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||||
|
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||||
|
div.ke-toolbar .ke-outline{border:none;}
|
||||||
|
.cr{clear: right;}
|
|
@ -443,7 +443,6 @@ color: #000000;
|
||||||
width:auto;
|
width:auto;
|
||||||
/*float:center;*/
|
/*float:center;*/
|
||||||
min-height:800px;
|
min-height:800px;
|
||||||
border: 1px solid #ffffff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*by huang*/
|
/*by huang*/
|
||||||
|
@ -1122,6 +1121,11 @@ a.root {
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.courses{
|
||||||
|
margin:0px;
|
||||||
|
padding-left: 0em;
|
||||||
|
}
|
||||||
|
|
||||||
.project-table {
|
.project-table {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
|
|
Loading…
Reference in New Issue