Merge branch 'cxt_course' into develop
Conflicts: app/helpers/application_helper.rb app/views/at/show.json.erb app/views/layouts/new_base_user.html.erb
This commit is contained in:
commit
6eb518c465
|
@ -77,15 +77,15 @@ module Mobile
|
||||||
if ac.container_type == "Course"
|
if ac.container_type == "Course"
|
||||||
case ac.act_type
|
case ac.act_type
|
||||||
when "HomeworkCommon"
|
when "HomeworkCommon"
|
||||||
"课程作业"
|
"班级作业"
|
||||||
when "News"
|
when "News"
|
||||||
"课程通知"
|
"班级通知"
|
||||||
when "Message"
|
when "Message"
|
||||||
"课程问答区"
|
"班级讨论区"
|
||||||
when "Poll"
|
when "Poll"
|
||||||
"课程问卷"
|
"班级问卷"
|
||||||
when "Course"
|
when "Course"
|
||||||
"课程"
|
"班级"
|
||||||
end
|
end
|
||||||
elsif ac.container_type == "Project"
|
elsif ac.container_type == "Project"
|
||||||
case ac.act_type
|
case ac.act_type
|
||||||
|
|
|
@ -12,11 +12,13 @@ class AvatarController < ApplicationController
|
||||||
@source_id = params[:source_id]
|
@source_id = params[:source_id]
|
||||||
@temp_file = params[:avatar][:image]
|
@temp_file = params[:avatar][:image]
|
||||||
@image_file = @temp_file.original_filename
|
@image_file = @temp_file.original_filename
|
||||||
|
@is_direct = params[:is_direct]
|
||||||
else
|
else
|
||||||
unless request.raw_post.nil?
|
unless request.raw_post.nil?
|
||||||
@source_type = params[:source_type]
|
@source_type = params[:source_type]
|
||||||
@source_id = params[:source_id]
|
@source_id = params[:source_id]
|
||||||
@temp_file = request.raw_post
|
@temp_file = request.raw_post
|
||||||
|
@is_direct = params[:is_direct]
|
||||||
if @temp_file.size > 0
|
if @temp_file.size > 0
|
||||||
if @temp_file.respond_to?(:original_filename)
|
if @temp_file.respond_to?(:original_filename)
|
||||||
@image_file = @temp_file.original_filename
|
@image_file = @temp_file.original_filename
|
||||||
|
@ -38,7 +40,7 @@ class AvatarController < ApplicationController
|
||||||
@urlfile='/' << File.join("images","avatars",avatar_directory(@source_type),avatar_filename(@source_id,@image_file))
|
@urlfile='/' << File.join("images","avatars",avatar_directory(@source_type),avatar_filename(@source_id,@image_file))
|
||||||
|
|
||||||
# 用户头像上传时进行特别处理
|
# 用户头像上传时进行特别处理
|
||||||
if @source_type == 'User'
|
if @is_direct == '1' && (@source_type == 'User' || @source_type == 'Course' || @source_type == 'Project')
|
||||||
diskfile += "temp"
|
diskfile += "temp"
|
||||||
@urlfile += "temp"
|
@urlfile += "temp"
|
||||||
end
|
end
|
||||||
|
@ -105,7 +107,7 @@ class AvatarController < ApplicationController
|
||||||
path = File.dirname(diskfile)
|
path = File.dirname(diskfile)
|
||||||
if File.directory?(path) && File.exist?(diskfile)
|
if File.directory?(path) && File.exist?(diskfile)
|
||||||
# 用户头像进行特别处理
|
# 用户头像进行特别处理
|
||||||
if @source_type == 'User'
|
if @source_type == 'User' || @source_type == 'Course' || @source_type == 'Project'
|
||||||
diskfile1 = diskfile + 'temp'
|
diskfile1 = diskfile + 'temp'
|
||||||
File.open(diskfile1, "wb") do |f|
|
File.open(diskfile1, "wb") do |f|
|
||||||
buffer = "DELETE"
|
buffer = "DELETE"
|
||||||
|
|
|
@ -94,8 +94,10 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
status = false
|
||||||
if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
|
if @homework.publish_time <= Date.today && homework_detail_manual.comment_status == 0
|
||||||
homework_detail_manual.comment_status = 1
|
homework_detail_manual.comment_status = 1
|
||||||
|
status = true
|
||||||
end
|
end
|
||||||
eval_start = homework_detail_manual.evaluation_start
|
eval_start = homework_detail_manual.evaluation_start
|
||||||
if eval_start.nil? || (eval_start <= @homework.end_time && homework_detail_manual.comment_status <= 1)
|
if eval_start.nil? || (eval_start <= @homework.end_time && homework_detail_manual.comment_status <= 1)
|
||||||
|
@ -145,6 +147,10 @@ class HomeworkCommonController < ApplicationController
|
||||||
@homework_detail_programing.save if @homework_detail_programing
|
@homework_detail_programing.save if @homework_detail_programing
|
||||||
@homework_detail_group.save if @homework_detail_group
|
@homework_detail_group.save if @homework_detail_group
|
||||||
|
|
||||||
|
if @homework.homework_type != 3 && homework_detail_manual.comment_status == 1 && status
|
||||||
|
create_works_list @homework
|
||||||
|
end
|
||||||
|
|
||||||
if params[:is_manage] == "1"
|
if params[:is_manage] == "1"
|
||||||
redirect_to manage_or_receive_homeworks_user_path(User.current.id)
|
redirect_to manage_or_receive_homeworks_user_path(User.current.id)
|
||||||
elsif params[:is_manage] == "2"
|
elsif params[:is_manage] == "2"
|
||||||
|
|
|
@ -90,14 +90,34 @@ class MyController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def clear_user_avatar_temp
|
def clear_user_avatar_temp
|
||||||
@user = User.current
|
if params[:course]
|
||||||
diskfile = disk_filename('User', @user.id)
|
@course = Course.find params[:course]
|
||||||
|
diskfile = disk_filename('Course', @course.id)
|
||||||
|
elsif params[:project]
|
||||||
|
@project = Project.find params[:project]
|
||||||
|
diskfile = disk_filename('Project', @project.id)
|
||||||
|
else
|
||||||
|
@user = User.current
|
||||||
|
diskfile = disk_filename('User', @user.id)
|
||||||
|
end
|
||||||
diskfile1 = diskfile + 'temp'
|
diskfile1 = diskfile + 'temp'
|
||||||
File.delete(diskfile1) if File.exist?(diskfile1)
|
File.delete(diskfile1) if File.exist?(diskfile1)
|
||||||
end
|
end
|
||||||
|
|
||||||
def save_user_avatar
|
def save_user_avatar
|
||||||
@user = User.current
|
if params[:source_id] && params[:source_type]
|
||||||
diskfile = disk_filename('User', @user.id)
|
case params[:source_type]
|
||||||
|
when 'User'
|
||||||
|
@user = User.current
|
||||||
|
diskfile = disk_filename('User', @user.id)
|
||||||
|
when 'Course'
|
||||||
|
@course = Course.find params[:source_id]
|
||||||
|
diskfile = disk_filename('Course', @course.id)
|
||||||
|
when 'Project'
|
||||||
|
@project = Project.find params[:source_id]
|
||||||
|
diskfile = disk_filename('Project', @project.id)
|
||||||
|
end
|
||||||
|
end
|
||||||
diskfile1 = diskfile + 'temp'
|
diskfile1 = diskfile + 'temp'
|
||||||
begin
|
begin
|
||||||
FileUtils.mv diskfile1, diskfile, force: true if File.exist? diskfile1
|
FileUtils.mv diskfile1, diskfile, force: true if File.exist? diskfile1
|
||||||
|
|
|
@ -734,24 +734,33 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if @work.destroy
|
if @homework.homework_type == 3
|
||||||
if @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1
|
if @work.destroy
|
||||||
pros = @work.student_work_projects.where("is_leader = 0")
|
if @homework.homework_detail_group.base_on_project == 1
|
||||||
pros.each do |pro|
|
pros = @work.student_work_projects.where("is_leader = 0")
|
||||||
pro.destroy
|
pros.each do |pro|
|
||||||
end
|
pro.destroy
|
||||||
project = @work.student_work_projects.where("is_leader = 1").first
|
end
|
||||||
project.update_attributes(:student_work_id => nil)
|
project = @work.student_work_projects.where("is_leader = 1").first
|
||||||
elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0
|
project.update_attributes(:student_work_id => nil)
|
||||||
@work.student_work_projects.each do |pro2|
|
elsif @homework.homework_detail_group.base_on_project == 0
|
||||||
pro2.destroy
|
@work.student_work_projects.each do |pro2|
|
||||||
|
pro2.destroy
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
else
|
||||||
format.html {
|
@work.attachments.destroy_all
|
||||||
redirect_to student_work_index_url(:homework => @homework.id)
|
@work.student_works_scores.destroy_all
|
||||||
}
|
@work.course_messages.destroy_all
|
||||||
end
|
@work.student_work_tests.destroy_all
|
||||||
|
@work.update_attributes(:work_status => 0, :name => "#{@homework.name}的作品提交", :description => nil, :late_penalty => 0, :commit_time => nil,:final_score => nil,:teacher_score => nil,:student_score => nil,:teaching_asistant_score => nil,:system_score => 0,:work_score => nil)
|
||||||
|
@work.update_column("work_score",nil)
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.html {
|
||||||
|
redirect_to student_work_index_url(:homework => @homework.id)
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -793,6 +802,8 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
elsif @homework.homework_type == 1
|
elsif @homework.homework_type == 1
|
||||||
@work.update_attributes(:work_status => 0, :name => "#{@homework.name}的作品提交", :description => nil, :late_penalty => 0, :commit_time => nil)
|
@work.update_attributes(:work_status => 0, :name => "#{@homework.name}的作品提交", :description => nil, :late_penalty => 0, :commit_time => nil)
|
||||||
|
@work.attachments.destroy_all
|
||||||
|
@work.course_messages.destroy_all
|
||||||
end
|
end
|
||||||
@student_work = StudentWork.new
|
@student_work = StudentWork.new
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class UsersController < ApplicationController
|
||||||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
|
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
|
||||||
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
||||||
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list,
|
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list,
|
||||||
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks]
|
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses]
|
||||||
before_filter :auth_user_extension, only: :show
|
before_filter :auth_user_extension, only: :show
|
||||||
#before_filter :rest_user_score, only: :show
|
#before_filter :rest_user_score, only: :show
|
||||||
#before_filter :select_entry, only: :user_projects
|
#before_filter :select_entry, only: :user_projects
|
||||||
|
@ -1115,23 +1115,8 @@ class UsersController < ApplicationController
|
||||||
homework_detail_programing.save if homework_detail_programing
|
homework_detail_programing.save if homework_detail_programing
|
||||||
homework_detail_group.save if homework_detail_group
|
homework_detail_group.save if homework_detail_group
|
||||||
|
|
||||||
if homework.homework_type != 3
|
if homework.homework_type != 3 && homework_detail_manual.comment_status == 1
|
||||||
students = homework.course.student
|
create_works_list homework
|
||||||
if !homework.course.nil? && !students.empty?
|
|
||||||
name = homework.name
|
|
||||||
name_str = name + "的作品提交"
|
|
||||||
str = ""
|
|
||||||
students.each do |student|
|
|
||||||
if str != ""
|
|
||||||
str += ","
|
|
||||||
end
|
|
||||||
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')"
|
|
||||||
end
|
|
||||||
#('#{name}的作品提交',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')
|
|
||||||
sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str
|
|
||||||
#StudentWork.create(:name => "#{name}的作品提交", :homework_common_id => homework.id, :user_id => student.student_id)
|
|
||||||
ActiveRecord::Base.connection.execute sql
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:quotes] && !params[:quotes].blank?
|
if params[:quotes] && !params[:quotes].blank?
|
||||||
|
@ -1474,15 +1459,15 @@ class UsersController < ApplicationController
|
||||||
#显示更多用户课程
|
#显示更多用户课程
|
||||||
def user_courses4show
|
def user_courses4show
|
||||||
@page = params[:page].to_i + 1
|
@page = params[:page].to_i + 1
|
||||||
@courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10).offset(@page * 10)
|
@courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10).offset(@page * 10)
|
||||||
@all_count = @user.courses.visible.where("is_delete =?", 0).count
|
@all_count = @user.favorite_courses.visible.where("is_delete =?", 0).count
|
||||||
end
|
end
|
||||||
|
|
||||||
#显示更多用户项目
|
#显示更多用户项目
|
||||||
def user_projects4show
|
def user_projects4show
|
||||||
@page = params[:page].to_i + 1
|
@page = params[:page].to_i + 1
|
||||||
@projects = @user.projects.visible.select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10).offset(@page * 10)
|
@projects = @user.favorite_projects.visible.select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10).offset(@page * 10)
|
||||||
@all_count = @user.projects.visible.count
|
@all_count = @user.favorite_projects.visible.count
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_course_activities
|
def user_course_activities
|
||||||
|
@ -3439,6 +3424,28 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#收藏班级/项目
|
||||||
|
def cancel_or_collect
|
||||||
|
if params[:project]
|
||||||
|
@project = Project.find params[:project]
|
||||||
|
member = Member.where("user_id = #{@user.id} and project_id = #{@project.id}")
|
||||||
|
elsif params[:course]
|
||||||
|
@course = Course.find params[:course]
|
||||||
|
member = Member.where("user_id = #{@user.id} and course_id = #{@course.id}")
|
||||||
|
end
|
||||||
|
unless member.empty?
|
||||||
|
member.first.update_attribute(:is_collect, member.first.is_collect == 0 ? 1 : 0)
|
||||||
|
end
|
||||||
|
if @project
|
||||||
|
@projects = @user.favorite_projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)
|
||||||
|
elsif @course
|
||||||
|
@courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10)
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def user_projectlist
|
def user_projectlist
|
||||||
@order, @c_sort, @type, @list_type = 1, 2, 1, 1
|
@order, @c_sort, @type, @list_type = 1, 2, 1, 1
|
||||||
#limit = 5
|
#limit = 5
|
||||||
|
|
|
@ -3437,8 +3437,26 @@ def course_syllabus_option user = User.current
|
||||||
type
|
type
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def create_works_list homework
|
||||||
|
students = homework.course.student
|
||||||
|
if !homework.course.nil? && !students.empty?
|
||||||
|
name = homework.name
|
||||||
|
name_str = name + "的作品提交"
|
||||||
|
str = ""
|
||||||
|
students.each do |student|
|
||||||
|
if str != ""
|
||||||
|
str += ","
|
||||||
|
end
|
||||||
|
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')"
|
||||||
|
end
|
||||||
|
sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str
|
||||||
|
ActiveRecord::Base.connection.execute sql
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# 获取项目动态更新时间
|
# 获取项目动态更新时间
|
||||||
def get_forge_act_message(act, type)
|
def get_forge_act_message(act, type)
|
||||||
forge_act = ForgeActivity.where(:forge_act_id => act.id, :forge_act_type => type).first
|
forge_act = ForgeActivity.where(:forge_act_id => act.id, :forge_act_type => type).first
|
||||||
format_time(forge_act.nil? ? act.created_on : forge_act.try(:updated_at))
|
format_time(forge_act.nil? ? act.created_on : forge_act.try(:updated_at))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,22 @@ class Principal < ActiveRecord::Base
|
||||||
columns.uniq.map {|field| "#{table}.#{field}"}
|
columns.uniq.map {|field| "#{table}.#{field}"}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#收藏的课程
|
||||||
|
def favorite_courses
|
||||||
|
members = Member.where("user_id = #{self.id} and course_id != -1 and is_collect = 1")
|
||||||
|
course_ids = members.empty? ? "(-1)" : "(" + members.map{|member| member.course_id}.join(",") + ")"
|
||||||
|
courses = Course.where("id in #{course_ids}")
|
||||||
|
return courses
|
||||||
|
end
|
||||||
|
|
||||||
|
#收藏的项目
|
||||||
|
def favorite_projects
|
||||||
|
members = Member.where("user_id = #{self.id} and project_id != -1 and project_id != 0 and is_collect = 1")
|
||||||
|
project_ids = members.empty? ? "(-1)" : "(" + members.map{|member| member.project_id}.join(",") + ")"
|
||||||
|
projects = Project.where("id in #{project_ids}")
|
||||||
|
return projects
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
# Make sure we don't try to insert NULL values (see #4632)
|
# Make sure we don't try to insert NULL values (see #4632)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#学生提交作品表
|
#学生提交作品表
|
||||||
class StudentWork < ActiveRecord::Base
|
class StudentWork < ActiveRecord::Base
|
||||||
attr_accessible :name, :description, :homework_common_id, :user_id, :final_score, :teacher_score, :student_score, :teaching_asistant_score, :project_id, :is_test, :simi_id, :simi_value, :work_status, :commit_time
|
attr_accessible :name, :description, :homework_common_id, :user_id, :final_score, :teacher_score, :student_score, :teaching_asistant_score, :system_score, :work_score, :project_id, :is_test, :simi_id, :simi_value, :work_status, :commit_time
|
||||||
|
|
||||||
belongs_to :homework_common
|
belongs_to :homework_common
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
:upload_path => upload_avatar_path(:format => 'js'),
|
:upload_path => upload_avatar_path(:format => 'js'),
|
||||||
:description_placeholder => nil ,# l(:label_optional_description)
|
:description_placeholder => nil ,# l(:label_optional_description)
|
||||||
:source_type => source.class.to_s,
|
:source_type => source.class.to_s,
|
||||||
:source_id => source.id.to_s
|
:source_id => source.id.to_s,
|
||||||
|
:is_direct => 0
|
||||||
} %>
|
} %>
|
||||||
<!--</span>-->
|
<!--</span>-->
|
||||||
<% content_for :header_tags do %>
|
<% content_for :header_tags do %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% if @source_type=='User' %>
|
<% if @is_direct == '1' && (@source_type=='User'|| @source_type == 'Course' || @source_type == 'Project') %>
|
||||||
var imgSpan = $("img[nhname='avatar_image']");
|
var imgSpan = $("img[nhname='avatar_image']");
|
||||||
imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'});
|
imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'});
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<div class="homepageRight mt0 ml10">
|
<div class="homepageRight mt0 ml10">
|
||||||
<div class="homepageRightBanner">
|
<div class="homepageRightBanner">
|
||||||
<div class="NewsBannerName">
|
<div class="NewsBannerName">
|
||||||
班级问答区
|
班级讨论区
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div nhname="topic_form">
|
<div nhname="topic_form">
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
||||||
<% if show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
<% if show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%=course_boards_path(@course) %>">问答区</a>
|
<a href="<%=course_boards_path(@course) %>">讨论区</a>
|
||||||
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
|
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ml45">
|
<li class="ml45">
|
||||||
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
<label><span class="c_red">*</span> <%= l(:label_tags_course_name)%> :</label>
|
||||||
<input type="text" name="course[name]" id="new_course_name" class="courses_input" maxlength="100" placeholder="例如:计算机系A班" onkeyup="regex_course_name('new');">
|
<input type="text" name="course[name]" id="new_course_name" class="courses_input" maxlength="100" placeholder="例如:软件工程计算机系A班" onkeyup="regex_course_name('new');">
|
||||||
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
<span class="c_red" id="new_course_name_notice" style="display: none;">班级名称不能为空且至少有两个字符</span>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
$("#course_is_public").attr("checked",true);
|
$("#course_is_public").attr("checked",true);
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
||||||
|
if(document.getElementById("course_list")) {
|
||||||
|
window.location.href = "<%=course_files_path(@course) %>";
|
||||||
|
}
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @course.is_public? %>
|
<% if @course.is_public? %>
|
||||||
$("#show_course_<%= @course.id %>").attr("title","公开班级:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
|
$("#show_course_<%= @course.id %>").attr("title","公开班级:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
|
<div class="hwork_dis" id="tbc_01" style="padding-top: 10px;">
|
||||||
<ul>
|
<ul>
|
||||||
<%= labelled_form_for @course do |f| %>
|
<%= labelled_form_for @course do |f| %>
|
||||||
<li class="ml45 mb10">
|
<li class="ml45 mb10" id="course_avatar_form">
|
||||||
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
|
<%= render :partial => "avatar/new_avatar_form", :locals => {source: @course} %>
|
||||||
<div class="cl"></div>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="ml45 mb10">
|
<li class="ml45 mb10">
|
||||||
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
<label><span class="c_red">*</span> <%= l(:label_tags_syllabus_name)%> :</label>
|
||||||
|
|
|
@ -30,7 +30,16 @@
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="sy_class_logo fl">
|
<div class="sy_class_logo fl">
|
||||||
<%= image_tag(url_to_avatar(@course), :width => "110", :height => "110", :alt => "班级logo") %>
|
<div class="pr" style="width: 96px; height:96px;">
|
||||||
|
<% if User.current.logged? && (User.current == @course.teacher || User.current.admin?)%>
|
||||||
|
<%=link_to image_tag(url_to_avatar(@course),width:"96", height: "96", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:course => @course.id), :remote => true%>
|
||||||
|
<div class="homepageEditProfile undis">
|
||||||
|
<%=link_to '', my_clear_user_avatar_temp_path(:course => @course.id), :class => 'homepageEditProfileIcon', :title => '点击编辑头像', :remote => true %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= image_tag(url_to_avatar(@course), :width => "96", :height => "96", :alt => "班级logo") %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sy_class_id fl">
|
<div class="sy_class_id fl">
|
||||||
<p>邀 请 码<br />
|
<p>邀 请 码<br />
|
||||||
|
@ -54,7 +63,7 @@
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<p class="sy_cgrey mb10">
|
<p class="sy_cgrey mb5">
|
||||||
<span class=" mr15">主讲老师:<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cblue') %></span>
|
<span class=" mr15">主讲老师:<%= link_to(@course.teacher.show_name, user_path(@course.teacher), :class => 'sy_cblue') %></span>
|
||||||
<span class=" mr15">学时:<span class="sy_cblack"><%= @course.class_period %>学时</span></span>
|
<span class=" mr15">学时:<span class="sy_cblack"><%= @course.class_period %>学时</span></span>
|
||||||
<span class=" mr15">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
|
<span class=" mr15">学期:<span class="sy_cblack"><%= current_time_and_term @course %></span></span>
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<% all_count = @user.favorite_courses.visible.where("is_delete =?", 0).count%>
|
||||||
|
<div id="homepageLeftMenuCourses">
|
||||||
|
<ul class="user_sub_menu" id="user_courses_li">
|
||||||
|
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user,:all_count => all_count,:page => 0} %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% if !courses.empty? %>
|
||||||
|
<a class="user_navmorebox" href="javascript:void(0);" id="user_hide_course" onclick="leftCourseslistChange();">
|
||||||
|
<span id="hide_show_courseicon" class="user_icons_closeclass"></span>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#user_hide_course').hide();
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,17 @@
|
||||||
|
<% all_count = @user.favorite_projects.visible.count%>
|
||||||
|
<div id="homepageLeftMenuForge">
|
||||||
|
<ul class="user_sub_menu" id="user_projects_li">
|
||||||
|
<%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :all_count => all_count, :page => 0} %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% if !projects.empty? %>
|
||||||
|
<a class="user_navmorebox" href="javascript:void(0);" id="user_hide_project" onclick="leftProjectslistChange();">
|
||||||
|
<span id="hide_show_projecticon" class="user_icons_closeclass"></span>
|
||||||
|
</a>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#user_hide_project').hide();
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,44 @@
|
||||||
|
<div>
|
||||||
|
<div><a href="javascript:hideModal();" class="box_close"></a></div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="pro_new">
|
||||||
|
<h3 class="box_h3 mb10">头像设置</h3>
|
||||||
|
<div class="uppicBox">
|
||||||
|
<input type="button" class="uppic_btn" onclick="$('#upload_avatar').click();" value="浏览.."/>
|
||||||
|
<%= file_field_tag 'avatar[image]',
|
||||||
|
:id => "upload_avatar",
|
||||||
|
:style => 'display:none;',#added by young
|
||||||
|
:size => "1",
|
||||||
|
:multiple => false,
|
||||||
|
:onchange => 'addInputAvatar(this);',
|
||||||
|
:data => {
|
||||||
|
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||||
|
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||||
|
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||||
|
:file_type => Redmine::Configuration['pic_types'].to_s,
|
||||||
|
:type_support_message => l(:error_pic_type),
|
||||||
|
:upload_path => upload_avatar_path(:format => 'js'),
|
||||||
|
:description_placeholder => nil ,# l(:label_optional_description)
|
||||||
|
:source_type => source.class.to_s,
|
||||||
|
:source_id => source.id.to_s,
|
||||||
|
:is_direct => 1
|
||||||
|
} %>
|
||||||
|
<!--<br/>-->
|
||||||
|
<!--<span>只支持jpg,png,gif,大小不超过5M</span>-->
|
||||||
|
</div>
|
||||||
|
<div class="showpicBox">
|
||||||
|
<p>预览</p>
|
||||||
|
<%= image_tag(url_to_avatar(source), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
|
||||||
|
<br/>
|
||||||
|
<span >96px*96px</span> <br />
|
||||||
|
<div class="mb20"></div>
|
||||||
|
<%= image_tag(url_to_avatar(source), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
|
||||||
|
<br />
|
||||||
|
<span>48px*48px</span> <br />
|
||||||
|
</div>
|
||||||
|
<div class="cl mb10"></div>
|
||||||
|
<a href="javascript:hideModal();" class=" fr grey_btn mr15 f14"> 取 消</a>
|
||||||
|
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar', :source_id => source.id, :source_type => source.class.to_s) %>" data-remote="true" class="blue_btn fr mr10 f14">确 定</a>
|
||||||
|
</div><!--talknew end-->
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div><!--floatbox end-->
|
|
@ -52,6 +52,10 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current == user %>
|
<% if User.current == user %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "取消收藏", cancel_or_collect_user_path(user, :course => course.id), :class => 'user_navmore_li',:target => '_blank', :remote => true %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<% if count == 0 %>
|
<% if count == 0 %>
|
||||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :course_id => course.id), :method => 'post', :class => 'user_navmore_li',:remote => true %>
|
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :course_id => course.id), :method => 'post', :class => 'user_navmore_li',:remote => true %>
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current == @user %>
|
<% if User.current == @user %>
|
||||||
|
<li>
|
||||||
|
<%= link_to "取消收藏", cancel_or_collect_user_path(user, :project => project.id), :class => 'user_navmore_li',:target => '_blank', :remote => true %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<% if ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count == 0 %>
|
<% if ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count == 0 %>
|
||||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :project_id => project.id), :method => 'post',:remote => true,:class => "user_navmore_li" %>
|
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :project_id => project.id), :method => 'post',:remote => true,:class => "user_navmore_li" %>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus'%>
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/public', 'css/structure','prettify', 'css/courses','css/popup','sy_public','syllabus'%>
|
||||||
<%= javascript_include_tag "course","header","attachments",'prettify' %>
|
<%= javascript_include_tag "course","avatars","header","attachments",'prettify' %>
|
||||||
<!-- page specific tags -->
|
<!-- page specific tags -->
|
||||||
<%= yield :header_tags -%>
|
<%= yield :header_tags -%>
|
||||||
<!-- MathJax的配置 -->
|
<!-- MathJax的配置 -->
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
<% unless show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
<% unless show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
||||||
<li id="sy_02" class="sy_icons_boards">
|
<li id="sy_02" class="sy_icons_boards">
|
||||||
<% count = @course.boards.first ? (@course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", @course.boards.first.id, nil).count) : 0 %>
|
<% count = @course.boards.first ? (@course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", @course.boards.first.id, nil).count) : 0 %>
|
||||||
<a href="<%=course_boards_path(@course) %>">问答区<span><%=count %></span></a>
|
<a href="<%=course_boards_path(@course) %>">讨论区<span><%=count %></span></a>
|
||||||
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
|
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'sy_class_add', :title =>"#{l(:label_message_new)}") %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -151,6 +151,9 @@
|
||||||
<span><%= l(:label_loading) %></span>
|
<span><%= l(:label_loading) %></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
|
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||||
|
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @course} %>
|
||||||
|
</div>
|
||||||
<%= call_hook :view_layouts_base_body_bottom %>
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
</body>
|
</body>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<%= javascript_heads %>
|
<%= javascript_heads %>
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','prettify','repository' %>
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','css/common','css/structure','scm','css/public', 'css/project','css/popup','prettify','repository' %>
|
||||||
<%= javascript_include_tag 'cookie','project', 'header','prettify','select_list_move','attachments' %>
|
<%= javascript_include_tag 'cookie','project',"avatars", 'header','prettify','select_list_move','attachments' %>
|
||||||
|
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
<!-- page specific tags -->
|
<!-- page specific tags -->
|
||||||
|
@ -50,7 +50,16 @@
|
||||||
<div id="LSide" class="fl">
|
<div id="LSide" class="fl">
|
||||||
<div class="project_info">
|
<div class="project_info">
|
||||||
<div class="pr_info_logo fl mr10 mb5">
|
<div class="pr_info_logo fl mr10 mb5">
|
||||||
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %>
|
<div class="pr" style="width: 64px; height:64px;">
|
||||||
|
<% if User.current.logged? && (User.current.id == @project.user_id || User.current.admin?)%>
|
||||||
|
<%=link_to image_tag(url_to_avatar(@project),width:"60", height: "60", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:project => @project.id), :remote => true%>
|
||||||
|
<div class="homepageEditProfile undis">
|
||||||
|
<%=link_to '', my_clear_user_avatar_temp_path(:project => @project.id), :remote => true, :class => 'homepageEditProfileIcon', :title => '点击编辑Logo' %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60", :alt => "项目logo") %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pr_info_id fl mb5 f14">
|
<div class="pr_info_id fl mb5 f14">
|
||||||
<%= l(:label_project_ivite_code)%>
|
<%= l(:label_project_ivite_code)%>
|
||||||
|
@ -249,6 +258,9 @@
|
||||||
<span><%= l(:label_loading) %></span>
|
<span><%= l(:label_loading) %></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
<div id="ajax-modal" style="display:none;"></div>
|
||||||
|
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||||
|
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @project} %>
|
||||||
|
</div>
|
||||||
<%= call_hook :view_layouts_base_body_bottom %>
|
<%= call_hook :view_layouts_base_body_bottom %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -103,9 +103,12 @@
|
||||||
<div class="homepageLeft mt10" id="LSide">
|
<div class="homepageLeft mt10" id="LSide">
|
||||||
<div class="user_leftinfo mb10">
|
<div class="user_leftinfo mb10">
|
||||||
<% if User.current.logged? && User.current == @user%>
|
<% if User.current.logged? && User.current == @user%>
|
||||||
<%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id => 'nh_user_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
|
<div class="pr" style="width: 80px; margin:0 auto;">
|
||||||
<% elsif User.current.logged? %>
|
<%=link_to image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path, :class => "user_leftinfo_img", :remote => true%>
|
||||||
<a href="javascript:void(0)" style="cursor: default;" class="user_leftinfo_img"><%=image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_user_tx') %></a>
|
<div class="homepageEditProfile undis">
|
||||||
|
<%=link_to '', my_clear_user_avatar_temp_path, :class => 'homepageEditProfileIcon', :remote => true, :title => '点击编辑Logo' %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<img src="images/user/male.jpg" width="74" height="74" />
|
<img src="images/user/male.jpg" width="74" height="74" />
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -159,20 +162,10 @@
|
||||||
<% if !unvisiable %>
|
<% if !unvisiable %>
|
||||||
<ul class="users_accordion mb10">
|
<ul class="users_accordion mb10">
|
||||||
<li id="user_01" class="user_icons_course">
|
<li id="user_01" class="user_icons_course">
|
||||||
<%= link_to '课程',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
|
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
|
||||||
<% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
|
<% courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
|
||||||
<% all_count = @user.courses.visible.where("is_delete =?", 0).count%>
|
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
|
||||||
<div class="<%= courses.empty? ? 'none' : ''%>" >
|
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
|
||||||
<div id="homepageLeftMenuCourses">
|
|
||||||
<ul class="user_sub_menu" id="user_courses_li">
|
|
||||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user,:all_count => all_count,:page => 0} %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% if !courses.empty? %>
|
|
||||||
<a class="user_navmorebox" href="javascript:void(0);" id="user_hide_course" onclick="leftCourseslistChange();">
|
|
||||||
<span id="hide_show_courseicon" class="user_icons_closeclass"></span>
|
|
||||||
</a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<% if is_current_user %>
|
<% if is_current_user %>
|
||||||
|
@ -197,19 +190,9 @@
|
||||||
<ul class="users_accordion mb10">
|
<ul class="users_accordion mb10">
|
||||||
<li id="user_06" class="user_icons_project">
|
<li id="user_06" class="user_icons_project">
|
||||||
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
|
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
|
||||||
<% all_count = @user.projects.visible.count%>
|
<% projects = @user.favorite_projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
|
||||||
<% projects = @user.projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
|
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
|
||||||
<div class="<%= projects.empty? ? 'none' : ''%>" >
|
<%=render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => projects} %>
|
||||||
<div id="homepageLeftMenuForge">
|
|
||||||
<ul class="user_sub_menu" id="user_projects_li">
|
|
||||||
<%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :all_count => all_count, :page => 0} %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% if !projects.empty? %>
|
|
||||||
<a class="user_navmorebox" href="javascript:void(0);" id="user_hide_project" onclick="leftProjectslistChange();">
|
|
||||||
<span id="hide_show_projecticon" class="user_icons_closeclass"></span>
|
|
||||||
</a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<% if is_current_user %>
|
<% if is_current_user %>
|
||||||
|
@ -248,53 +231,10 @@
|
||||||
<span><%= l(:label_loading) %></span>
|
<span><%= l(:label_loading) %></span>
|
||||||
</div>
|
</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>
|
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @user} %>
|
||||||
<div><a href="javascript:hideModal();" class="box_close"></a></div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<div class="pro_new">
|
|
||||||
<h3 class="box_h3 mb10">头像设置</h3>
|
|
||||||
<div class="uppicBox">
|
|
||||||
<input type="button" class="uppic_btn" onclick="$('#upload_user_image').click();" value="浏览.."/>
|
|
||||||
<%= file_field_tag 'avatar[image]',
|
|
||||||
:id => "upload_user_image",
|
|
||||||
:style => 'display:none;',#added by young
|
|
||||||
:size => "1",
|
|
||||||
:multiple => false,
|
|
||||||
:onchange => 'addInputAvatar(this);',
|
|
||||||
:data => {
|
|
||||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
|
||||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
|
||||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
|
||||||
:file_type => Redmine::Configuration['pic_types'].to_s,
|
|
||||||
:type_support_message => l(:error_pic_type),
|
|
||||||
:upload_path => upload_avatar_path(:format => 'js'),
|
|
||||||
:description_placeholder => nil ,# l(:label_optional_description)
|
|
||||||
:source_type => @user.class.to_s,
|
|
||||||
:source_id => @user.id.to_s
|
|
||||||
} %>
|
|
||||||
<!--<br/>-->
|
|
||||||
<!--<span>只支持jpg,png,gif,大小不超过5M</span>-->
|
|
||||||
</div>
|
|
||||||
<div class="showpicBox">
|
|
||||||
<p>预览</p>
|
|
||||||
<%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
|
|
||||||
<br/>
|
|
||||||
<span >96px*96px</span> <br />
|
|
||||||
<div class="mb20"></div>
|
|
||||||
<%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
|
|
||||||
<br />
|
|
||||||
<span>48px*48px</span> <br />
|
|
||||||
</div>
|
|
||||||
<div class="cl mb10"></div>
|
|
||||||
<a href="javascript:hideModal();" class=" fr grey_btn mr15 f14"> 取 消</a>
|
|
||||||
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar') %>" data-remote="true" class="blue_btn fr mr10 f14">确 定</a>
|
|
||||||
</div><!--talknew end-->
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--floatbox end-->
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function(){
|
$(function(){
|
||||||
$('#user_hide_course').hide();
|
|
||||||
$('#user_hide_project').hide();
|
$('#user_hide_project').hide();
|
||||||
autoUrl("user_brief_introduction_show");
|
autoUrl("user_brief_introduction_show");
|
||||||
if(<%= @is_course == 1 %>) {
|
if(<%= @is_course == 1 %>) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$("img[nhname='avatar_image']").attr('src',$("#nh_user_tx").attr('src'));
|
$("img[nhname='avatar_image']").attr('src',$("#nh_source_tx").attr('src'));
|
||||||
$('#ajax-modal').html($("#nh_tx_dialog_html").html());
|
$('#ajax-modal').html($("#nh_tx_dialog_html").html());
|
||||||
showModal('ajax-modal','460px');
|
showModal('ajax-modal','460px');
|
||||||
$('#ajax-modal').siblings().hide();
|
$('#ajax-modal').siblings().hide();
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
$("#nh_user_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_tx',:style=>"width:78px;height:78px;overflow:hidden",:alt=>"头像") %>');
|
<% if @user %>
|
||||||
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_source_tx',:style=>"width:78px;height:78px;overflow:hidden",:alt=>"头像") %>');
|
||||||
$("#nh_user_logo").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_logo',:width =>"40",:height => "40",:alt=>"头像") %>');
|
$("#nh_user_logo").replaceWith('<%= image_tag(url_to_avatar(@user), :id=>'nh_user_logo',:width =>"40",:height => "40",:alt=>"头像") %>');
|
||||||
|
<% elsif @course %>
|
||||||
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@course), :id=>'nh_source_tx',:style=>"width:96px;height:96px;overflow:hidden",:alt=>"班级logo") %>');
|
||||||
|
if($("#course_avatar_form").length > 0) {
|
||||||
|
window.location.href = "<%=settings_course_path(@course) %>";
|
||||||
|
}
|
||||||
|
<% elsif @project %>
|
||||||
|
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:60px;height:60px;overflow:hidden",:alt=>"项目logo") %>');
|
||||||
|
if($("#project_avatar_form").length > 0) {
|
||||||
|
window.location.href = "<%=settings_project_path(@project) %>";
|
||||||
|
}<% end %>
|
||||||
hideModal();
|
hideModal();
|
|
@ -12,7 +12,7 @@
|
||||||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
TO
|
TO
|
||||||
<%= link_to activity.course.name.to_s+" | 班级问答区", course_boards_url_in_org(activity.course.id), :class => "newsBlue ml15 mr5"%>
|
<%= link_to activity.course.name.to_s+" | 班级讨论区", course_boards_url_in_org(activity.course.id), :class => "newsBlue ml15 mr5"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle hidden m_w530 fl">
|
<div class="homepagePostTitle hidden m_w530 fl">
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<%= error_messages_for 'project' %>
|
<%= error_messages_for 'project' %>
|
||||||
<%= labelled_form_for @project do |f| %>
|
<%= labelled_form_for @project do |f| %>
|
||||||
<ul class="newpro_box ">
|
<ul class="newpro_box ">
|
||||||
<li class="ml45 mb10">
|
<li class="ml45 mb10" id="project_avatar_form">
|
||||||
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
|
<%= render :partial=>"avatar/new_avatar_form",:locals=> {source:@project} %>
|
||||||
<div class="cl"></div>
|
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
<label class="label02"><span class="c_red">*</span> 项目名称 :</label>
|
<label class="label02"><span class="c_red">*</span> 项目名称 :</label>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<span title ="该项目是私有的"><%=work.project.name %></span>
|
<span title ="该项目是私有的"><%=work.project.name %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
<%#= link_to( work.project.name, project_path(work.project.id), :class => "linkBlue" )%>
|
||||||
<span class="ml5">(综合评分:<font class="c_red"><%=work.project.project_score.score.to_i %></font>)</span>
|
<span class="ml5">(综合评分:<font class="c_red"><%=static_project_score(work.project.project_score).to_i %></font>)</span>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<% member = Member.where("user_id = #{@user.id} and course_id = #{course.id}").first %>
|
||||||
|
<% if User.current == @user %>
|
||||||
|
<% if member %>
|
||||||
|
<%= link_to "", cancel_or_collect_user_path(@user, :course => course.id), :class => "#{member.is_collect == 1 ? 'icons_sy_favorite' : 'icons_sy_star'}",:target => '_blank', :remote => true, :title => "#{member.is_collect == 1 ? '点击将其从个人主页的班级列表中移除' : '点击将其添加至个人主页的班级列表中'}" %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if member %>
|
||||||
|
<span class="<%= member.is_collect == 1 ? 'icons_sy_favorite' : 'icons_sy_star'%>"></span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<% member = Member.where("user_id = #{@user.id} and project_id = #{project.id}").first %>
|
||||||
|
<% if User.current == @user %>
|
||||||
|
<% if member %>
|
||||||
|
<%= link_to "", cancel_or_collect_user_path(@user, :project => project.id), :class => "#{member.is_collect == 1 ? 'icons_project_favorite mt3' : 'icons_project_star mt3'}",:target => '_blank', :remote => true, :title => "#{member.is_collect == 1 ? '点击将其从个人主页的班级列表中移除' : '点击将其添加至个人主页的班级列表中'}" %>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<% if member %>
|
||||||
|
<span class="<%= member.is_collect == 1 ? 'icons_project_favorite mt3' : 'icons_project_star mt3'%>"></span>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -1,7 +1,7 @@
|
||||||
<div class = "cl"> </div>
|
<div class = "cl"> </div>
|
||||||
<div id="course-boardlist">
|
<div id="course-boardlist">
|
||||||
<div class="listbox mt10" >
|
<div class="listbox mt10" >
|
||||||
<h2 class="list-h2">问答区列表</h2>
|
<h2 class="list-h2">讨论区列表</h2>
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<span class="grayTxt ">排序:</span>
|
<span class="grayTxt ">排序:</span>
|
||||||
<%= link_to "时间", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
<%= link_to "时间", {:controller => 'boards', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="homepagePostTo break_word">
|
<div class="homepagePostTo break_word">
|
||||||
<%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
<%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||||
TO
|
TO
|
||||||
<%= link_to activity.course.name.to_s+" | 班级问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
|
<%= link_to activity.course.name.to_s+" | 班级讨论区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle hidden m_w530 fl">
|
<div class="homepagePostTitle hidden m_w530 fl">
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
|
|
|
@ -1,30 +1,44 @@
|
||||||
<% unless courses.nil? %>
|
<% unless courses.nil? %>
|
||||||
<% courses.each_with_index do |course, i| %>
|
<% courses.each_with_index do |course, i| %>
|
||||||
<li class="syllabus_class_list <%=i > 2 ? 'none' : '' %>">
|
<li class="syllabus_class_list <%= i > 2 ? 'none' : '' %>">
|
||||||
<% allow_visit = User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1 %>
|
<% allow_visit = User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1 %>
|
||||||
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问"%>">
|
<span id="collect_course_icon_<%=course.id %>">
|
||||||
<span class="icons_sy_cir "></span>
|
<%=render :partial => 'collect_course', :locals => {:course => course} %>
|
||||||
<div class="fl">
|
</span>
|
||||||
<div class="syllabus_class_w ">
|
|
||||||
<p class="syllabus_class_title fl"><%=course.name %></p>
|
<div class="fl">
|
||||||
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl"></span>
|
<div class="syllabus_class_w ">
|
||||||
<span class="fr sy_p_grey hidden" style="max-width: 120px;">主讲老师:<%=course.teacher.show_name %></span>
|
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" class="syllabus_class_title fl" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= course.name %></a>
|
||||||
<div class="cl"></div>
|
<span class="<%= course.is_public == 0 ? 'syllabus_class_private' : 'syllabus_class_open' %> fl ml10 mt3 syllabus_class_property"><%= course.is_public == 0 ? '私有' : '公开' %></span>
|
||||||
</div>
|
<span class="fr sy_p_grey hidden" style="max-width: 120px;">主讲老师:<%= link_to course.teacher.show_name, user_path(course.teacher) %></span>
|
||||||
<div class="">
|
|
||||||
<p class="fl grayTxt ">更新:<%=format_date Time.at(course.updatetime) %><span class="mr10"></span>学期:<%=current_time_and_term(course) %></p>
|
<div class="cl"></div>
|
||||||
<p class="list-info fr grayTxt"><span><%=studentCount course %></span><span>学生</span><span>|</span><span><%=visable_course_homework course %></span><span>作业</span><span>|</span><span><%=visable_attachemnts_incourse(course).count %></span><span>资源</span></p>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<span class="icons_sy_arrow fl mt19 ml10" ></span>
|
<div class="">
|
||||||
<div class="cl"></div>
|
<p class="fl grayTxt ">更新:<%= format_date Time.at(course.updatetime) %><span class="mr10"></span>
|
||||||
</a>
|
学期:<%= current_time_and_term(course) %></p>
|
||||||
|
|
||||||
|
<p class="list-info fr grayTxt">
|
||||||
|
<% student_link = (User.current.logged? && course.open_student == 1 && course.is_public == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
||||||
|
<span><a href="<%= student_link ? course_member_path(course, :role => 2) : "javascript:void(0)" %>" target="_blank" title="<%= student_link ? "" : "学生列表不对外公开" %>"><%= studentCount course %></a></span><span>学生</span>
|
||||||
|
<span>|</span>
|
||||||
|
<span><a href="<%= allow_visit ? homework_common_index_path(:course => course.id) : "javascript:void(0)" %>" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= visable_course_homework course %></a></span><span>作业</span>
|
||||||
|
<span>|</span>
|
||||||
|
<span><a href="<%= allow_visit ? course_files_path(course) : "javascript:void(0)" %>" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= visable_attachemnts_incourse(course).count %></a></span><span>资源</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="icons_sy_arrow fl mt19 ml10"></span>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if courses.count > 3 %>
|
<% if courses.count > 3 %>
|
||||||
<li class="syllabus_class_list_more" id="syllabus_class_list_more_<%=syllabus.id %>">
|
<li class="syllabus_class_list_more" id="syllabus_class_list_more_<%= syllabus.id %>">
|
||||||
<a href="javascript:void(0);" id="expand_list_<%=syllabus.id %>" data-init="0" onclick="expand_course_list(<%=syllabus.id %>,'#syllabus_course_ul_<%=syllabus.id %> li','#expand_list_<%=syllabus.id %>',<%=courses.count %>)">共<%=courses.count %>个班级,点击全部展开</a>
|
<a href="javascript:void(0);" id="expand_list_<%= syllabus.id %>" data-init="0" onclick="expand_course_list(<%=syllabus.id %>,'#syllabus_course_ul_<%=syllabus.id %> li','#expand_list_<%=syllabus.id %>',<%=courses.count %>)">共<%= courses.count %>
|
||||||
|
个班级,点击全部展开</a>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -32,10 +32,12 @@
|
||||||
<% projects.each_with_index do |project, i| %>
|
<% projects.each_with_index do |project, i| %>
|
||||||
<div class="syllabus_courses_list <%= i > 4 ? 'none' : ''%>" style="cursor: default;">
|
<div class="syllabus_courses_list <%= i > 4 ? 'none' : ''%>" style="cursor: default;">
|
||||||
<div class="sy_courses_open">
|
<div class="sy_courses_open">
|
||||||
<span class="icons_project_list fl mt5 mr10"></span>
|
<span id="collect_project_icon_<%=project.id %>">
|
||||||
|
<%=render :partial => 'collect_project', :locals => {:project => project} %>
|
||||||
|
</span>
|
||||||
<h3><%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%></h3>
|
<h3><%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%></h3>
|
||||||
<% unless project.is_public? %>
|
<% unless project.is_public? %>
|
||||||
<span class="hw_icon_private fl"></span>
|
<span class="syllabus_class_private fl ml10 mt3 syllabus_class_property">私有</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% projectUser = User.where("id=?",project.user_id).first %>
|
<% projectUser = User.where("id=?",project.user_id).first %>
|
||||||
<%=link_to "<span class='fr grayTxt'>创建者:#{projectUser.try(:realname) != " " ? projectUser.lastname + projectUser.firstname : projectUser.try(:login)}</span>".html_safe, user_path(projectUser) %>
|
<%=link_to "<span class='fr grayTxt'>创建者:#{projectUser.try(:realname) != " " ? projectUser.lastname + projectUser.firstname : projectUser.try(:login)}</span>".html_safe, user_path(projectUser) %>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<% if @course %>
|
||||||
|
$("#homepage_left_course_list").html("<%= escape_javascript(render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => @courses}) %>");
|
||||||
|
if($("#collect_course_icon_<%=@course.id %>").length > 0){
|
||||||
|
$("#collect_course_icon_<%=@course.id %>").html("<%= escape_javascript(render :partial => 'users/collect_course', :locals => {:course => @course}) %>");
|
||||||
|
}
|
||||||
|
<% elsif @project %>
|
||||||
|
$("#homepage_left_project_list").html("<%= escape_javascript(render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => @projects}) %>");
|
||||||
|
if($("#collect_project_icon_<%=@project.id %>").length > 0){
|
||||||
|
$("#collect_project_icon_<%=@project.id %>").html("<%= escape_javascript(render :partial => 'users/collect_project', :locals => {:project => @project}) %>");
|
||||||
|
}
|
||||||
|
<% end %>
|
|
@ -27,8 +27,9 @@
|
||||||
} else if(count > 0) {
|
} else if(count > 0) {
|
||||||
var str = div.next().children().eq(0).attr('id');
|
var str = div.next().children().eq(0).attr('id');
|
||||||
var id = str.substring(19);
|
var id = str.substring(19);
|
||||||
|
var user_id = <%= @user.id%>;
|
||||||
$.get(
|
$.get(
|
||||||
'/users/expand_courses?syllabus_id=' + id
|
'/users/'+user_id+'/expand_courses?syllabus_id=' + id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -621,7 +621,7 @@ zh:
|
||||||
label_homework_info: 提交情况 #huang
|
label_homework_info: 提交情况 #huang
|
||||||
|
|
||||||
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
|
label_course_news_description: '课程必须是高校正式开设的课程,或是围绕特定主题定期发布课程资料的公共开放课程;<br/>如果您想创建一个协作研究空间,请您前往“我的项目”页面创建项目,谢谢!'
|
||||||
label_course_board: 问答区
|
label_course_board: 讨论区
|
||||||
label_version: 版本
|
label_version: 版本
|
||||||
label_version_new: 新建版本
|
label_version_new: 新建版本
|
||||||
|
|
||||||
|
@ -1743,7 +1743,7 @@ zh:
|
||||||
label_newbie_faq: '新手指引 & 问答'
|
label_newbie_faq: '新手指引 & 问答'
|
||||||
label_hot_project: '热门项目'
|
label_hot_project: '热门项目'
|
||||||
label_borad_project: 项目讨论区
|
label_borad_project: 项目讨论区
|
||||||
label_borad_course: 班级问答区
|
label_borad_course: 班级讨论区
|
||||||
label_borad_org_subfield: 资源栏目讨论区
|
label_borad_org_subfield: 资源栏目讨论区
|
||||||
view_borad_course: 课程讨论
|
view_borad_course: 课程讨论
|
||||||
label_memo_create_succ: 发布成功
|
label_memo_create_succ: 发布成功
|
||||||
|
@ -2143,7 +2143,7 @@ zh:
|
||||||
#微信模板消息
|
#微信模板消息
|
||||||
label_new_homework_template: 您有新作业了。
|
label_new_homework_template: 您有新作业了。
|
||||||
label_update_homework_template: 您的作业已被修改。
|
label_update_homework_template: 您的作业已被修改。
|
||||||
label_course_topic_template: 课程问答区有新帖子发布了。
|
label_course_topic_template: 班级讨论区有新帖子发布了。
|
||||||
label_topic_comment_template: 您的帖子有新回复了。
|
label_topic_comment_template: 您的帖子有新回复了。
|
||||||
label_project_topic_template: 项目讨论区有新帖子发布了。
|
label_project_topic_template: 项目讨论区有新帖子发布了。
|
||||||
label_issue_comment_template: 您的缺陷有新回复了。
|
label_issue_comment_template: 您的缺陷有新回复了。
|
||||||
|
|
|
@ -567,7 +567,6 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'user_select_homework'
|
post 'user_select_homework'
|
||||||
post 'check_homework'
|
post 'check_homework'
|
||||||
get 'all_journals'
|
get 'all_journals'
|
||||||
get 'expand_courses'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
member do
|
member do
|
||||||
|
@ -667,6 +666,8 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'apply_for_resource'
|
post 'apply_for_resource'
|
||||||
match 'manage_or_receive_homeworks', :to => 'users#manage_or_receive_homeworks', :via => :get
|
match 'manage_or_receive_homeworks', :to => 'users#manage_or_receive_homeworks', :via => :get
|
||||||
get 'search_m_r_homeworks'
|
get 'search_m_r_homeworks'
|
||||||
|
get 'expand_courses'
|
||||||
|
get 'cancel_or_collect'
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
#resources :blogs
|
#resources :blogs
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddIsCollectToMembers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :members, :is_collect, :integer, :default => 1
|
||||||
|
end
|
||||||
|
end
|
433
db/schema.rb
433
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 => 20160810081337) do
|
ActiveRecord::Schema.define(:version => 20160824073554) 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
|
||||||
|
@ -52,28 +52,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
|
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
|
||||||
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
|
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
|
||||||
|
|
||||||
create_table "application_settings", :force => true do |t|
|
|
||||||
t.integer "default_projects_limit"
|
|
||||||
t.boolean "signup_enabled"
|
|
||||||
t.boolean "signin_enabled"
|
|
||||||
t.boolean "gravatar_enabled"
|
|
||||||
t.text "sign_in_text"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.string "home_page_url"
|
|
||||||
t.integer "default_branch_protection", :default => 2
|
|
||||||
t.boolean "twitter_sharing_enabled", :default => true
|
|
||||||
t.text "restricted_visibility_levels"
|
|
||||||
t.boolean "version_check_enabled", :default => true
|
|
||||||
t.integer "max_attachment_size", :default => 10, :null => false
|
|
||||||
t.integer "default_project_visibility"
|
|
||||||
t.integer "default_snippet_visibility"
|
|
||||||
t.text "restricted_signup_domains"
|
|
||||||
t.boolean "user_oauth_applications", :default => true
|
|
||||||
t.string "after_sign_out_path"
|
|
||||||
t.integer "session_expire_delay", :default => 10080, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "applied_messages", :force => true do |t|
|
create_table "applied_messages", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "applied_id"
|
t.integer "applied_id"
|
||||||
|
@ -82,17 +60,16 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "status", :default => 0
|
t.integer "status", :default => 0
|
||||||
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.string "name"
|
||||||
t.integer "applied_user_id"
|
t.integer "applied_user_id"
|
||||||
t.integer "role"
|
t.integer "role"
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "name"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "applied_projects", :force => true do |t|
|
create_table "applied_projects", :force => true do |t|
|
||||||
t.integer "project_id", :null => false
|
t.integer "project_id", :null => false
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id", :null => false
|
||||||
t.integer "role", :default => 0
|
t.integer "role", :default => 0
|
||||||
t.integer "applied_user_id"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "apply_add_schools", :force => true do |t|
|
create_table "apply_add_schools", :force => true do |t|
|
||||||
|
@ -207,20 +184,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.string "typeName", :limit => 50
|
t.string "typeName", :limit => 50
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "audit_events", :force => true do |t|
|
|
||||||
t.integer "author_id", :null => false
|
|
||||||
t.string "type", :null => false
|
|
||||||
t.integer "entity_id", :null => false
|
|
||||||
t.string "entity_type", :null => false
|
|
||||||
t.text "details"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id"
|
|
||||||
add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type"
|
|
||||||
add_index "audit_events", ["type"], :name => "index_audit_events_on_type"
|
|
||||||
|
|
||||||
create_table "auth_sources", :force => true do |t|
|
create_table "auth_sources", :force => true do |t|
|
||||||
t.string "type", :limit => 30, :default => "", :null => false
|
t.string "type", :limit => 30, :default => "", :null => false
|
||||||
t.string "name", :limit => 60, :default => "", :null => false
|
t.string "name", :limit => 60, :default => "", :null => false
|
||||||
|
@ -318,17 +281,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
|
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
|
||||||
add_index "boards", ["project_id"], :name => "boards_project_id"
|
add_index "boards", ["project_id"], :name => "boards_project_id"
|
||||||
|
|
||||||
create_table "broadcast_messages", :force => true do |t|
|
|
||||||
t.text "message", :null => false
|
|
||||||
t.datetime "starts_at"
|
|
||||||
t.datetime "ends_at"
|
|
||||||
t.integer "alert_type"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.string "color"
|
|
||||||
t.string "font"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "bug_to_osps", :force => true do |t|
|
create_table "bug_to_osps", :force => true do |t|
|
||||||
t.integer "osp_id"
|
t.integer "osp_id"
|
||||||
t.integer "relative_memo_id"
|
t.integer "relative_memo_id"
|
||||||
|
@ -358,16 +310,14 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids"
|
add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids"
|
||||||
|
|
||||||
create_table "changesets", :force => true do |t|
|
create_table "changesets", :force => true do |t|
|
||||||
t.integer "repository_id", :null => false
|
t.integer "repository_id", :null => false
|
||||||
t.string "revision", :null => false
|
t.string "revision", :null => false
|
||||||
t.string "committer"
|
t.string "committer"
|
||||||
t.datetime "committed_on", :null => false
|
t.datetime "committed_on", :null => false
|
||||||
t.text "comments"
|
t.text "comments"
|
||||||
t.date "commit_date"
|
t.date "commit_date"
|
||||||
t.string "scmid"
|
t.string "scmid"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "project_id"
|
|
||||||
t.integer "type", :default => 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
|
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
|
||||||
|
@ -647,11 +597,8 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.string "qrcode"
|
t.string "qrcode"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "courses", ["id"], :name => "id", :unique => true
|
|
||||||
add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true
|
add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true
|
||||||
add_index "courses", ["syllabus_id"], :name => "index_courses_on_syllabus_id"
|
add_index "courses", ["syllabus_id"], :name => "index_courses_on_syllabus_id"
|
||||||
add_index "courses", ["tea_id"], :name => "tea_id"
|
|
||||||
add_index "courses", ["visits"], :name => "visits"
|
|
||||||
|
|
||||||
create_table "custom_fields", :force => true do |t|
|
create_table "custom_fields", :force => true do |t|
|
||||||
t.string "type", :limit => 30, :default => "", :null => false
|
t.string "type", :limit => 30, :default => "", :null => false
|
||||||
|
@ -714,15 +661,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
create_table "deploy_keys_projects", :force => true do |t|
|
|
||||||
t.integer "deploy_key_id", :null => false
|
|
||||||
t.integer "project_id", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id"
|
|
||||||
|
|
||||||
create_table "discuss_demos", :force => true do |t|
|
create_table "discuss_demos", :force => true do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "body"
|
t.text "body"
|
||||||
|
@ -772,16 +710,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "emails", :force => true do |t|
|
|
||||||
t.integer "user_id", :null => false
|
|
||||||
t.string "email", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true
|
|
||||||
add_index "emails", ["user_id"], :name => "index_emails_on_user_id"
|
|
||||||
|
|
||||||
create_table "enabled_modules", :force => true do |t|
|
create_table "enabled_modules", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
|
@ -804,25 +732,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
|
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
|
||||||
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
|
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
|
||||||
|
|
||||||
create_table "events", :force => true do |t|
|
|
||||||
t.string "target_type"
|
|
||||||
t.integer "target_id"
|
|
||||||
t.string "title"
|
|
||||||
t.text "data"
|
|
||||||
t.integer "project_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.integer "action"
|
|
||||||
t.integer "author_id"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "events", ["action"], :name => "index_events_on_action"
|
|
||||||
add_index "events", ["author_id"], :name => "index_events_on_author_id"
|
|
||||||
add_index "events", ["created_at"], :name => "index_events_on_created_at"
|
|
||||||
add_index "events", ["project_id"], :name => "index_events_on_project_id"
|
|
||||||
add_index "events", ["target_id"], :name => "index_events_on_target_id"
|
|
||||||
add_index "events", ["target_type"], :name => "index_events_on_target_type"
|
|
||||||
|
|
||||||
create_table "exercise_answers", :force => true do |t|
|
create_table "exercise_answers", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "exercise_question_id"
|
t.integer "exercise_question_id"
|
||||||
|
@ -925,15 +834,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type"
|
add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type"
|
||||||
add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at"
|
add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at"
|
||||||
|
|
||||||
create_table "forked_project_links", :force => true do |t|
|
|
||||||
t.integer "forked_to_project_id", :null => false
|
|
||||||
t.integer "forked_from_project_id", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true
|
|
||||||
|
|
||||||
create_table "forums", :force => true do |t|
|
create_table "forums", :force => true do |t|
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -1063,17 +963,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "identities", :force => true do |t|
|
|
||||||
t.string "extern_uid"
|
|
||||||
t.string "provider"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id"
|
|
||||||
add_index "identities", ["user_id"], :name => "index_identities_on_user_id"
|
|
||||||
|
|
||||||
create_table "invite_lists", :force => true do |t|
|
create_table "invite_lists", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -1220,20 +1109,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "private", :default => 0
|
t.integer "private", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "keys", :force => true do |t|
|
|
||||||
t.integer "user_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.text "key"
|
|
||||||
t.string "title"
|
|
||||||
t.string "type"
|
|
||||||
t.string "fingerprint"
|
|
||||||
t.boolean "public", :default => false, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id"
|
|
||||||
add_index "keys", ["user_id"], :name => "index_keys_on_user_id"
|
|
||||||
|
|
||||||
create_table "kindeditor_assets", :force => true do |t|
|
create_table "kindeditor_assets", :force => true do |t|
|
||||||
t.string "asset"
|
t.string "asset"
|
||||||
t.integer "file_size"
|
t.integer "file_size"
|
||||||
|
@ -1245,27 +1120,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "owner_type", :default => 0
|
t.integer "owner_type", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "label_links", :force => true do |t|
|
|
||||||
t.integer "label_id"
|
|
||||||
t.integer "target_id"
|
|
||||||
t.string "target_type"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id"
|
|
||||||
add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type"
|
|
||||||
|
|
||||||
create_table "labels", :force => true do |t|
|
|
||||||
t.string "title"
|
|
||||||
t.string "color"
|
|
||||||
t.integer "project_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "labels", ["project_id"], :name => "index_labels_on_project_id"
|
|
||||||
|
|
||||||
create_table "member_roles", :force => true do |t|
|
create_table "member_roles", :force => true do |t|
|
||||||
t.integer "member_id", :null => false
|
t.integer "member_id", :null => false
|
||||||
t.integer "role_id", :null => false
|
t.integer "role_id", :null => false
|
||||||
|
@ -1283,6 +1137,7 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.boolean "mail_notification", :default => false, :null => false
|
t.boolean "mail_notification", :default => false, :null => false
|
||||||
t.integer "course_id", :default => -1
|
t.integer "course_id", :default => -1
|
||||||
t.integer "course_group_id", :default => 0
|
t.integer "course_group_id", :default => 0
|
||||||
|
t.integer "is_collect", :default => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "members", ["project_id"], :name => "index_members_on_project_id"
|
add_index "members", ["project_id"], :name => "index_members_on_project_id"
|
||||||
|
@ -1317,47 +1172,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "viewed_count", :default => 0
|
t.integer "viewed_count", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "merge_request_diffs", :force => true do |t|
|
|
||||||
t.string "state"
|
|
||||||
t.text "st_commits", :limit => 2147483647
|
|
||||||
t.text "st_diffs", :limit => 2147483647
|
|
||||||
t.integer "merge_request_id", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true
|
|
||||||
|
|
||||||
create_table "merge_requests", :force => true do |t|
|
|
||||||
t.string "target_branch", :null => false
|
|
||||||
t.string "source_branch", :null => false
|
|
||||||
t.integer "source_project_id", :null => false
|
|
||||||
t.integer "author_id"
|
|
||||||
t.integer "assignee_id"
|
|
||||||
t.string "title"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.integer "milestone_id"
|
|
||||||
t.string "state"
|
|
||||||
t.string "merge_status"
|
|
||||||
t.integer "target_project_id", :null => false
|
|
||||||
t.integer "iid"
|
|
||||||
t.text "description"
|
|
||||||
t.integer "position", :default => 0
|
|
||||||
t.datetime "locked_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id"
|
|
||||||
add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id"
|
|
||||||
add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id"
|
|
||||||
add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at"
|
|
||||||
add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id"
|
|
||||||
add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch"
|
|
||||||
add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id"
|
|
||||||
add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch"
|
|
||||||
add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true
|
|
||||||
add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title"
|
|
||||||
|
|
||||||
create_table "message_alls", :force => true do |t|
|
create_table "message_alls", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "message_id"
|
t.integer "message_id"
|
||||||
|
@ -1392,39 +1206,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
|
add_index "messages", ["last_reply_id"], :name => "index_messages_on_last_reply_id"
|
||||||
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
||||||
|
|
||||||
create_table "milestones", :force => true do |t|
|
|
||||||
t.string "title", :null => false
|
|
||||||
t.integer "project_id", :null => false
|
|
||||||
t.text "description"
|
|
||||||
t.date "due_date"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.string "state"
|
|
||||||
t.integer "iid"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id"
|
|
||||||
add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date"
|
|
||||||
add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true
|
|
||||||
add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id"
|
|
||||||
|
|
||||||
create_table "namespaces", :force => true do |t|
|
|
||||||
t.string "name", :null => false
|
|
||||||
t.string "path", :null => false
|
|
||||||
t.integer "owner_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.string "type"
|
|
||||||
t.string "description", :default => "", :null => false
|
|
||||||
t.string "avatar"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id"
|
|
||||||
add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true
|
|
||||||
add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id"
|
|
||||||
add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true
|
|
||||||
add_index "namespaces", ["type"], :name => "index_namespaces_on_type"
|
|
||||||
|
|
||||||
create_table "news", :force => true do |t|
|
create_table "news", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "title", :limit => 60, :default => "", :null => false
|
t.string "title", :limit => 60, :default => "", :null => false
|
||||||
|
@ -1450,31 +1231,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "notes", :force => true do |t|
|
|
||||||
t.text "note"
|
|
||||||
t.string "noteable_type"
|
|
||||||
t.integer "author_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.integer "project_id"
|
|
||||||
t.string "attachment"
|
|
||||||
t.string "line_code"
|
|
||||||
t.string "commit_id"
|
|
||||||
t.integer "noteable_id"
|
|
||||||
t.boolean "system", :default => false, :null => false
|
|
||||||
t.text "st_diff", :limit => 2147483647
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "notes", ["author_id"], :name => "index_notes_on_author_id"
|
|
||||||
add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id"
|
|
||||||
add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id"
|
|
||||||
add_index "notes", ["created_at"], :name => "index_notes_on_created_at"
|
|
||||||
add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type"
|
|
||||||
add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type"
|
|
||||||
add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type"
|
|
||||||
add_index "notes", ["project_id"], :name => "index_notes_on_project_id"
|
|
||||||
add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at"
|
|
||||||
|
|
||||||
create_table "notificationcomments", :force => true do |t|
|
create_table "notificationcomments", :force => true do |t|
|
||||||
t.string "notificationcommented_type"
|
t.string "notificationcommented_type"
|
||||||
t.integer "notificationcommented_id"
|
t.integer "notificationcommented_id"
|
||||||
|
@ -1484,49 +1240,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "oauth_access_grants", :force => true do |t|
|
|
||||||
t.integer "resource_owner_id", :null => false
|
|
||||||
t.integer "application_id", :null => false
|
|
||||||
t.string "token", :null => false
|
|
||||||
t.integer "expires_in", :null => false
|
|
||||||
t.text "redirect_uri", :null => false
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "revoked_at"
|
|
||||||
t.string "scopes"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true
|
|
||||||
|
|
||||||
create_table "oauth_access_tokens", :force => true do |t|
|
|
||||||
t.integer "resource_owner_id"
|
|
||||||
t.integer "application_id"
|
|
||||||
t.string "token", :null => false
|
|
||||||
t.string "refresh_token"
|
|
||||||
t.integer "expires_in"
|
|
||||||
t.datetime "revoked_at"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.string "scopes"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true
|
|
||||||
add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id"
|
|
||||||
add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true
|
|
||||||
|
|
||||||
create_table "oauth_applications", :force => true do |t|
|
|
||||||
t.string "name", :null => false
|
|
||||||
t.string "uid", :null => false
|
|
||||||
t.string "secret", :null => false
|
|
||||||
t.text "redirect_uri", :null => false
|
|
||||||
t.string "scopes", :default => "", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.integer "owner_id"
|
|
||||||
t.string "owner_type"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type"
|
|
||||||
add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true
|
|
||||||
|
|
||||||
create_table "onclick_times", :force => true do |t|
|
create_table "onclick_times", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "onclick_time"
|
t.datetime "onclick_time"
|
||||||
|
@ -1684,23 +1397,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "allow_teacher", :default => 0
|
t.integer "allow_teacher", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "permissions", :force => true do |t|
|
|
||||||
t.string "controller", :limit => 30, :default => "", :null => false
|
|
||||||
t.string "action", :limit => 30, :default => "", :null => false
|
|
||||||
t.string "description", :limit => 60, :default => "", :null => false
|
|
||||||
t.boolean "is_public", :default => false, :null => false
|
|
||||||
t.integer "sort", :default => 0, :null => false
|
|
||||||
t.boolean "mail_option", :default => false, :null => false
|
|
||||||
t.boolean "mail_enabled", :default => false, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "permissions_roles", :id => false, :force => true do |t|
|
|
||||||
t.integer "permission_id", :default => 0, :null => false
|
|
||||||
t.integer "role_id", :default => 0, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
|
|
||||||
|
|
||||||
create_table "phone_app_versions", :force => true do |t|
|
create_table "phone_app_versions", :force => true do |t|
|
||||||
t.string "version"
|
t.string "version"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -1783,11 +1479,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "project_import_data", :force => true do |t|
|
|
||||||
t.integer "project_id"
|
|
||||||
t.text "data"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "project_infos", :force => true do |t|
|
create_table "project_infos", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -1880,16 +1571,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
|
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
|
||||||
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
|
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
|
||||||
|
|
||||||
create_table "protected_branches", :force => true do |t|
|
|
||||||
t.integer "project_id", :null => false
|
|
||||||
t.string "name", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.boolean "developers_can_push", :default => false, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id"
|
|
||||||
|
|
||||||
create_table "pull_requests", :force => true do |t|
|
create_table "pull_requests", :force => true do |t|
|
||||||
t.integer "pull_request_id"
|
t.integer "pull_request_id"
|
||||||
t.integer "gpid"
|
t.integer "gpid"
|
||||||
|
@ -2046,25 +1727,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "is_teacher_score", :default => 0
|
t.integer "is_teacher_score", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "services", :force => true do |t|
|
|
||||||
t.string "type"
|
|
||||||
t.string "title"
|
|
||||||
t.integer "project_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.boolean "active", :default => false, :null => false
|
|
||||||
t.text "properties"
|
|
||||||
t.boolean "template", :default => false
|
|
||||||
t.boolean "push_events", :default => true
|
|
||||||
t.boolean "issues_events", :default => true
|
|
||||||
t.boolean "merge_requests_events", :default => true
|
|
||||||
t.boolean "tag_push_events", :default => true
|
|
||||||
t.boolean "note_events", :default => true, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id"
|
|
||||||
add_index "services", ["project_id"], :name => "index_services_on_project_id"
|
|
||||||
|
|
||||||
create_table "settings", :force => true do |t|
|
create_table "settings", :force => true do |t|
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
t.text "value"
|
t.text "value"
|
||||||
|
@ -2103,26 +1765,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "snippets", :force => true do |t|
|
|
||||||
t.string "title"
|
|
||||||
t.text "content", :limit => 2147483647
|
|
||||||
t.integer "author_id", :null => false
|
|
||||||
t.integer "project_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.string "file_name"
|
|
||||||
t.datetime "expires_at"
|
|
||||||
t.string "type"
|
|
||||||
t.integer "visibility_level", :default => 0, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id"
|
|
||||||
add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id"
|
|
||||||
add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at"
|
|
||||||
add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at"
|
|
||||||
add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id"
|
|
||||||
add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level"
|
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -2203,10 +1845,11 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.integer "absence_penalty", :default => 0
|
t.integer "absence_penalty", :default => 0
|
||||||
t.float "system_score", :default => 0.0
|
t.float "system_score", :default => 0.0
|
||||||
t.boolean "is_test", :default => false
|
t.boolean "is_test", :default => false
|
||||||
t.float "work_score"
|
|
||||||
t.integer "simi_id"
|
t.integer "simi_id"
|
||||||
t.integer "simi_value"
|
t.integer "simi_value"
|
||||||
|
t.float "work_score"
|
||||||
t.integer "work_status", :default => 0
|
t.integer "work_status", :default => 0
|
||||||
|
t.datetime "commit_time"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
||||||
|
@ -2254,13 +1897,13 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
|
|
||||||
create_table "sub_domains", :force => true do |t|
|
create_table "sub_domains", :force => true do |t|
|
||||||
t.integer "org_subfield_id"
|
t.integer "org_subfield_id"
|
||||||
t.integer "priority"
|
t.integer "priority", :default => 0
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "field_type"
|
t.string "field_type"
|
||||||
t.integer "hide"
|
t.integer "hide", :default => 0
|
||||||
t.integer "status"
|
t.integer "status", :default => 0
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "subfield_subdomain_dirs", :force => true do |t|
|
create_table "subfield_subdomain_dirs", :force => true do |t|
|
||||||
|
@ -2270,17 +1913,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "subscriptions", :force => true do |t|
|
|
||||||
t.integer "user_id"
|
|
||||||
t.integer "subscribable_id"
|
|
||||||
t.string "subscribable_type"
|
|
||||||
t.boolean "subscribed"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true
|
|
||||||
|
|
||||||
create_table "syllabuses", :force => true do |t|
|
create_table "syllabuses", :force => true do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -2510,8 +2142,9 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.string "remark"
|
t.string "remark"
|
||||||
t.integer "groupid"
|
t.integer "groupid"
|
||||||
t.integer "user_id"
|
t.integer "user_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 "bindtype", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
|
@ -2541,17 +2174,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
|
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
|
||||||
add_index "users", ["type"], :name => "index_users_on_type"
|
add_index "users", ["type"], :name => "index_users_on_type"
|
||||||
|
|
||||||
create_table "users_star_projects", :force => true do |t|
|
|
||||||
t.integer "project_id", :null => false
|
|
||||||
t.integer "user_id", :null => false
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id"
|
|
||||||
add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true
|
|
||||||
add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id"
|
|
||||||
|
|
||||||
create_table "versions", :force => true do |t|
|
create_table "versions", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
|
@ -2603,23 +2225,6 @@ ActiveRecord::Schema.define(:version => 20160810081337) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "web_hooks", :force => true do |t|
|
|
||||||
t.string "url"
|
|
||||||
t.integer "project_id"
|
|
||||||
t.datetime "created_at"
|
|
||||||
t.datetime "updated_at"
|
|
||||||
t.string "type", :default => "ProjectHook"
|
|
||||||
t.integer "service_id"
|
|
||||||
t.boolean "push_events", :default => true, :null => false
|
|
||||||
t.boolean "issues_events", :default => false, :null => false
|
|
||||||
t.boolean "merge_requests_events", :default => false, :null => false
|
|
||||||
t.boolean "tag_push_events", :default => false
|
|
||||||
t.boolean "note_events", :default => false, :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id"
|
|
||||||
add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id"
|
|
||||||
|
|
||||||
create_table "wechat_logs", :force => true do |t|
|
create_table "wechat_logs", :force => true do |t|
|
||||||
t.string "openid", :null => false
|
t.string "openid", :null => false
|
||||||
t.text "request_raw"
|
t.text "request_raw"
|
||||||
|
|
|
@ -8,6 +8,22 @@ namespace :homework_publishtime do
|
||||||
homework_detail_manual = homework.homework_detail_manual
|
homework_detail_manual = homework.homework_detail_manual
|
||||||
if homework_detail_manual.comment_status == 0
|
if homework_detail_manual.comment_status == 0
|
||||||
homework_detail_manual.update_column('comment_status', 1)
|
homework_detail_manual.update_column('comment_status', 1)
|
||||||
|
if homework.homework_type != 3
|
||||||
|
students = homework.course.student
|
||||||
|
if !homework.course.nil? && !students.empty?
|
||||||
|
name = homework.name
|
||||||
|
name_str = name + "的作品提交"
|
||||||
|
str = ""
|
||||||
|
students.each do |student|
|
||||||
|
if str != ""
|
||||||
|
str += ","
|
||||||
|
end
|
||||||
|
str += "('#{name_str}',#{homework.id},#{student.student_id}, '#{format_time(Time.now)}', '#{format_time(Time.now)}')"
|
||||||
|
end
|
||||||
|
sql = "insert into student_works (name, homework_common_id,user_id, created_at, updated_at) values" + str
|
||||||
|
ActiveRecord::Base.connection.execute sql
|
||||||
|
end
|
||||||
|
end
|
||||||
course = homework.course
|
course = homework.course
|
||||||
course.members.each do |m|
|
course.members.each do |m|
|
||||||
homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => nil)
|
homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => nil)
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="ml40">
|
<div class="ml40">
|
||||||
<div class="post-dynamic-title c-black fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
<div class="post-dynamic-title c-black fb">{{discussion.subject}}<img ng-if="discussion.locked" src="/images/locked.png" style="display:inline-block;" /></div>
|
||||||
<div class="c-grey4 f13 mt5"><span class="mr10">{{discussion.course_project_name}} - 课程问答区</span><span>{{discussion.created_on}}</span></div>
|
<div class="c-grey4 f13 mt5"><span class="mr10">{{discussion.course_project_name}} - 班级讨论区</span><span>{{discussion.created_on}}</span></div>
|
||||||
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
<div class="f13 c-black mt5 text-control post-all-content" ng-bind-html="discussion.content|safeHtml"></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="fr f13">
|
<div class="fr f13">
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
|
@ -2099,3 +2099,15 @@ function throttle_me(method, context, e, condition, url){
|
||||||
},500);
|
},500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//头像、logo编辑图标显隐
|
||||||
|
function edit_img(){
|
||||||
|
$(".homepageEditProfile").parent().mouseover(function(){
|
||||||
|
$(".homepageEditProfile").show();
|
||||||
|
});
|
||||||
|
$(".homepageEditProfile").parent().mouseout(function(){
|
||||||
|
$(".homepageEditProfile").hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(edit_img);
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
ajaxUpload.uploading++;
|
ajaxUpload.uploading++;
|
||||||
|
|
||||||
uploadBlob(file, $(inputEl).data('upload-path'),$(inputEl).data('source-type'), $(inputEl).data('source-id'),{
|
uploadBlob(file, $(inputEl).data('upload-path'),$(inputEl).data('source-type'), $(inputEl).data('source-id'),$(inputEl).data('is-direct'),{
|
||||||
loadstartEventHandler: onLoadstart.bind(progressSpan),
|
loadstartEventHandler: onLoadstart.bind(progressSpan),
|
||||||
progressEventHandler: onProgress.bind(progressSpan)
|
progressEventHandler: onProgress.bind(progressSpan)
|
||||||
})
|
})
|
||||||
|
@ -82,14 +82,14 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadBlob(blob, uploadUrl, source_type,source_id, options) {
|
function uploadBlob(blob, uploadUrl, source_type,source_id,is_direct, options) {
|
||||||
|
|
||||||
var actualOptions = $.extend({
|
var actualOptions = $.extend({
|
||||||
loadstartEventHandler: $.noop,
|
loadstartEventHandler: $.noop,
|
||||||
progressEventHandler: $.noop
|
progressEventHandler: $.noop
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
uploadUrl = uploadUrl + '?source_type=' + source_type + '&source_id=' + source_id;
|
uploadUrl = uploadUrl + '?source_type=' + source_type + '&source_id=' + source_id + '&is_direct=' + is_direct;
|
||||||
if (blob instanceof window.File) {
|
if (blob instanceof window.File) {
|
||||||
uploadUrl += '&filename=' + encodeURIComponent(blob.name);
|
uploadUrl += '&filename=' + encodeURIComponent(blob.name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -551,32 +551,7 @@ a:hover.upload_btn_grey{background:#8a8a8a;}
|
||||||
/*新版项目列表新增*/
|
/*新版项目列表新增*/
|
||||||
.new_project_title{ font-size:16px; color:#333; max-width:560px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
.new_project_title{ font-size:16px; color:#333; max-width:560px; font-weight:normal;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||||
.icons_project_list{ width:8px; height:8px; border:2px solid #fff; background:#3b94d6;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;-webkit-box-shadow: 0px 2px 5px rgba(146, 153, 169, 0.5);-moz-box-shadow: 0px 2px 5px rgba(146, 153, 169, 0.5);box-shadow: 0px 2px 5px rgba(146, 153, 169, 0.5); }
|
.icons_project_list{ width:8px; height:8px; border:2px solid #fff; background:#3b94d6;-webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;-webkit-box-shadow: 0px 2px 5px rgba(146, 153, 169, 0.5);-moz-box-shadow: 0px 2px 5px rgba(146, 153, 169, 0.5);box-shadow: 0px 2px 5px rgba(146, 153, 169, 0.5); }
|
||||||
|
.icons_project_favorite {background: url(/images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; float:left;}
|
||||||
|
.icons_project_star{background: url(/images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; float:left;}
|
||||||
.new_projectlist_more{ text-align:center;}
|
.new_projectlist_more{ text-align:center;}
|
||||||
.new_projectlist_more a:hover{ color:#3b94d6;}
|
.new_projectlist_more a:hover{ color:#3b94d6;}
|
||||||
/*新版项目引用的新版课程大纲中的公共样式*/
|
|
||||||
.icons_tishi{
|
|
||||||
width: 110px;
|
|
||||||
height: 110px;
|
|
||||||
margin: 135px auto 20px;
|
|
||||||
}
|
|
||||||
.sy_tab_con_p{
|
|
||||||
font-size: 16px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom:100px;
|
|
||||||
color:#888;
|
|
||||||
}
|
|
||||||
a.sy_btn_green{
|
|
||||||
display:inline-block;
|
|
||||||
color: #fff;
|
|
||||||
background: #60b25e;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 12px;
|
|
||||||
padding:0 15px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
-webkit-border-radius:3px;
|
|
||||||
-moz-border-radius:3px;
|
|
||||||
-o-border-radius:3px;
|
|
||||||
border-radius:3px;
|
|
||||||
}
|
|
||||||
a:hover.sy_btn_green{ background: #51a74f;}
|
|
|
@ -1419,3 +1419,30 @@ a:hover.comment_ding_link{ color:#269ac9;}
|
||||||
a.syllabusbox_a_blue{
|
a.syllabusbox_a_blue{
|
||||||
color:#3b94d6 !important;
|
color:#3b94d6 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icons_tishi{
|
||||||
|
width: 110px;
|
||||||
|
height: 110px;
|
||||||
|
margin: 135px auto 20px;
|
||||||
|
}
|
||||||
|
.sy_tab_con_p{
|
||||||
|
font-size: 16px;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom:100px;
|
||||||
|
color:#888;
|
||||||
|
}
|
||||||
|
a.sy_btn_green{
|
||||||
|
display:inline-block;
|
||||||
|
color: #fff;
|
||||||
|
background: #60b25e;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
padding:0 15px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
-moz-border-radius:3px;
|
||||||
|
-o-border-radius:3px;
|
||||||
|
border-radius:3px;
|
||||||
|
}
|
||||||
|
a:hover.sy_btn_green{ background: #51a74f;}
|
|
@ -109,21 +109,6 @@ a:hover.btn_green_big{
|
||||||
background: #60b25e;
|
background: #60b25e;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
a.sy_btn_green{
|
|
||||||
display:inline-block;
|
|
||||||
color: #fff;
|
|
||||||
background: #60b25e;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 12px;
|
|
||||||
padding:0 15px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
-webkit-border-radius:3px;
|
|
||||||
-moz-border-radius:3px;
|
|
||||||
-o-border-radius:3px;
|
|
||||||
border-radius:3px;
|
|
||||||
}
|
|
||||||
a:hover.sy_btn_green{ background: #51a74f;}
|
|
||||||
|
|
||||||
/*a.sy_btn_grey{*/
|
/*a.sy_btn_grey{*/
|
||||||
/*color: #333;*/
|
/*color: #333;*/
|
||||||
|
|
|
@ -80,6 +80,8 @@ input.syllabus_input_min{
|
||||||
.icons_sy_setting{background: url(../images/syllabus/icons_syllabus.png) -51px -33px no-repeat; width:20px; height:20px; display:block; position:absolute; right:10px; top:10px; }
|
.icons_sy_setting{background: url(../images/syllabus/icons_syllabus.png) -51px -33px no-repeat; width:20px; height:20px; display:block; position:absolute; right:10px; top:10px; }
|
||||||
.icons_sy_setting:hover{background: url(../images/syllabus/icons_syllabus.png) -25px -33px no-repeat; }
|
.icons_sy_setting:hover{background: url(../images/syllabus/icons_syllabus.png) -25px -33px no-repeat; }
|
||||||
.icons_sy_cir{background: url(../images/syllabus/icons_syllabus.png) 0px -82px no-repeat; width:15px; height:15px; display:block; position:absolute; left:-8px; top:25px;}
|
.icons_sy_cir{background: url(../images/syllabus/icons_syllabus.png) 0px -82px no-repeat; width:15px; height:15px; display:block; position:absolute; left:-8px; top:25px;}
|
||||||
|
.icons_sy_favorite{background: url(../images/syllabus/sy_icons_star.png) 0px 0px no-repeat; width:20px; height:20px; display:block; position:absolute; left:-10px; top:25px;}
|
||||||
|
.icons_sy_star{background: url(../images/syllabus/sy_icons_star.png) 0px -27px no-repeat; width:20px; height:20px; display:block; position:absolute; left:-10px; top:25px;}
|
||||||
.icons_sy_arrow{background: url(../images/syllabus/icons_syllabus.png) -31px -81px no-repeat; width:20px; height:20px; display:block; }
|
.icons_sy_arrow{background: url(../images/syllabus/icons_syllabus.png) -31px -81px no-repeat; width:20px; height:20px; display:block; }
|
||||||
.syllabus_h2_top{ font-size:18px; color:#333; font-weight:normal; padding:10px 15px;border-bottom:1px solid #e7e7e7; }
|
.syllabus_h2_top{ font-size:18px; color:#333; font-weight:normal; padding:10px 15px;border-bottom:1px solid #e7e7e7; }
|
||||||
.syllabus_category{ padding:10px 15px; background-color:#f6f6f6; border-bottom:1px solid #e7e7e7;}
|
.syllabus_category{ padding:10px 15px; background-color:#f6f6f6; border-bottom:1px solid #e7e7e7;}
|
||||||
|
@ -94,8 +96,11 @@ input.syllabus_input_min{
|
||||||
.syllabus_class_list_more{padding:8px; text-align:center;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;}
|
.syllabus_class_list_more{padding:8px; text-align:center;border-left:1px solid #e7e7e7;border-bottom:1px solid #e7e7e7;}
|
||||||
.syllabus_class_list_more:hover{ background:#ececec;}
|
.syllabus_class_list_more:hover{ background:#ececec;}
|
||||||
.syllabus_class_list_more a{ color:#ff7e00;}
|
.syllabus_class_list_more a{ color:#ff7e00;}
|
||||||
.syllabus_class_title{ font-size:14px; color:#333; max-width:480px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
a.syllabus_class_title{ font-size:14px; color:#333; max-width:480px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||||||
.syllabus_class_w{ width:650px;}
|
.syllabus_class_w{ width:650px;}
|
||||||
|
.syllabus_class_property {font-size:12px; padding:0 5px; border-radius:3px; line-height:14px;}
|
||||||
|
.syllabus_class_private {color:#ff4a1b; border:1px solid #ff4a1b;}
|
||||||
|
.syllabus_class_open {color:#7dd26c; border:1px solid #7dd26c;}
|
||||||
|
|
||||||
|
|
||||||
/*新建页面*/
|
/*新建页面*/
|
||||||
|
@ -164,17 +169,6 @@ input.syllabus_input_min{
|
||||||
border-bottom:none;
|
border-bottom:none;
|
||||||
}
|
}
|
||||||
/* 课程大纲 */
|
/* 课程大纲 */
|
||||||
.icons_tishi{
|
|
||||||
width: 110px;
|
|
||||||
height: 110px;
|
|
||||||
margin: 135px auto 20px;
|
|
||||||
}
|
|
||||||
.sy_tab_con_p{
|
|
||||||
font-size: 16px;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom:100px;
|
|
||||||
color:#888;
|
|
||||||
}
|
|
||||||
.sy_classlist{
|
.sy_classlist{
|
||||||
padding: 15px 15px;
|
padding: 15px 15px;
|
||||||
border-bottom: 1px dashed #e6e6e6;
|
border-bottom: 1px dashed #e6e6e6;
|
||||||
|
@ -320,16 +314,16 @@ a.sy_class_option:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
.sy_class_logo{
|
.sy_class_logo{
|
||||||
width:110px;
|
width:96px;
|
||||||
height:110px;
|
height:96px;
|
||||||
}
|
}
|
||||||
.sy_class_id{
|
.sy_class_id{
|
||||||
width:108px;
|
width:94px;
|
||||||
height:78px;
|
height:70px;
|
||||||
border:1px solid #f1f1f1;
|
border:1px solid #f1f1f1;
|
||||||
background:#fff;
|
background:#fff;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
padding-top:30px;
|
padding-top:24px;
|
||||||
}
|
}
|
||||||
.sy_class_id p{
|
.sy_class_id p{
|
||||||
font-size:16px;
|
font-size:16px;
|
||||||
|
@ -375,7 +369,7 @@ a.sy_class_option:hover {
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sy_class_titbox{margin-bottom:5px; padding-top:10px; }
|
.sy_class_titbox{ padding-top:5px; }
|
||||||
a.sy_btn_orange{
|
a.sy_btn_orange{
|
||||||
display:block;
|
display:block;
|
||||||
border:1px solid #ee4a1f;
|
border:1px solid #ee4a1f;
|
||||||
|
@ -425,9 +419,9 @@ a:hover.sy_btn_orange{
|
||||||
|
|
||||||
.accordion li > a span {
|
.accordion li > a span {
|
||||||
margin-top:15px;
|
margin-top:15px;
|
||||||
font-size:12px;
|
font-size:11px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
background: #ccc;
|
background: #eee;
|
||||||
-webkit-border-radius: 15px;
|
-webkit-border-radius: 15px;
|
||||||
-moz-border-radius: 15px;
|
-moz-border-radius: 15px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
|
@ -439,7 +433,7 @@ a:hover.sy_btn_orange{
|
||||||
.accordion > li > a.active span {
|
.accordion > li > a.active span {
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
color: #888;
|
color: #888;
|
||||||
background: #ccc;
|
background: #ddd;
|
||||||
}
|
}
|
||||||
/* Images */
|
/* Images */
|
||||||
.accordion > li > a:before {
|
.accordion > li > a:before {
|
||||||
|
|
Loading…
Reference in New Issue