Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
Conflicts: public/assets/wechat/app.html public/assets/wechat/new_project.html public/javascripts/wechat/directives/ellipsis.js public/stylesheets/weui/weixin.css
This commit is contained in:
commit
5b93d40f67
|
@ -1,44 +1,70 @@
|
||||||
class AppliedProjectController < ApplicationController
|
class AppliedProjectController < ApplicationController
|
||||||
|
helper :watchers
|
||||||
#申请加入项目
|
#申请加入项目
|
||||||
def applied_join_project
|
def applied_join_project
|
||||||
@user_id = params[:user_id]
|
if params[:object_id]
|
||||||
@project = Project.find_by_id(params[:project_id])
|
@project = Project.find_by_id(params[:object_id])
|
||||||
if params[:project_join]
|
|
||||||
if @project
|
|
||||||
user = User.find @user_id
|
|
||||||
if user.member_of?(@project)
|
|
||||||
@status = 3
|
|
||||||
else
|
|
||||||
@applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id])
|
|
||||||
if @applieds.count == 0
|
|
||||||
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
|
|
||||||
Mailer.run.applied_project(appliedproject)
|
|
||||||
@status = 2
|
|
||||||
else
|
|
||||||
@status = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
@status = 0
|
|
||||||
end
|
|
||||||
respond_to do |format|
|
|
||||||
format.js
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
# @user_id = params[:user_id]
|
||||||
|
# if params[:project_join]
|
||||||
|
# if @project
|
||||||
|
# user = User.find @user_id
|
||||||
|
# if user.member_of?(@project)
|
||||||
|
# @status = 3
|
||||||
|
# else
|
||||||
|
# @applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id])
|
||||||
|
# if @applieds.count == 0
|
||||||
|
# appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
|
||||||
|
# Mailer.run.applied_project(appliedproject)
|
||||||
|
# @status = 2
|
||||||
|
# else
|
||||||
|
# @status = 1
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# else
|
||||||
|
# @status = 0
|
||||||
|
# end
|
||||||
|
# respond_to do |format|
|
||||||
|
# format.js
|
||||||
|
# end
|
||||||
|
# return
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# @applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id])
|
||||||
|
# if @applieds.count == 0
|
||||||
|
# appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
|
||||||
|
# Mailer.run.applied_project(appliedproject)
|
||||||
|
# end
|
||||||
|
#
|
||||||
|
# #redirect_to project_path(params[:project_id])
|
||||||
|
# #redirect_to_referer_or {render :text => ( 'applied success.'), :layout => true}
|
||||||
|
# respond_to do |format|
|
||||||
|
# format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
|
||||||
|
# format.js { render :partial => 'set_applied'}
|
||||||
|
# end
|
||||||
|
end
|
||||||
|
|
||||||
@applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id])
|
# @flage:提示语标志(1:邀请码错误;2:已经是项目成员; 3:角色没有选择; 4:申请成功)
|
||||||
if @applieds.count == 0
|
# role:成员角色 => 0(4:管理人员;5:开发人员;6:报告人员)
|
||||||
appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id])
|
# 申请成功则发送消息
|
||||||
Mailer.run.applied_project(appliedproject)
|
def applied_project_info
|
||||||
|
if params[:project_id].nil?
|
||||||
|
@project = Project.where(:invite_code => params[:invite_code]).first
|
||||||
|
else
|
||||||
|
@project = Project.find(params[:project_id])
|
||||||
end
|
end
|
||||||
|
if !@project || params[:invite_code].to_s != @project.invite_code
|
||||||
#redirect_to project_path(params[:project_id])
|
@flag = 1
|
||||||
#redirect_to_referer_or {render :text => ( 'applied success.'), :layout => true}
|
elsif User.current.member_of?(@project)
|
||||||
respond_to do |format|
|
@flag = 2
|
||||||
format.html { redirect_to_referer_or {render :text => (watching ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
|
elsif params[:member].nil?
|
||||||
format.js { render :partial => 'set_applied'}
|
@flag = 3
|
||||||
|
else
|
||||||
|
@flag = 4
|
||||||
|
role = params[:member] == "member_manager" ? 3 : (params[:member] = "member_developer" ? 4 :5)
|
||||||
|
applied_project = AppliedProject.create(:user_id => User.current.id, :project_id => @project.id, :role => role)
|
||||||
|
# 申请成功则给项目管理员发送邮件及发送消息
|
||||||
|
Mailer.run.applied_project(applied_project)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class CoursesController < ApplicationController
|
||||||
|
|
||||||
before_filter :can_show_course, :except => []
|
before_filter :can_show_course, :except => []
|
||||||
before_filter :logged_user_by_apptoken,:only => [:show,:feedback]
|
before_filter :logged_user_by_apptoken,:only => [:show,:feedback]
|
||||||
before_filter :find_course, :except => [ :index, :search, :new,:join,:unjoin, :create, :new_join, :course,:join_private_courses]
|
before_filter :find_course, :except => [ :index, :search, :new,:join,:unjoin, :create, :new_join, :course,:join_private_courses, :join_course_multi_role]
|
||||||
before_filter :authorize_course, :only => [:show, :settings, :update, :course]
|
before_filter :authorize_course, :only => [:show, :settings, :update, :course]
|
||||||
before_filter :authorize_course_global, :only => [:new,:create]
|
before_filter :authorize_course_global, :only => [:new,:create]
|
||||||
before_filter :toggleCourse, :only => [:finishcourse, :restartcourse]
|
before_filter :toggleCourse, :only => [:finishcourse, :restartcourse]
|
||||||
|
@ -81,6 +81,22 @@ class CoursesController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def join_course_multi_role
|
||||||
|
if User.current.logged?
|
||||||
|
cs = CoursesService.new
|
||||||
|
@user = User.current
|
||||||
|
join = cs.join_course_roles params,@user
|
||||||
|
@state = join[:state]
|
||||||
|
@course = join[:course]
|
||||||
|
else
|
||||||
|
@state = 5 #未登录
|
||||||
|
end
|
||||||
|
@object_id = @course.id if @course
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def unjoin
|
def unjoin
|
||||||
if User.current.logged?
|
if User.current.logged?
|
||||||
cs = CoursesService.new
|
cs = CoursesService.new
|
||||||
|
@ -1136,6 +1152,21 @@ class CoursesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#切换身份
|
||||||
|
def switch_role
|
||||||
|
members = @course.members.where("user_id = #{params[:user_id]}")
|
||||||
|
unless members.blank?
|
||||||
|
#role = MemberRole.where("member_id = #{members.first.id} and role_id = #{params[:role]}").first
|
||||||
|
curr_role = MemberRole.find_by_member_id_and_role_id(members.first.id, params[:curr_role])
|
||||||
|
tar_role = MemberRole.find_by_member_id_and_role_id(members.first.id, params[:tar_role])
|
||||||
|
unless (curr_role.nil? || tar_role.nil?)
|
||||||
|
curr_role.update_column('is_current', 0)
|
||||||
|
tar_role.update_column('is_current', 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
redirect_to course_path(@course)
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
def update_quotes attachment
|
def update_quotes attachment
|
||||||
if attachment.copy_from
|
if attachment.copy_from
|
||||||
|
|
|
@ -17,10 +17,11 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class MembersController < ApplicationController
|
class MembersController < ApplicationController
|
||||||
|
helper :users
|
||||||
model_object Member
|
model_object Member
|
||||||
before_filter :find_model_object, :except => [:index, :create, :autocomplete]
|
before_filter :find_model_object, :except => [:index, :create, :autocomplete, :allow_to_join_project, :refused_allow_to_join_project]
|
||||||
#before_filter :find_model_object_contest, :except => [:index, :create, :autocomplete]
|
#before_filter :find_model_object_contest, :except => [:index, :create, :autocomplete]
|
||||||
before_filter :find_project_from_association, :except => [:index, :create, :autocomplete]
|
before_filter :find_project_from_association, :except => [:index, :create, :autocomplete, :allow_to_join_project, :refused_allow_to_join_project]
|
||||||
before_filter :find_project_by_project_id, :only => [:index, :create, :autocomplete]
|
before_filter :find_project_by_project_id, :only => [:index, :create, :autocomplete]
|
||||||
before_filter :authorize
|
before_filter :authorize
|
||||||
accept_api_auth :index, :show, :create, :update, :destroy
|
accept_api_auth :index, :show, :create, :update, :destroy
|
||||||
|
@ -49,6 +50,62 @@ class MembersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 同意消息中申请加入项目
|
||||||
|
# 之所以role不在参数中传送是考虑到安全问题
|
||||||
|
# status(1:申请的消息;2:已操作过该消息(包括同意或者拒绝,消息状态更新);3:决绝消息;4:被拒人收到消息;5:拒绝者收到消息;6:同意后申请人收到消息;7:同意后批准人收到消息)
|
||||||
|
def allow_to_join_project
|
||||||
|
@applied_message = AppliedMessage.find(params[:applied_message_id])
|
||||||
|
applied_project = @applied_message.applied
|
||||||
|
user = User.find(@applied_message.applied_user_id)
|
||||||
|
project = Project.find(applied_project.project_id)
|
||||||
|
if user.member_of?(project)
|
||||||
|
@flash_message = "您已经是项目成员了"
|
||||||
|
@applied_message.update_attribute(:status, 2)
|
||||||
|
else
|
||||||
|
ap_role = applied_project.try(:role)
|
||||||
|
if ap_role
|
||||||
|
begin
|
||||||
|
members = []
|
||||||
|
user_grades = []
|
||||||
|
project_info = []
|
||||||
|
members << Member.new(:role_ids => ["#{ap_role}"], :user_id => @applied_message.applied_user_id)
|
||||||
|
user_grades << UserGrade.new(:user_id => @applied_message.applied_user_id, :project_id => project.id)
|
||||||
|
role = Role.find(ap_role)
|
||||||
|
project_info << ProjectInfo.new(:project_id => project.id, :user_id => @applied_message.applied_user_id) if role.allowed_to?(:is_manager)
|
||||||
|
project.members << members
|
||||||
|
project.project_infos << project_info
|
||||||
|
project.user_grades << user_grades unless user_grades.first.user_id.nil?
|
||||||
|
@applied_message.update_attribute(:status, 2)
|
||||||
|
# 添加成功后,申请人收到消息
|
||||||
|
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,
|
||||||
|
:status => 6, :viewed => true, :applied_user_id => @applied_message.user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||||
|
# 添加成功后,批准人收到消息
|
||||||
|
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,
|
||||||
|
:status => 7, :viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||||
|
rescue Exception => e
|
||||||
|
puts e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# 同意消息中拒绝加入项目
|
||||||
|
# params[:user_id]为申请者ID
|
||||||
|
# params[:send_id]为拒绝人ID
|
||||||
|
# status(1:申请的消息;2:已操作过该消息(包括同意或者拒绝,消息状态更新);3:拒绝消息;4:被拒人收到消息;5:拒绝者收到消息;6:同意后申请人收到消息;7:同意后批准人收到消息)
|
||||||
|
def refused_allow_to_join_project
|
||||||
|
@applied_message = AppliedMessage.find(params[:applied_message_id])
|
||||||
|
@applied_message.update_attribute(:status, 3)
|
||||||
|
applied_project = @applied_message.applied
|
||||||
|
# 发送消息给被拒者,user_id对应的收到信息的用户
|
||||||
|
AppliedMessage.create(:user_id => @applied_message.applied_user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 4,
|
||||||
|
:viewed => true, :applied_user_id => @applied_message.user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||||
|
# 发送消息给拒绝者
|
||||||
|
AppliedMessage.create(:user_id => @applied_message.user_id, :applied_type => "AppliedProject", :applied_id => applied_project.id ,:status => 5,
|
||||||
|
:viewed => true, :applied_user_id => @applied_message.applied_user_id, :role => applied_project.role, :project_id => applied_project.project_id)
|
||||||
|
applied_project.delete
|
||||||
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
if params[:refusal_button]
|
if params[:refusal_button]
|
||||||
members = []
|
members = []
|
||||||
|
@ -154,9 +211,11 @@ class MembersController < ApplicationController
|
||||||
user_ids = attrs.delete(:user_ids)
|
user_ids = attrs.delete(:user_ids)
|
||||||
user_ids.each do |user_id|
|
user_ids.each do |user_id|
|
||||||
member = Member.new(:role_ids => params[:membership][:role_ids], :user_id => user_id)
|
member = Member.new(:role_ids => params[:membership][:role_ids], :user_id => user_id)
|
||||||
role = Role.find_by_id(params[:membership][:role_ids])
|
|
||||||
|
role_ids = attrs.delete(:role_ids)
|
||||||
|
#role = Role.find(params[:membership][:role_ids])
|
||||||
# 这里的判断只能通过角色名,可以弄成常量
|
# 这里的判断只能通过角色名,可以弄成常量
|
||||||
if role && (role.name == "学生" || role.name == "Student")
|
if role_ids && role_ids.include?("10")
|
||||||
StudentsForCourse.create(:student_id => user_id, :course_id =>@course.id)
|
StudentsForCourse.create(:student_id => user_id, :course_id =>@course.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -252,7 +311,10 @@ class MembersController < ApplicationController
|
||||||
if (params[:membership][:role_ids])
|
if (params[:membership][:role_ids])
|
||||||
role = Role.find(params[:membership][:role_ids][0])
|
role = Role.find(params[:membership][:role_ids][0])
|
||||||
# 这里的判断只能通过角色名,可以弄成常量
|
# 这里的判断只能通过角色名,可以弄成常量
|
||||||
if role.name == "学生" || role.name == "Student"
|
attrs = params[:membership].dup
|
||||||
|
role_ids = attrs.delete(:role_ids)
|
||||||
|
|
||||||
|
if role_ids && role_ids.include?("10")
|
||||||
StudentsForCourse.create(:student_id => @member.user_id, :course_id =>@course.id)
|
StudentsForCourse.create(:student_id => @member.user_id, :course_id =>@course.id)
|
||||||
else
|
else
|
||||||
joined = StudentsForCourse.where('student_id = ? and course_id = ?', @member.user_id,@course.id)
|
joined = StudentsForCourse.where('student_id = ? and course_id = ?', @member.user_id,@course.id)
|
||||||
|
@ -313,6 +375,11 @@ class MembersController < ApplicationController
|
||||||
grade.destroy
|
grade.destroy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# 移出的时候删除申请消息,不需要删除消息,所以不必要关联删除
|
||||||
|
applied_projects = AppliedProject.where(:project_id => @project.id, :user_id => @member.user_id).first
|
||||||
|
unless applied_projects.nil?
|
||||||
|
applied_projects.delete
|
||||||
|
end
|
||||||
#移出项目发送消息
|
#移出项目发送消息
|
||||||
ForgeMessage.create(:user_id => @member.user_id, :project_id => @project.id, :forge_message_type => "RemoveFromProject", :viewed => false, :forge_message_id => User.current.id)
|
ForgeMessage.create(:user_id => @member.user_id, :project_id => @project.id, :forge_message_type => "RemoveFromProject", :viewed => false, :forge_message_id => User.current.id)
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,7 +37,7 @@ class QualityAnalysisController < ApplicationController
|
||||||
quality_an.delete unless quality_an.blank?
|
quality_an.delete unless quality_an.blank?
|
||||||
end
|
end
|
||||||
# Checks if the given job exists in Jenkins.
|
# Checks if the given job exists in Jenkins.
|
||||||
unless @client.job.exists?(job_name)
|
# unless @client.job.exists?(job_name)
|
||||||
@g = Gitlab.client
|
@g = Gitlab.client
|
||||||
branch = params[:branch]
|
branch = params[:branch]
|
||||||
language = swith_language_type(params[:language])
|
language = swith_language_type(params[:language])
|
||||||
|
@ -111,7 +111,7 @@ class QualityAnalysisController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
# end
|
||||||
rescue => e
|
rescue => e
|
||||||
@message = e.message
|
@message = e.message
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,7 +41,7 @@ class UsersController < ApplicationController
|
||||||
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
|
||||||
: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]
|
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list]
|
||||||
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
|
||||||
|
@ -133,6 +133,7 @@ class UsersController < ApplicationController
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@activity_id = params[:activity_id]
|
@activity_id = params[:activity_id]
|
||||||
@homepage = params[:homepage]
|
@homepage = params[:homepage]
|
||||||
|
@user_id = params[:user_id]
|
||||||
@type = 'BlogComment'
|
@type = 'BlogComment'
|
||||||
when 'OrgDocumentComment'
|
when 'OrgDocumentComment'
|
||||||
@reply = OrgDocumentComment.find params[:reply_id]
|
@reply = OrgDocumentComment.find params[:reply_id]
|
||||||
|
@ -149,6 +150,9 @@ class UsersController < ApplicationController
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@activity_id = params[:activity_id]
|
@activity_id = params[:activity_id]
|
||||||
@type = 'Issue'
|
@type = 'Issue'
|
||||||
|
when 'Syllabus'
|
||||||
|
@reply = JournalsForMessage.find params[:reply_id]
|
||||||
|
@type = 'Syllabus'
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
@ -351,15 +355,21 @@ class UsersController < ApplicationController
|
||||||
case params[:agree]
|
case params[:agree]
|
||||||
when 'Y'
|
when 'Y'
|
||||||
apply_user = User.find(@msg.course_message_id)
|
apply_user = User.find(@msg.course_message_id)
|
||||||
|
ids = @msg.content.split(",") # [@msg.content] msg content保存的是申请的职位角色
|
||||||
|
integer_ids = []
|
||||||
|
ids.each do |role_id|
|
||||||
|
integer_ids << role_id.to_i
|
||||||
|
end
|
||||||
if apply_user.member_of_course?(Course.find(@msg.course_id))
|
if apply_user.member_of_course?(Course.find(@msg.course_id))
|
||||||
#将角色改为老师或者教辅
|
#将角色改为老师或者教辅
|
||||||
member = Course.find(@msg.course_id).members.where(:user_id=>apply_user.id).all[0]
|
member = Course.find(@msg.course_id).members.where(:user_id=>apply_user.id).all[0]
|
||||||
member.role_ids = [@msg.content] # msg content保存的是申请的职位角色
|
member.role_ids = integer_ids
|
||||||
#删除为学生的记录
|
#删除为学生的记录
|
||||||
joined = StudentsForCourse.where('student_id = ? and course_id = ?', member.user_id,@msg.course_id)
|
unless member.role_ids.include?(10)
|
||||||
joined.each do |join|
|
joined = StudentsForCourse.where('student_id = ? and course_id = ?', member.user_id,@msg.course_id)
|
||||||
join.delete
|
joined.each do |join|
|
||||||
|
join.delete
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
member.course_group_id = 0
|
member.course_group_id = 0
|
||||||
|
@ -368,7 +378,7 @@ class UsersController < ApplicationController
|
||||||
@msg.update_attributes(:status=>1,:viewed=>1)
|
@msg.update_attributes(:status=>1,:viewed=>1)
|
||||||
else
|
else
|
||||||
members = []
|
members = []
|
||||||
members << Member.new(:role_ids => [@msg.content.to_i], :user_id => @msg.course_message_id)
|
members << Member.new(:role_ids => integer_ids, :user_id => @msg.course_message_id)
|
||||||
Course.find(@msg.course_id).members << members
|
Course.find(@msg.course_id).members << members
|
||||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>1)
|
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>1)
|
||||||
@msg.update_attributes(:status=>1,:viewed=>1)
|
@msg.update_attributes(:status=>1,:viewed=>1)
|
||||||
|
@ -3225,7 +3235,35 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_courselist
|
def user_courselist
|
||||||
@order, @c_sort,@type = params[:order] || 1, params[:sort] || 1, params[:type] || 1
|
@order, @c_sort, @type, @list_type = 1, 2, 1, 1
|
||||||
|
|
||||||
|
@my_syllabuses = @user.syllabuses
|
||||||
|
|
||||||
|
sy_courses = @user.courses.visible.where("is_delete =? and tea_id != ?", 0, @user.id)
|
||||||
|
syllabus_ids = sy_courses.empty? ? '(-1)' : "(" + sy_courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
||||||
|
@join_syllabuses = Syllabus.where("id in #{syllabus_ids} and user_id != #{@user.id}")
|
||||||
|
|
||||||
|
@my_syllabuses = syllabus_course_list_sort @my_syllabuses
|
||||||
|
@join_syllabuses = syllabus_course_list_sort @join_syllabuses
|
||||||
|
@my_syllabuses = @my_syllabuses.sort{|x,y| y[:last_update] <=> x[:last_update]}
|
||||||
|
@join_syllabuses = @join_syllabuses.sort{|x,y| y[:last_update] <=> x[:last_update]}
|
||||||
|
|
||||||
|
#分页
|
||||||
|
# @limit = 10
|
||||||
|
# @is_remote = true
|
||||||
|
# @atta_count = @syllabus.count
|
||||||
|
# @atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
||||||
|
# @offset ||= @atta_pages.offset
|
||||||
|
# @syllabus = paginateHelper @syllabus,@limit
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html {render :layout => 'new_base_user'}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#课程列表的排序
|
||||||
|
def sort_syllabus_list
|
||||||
|
@order, @c_sort, @type, @list_type = params[:order] || 1, params[:sort] || 1, params[:type] || 1, params[:list_type] || 1
|
||||||
|
|
||||||
#确定 sort_type
|
#确定 sort_type
|
||||||
if @order.to_i == @type.to_i
|
if @order.to_i == @type.to_i
|
||||||
|
@ -3235,40 +3273,48 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
sort_name = "updated_at"
|
sort_name = "updated_at"
|
||||||
sort_type = @c_sort == 1 ? "asc" : "desc"
|
|
||||||
|
|
||||||
@courses = @user.courses.visible.where("is_delete =?", 0)
|
if @list_type.to_i == 1
|
||||||
syllabus_ids = @courses.empty? ? '(-1)' : "(" + @courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
@syllabuses = @user.syllabuses.order("updated_at desc")
|
||||||
@syllabus = Syllabus.where("id in #{syllabus_ids} or user_id = #{User.current.id}").order("#{sort_name} #{sort_type}")
|
else
|
||||||
|
sy_courses = @user.courses.visible.where("is_delete =? and tea_id != ?", 0, @user.id)
|
||||||
|
syllabus_ids = sy_courses.empty? ? '(-1)' : "(" + sy_courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
||||||
|
@syllabuses = Syllabus.where("id in #{syllabus_ids} and user_id != #{@user.id}").order("updated_at desc")
|
||||||
|
end
|
||||||
|
|
||||||
#根据 作业+资源数排序
|
if @order.to_i == 1 #根据 班级更新时间排序
|
||||||
if @order.to_i == 2
|
@syllabuses = syllabus_course_list_sort @syllabuses
|
||||||
|
@c_sort == 1 ? (@syllabuses = @syllabuses.sort{|x,y| x[:last_update] <=> y[:last_update] }) : (@syllabuses = @syllabuses.sort{|x,y| y[:last_update] <=> x[:last_update]})
|
||||||
|
@type = 1
|
||||||
|
elsif @order.to_i == 2 #根据 作业+资源数排序
|
||||||
@type = 2
|
@type = 2
|
||||||
@syllabus.each do |syllabus|
|
@syllabuses.each do |syllabus|
|
||||||
count = 0
|
count = 0
|
||||||
courses = @courses.where("syllabus_id = #{syllabus.id}")
|
courses = syllabus.courses.not_deleted
|
||||||
courses.each do |c|
|
courses.each do |c|
|
||||||
count += (User.current.admin? || User.current.allowed_to?(:as_teacher,c)) ? (c.homework_commons.count + visable_attachemnts_incourse(c).count) : (c.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(c).count)
|
count += (User.current.admin? || User.current.allowed_to?(:as_teacher,c)) ? (c.homework_commons.count + visable_attachemnts_incourse(c).count) : (c.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(c).count)
|
||||||
end
|
end
|
||||||
syllabus[:infocount] = count
|
syllabus[:infocount] = count
|
||||||
end
|
end
|
||||||
@c_sort == 1 ? (@syllabus = @syllabus.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@syllabus = @syllabus.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
@c_sort == 1 ? (@syllabuses = @syllabuses.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@syllabuses = @syllabuses.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
||||||
@syllabus = sortby_time_countcommon_nosticky @syllabus,sort_name
|
@syllabuses = sortby_time_countcommon_nosticky @syllabuses,sort_name
|
||||||
else
|
else
|
||||||
@type = 1
|
@type = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
#分页
|
|
||||||
@limit = 10
|
|
||||||
@is_remote = true
|
|
||||||
@atta_count = @syllabus.count
|
|
||||||
@atta_pages = Paginator.new @atta_count, @limit, params['page'] || 1
|
|
||||||
@offset ||= @atta_pages.offset
|
|
||||||
@syllabus = paginateHelper @syllabus,@limit
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
format.html {render :layout => 'new_base_user'}
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#展开课程下的班级
|
||||||
|
def expand_courses
|
||||||
|
@syllabus = Syllabus.where("id = #{params[:syllabus_id]}").first
|
||||||
|
unless @syllabus.nil?
|
||||||
|
@courses = @syllabus.courses.not_deleted.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc")
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -3342,6 +3388,8 @@ class UsersController < ApplicationController
|
||||||
when 'Syllabus'
|
when 'Syllabus'
|
||||||
obj = Syllabus.where('id = ?', params[:id].to_i).first
|
obj = Syllabus.where('id = ?', params[:id].to_i).first
|
||||||
@journals = obj.journals_for_messages.reorder("created_on desc")
|
@journals = obj.journals_for_messages.reorder("created_on desc")
|
||||||
|
@type = 'Syllabus'
|
||||||
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
when 'JournalsForMessage'
|
when 'JournalsForMessage'
|
||||||
obj = JournalsForMessage.where('id = ?', params[:id].to_i).first
|
obj = JournalsForMessage.where('id = ?', params[:id].to_i).first
|
||||||
journals = []
|
journals = []
|
||||||
|
@ -3358,6 +3406,7 @@ class UsersController < ApplicationController
|
||||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
@homepage = params[:homepage].to_i
|
@homepage = params[:homepage].to_i
|
||||||
@type = 'BlogComment'
|
@type = 'BlogComment'
|
||||||
|
@user_id = obj.author_id
|
||||||
comments = []
|
comments = []
|
||||||
@journals = get_all_children(comments, obj)
|
@journals = get_all_children(comments, obj)
|
||||||
when 'HomeworkCommon'
|
when 'HomeworkCommon'
|
||||||
|
|
|
@ -112,6 +112,10 @@ class WordsController < ApplicationController
|
||||||
end
|
end
|
||||||
@is_in_course = params[:is_in_course].to_i
|
@is_in_course = params[:is_in_course].to_i
|
||||||
@course_activity = params[:course_activity].to_i
|
@course_activity = params[:course_activity].to_i
|
||||||
|
elsif @journal_destroyed.jour_type == 'Syllabus'
|
||||||
|
@syllabus = Syllabus.find @journal_destroyed.jour_id
|
||||||
|
@count = @syllabus.journals_for_messages.count
|
||||||
|
@comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3)
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
@ -352,6 +356,35 @@ class WordsController < ApplicationController
|
||||||
render_403
|
render_403
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#课程大纲的二级回复
|
||||||
|
def reply_to_syllabus
|
||||||
|
if User.current.logged?
|
||||||
|
@user = User.current
|
||||||
|
reply = JournalsForMessage.find params[:id].to_i
|
||||||
|
@syllabus = Syllabus.find reply.jour_id
|
||||||
|
if params[:reply_message].size>0 && User.current.logged? && @user
|
||||||
|
options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => @user.id,:m_parent_id => params[:id].to_i,:m_reply_id => params[:id].to_i}
|
||||||
|
feedback = Syllabus.add_syllabus_jour(@user, params[:reply_message], reply.jour_id, options)
|
||||||
|
if (feedback.errors.empty?)
|
||||||
|
if params[:asset_id]
|
||||||
|
ids = params[:asset_id].split(',')
|
||||||
|
update_kindeditor_assets_owner ids,feedback[:id],OwnerTypeHelper::JOURNALSFORMESSAGE
|
||||||
|
end
|
||||||
|
@syllabus.update_column('updated_at', Time.now)
|
||||||
|
@count = @syllabus.journals_for_messages.count
|
||||||
|
@comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3)
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
else
|
||||||
|
flash[:error] = feedback.errors.full_messages[0]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
render_403
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def add_brief_introdution
|
def add_brief_introdution
|
||||||
user = User.current
|
user = User.current
|
||||||
|
|
|
@ -274,14 +274,19 @@ module CoursesHelper
|
||||||
#searchPeopleByRoles(project, TeacherRoles)
|
#searchPeopleByRoles(project, TeacherRoles)
|
||||||
members = []
|
members = []
|
||||||
project.members.includes(:user).each do |m|
|
project.members.includes(:user).each do |m|
|
||||||
members << m if m && m.user && m.user.allowed_to?(:as_teacher,project)
|
#members << m if m && m.user && m.user.allowed_to?(:as_teacher,project)
|
||||||
|
members << m if m && m.user && m.user.has_teacher_role(project)
|
||||||
end
|
end
|
||||||
members
|
members
|
||||||
end
|
end
|
||||||
|
|
||||||
def TeacherAndAssistantCount course
|
def TeacherAndAssistantCount course
|
||||||
students_count = course.student.count
|
#students_count = course.student.count
|
||||||
number = course.members.count - students_count
|
#number = course.members.count - students_count
|
||||||
|
member_ids = course.members.includes(:user).blank? ? "(-1)" : "(" + course.members.includes(:user).map { |mem| mem.id}.join(",") + ")"
|
||||||
|
role_ids = "(3, 7, 9)"
|
||||||
|
number = MemberRole.where("member_id in #{member_ids} and role_id in #{role_ids}").count
|
||||||
|
#number = (searchTeacherAndAssistant course).count
|
||||||
end
|
end
|
||||||
|
|
||||||
def search_student_in_group(project, course_group_id)
|
def search_student_in_group(project, course_group_id)
|
||||||
|
@ -789,7 +794,7 @@ module CoursesHelper
|
||||||
if user.logged?
|
if user.logged?
|
||||||
joined = course.members.includes(:user).map{|member| member.user_id}.include? user.id
|
joined = course.members.includes(:user).map{|member| member.user_id}.include? user.id
|
||||||
text = joined ? l(:label_course_exit_student) : l(:label_course_join_student)
|
text = joined ? l(:label_course_exit_student) : l(:label_course_join_student)
|
||||||
url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id)
|
url = joined ? join_path(:object_id => course.id) : join_private_courses_courses_path()
|
||||||
method = joined ? 'delete' : 'post'
|
method = joined ? 'delete' : 'post'
|
||||||
if joined
|
if joined
|
||||||
link = link_to(text, url, :remote => true, :method => method, :class => "sy_btn_grey fl", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out))
|
link = link_to(text, url, :remote => true, :method => method, :class => "sy_btn_grey fl", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out))
|
||||||
|
@ -831,6 +836,10 @@ module CoursesHelper
|
||||||
result = l(:label_student)
|
result = l(:label_student)
|
||||||
elsif role == "Manager"
|
elsif role == "Manager"
|
||||||
result = l(:field_admin)
|
result = l(:field_admin)
|
||||||
|
elsif role.include?("TeachingAsistant") && role.include?("Student")
|
||||||
|
result = l(:label_TA) + " " + l(:label_student)
|
||||||
|
elsif role.include?("Teacher") && role.include?("Student")
|
||||||
|
result = l(:label_teacher) + " " + l(:label_student)
|
||||||
end
|
end
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
@ -914,5 +923,15 @@ module CoursesHelper
|
||||||
resource_num*5 + journal_num + homework_journal_num ) desc limit 3;")
|
resource_num*5 + journal_num + homework_journal_num ) desc limit 3;")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#用户在该课程是否具有某个角色
|
||||||
|
def get_user_member_roles_course course, user, role
|
||||||
|
members = course.members.where("user_id = #{user.id}")
|
||||||
|
result = false
|
||||||
|
unless members.blank?
|
||||||
|
m_roles = MemberRole.where("member_id = #{members.first.id} and role_id = #{role}")
|
||||||
|
end
|
||||||
|
result = !m_roles.blank?
|
||||||
|
result
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,44 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 获取消息角色
|
||||||
|
def applied_project_message_type role
|
||||||
|
case role
|
||||||
|
when 3
|
||||||
|
"管理员"
|
||||||
|
when 4
|
||||||
|
"开发人员"
|
||||||
|
when 5
|
||||||
|
"报告人员"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# 判断当前用户能否对消息进行操作
|
||||||
|
def allow_to_show applied_message
|
||||||
|
(User.current.id == applied_message.user_id && applied_message.status == 1) ? true : false
|
||||||
|
end
|
||||||
|
|
||||||
|
# 项目申请消息通过状态判断用户
|
||||||
|
# status(1:申请的消息;2:已操作过该消息(包括同意或者拒绝,消息状态更新);3:拒绝消息;4:被拒人收到消息;5:拒绝者收到消息;6:同意后申请人收到消息;7:同意后批准人收到消息)
|
||||||
|
def applied_project_users applied_message
|
||||||
|
# case applied_message.status
|
||||||
|
# when 3,2,1,5,4,7,6
|
||||||
|
user = User.find(applied_message.applied_user_id)
|
||||||
|
# end
|
||||||
|
end
|
||||||
|
|
||||||
|
# 项目申请消息通过状态判断tip描述
|
||||||
|
def applied_project_tip applied_message
|
||||||
|
case applied_message.status
|
||||||
|
when 4
|
||||||
|
"拒绝申请加入项目:"
|
||||||
|
when 5,3,2,1,7
|
||||||
|
"申请加入项目:"
|
||||||
|
when 6
|
||||||
|
"同意申请加入项目"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def get_resource_origin attach
|
def get_resource_origin attach
|
||||||
type = attach.container_type
|
type = attach.container_type
|
||||||
content = attach.container
|
content = attach.container
|
||||||
|
@ -690,4 +728,18 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
result_ids
|
result_ids
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#课程的班级列表最近更新时间
|
||||||
|
def syllabus_course_list_sort syllabuses
|
||||||
|
syllabuses.each do |sy|
|
||||||
|
updated_at = sy.updated_at
|
||||||
|
courses = sy.courses.not_deleted
|
||||||
|
unless courses.empty?
|
||||||
|
course_ids = "(" + courses.map { |course| course.id}.join(",") + ")"
|
||||||
|
updated_at = CourseActivity.where("course_id in #{course_ids}").order("updated_at desc").first.updated_at
|
||||||
|
end
|
||||||
|
sy[:last_update] = updated_at
|
||||||
|
end
|
||||||
|
syllabuses
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -364,22 +364,29 @@ module WatchersHelper
|
||||||
:class => "pr_join_a" ,:id=>id
|
:class => "pr_join_a" ,:id=>id
|
||||||
end
|
end
|
||||||
|
|
||||||
#申请加入项目
|
# 申请加入项目
|
||||||
def join_in_project_link(project, user, options=[])
|
def join_in_project_link(project, user, options=[])
|
||||||
return '' unless user && user.logged?
|
|
||||||
applied = project.applied_projects.find_by_user_id(user.id)
|
applied = project.applied_projects.find_by_user_id(user.id)
|
||||||
text = applied ? l(:label_unapply_project) : l(:label_apply_project)
|
text = applied ? l(:label_unapply_project) : l(:label_apply_project)
|
||||||
@applied_flag = project.instance_of?(Project)
|
url = applied_join_project_path(:object_id => project.id)
|
||||||
|
method = 'post'
|
||||||
|
@applied_flag = project.instance_of?(Project)
|
||||||
if applied
|
if applied
|
||||||
appliedid = applied.id
|
link = "<a class ='pr_join_a'>#{text}</a>"
|
||||||
|
else
|
||||||
|
link = link_to(text, url, :remote => true, :method => method, :id => "#{project.id}", :class => "pr_join_a")
|
||||||
end
|
end
|
||||||
id = applied_css(project)
|
link.html_safe
|
||||||
url = appliedproject_path(
|
# if applied
|
||||||
:id=>appliedid,
|
# appliedid = applied.id
|
||||||
:user_id => user.id,
|
# end
|
||||||
:project_id => project.id)
|
# id = applied_css(project)
|
||||||
method = applied ? 'delete' : 'post'
|
# url = appliedproject_path(
|
||||||
link_to text, url, :remote => true, :method => method , :class => "pr_join_a",:id => id
|
# :id=>appliedid,
|
||||||
|
# :user_id => user.id,
|
||||||
|
# :project_id => project.id)
|
||||||
|
# method = applied ? 'delete' : 'post'
|
||||||
|
# link_to text, url, :remote => true, :method => method , :class => "pr_join_a",:id => id
|
||||||
end
|
end
|
||||||
|
|
||||||
def paginateHelper obj, pre_size=20
|
def paginateHelper obj, pre_size=20
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class AppliedMessage < ActiveRecord::Base
|
class AppliedMessage < ActiveRecord::Base
|
||||||
# status: 0表示未批准; status:1表示已批准; status: 2表示已拒绝
|
# status: 0表示未批准; status:1表示已批准; status: 2表示已拒绝
|
||||||
attr_accessible :applied_id, :applied_type, :status, :user_id, :viewed, :name
|
attr_accessible :applied_id, :applied_type, :status, :user_id, :viewed, :applied_user_id, :role, :project_id
|
||||||
belongs_to :applied ,:polymorphic => true
|
belongs_to :applied ,:polymorphic => true
|
||||||
belongs_to :apply_add_schools
|
belongs_to :apply_add_schools
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
class AppliedProject < ActiveRecord::Base
|
class AppliedProject < ActiveRecord::Base
|
||||||
attr_accessible :project_id, :user_id
|
attr_accessible :project_id, :user_id, :role
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy
|
has_many :applied_messages, :class_name => 'AppliedMessage', :as => :applied, :dependent => :destroy
|
||||||
|
|
||||||
after_create :send_appliled_message
|
after_create :send_appliled_message
|
||||||
|
|
||||||
|
# 仅仅给项目管理人员发送消息
|
||||||
def send_appliled_message
|
def send_appliled_message
|
||||||
# if MessageAll.where("message_type = '#{self.class.to_s}' and message_id = '#{self.id}'").first.nil?
|
self.project.managers.each do |member|
|
||||||
self.project.members.each do |m|
|
self.applied_messages << AppliedMessage.new(:user_id => member.user_id, :status => true, :viewed => false, :applied_user_id => self.user_id, :role => self.role, :project_id => self.project_id)
|
||||||
if m.roles.first.to_s.include?("Manager")
|
|
||||||
self.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => self.project_id, :viewed => false)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
|
@ -53,7 +53,15 @@ class Member < ActiveRecord::Base
|
||||||
|
|
||||||
new_role_ids = ids - role_ids
|
new_role_ids = ids - role_ids
|
||||||
# Add new roles
|
# Add new roles
|
||||||
new_role_ids.each {|id| member_roles << MemberRole.new(:role_id => id) }
|
if new_role_ids.include?(7) && new_role_ids.include?(10)
|
||||||
|
member_roles << MemberRole.new(:role_id => 7)
|
||||||
|
member_roles << MemberRole.new(:role_id => 10, :is_current => 0)
|
||||||
|
elsif new_role_ids.include?(9) && new_role_ids.include?(10)
|
||||||
|
member_roles << MemberRole.new(:role_id => 9)
|
||||||
|
member_roles << MemberRole.new(:role_id => 10, :is_current => 0)
|
||||||
|
else
|
||||||
|
new_role_ids.each {|id| member_roles << MemberRole.new(:role_id => id) }
|
||||||
|
end
|
||||||
# Remove roles (Rails' #role_ids= will not trigger MemberRole#on_destroy)
|
# Remove roles (Rails' #role_ids= will not trigger MemberRole#on_destroy)
|
||||||
member_roles_to_destroy = member_roles.select {|mr| !ids.include?(mr.role_id)}
|
member_roles_to_destroy = member_roles.select {|mr| !ids.include?(mr.role_id)}
|
||||||
if member_roles_to_destroy.any?
|
if member_roles_to_destroy.any?
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class MemberRole < ActiveRecord::Base
|
class MemberRole < ActiveRecord::Base
|
||||||
|
# multi_role 课程中的多重角色 0:单角色/学生,1:管理员&学生,2:教师&学生,3:教辅&学生
|
||||||
belongs_to :member
|
belongs_to :member
|
||||||
belongs_to :role
|
belongs_to :role
|
||||||
|
|
||||||
|
|
|
@ -269,6 +269,11 @@ class Project < ActiveRecord::Base
|
||||||
notified.collect(&:mail)
|
notified.collect(&:mail)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 返回为member类型数组
|
||||||
|
def managers
|
||||||
|
self.members.includes(:roles).select{|member| member.roles[0].try(:name) == "Manager"}
|
||||||
|
end
|
||||||
|
|
||||||
def initialize(attributes=nil, *args)
|
def initialize(attributes=nil, *args)
|
||||||
super
|
super
|
||||||
|
|
||||||
|
@ -905,6 +910,24 @@ class Project < ActiveRecord::Base
|
||||||
User.find(self.user_id)
|
User.find(self.user_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 延迟生成邀请码
|
||||||
|
def invite_code
|
||||||
|
return generate_invite_code
|
||||||
|
end
|
||||||
|
|
||||||
|
# 生成邀请码
|
||||||
|
# 如果已有改邀请码,则重新生成
|
||||||
|
CODES = %W(2 3 4 5 6 7 8 9 A B C D E F G H J K L N M O P Q R S T U V W X Y Z)
|
||||||
|
def generate_invite_code
|
||||||
|
code = read_attribute(:invite_code)
|
||||||
|
if !code || code.size <6
|
||||||
|
code = CODES.sample(6).join
|
||||||
|
return generate_invite_code if Project.where(invite_code: code).present?
|
||||||
|
update_attribute(:invite_code, code)
|
||||||
|
end
|
||||||
|
code
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def after_parent_changed(parent_was)
|
def after_parent_changed(parent_was)
|
||||||
|
|
|
@ -42,12 +42,12 @@ class User < Principal
|
||||||
# Different ways of displaying/sorting users
|
# Different ways of displaying/sorting users
|
||||||
USER_FORMATS = {
|
USER_FORMATS = {
|
||||||
:firstname_lastname => {
|
:firstname_lastname => {
|
||||||
:string => '#{firstname} #{lastname}',
|
:string => '#{firstname}#{lastname}',
|
||||||
:order => %w(firstname lastname id),
|
:order => %w(firstname lastname id),
|
||||||
:setting_order => 1
|
:setting_order => 1
|
||||||
},
|
},
|
||||||
:firstname_lastinitial => {
|
:firstname_lastinitial => {
|
||||||
:string => '#{firstname} #{lastname.to_s.chars.first}.',
|
:string => '#{firstname}#{lastname.to_s.chars.first}.',
|
||||||
:order => %w(firstname lastname id),
|
:order => %w(firstname lastname id),
|
||||||
:setting_order => 2
|
:setting_order => 2
|
||||||
},
|
},
|
||||||
|
@ -57,7 +57,7 @@ class User < Principal
|
||||||
:setting_order => 3
|
:setting_order => 3
|
||||||
},
|
},
|
||||||
:lastname_firstname => {
|
:lastname_firstname => {
|
||||||
:string => '#{lastname} #{firstname}',
|
:string => '#{lastname}#{firstname}',
|
||||||
:order => %w(lastname firstname id),
|
:order => %w(lastname firstname id),
|
||||||
:setting_order => 4
|
:setting_order => 4
|
||||||
},
|
},
|
||||||
|
@ -369,7 +369,8 @@ class User < Principal
|
||||||
system_messages_count = SystemMessage.where("created_at >?", onclick_time).count
|
system_messages_count = SystemMessage.where("created_at >?", onclick_time).count
|
||||||
at_count = AtMessage.where("user_id =? and viewed =? and created_at >?", user.id, 0, onclick_time).count
|
at_count = AtMessage.where("user_id =? and viewed =? and created_at >?", user.id, 0, onclick_time).count
|
||||||
org_count = OrgMessage.where("user_id=? and viewed =? and created_at >?", user.id,0, onclick_time).count
|
org_count = OrgMessage.where("user_id=? and viewed =? and created_at >?", user.id,0, onclick_time).count
|
||||||
messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count
|
applied_count = AppliedMessage.where("user_id=? and viewed =? and created_at >?", user.id, 0, onclick_time).count
|
||||||
|
messages_count = course_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count + applied_count
|
||||||
end
|
end
|
||||||
|
|
||||||
# 查询指派给我的缺陷记录
|
# 查询指派给我的缺陷记录
|
||||||
|
@ -823,7 +824,7 @@ class User < Principal
|
||||||
# Find course membership
|
# Find course membership
|
||||||
membership = coursemembership(course)
|
membership = coursemembership(course)
|
||||||
if membership
|
if membership
|
||||||
roles = membership.roles
|
roles = membership.roles.where("is_current = 1")
|
||||||
else
|
else
|
||||||
@role_non_member ||= Role.non_member
|
@role_non_member ||= Role.non_member
|
||||||
roles << @role_non_member
|
roles << @role_non_member
|
||||||
|
@ -918,6 +919,12 @@ class User < Principal
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#是否具有老师角色
|
||||||
|
def has_teacher_role(course)
|
||||||
|
member = course.members.where("user_id = #{self.id}").first
|
||||||
|
role = MemberRole.where("member_id = #{member.id} and role_id in (3, 7, 9)")
|
||||||
|
!role.blank?
|
||||||
|
end
|
||||||
|
|
||||||
# Return true if the user is allowed to do the specified action on a specific context
|
# Return true if the user is allowed to do the specified action on a specific context
|
||||||
# Action can be:
|
# Action can be:
|
||||||
|
|
|
@ -391,6 +391,103 @@ class CoursesService
|
||||||
{:state => @state,:course => course}
|
{:state => @state,:course => course}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#多个角色加入课程
|
||||||
|
def join_course_roles params,current_user
|
||||||
|
course = Course.find_by_invite_code(params[:invite_code]) if params[:invite_code]
|
||||||
|
|
||||||
|
@state = 10
|
||||||
|
if course
|
||||||
|
if course_endTime_timeout? course
|
||||||
|
@state = 2
|
||||||
|
elsif course[:is_delete] == 1
|
||||||
|
@state = 11
|
||||||
|
else
|
||||||
|
if current_user.member_of_course?(course) #如果已经是成员
|
||||||
|
@state = 3
|
||||||
|
# member = course.members.where("user_id=#{current_user.id} and course_id=#{course.id}")[0]
|
||||||
|
# role_ids = params[:role]
|
||||||
|
# #roleName = member.roles[0].name if member
|
||||||
|
# #roleName = member.roles.map{|role| role.name}.join(",") if member
|
||||||
|
# if params[:invite_code].present?
|
||||||
|
# #如果加入角色为学生 并且当前是学生
|
||||||
|
# if role_ids == "10" && roleName.include?("Student") && !roleName.include?("Teacher") && !roleName.include?("TeachingAsistant")&& !roleName.include?("Manager")
|
||||||
|
# @state = 3
|
||||||
|
# #如果加入的角色为老师,并且当前已经是老师
|
||||||
|
# elsif role_ids == "9" && roleName.include?("Teacher") && !roleName.include?("Student")
|
||||||
|
# @state = 8
|
||||||
|
# #如果加入的角色教辅并且当前为教辅
|
||||||
|
# elsif role_ids == "7" && roleName.include?("TeachingAsistant") && !roleName.include?("Student")
|
||||||
|
# @state = 9
|
||||||
|
# elsif roleName.include?("Manager")
|
||||||
|
# @state = 10
|
||||||
|
# #如果加入角色为教师或者教辅,并且当前是学生,或者是要成为教辅,当前不是教辅,或者要成为教师,当前不是教师。那么要发送请求
|
||||||
|
# elsif (params[:role] != "10" && roleName == "Student") || (params[:role] == "7" && roleName != "TeachingAsistant" ) || (params[:role] == "9" && roleName != "Teacher" )
|
||||||
|
# #如果已经发送过消息了,那么就要给个提示
|
||||||
|
# if CourseMessage.where("course_message_type = 'JoinCourseRequest' and user_id = #{course.tea_id} and content = #{params[:role]} and course_message_id = #{User.current.id} and course_id = #{course.id} and status = 0 ").count != 0
|
||||||
|
# @state = 7
|
||||||
|
# else
|
||||||
|
# Mailer.run.join_course_request(course, User.current, params[:role])
|
||||||
|
# CourseMessage.create(:user_id => course.tea_id, :course_id => course.id, :viewed => false,:content=> params[:role],:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest',:status=>0)
|
||||||
|
# @state = 6
|
||||||
|
# end
|
||||||
|
# #如果加入角色是学生,但是是当前课程的教师或者教辅
|
||||||
|
# elsif params[:role] == "10" && roleName != "Student"
|
||||||
|
# member.role_ids = [params[:role]]
|
||||||
|
# member.save
|
||||||
|
# StudentsForCourse.create(:student_id => current_user.id, :course_id => course.id)
|
||||||
|
# @state = 0
|
||||||
|
# end
|
||||||
|
# else
|
||||||
|
# @state = 1
|
||||||
|
# end
|
||||||
|
else
|
||||||
|
if params[:invite_code].present?
|
||||||
|
role_ids = params[:role]
|
||||||
|
role_str = role_ids.join(",")
|
||||||
|
if role_ids.include?("10") && !role_ids.include?("7") && !role_ids.include?("9")
|
||||||
|
members = []
|
||||||
|
members << Member.new(:role_ids => [10], :user_id => current_user.id)
|
||||||
|
course.members << members
|
||||||
|
StudentsForCourse.create(:student_id => current_user.id, :course_id => course.id)
|
||||||
|
@state = 0
|
||||||
|
else
|
||||||
|
is_stu = false
|
||||||
|
if role_ids.include?("10")
|
||||||
|
members = []
|
||||||
|
members << Member.new(:role_ids => [10], :user_id => current_user.id)
|
||||||
|
course.members << members
|
||||||
|
StudentsForCourse.create(:student_id => current_user.id, :course_id =>course.id)
|
||||||
|
is_stu = true
|
||||||
|
end
|
||||||
|
#如果已经发送过消息了,那么就要给个提示
|
||||||
|
if CourseMessage.where("course_message_type = 'JoinCourseRequest' and user_id = #{course.tea_id} and content = '#{role_str}' and course_message_id = #{User.current.id} and course_id = #{course.id} and status = 0").count != 0
|
||||||
|
if is_stu
|
||||||
|
@state = 12
|
||||||
|
else
|
||||||
|
@state = 7
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Mailer.run.join_course_request(course, User.current, params[:role])
|
||||||
|
CourseMessage.create(:user_id => course.tea_id, :course_id => course.id, :viewed => false,:content=> role_str,:course_message_id=>User.current.id,:course_message_type=>'JoinCourseRequest',:status=>0)
|
||||||
|
if is_stu
|
||||||
|
@state = 13
|
||||||
|
else
|
||||||
|
@state = 6
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
@state = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
@state = 4
|
||||||
|
end
|
||||||
|
{:state => @state,:course => course}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
#作业列表
|
#作业列表
|
||||||
#已提交的作业数量获取 bid.homeworks.count
|
#已提交的作业数量获取 bid.homeworks.count
|
||||||
#学生提问数量获取 bid.commit.nil? ? 0 : bid.commit
|
#学生提问数量获取 bid.commit.nil? ? 0 : bid.commit
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= link_to(course.teacher.show_name.truncate(6, omission: '...'), user_path(course.teacher)) %>
|
<%= link_to(course.teacher.show_name, user_path(course.teacher)) %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= course.class_period %>
|
<%= course.class_period %>
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= link_to(course.teacher.show_name.truncate(6, omission: '...'), user_path(course.teacher)) %>
|
<%= link_to(course.teacher.show_name, user_path(course.teacher)) %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= course.class_period %>
|
<%= course.class_period %>
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
<td class="center">
|
<td class="center">
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= link_to(syllabus.try(:user).try(:realname).truncate(6, omission: '...'), user_path(syllabus.user)) %>
|
<%= link_to syllabus.user.show_name, user_path(syllabus.user) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%= format_date(syllabus.created_at) %>
|
<%= format_date(syllabus.created_at) %>
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
<%= render :partial => 'admin/rename_course_name', :locals => {:course => course} %>
|
<%= render :partial => 'admin/rename_course_name', :locals => {:course => course} %>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
|
<%= link_to(course.teacher.show_name, user_path(course.teacher)) %>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
<%= format_date(course.created_at) %>
|
<%= format_date(course.created_at) %>
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
<div class="sy_popup_top">
|
||||||
|
<h3 class="fl">欢迎加入项目</h3>
|
||||||
|
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sy_popup_con" style="width:370px;">
|
||||||
|
<%= form_tag( url_for(:controller => 'applied_project', :action => 'applied_project_info', :project_id => (@project.nil? ? nil : @project.id)), :remote => true, :id => 'project_applied_form') do %>
|
||||||
|
<ul class="sy_popup_add ">
|
||||||
|
<li>
|
||||||
|
<label >项目邀请码:</label>
|
||||||
|
<input name="invite_code" class=" sy_input_txt fl" placeholder="请输入六位项目邀请码" style="width:250px"/>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label >身份:</label>
|
||||||
|
<input name="member" value="member_manager" type="radio" class="ml5 mr5 " /><span class="mr10">管理人员</span>
|
||||||
|
<input name="member" value="member_developer" type="radio" class="ml5 mr5 " /><span class="mr10">开发人员</span>
|
||||||
|
<input name="member" value="member_reporter" type="radio" class="ml5 mr5 " /><span class="mr10">报告人员</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label> </label>
|
||||||
|
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sy_btn_blue fl" onclick="$('#project_applied_form').submit();hideModal()">确 定</a></div>
|
||||||
|
<a href="javascript:void(0);" class="sy_btn_grey fl ml20" onclick="hideModal()">取 消</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<div id="sy_popup_box" style="width:380px;">
|
||||||
|
<div class="sy_popup_top sy_popup_top_tishi">
|
||||||
|
<h3 class="fl">提示</h3>
|
||||||
|
<a href="javascript:void(0);" class="sy_icons_close02 fr" onclick="hideModal()"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="sy_popup_con02" >
|
||||||
|
<ul class="sy_popup_tishi ">
|
||||||
|
<li>
|
||||||
|
<% if @flag == 1 %>
|
||||||
|
<p>您输入的邀请码错误</p>
|
||||||
|
<% elsif @flag == 2 %>
|
||||||
|
<p>您已经是该项目成员</p>
|
||||||
|
<% elsif @flag == 3 %>
|
||||||
|
<p>请选择一个角色</p>
|
||||||
|
<% elsif @flag == 4 %>
|
||||||
|
<p>您的申请已提交,请等待项目管理员审批</p>
|
||||||
|
<% end %>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="javascript:void(0);" class="sy_btn_blue " onclick="hideModal()">知道了</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,14 +1,3 @@
|
||||||
// @status: 0 该项目不存在;1 不重复加入;2 成功加入; 3 已是项目成员;其它 加入失败
|
var htmlvalue = "<%= escape_javascript(render :partial => 'applied_join_project', locals: {:project_id => (@project.nil? ? nil : @project.id)}) %>";
|
||||||
<% if @status == 0%>
|
pop_box_new(htmlvalue,460,40,50);
|
||||||
alert("<%= l('project.join.tips.notexist') %>");
|
|
||||||
<% elsif @status == 1%>
|
|
||||||
alert("<%= l('project.join.tips.repeat') %>");
|
|
||||||
<% elsif @status == 2%>
|
|
||||||
alert("<%= l('project.join.tips.success') %>");
|
|
||||||
hideModal($("#popbox"));
|
|
||||||
$("#applied_project_link_<%= @project.id%>").replaceWith("<%=escape_javascript(link_to '取消申请',appliedproject_applied_path(:project_id => @project.id,:user_id => User.current.id),:class => "blue_n_btn fr mt20", :remote => "true",:method => "delete",:id => "applied_project_link_#{@project.id}")%>");
|
|
||||||
<% elsif @status == 3%>
|
|
||||||
alert("<%= l('project.join.tips.has') %>");
|
|
||||||
<%else%>
|
|
||||||
alert("<%= l('project.join.tips.fail') %>");
|
|
||||||
<%end%>
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<% if @project %>
|
||||||
|
$("#join_in_project_applied").html('<%= escape_javascript( render :partial => 'projects/applied_status') %>');
|
||||||
|
<% end %>
|
||||||
|
var htmlvalue = "<%= escape_javascript(render :partial => 'applied_project/applied_project_tip') %>";
|
||||||
|
pop_box_new(htmlvalue,380,40,50);
|
|
@ -92,7 +92,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if options[:author] %>
|
<% if options[:author] %>
|
||||||
<span class="author" title="<%= attachment.author%>">
|
<span class="author" title="<%= attachment.author%>">
|
||||||
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>,
|
<%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "link-blue" %>,
|
||||||
<%= format_time(attachment.created_on) %>
|
<%= format_time(attachment.created_on) %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if @in_user_homepage %>
|
<% if @in_user_homepage %>
|
||||||
<% homepage = BlogComment.find(User.current.blog.homepage_id) %>
|
<% homepage = BlogComment.find(@user.blog.homepage_id) %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>");
|
||||||
<% else%>
|
<% else%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" >
|
<div class="resources mt10" id="user_activity_<%= user_activity_id%>" >
|
||||||
<div class="homepagePostBrief" onmouseover="$('#homepage_message_setting_<%=activity.id%>').show();" onmouseout="$('#homepage_message_setting_<%= activity.id%>').hide();">
|
<div class="homepagePostBrief" onmouseover="$('#homepage_message_setting_<%=activity.id%>').show();" onmouseout="$('#homepage_message_setting_<%= activity.id%>').hide();">
|
||||||
<div class="homepagePostDes">
|
|
||||||
<% if activity.author.id == User.current.id%>
|
<% if activity.author.id == User.current.id%>
|
||||||
<div class="homepagePostSetting" id="homepage_message_setting_<%= activity.id%>" style="display: none">
|
<div class="homepagePostSetting" id="homepage_message_setting_<%= activity.id%>" style="display: none">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -35,7 +34,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<%end%>
|
||||||
<div class="cl"></div>
|
|
||||||
<div class="homepagePostTitle hidden m_w530">
|
<div class="homepagePostTitle hidden m_w530">
|
||||||
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id,
|
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author_id,
|
||||||
:blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey", :style => 'text-align:center;' %>
|
:blog_id=>activity.blog.id,:id=>activity), :class=> "postGrey", :style => 'text-align:center;' %>
|
||||||
|
@ -45,7 +43,6 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
<% all_comments = []%>
|
||||||
|
@ -57,7 +54,7 @@
|
||||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1}%>
|
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
<label class="fl">
|
<label class="fl">
|
||||||
<input name="course_content_type[]" type="checkbox" value="1" class="resourceCopy"/>
|
<input name="course_content_type[]" type="checkbox" value="1" class="resourceCopy"/>
|
||||||
资源</label>
|
资源</label>
|
||||||
<span class="c_red ml5 fl mb10">复制到新班级的资源将在1个月后发布,请您调整资源的发布时间,否则学生可能看不到资源。</span>
|
<span class="c_red ml5 fl mb10">复制到新班级的资源将在1个月后发布,请您调整资源的发布时间,否则学生将看不到资源。</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<!--<ul class="fl" id="copyResource2">
|
<!--<ul class="fl" id="copyResource2">
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% @roles.each do |role| %>
|
<% @roles.each do |role| %>
|
||||||
<li>
|
<li>
|
||||||
<%= radio_button_tag 'membership[role_ids][]', role.id, role.name == "学生" || role.name == "Student" %>
|
<%= check_box_tag 'membership[role_ids][]', role.id, role.name == "学生" || role.name == "Student", :id => "add_member_checkbox_#{role.id}" %>
|
||||||
<label ><%= zh_course_role(h role) %></label>
|
<label ><%= zh_course_role(h role) %></label>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -47,4 +47,23 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div><!-- 右边 end-->
|
</div><!-- 右边 end-->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#add_member_checkbox_7").on('click', function(){
|
||||||
|
if($("#add_member_checkbox_7").is(":checked")) {
|
||||||
|
$("#add_member_checkbox_9").attr('disabled', 'disabled');
|
||||||
|
} else {
|
||||||
|
$("#add_member_checkbox_9").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#add_member_checkbox_9").on('click', function(){
|
||||||
|
if($("#add_member_checkbox_9").is(":checked")) {
|
||||||
|
$("#add_member_checkbox_7").attr('disabled', 'disabled');
|
||||||
|
} else {
|
||||||
|
$("#add_member_checkbox_7").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -1,100 +1,52 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<div id="sy_popup_box">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<div class="sy_popup_top">
|
||||||
<head>
|
<h3 class="fl">欢迎加入班级</h3>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
|
||||||
<title>快速进入班级通道</title>
|
<div class="cl"></div>
|
||||||
<style>
|
</div>
|
||||||
#popbox{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;}
|
<div class="sy_popup_con">
|
||||||
#popbox div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margin:0; padding:0;}
|
<%= form_tag({:controller => 'courses', :action => 'join_course_multi_role'}, :remote => true, :method => :post, :id => 'new-watcher-form') do %>
|
||||||
#popbox div,img,tr,td{ border:0;}
|
<ul class="sy_popup_add ">
|
||||||
#popbox table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
<li>
|
||||||
#popbox ul,li{ list-style-type:none}
|
<label>班级邀请码:</label>
|
||||||
#popbox .cl{ clear:both; overflow:hidden; }
|
<input class=" sy_input_txt fl" name="invite_code" placeholder="请输入五位班级邀请码">
|
||||||
#popbox a{ text-decoration:none; }
|
|
||||||
#popbox a:hover{}
|
|
||||||
|
|
||||||
.alert_box {width:488px;height:550px;position:fixed;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; }
|
<div class="cl"></div>
|
||||||
#popbox{width:488px;height:368px;}
|
</li>
|
||||||
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
|
<li>
|
||||||
#popbox .C_top{ margin-top:20px; width:368px; height:100px; background:#e9e9e9; padding:0px 60px; }
|
<label>身份:</label>
|
||||||
#popbox .C_top h2{ color:#1c1d1d; font-size:24px; font-style:normal; font-weight:normal;}
|
<input type="checkbox" name="role[]" value="9" id="join_course_role_9" class="ml5 mr5 "/><span class="mr10">教师</span>
|
||||||
#popbox .C_top p{ color:#a9aaaa; line-height:22px;}
|
<input type="checkbox" name="role[]" value="7" id="join_course_role_7" class="ml5 mr5"/><span class="mr10">助教</span>
|
||||||
#popbox .C_form{ margin:20px 0 0 60px;}
|
<input type="checkbox" name="role[]" value="10" id="join_course_role_10" class="ml5 mr5"/><span class="mr10">学生</span>
|
||||||
#popbox .C_form ul li{ font-size:14px; color:#3f3a39; line-height:30px; }
|
|
||||||
#popbox .C_form ul li input{ margin-left:20px; border:0px; border:1px solid #e1e1e1; color:#898989; padding-left:5px; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; padding: 0 !important; }
|
|
||||||
#popbox .C_form ul li.mB5{ color:#898989; font-size:12px; padding-left:97px;}
|
|
||||||
#popbox .width190{ width:190px; height:26px; border-color:#e1e1e1;}
|
|
||||||
#popbox .C_form a{ font-size:12px; color:#15bccf; float:left; display:block; height:40px; width:200px; margin-top:25px;}
|
|
||||||
#popbox .C_form a:hover{ text-decoration:underline;}
|
|
||||||
#popbox .C_form a.btn_join{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#269ac9; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
|
|
||||||
#popbox .C_form a.btn_join:hover{ background:#297fb8; text-decoration: none;}
|
|
||||||
#popbox .C_form a.btn_cancel{ display:block; width:100px; height:36px; padding-top:4px; text-align: center; background:#c1c1c1; color:#fff; font-size:14px; margin:20px 20px 0 95px;}
|
|
||||||
#popbox .C_form a.btn_cancel:hover{ background:#717171; text-decoration: none;}
|
|
||||||
#popbox .IDType {border:1px solid #e1e1e1; outline: none; width: 65px; height: 25px;}
|
|
||||||
</style>
|
|
||||||
<script type="text/javascript">
|
|
||||||
function submit_form(obj)
|
|
||||||
{
|
|
||||||
$("#new-watcher-form").submit();
|
|
||||||
}
|
|
||||||
|
|
||||||
function hidden_join_course_form()
|
<div class="cl"></div>
|
||||||
{
|
</li>
|
||||||
hideModal($("#popbox"));
|
<li>
|
||||||
}
|
<label> </label>
|
||||||
</script>
|
<a href="javascript:void(0);" class="sy_btn_blue fl" onclick="$('#new-watcher-form').submit();hideModal()">确 定</a>
|
||||||
</head>
|
<a href="javascript:void(0);" class="sy_btn_grey fl ml20" onclick="hideModal()">取 消</a>
|
||||||
|
|
||||||
<body>
|
<div class="cl"></div>
|
||||||
<div id="popbox">
|
</li>
|
||||||
<div class="C" >
|
</ul>
|
||||||
<div class="C_top">
|
<% end %>
|
||||||
<h2>快速加入班级通道</h2>
|
</div>
|
||||||
<p>只要持有班级邀请码,就可以快速加入所在班级。班级页面搜索不到的私有班级只能从此通道进入哦!</p>
|
|
||||||
</div>
|
|
||||||
<div class="C_form">
|
|
||||||
<%= form_tag({:controller => 'courses',
|
|
||||||
:action => 'join'},
|
|
||||||
:remote => true,
|
|
||||||
:method => :post,
|
|
||||||
:id => 'new-watcher-form') do %>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
|
||||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
|
||||||
<span class="tips" style="width: 90px; display: inline-block;">班级邀请码:</span>
|
|
||||||
<input class="width190" style="margin-left: 0px;" name="invite_code" id="object_id" type="text" value="" >
|
|
||||||
<input type="text" style="display: none"/>
|
|
||||||
</li>
|
|
||||||
<li class="mB5">班级邀请码是所在班级页面中显示的邀请码</li>
|
|
||||||
<li style="margin-top: 15px;">
|
|
||||||
<span style="margin-right: 5px;"><span style="margin-right:43px;">身</span><span>份</span>:</span>
|
|
||||||
<% if User.current.logged? && User.current.extensions && User.current.extensions.identity == 0%>
|
|
||||||
<select name="role" class="IDType">
|
|
||||||
<option value="9">教师</option>
|
|
||||||
<option value="7">教辅</option>
|
|
||||||
<option value="10">学生</option>
|
|
||||||
</select>
|
|
||||||
<%else%>
|
|
||||||
<select name="role" class="IDType">
|
|
||||||
<option value="10">学生</option>
|
|
||||||
<option value="7">教辅</option>
|
|
||||||
</select>
|
|
||||||
<%end%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:" class="btn_join" style="margin-left: 50px;" onclick="submit_form(this);">
|
|
||||||
<%= l(:label_new_join) %>
|
|
||||||
</a>
|
|
||||||
<a href="javascript:" class="btn_cancel" style="margin-left: 20px;" onclick="hideModal(this);">
|
|
||||||
<%= l(:button_cancel)%>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
</div><!---- C end---->
|
|
||||||
</div>
|
</div>
|
||||||
</body>
|
<script>
|
||||||
</html>
|
$(function() {
|
||||||
|
$("#join_course_role_7").on('click', function(){
|
||||||
|
if($("#join_course_role_7").is(":checked")) {
|
||||||
|
$("#join_course_role_9").attr('disabled', 'disabled');
|
||||||
|
} else {
|
||||||
|
$("#join_course_role_9").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#join_course_role_9").on('click', function(){
|
||||||
|
if($("#join_course_role_9").is(":checked")) {
|
||||||
|
$("#join_course_role_7").attr('disabled', 'disabled');
|
||||||
|
} else {
|
||||||
|
$("#join_course_role_7").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -10,7 +10,7 @@
|
||||||
) do |f| %>
|
) do |f| %>
|
||||||
<% @roles.each do |role| %>
|
<% @roles.each do |role| %>
|
||||||
<ul style="text-align: left;" class="ml45">
|
<ul style="text-align: left;" class="ml45">
|
||||||
<%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
|
<%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role), :id => "edit_member_role_#{member.id}_#{role.id}",
|
||||||
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
|
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
|
||||||
<label ><%= zh_course_role(h role) %></label>
|
<label ><%= zh_course_role(h role) %></label>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -35,4 +35,25 @@
|
||||||
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_delete_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
|
:data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_delete_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<% end%>
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$("#edit_member_role_<%=member.id %>_7").on('click', function(){
|
||||||
|
if($("#edit_member_role_<%=member.id %>_7").is(":checked")) {
|
||||||
|
$("#edit_member_role_<%=member.id %>_9").attr("checked",false);
|
||||||
|
$("#edit_member_role_<%=member.id %>_9").attr('disabled', 'disabled');
|
||||||
|
} else {
|
||||||
|
$("#edit_member_role_<%=member.id %>_9").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("#edit_member_role_<%=member.id %>_9").on('click', function(){
|
||||||
|
if($("#edit_member_role_<%=member.id %>_9").is(":checked")) {
|
||||||
|
$("#edit_member_role_<%=member.id %>_7").attr('disabled', 'disabled');
|
||||||
|
$("#edit_member_role_<%=member.id %>_7").attr("checked",false);
|
||||||
|
} else {
|
||||||
|
$("#edit_member_role_<%=member.id %>_7").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% end%>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<% if show_nav?(course_feedback_count) %>
|
<% if show_nav?(course_feedback_count) %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<%=course_feedback_path(@course) %>">留言</a>
|
<a href="<%=course_feedback_path(@course) %>">留言</a>
|
||||||
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}", :id => "course_jour_count"%>
|
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}"%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if show_nav?(course_poll_count) %>
|
<% if show_nav?(course_poll_count) %>
|
||||||
|
|
|
@ -36,6 +36,10 @@ window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/co
|
||||||
alert("您已经是该班级的管理员了");
|
alert("您已经是该班级的管理员了");
|
||||||
hidden_join_course_form();
|
hidden_join_course_form();
|
||||||
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 11%>
|
||||||
|
alert("该班级已被删除");
|
||||||
|
hidden_join_course_form();
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
<% else %>
|
<% else %>
|
||||||
alert("未知错误,请稍后再试");
|
alert("未知错误,请稍后再试");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
<% if @object_id && @state != 6 && @state !=4 %>
|
||||||
|
$("#join_in_course_header").html("<%= escape_javascript(join_in_course_header(@course, @user)) %>");
|
||||||
|
<% end %>
|
||||||
|
<% if @state %>
|
||||||
|
<% if @state == 0 %>
|
||||||
|
alert("加入成功");
|
||||||
|
hideModal();
|
||||||
|
$("#try_join_course_link").replaceWith("<a href='<%=url_for(:controller => 'homework_common', :action => 'index',:course=>@course.id, :host=>Setting.host_course)%>' target='_blank' class='blue_n_btn fr mt20'>提交作品</a>");
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 1 %>
|
||||||
|
alert("密码错误");
|
||||||
|
<% elsif @state == 2 %>
|
||||||
|
alert("班级已过期\n请联系班级管理员重启班级。(在配置班级处)");
|
||||||
|
<% elsif @state == 3 %>
|
||||||
|
alert("您已经加入了班级");
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 4 %>
|
||||||
|
alert("您加入的班级不存在");
|
||||||
|
<% elsif @state == 5 %>
|
||||||
|
alert("您还未登录");
|
||||||
|
<% elsif @state == 6 %>
|
||||||
|
alert("申请成功,请等待审核");
|
||||||
|
hidden_join_course_form();
|
||||||
|
<% elsif @state == 7%>
|
||||||
|
alert("您已经发送过申请了,请耐心等待");
|
||||||
|
hidden_join_course_form();
|
||||||
|
<% elsif @state == 8%>
|
||||||
|
alert("您已经是该班级的教师了");
|
||||||
|
hidden_join_course_form();
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 9%>
|
||||||
|
alert("您已经是该班级的教辅了");
|
||||||
|
hidden_join_course_form();
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 10%>
|
||||||
|
alert("您已经是该班级的管理员了");
|
||||||
|
hidden_join_course_form();
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 11%>
|
||||||
|
alert("该班级已被删除");
|
||||||
|
hidden_join_course_form();
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 12 %>
|
||||||
|
alert("您已经发送过申请了,请耐心等待");
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% elsif @state == 13 %>
|
||||||
|
alert("申请成功,请等待审核");
|
||||||
|
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
|
||||||
|
<% else %>
|
||||||
|
alert("未知错误,请稍后再试");
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -1,11 +1,2 @@
|
||||||
$('#topnav_course_menu').hide();
|
var htmlvalue = "<%= escape_javascript(render :partial => 'join_private_course') %>";
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'join_private_course') %>');
|
pop_box_new(htmlvalue,460,40,50);
|
||||||
showModal('ajax-modal', '540px');
|
|
||||||
$('#ajax-modal').css('height','390px');
|
|
||||||
//$('#ajax-modal').siblings().remove();
|
|
||||||
$('#ajax-modal').siblings().hide();
|
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
|
|
||||||
"<a href='javascript:' onclick='hidden_join_course_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
|
||||||
$('#ajax-modal').parent().removeClass("alert_praise");
|
|
||||||
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
|
|
||||||
$('#ajax-modal').parent().addClass("alert_box");
|
|
||||||
|
|
|
@ -17,13 +17,13 @@
|
||||||
<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" 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>
|
||||||
<li class="ml45">
|
<li class="ml45">
|
||||||
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
<label><span class="c_red">*</span> <%= l(:label_class_period)%> :</label>
|
||||||
<input type="text" name="class_period" id="new_class_period" class="hwork_input02" onkeyup="regex_course_class_period('new');" maxlength="6">
|
<input type="text" name="class_period" id="new_class_period" class="hwork_input02" onkeyup="regex_course_class_period('new');" placeholder="例如:54" maxlength="6">
|
||||||
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
<span class='<%= "#{get_issue_priority(@issue.priority_id)[0]} " %>'><%= get_issue_priority(@issue.priority_id)[1] %></span></p>
|
||||||
<br>
|
<br>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
由<a href="javascript:void(0)" class="problem_name"><%= @issue.author %></a>添加于 <%= format_time(@issue.created_on).html_safe %>
|
由<%=link_to @issue.author, user_path(@issue.author), :class => "link-blue" %>添加于 <%= format_time(@issue.created_on).html_safe %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--talk_txt end-->
|
<!--talk_txt end-->
|
||||||
|
|
|
@ -1,278 +0,0 @@
|
||||||
<%# course_model %>
|
|
||||||
<% course_file_num = visable_attachemnts_incourse(@course).count%>
|
|
||||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course)) %>
|
|
||||||
<% homework_num = visable_course_homework @course %>
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>
|
|
||||||
<%= h html_title %>
|
|
||||||
</title>
|
|
||||||
<meta name="description" content="<%= Redmine::Info.app_name %>"/>
|
|
||||||
<meta name="keywords" content="issue,bug,tracker"/>
|
|
||||||
<%= csrf_meta_tag %>
|
|
||||||
<%= favicon %>
|
|
||||||
<%= javascript_heads %>
|
|
||||||
<%= heads_for_theme %>
|
|
||||||
<%= 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'%>
|
|
||||||
<%= javascript_include_tag "course","sy_public", "syllabus","header","attachments",'prettify' %>
|
|
||||||
<!-- page specific tags -->
|
|
||||||
<%= yield :header_tags -%>
|
|
||||||
<!-- MathJax的配置 -->
|
|
||||||
<script type="text/javascript"
|
|
||||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
|
||||||
</script>
|
|
||||||
<!--<script type="text/javascript"-->
|
|
||||||
<!--src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">-->
|
|
||||||
<!--</script>-->
|
|
||||||
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
|
||||||
<script type="text/x-mathjax-config">
|
|
||||||
MathJax.Hub.Config({
|
|
||||||
|
|
||||||
showMathMenu: false,
|
|
||||||
showMathMenuMSIE: false,
|
|
||||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<!--add by huang-->
|
|
||||||
<body onload="prettyPrint();">
|
|
||||||
<div class="navContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<%= render :partial => 'layouts/logined_header' %>
|
|
||||||
<% else%>
|
|
||||||
<%= render :partial => 'layouts/unlogin_header' %>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<div id="Container">
|
|
||||||
<div id="content">
|
|
||||||
<div id="LSide" class="fl">
|
|
||||||
<div class="project_info" style="position: relative" id="project_info_<%=@course.id %>">
|
|
||||||
<%=render :partial=>'layouts/project_info' %>
|
|
||||||
</div><!--课程信息 end-->
|
|
||||||
|
|
||||||
<div class="info_box">
|
|
||||||
<ul>
|
|
||||||
<li><%= l(:label_main_teacher)%> : <%= link_to(@course.teacher.lastname+@course.teacher.firstname, user_path(@course.teacher), :class => 'c_dblue') %></li>
|
|
||||||
<li><%= l(:label_class_period)%> : <span ><%= @course.class_period %> <%= l(:label_class_hour) %></span></li>
|
|
||||||
<li><%= l(:label_main_term)%> : <span><%= current_time_and_term @course %></span></li>
|
|
||||||
<% if @course.school%>
|
|
||||||
<li><%= l(:label_course_organizers)%> : <%= @course.school%></li>
|
|
||||||
<% end%>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
|
||||||
<% update_visiti_count @course %>
|
|
||||||
<%# over %>
|
|
||||||
|
|
||||||
<div class="subNavBox">
|
|
||||||
<% unless show_nav?(@course.course_activities.count) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:label_activity), course_path(@course), :class => "f14 c_blue02" %>
|
|
||||||
<!--暂时不显示课程动态数,优化后在显示-->
|
|
||||||
<%= link_to "(#{@course.course_activities.count})", course_path(@course), :class => "subnav_num c_orange"%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(@course.homework_commons.count) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
|
|
||||||
<%= link_to "(#{homework_num})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
|
|
||||||
<%= link_to( "", homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'courseMenuSetting', :title =>"#{l(:label_course_homework_new)}") if is_teacher %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(@course.news.count) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to "通知", course_news_index_path(@course), :class => "f14 c_blue02" %>
|
|
||||||
<%= link_to "(#{@course.news.count})", course_news_index_path(@course), :class => "subnav_num c_orange"%>
|
|
||||||
<%= link_to( "", new_course_news_path(@course,:is_new=>1), :class => 'courseMenuSetting', :title =>"#{l(:label_course_news_new)}") if is_teacher %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(course_file_num) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:label_course_file), course_files_path(@course), :class => "f14 c_blue02" %>
|
|
||||||
<%= link_to "(#{course_file_num})", course_files_path(@course), :class => "subnav_num c_orange",:id=>'courses_files_count_nav' %>
|
|
||||||
<% if is_teacher || (@course.publish_resource == 1 && User.current.member_of_course?(@course)) %>
|
|
||||||
<!--link_to( "+#{l(:label_upload_files)}", course_files_path(@course), :class => 'subnav_green ml95 c_white')-->
|
|
||||||
<a class="courseMenuSetting" title="上传资源" href="javascript:void(0);" onclick="course_files_upload();"> </a>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(@course.boards.first ? @course.boards.first.topics.count : 0) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f14 c_blue02" %>
|
|
||||||
<%= link_to "(#{@course.boards.first ? (@course.boards.first.topics.count + Message.where("board_id =? and parent_id is not ?", @course.boards.first.id, nil).count) : 0})", course_boards_path(@course), :class => "subnav_num c_orange" %>
|
|
||||||
<%= link_to( "",course_boards_path(@course, :flag => true, :is_new => 1), :class => 'courseMenuSetting', :title =>"#{l(:label_message_new)}") %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(course_feedback_count) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:label_course_feedback), course_feedback_path(@course), :class => "f14 c_blue02" %>
|
|
||||||
<%= link_to "(#{course_feedback_count})", course_feedback_path(@course), :class => "subnav_num c_orange", :id => "course_jour_count"%>
|
|
||||||
<%= link_to "", course_feedback_path(@course), :class => 'courseMenuSetting', :title =>"#{l(:label_course_feedback)}", :id => "course_jour_count"%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(course_poll_count) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => " f14 c_blue02"%>
|
|
||||||
<%= link_to "(#{course_poll_count})", poll_index_path(:polls_type => "Course", :polls_group_id => @course.id), :class => "subnav_num c_orange" %>
|
|
||||||
<%= link_to( "", new_poll_path(:polls_type => "Course",:polls_group_id => @course.id), :class => 'courseMenuSetting', :title =>"#{l(:label_new_poll)}") if is_teacher %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% unless show_nav?(User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count) %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to "在线测验", exercise_index_path(:course_id => @course.id), :class => " f14 c_blue02"%>
|
|
||||||
<%= link_to "(#{User.current.allowed_to?(:as_teacher,@course)? @course.exercises.count : @course.exercises.where("exercise_status <> 1").count})", exercise_index_path(:course_id => @course.id), :class => "subnav_num c_orange" %>
|
|
||||||
<%= link_to( "", new_exercise_path(:course_id => @course.id), :class => 'courseMenuSetting', :title =>"新建试卷") if is_teacher %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<%# 工具栏展开 %>
|
|
||||||
<% if @course.homework_commons.count == 0 || @course.news.count == 0 || course_file_num == 0 || course_poll_count == 0 || @course.exercises.count == 0 ||
|
|
||||||
course_feedback_count == 0 || @course.exercises.count == 0 || (@course.boards.first ? @course.boards.first.topics.count : 0) == 0 %>
|
|
||||||
|
|
||||||
<div class="subNav subNav_jiantou" id="expand_tools_expand"><%= l(:label_project_more) %></div>
|
|
||||||
<ul class="navContent" id="navContentCourse">
|
|
||||||
<%= render 'courses/tool_expand', :locals => {:is_teacher => is_teacher, :course_file_num => course_file_num} %>
|
|
||||||
</ul>
|
|
||||||
<% end %>
|
|
||||||
</div><!--项目侧导航 end-->
|
|
||||||
<%# 课程活跃度 %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<%= render :partial => 'courses/course_activity_users', :locals => {:course => @course} %>
|
|
||||||
<%# 课程英雄榜 %>
|
|
||||||
<%= render :partial => 'courses/course_heroes', :locals => {:course => @course} %>
|
|
||||||
|
|
||||||
<% if @course.description && !@course.description.blank? %>
|
|
||||||
<div class="project_intro">
|
|
||||||
<div id="course_description" class="course_description">
|
|
||||||
<h4 ><%= l(:label_course_brief_introduction)%>:</h4>
|
|
||||||
<div id="course_description_content">
|
|
||||||
<%= textilizable(@course.description) if @course.description && !@course.description.blank? %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="lg-foot" id="lg-foot" onclick="show_more_msg();">
|
|
||||||
<label id="expend_more_information" value="show_more"><%= l(:label_expend_information)%></label>
|
|
||||||
<span class="g-arr-down">
|
|
||||||
<img id="arrow" src="/images/jiantou.jpg" width="12" height="6" />
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div><!--项目简介 end-->
|
|
||||||
<% end %>
|
|
||||||
<div class="project_Label">
|
|
||||||
<h4 class="mb5" ><%= l(:label_tag)%>:</h4>
|
|
||||||
<div class="tag_h" >
|
|
||||||
<%= render :partial => 'tags/new_tag', :locals => {:obj => @course, :object_flag => "9"} %>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div><!--项目标签 end-->
|
|
||||||
<!--课程推荐-->
|
|
||||||
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
|
|
||||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @course.visits.to_i %> (自2016年5月)</div>
|
|
||||||
</div><!--LSide end-->
|
|
||||||
|
|
||||||
<div id="RSide" class="fl">
|
|
||||||
<%= yield %>
|
|
||||||
<%#= render_flash_messages %>
|
|
||||||
<%#= call_hook :view_layouts_base_content %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
</div><!--Content end-->
|
|
||||||
</div><!--Container end-->
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
<%= render :partial => 'layouts/footer' %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<%= render :partial => 'layouts/new_feedback' %>
|
|
||||||
<div id="ajax-indicator" style="display:none;">
|
|
||||||
<span><%= l(:label_loading) %></span>
|
|
||||||
</div>
|
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
|
||||||
<%= call_hook :view_layouts_base_body_bottom %>
|
|
||||||
</body>
|
|
||||||
<script>
|
|
||||||
var blog_artile_list_html = '';
|
|
||||||
$(function(){
|
|
||||||
$(document).on('input','input[name="course_outline_search"]',function(e){
|
|
||||||
throttle(course_outline_search,window,e);
|
|
||||||
})
|
|
||||||
function throttle(method,context,e){
|
|
||||||
clearTimeout(method.tId);
|
|
||||||
method.tId=setTimeout(function(){
|
|
||||||
method.call(context,e);
|
|
||||||
},500);
|
|
||||||
}
|
|
||||||
function course_outline_search(e){
|
|
||||||
// if($(e.target).val().trim() == ''){
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
$("#course_outline_hint").hide();
|
|
||||||
$.ajax({
|
|
||||||
url:'<%=search_course_outline_course_path(@course) %>'+"?&title="+ e.target.value,
|
|
||||||
type:'post',
|
|
||||||
success:function(data){
|
|
||||||
|
|
||||||
if(data.length != 0 ){
|
|
||||||
$("#course_outline_list").html('');
|
|
||||||
for(var i =0;i<data.length;i++){
|
|
||||||
var html = ' <ul class="blogRow"> '+
|
|
||||||
' <li class="fl"> '+
|
|
||||||
'<input name="outline_id" type="radio" value="'+data[i].blog_comment.id+'" class="courseSendCheckbox"/>'+
|
|
||||||
'</li>'+
|
|
||||||
'<li class="blogTitle fl">'+data[i].blog_comment.title+'</li>'+
|
|
||||||
'</ul>'+
|
|
||||||
'<div class="homeworkPublishTime">发布时间:'+data[i].blog_comment.created_at.match(/(\S*)T/)[1]+'</div>';
|
|
||||||
$("#course_outline_list").append(html)
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
$("#course_outline_list").html('');
|
|
||||||
$("#course_outline_hint").show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
//资源库上传附件
|
|
||||||
function course_files_upload(){
|
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>');
|
|
||||||
showModal('ajax-modal', '513px');
|
|
||||||
$('#ajax-modal').siblings().remove();
|
|
||||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
|
||||||
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
|
|
||||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
||||||
}
|
|
||||||
// 鼠标经过的时候显示内容
|
|
||||||
function message_titile_show(obj,e)
|
|
||||||
{
|
|
||||||
obj.parent().parent().next("div").show();
|
|
||||||
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
|
||||||
}
|
|
||||||
function message_titile_hide(obj)
|
|
||||||
{
|
|
||||||
obj.parent().parent().next("div").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
function message_titile_show2(obj,e)
|
|
||||||
{
|
|
||||||
obj.parent().next("div").show();
|
|
||||||
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
|
||||||
}
|
|
||||||
function message_titile_hide2(obj)
|
|
||||||
{
|
|
||||||
obj.parent().next("div").hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#expand_tools_expand").click(function(){
|
|
||||||
$("#navContentCourse").toggle();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</html>
|
|
|
@ -1,151 +0,0 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8" />
|
|
||||||
<title><%= h html_title %></title>
|
|
||||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
|
||||||
<meta name="keywords" content="issue,bug,tracker" />
|
|
||||||
<%= csrf_meta_tag %>
|
|
||||||
<%= favicon %>
|
|
||||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'syllabus','css/common','css/public','css/structure','css/courses','css/popup','prettify',:media => 'all' %>
|
|
||||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
|
||||||
<%= javascript_heads %>
|
|
||||||
<%= javascript_include_tag "bootstrap","avatars","course",'attachments','prettify','syllabus'%>
|
|
||||||
<%= heads_for_theme %>
|
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
|
||||||
<%= yield :header_tags -%>
|
|
||||||
<!-- MathJax的配置 -->
|
|
||||||
<script type="text/javascript"
|
|
||||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
|
||||||
</script>
|
|
||||||
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
|
||||||
<script type="text/x-mathjax-config">
|
|
||||||
MathJax.Hub.Config({
|
|
||||||
|
|
||||||
showMathMenu: false,
|
|
||||||
showMathMenuMSIE: false,
|
|
||||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body onload="prettyPrint();">
|
|
||||||
<% is_current_user = User.current.logged?%>
|
|
||||||
<div class="navContainer">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<%= render :partial => 'layouts/logined_header' %>
|
|
||||||
<% else%>
|
|
||||||
<%= render :partial => 'layouts/unlogin_header' %>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<div class="homepageContentContainer">
|
|
||||||
<div class="homepageContent">
|
|
||||||
<div class="homepageLeft">
|
|
||||||
<div class="homepagePortraitContainer mt15" onmouseover="$('#syllabus_edit_title_png').show();$('#syllabus_edit_ng_name_png').show();" onmouseout="$('#syllabus_edit_title_png').hide();$('#syllabus_edit_ng_name_png').hide();">
|
|
||||||
<%=render :partial => 'layouts/syllabus_info' %>
|
|
||||||
</div>
|
|
||||||
<% update_visiti_count @syllabus %>
|
|
||||||
|
|
||||||
<div class="homepageLeftMenuContainer" id="syllabus_base_info" onmouseover="$('#syllabus_attr_edit').show();" onmouseout="$('#syllabus_attr_edit').hide();">
|
|
||||||
<%= render :partial => 'layouts/syllabus_base_info', :locals => {:syllabus => @syllabus} %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="homepageLeftMenuContainer">
|
|
||||||
<div class="homepageLeftMenuBlock">
|
|
||||||
<%=link_to '班级', {:controller => "syllabuses", :action => "syllabus_courselist", :id => @syllabus.id}, :class => 'homepageMenuText' %>
|
|
||||||
<% if is_current_user%>
|
|
||||||
<% if User.current == @syllabus.user && User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
|
||||||
<div class="courseMenu" id="courseMenu">
|
|
||||||
<ul>
|
|
||||||
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
|
||||||
<ul class="topnav_course_menu" id="topnav_course_menu">
|
|
||||||
<li>
|
|
||||||
<%= link_to "新建班级", new_course_path(:host=> Setting.host_course, :syllabus_id => @syllabus.id), :class => "menuGrey", :target => '_blank'%>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% else%>
|
|
||||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入班级"%>
|
|
||||||
<% end%>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% if User.current == @syllabus.user || User.current.admin?
|
|
||||||
all_courses = @syllabus.courses.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")
|
|
||||||
else
|
|
||||||
all_courses = User.current.courses.visible.where("is_delete =? and syllabus_id =?", 0, @syllabus.id).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc")
|
|
||||||
end %>
|
|
||||||
<% courses = all_courses.limit(5) %>
|
|
||||||
<% all_count = all_courses.count%>
|
|
||||||
<div class="homepageLeftMenuCourses <%= courses.empty? ? 'none' : ''%>">
|
|
||||||
<div class = "leftCoursesList" id="homepageLeftMenuCourses">
|
|
||||||
<ul>
|
|
||||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => User.current,:all_count => all_count,:type =>'Syllabus',:page => 0} %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% if !courses.empty? %>
|
|
||||||
<div class="homepageLeftMenuMore" id="user_hide_course">
|
|
||||||
<a href="javascript:void(0);" class="homepageLeftMenuHideIcon" id="hide_show_courseicon" onclick="leftCourseslistChange();"></a>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="project_Label">
|
|
||||||
<h4 class="mb5" >标签:</h4>
|
|
||||||
<div class="tag_h">
|
|
||||||
<%= render :partial => 'tags/syllabus_tag', :locals => {:obj => @syllabus,:object_flag => "11"}%>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="fontGrey2 mt10 ml20">访问计数 <%=@syllabus.visits %> (自2016年7月)</div>
|
|
||||||
|
|
||||||
</div><!--left end -->
|
|
||||||
<div class="homepageRight">
|
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<%= render :partial => 'layouts/new_feedback' %>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<%= render :partial => 'layouts/footer' %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<div id="ajax-modal" style="display:none;"></div>
|
|
||||||
<div id="ajax-indicator" style="display:none;">
|
|
||||||
<span><%= l(:label_loading) %></span>
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function() {
|
|
||||||
$('#user_hide_course').hide();
|
|
||||||
$("#syllabus_title_edit").live("blur", function () {
|
|
||||||
edit_syllabus_title('<%= edit_syllabus_title_syllabus_path(@syllabus.id)%>');
|
|
||||||
});
|
|
||||||
$("#syllabus_eng_name_edit").live("blur", function () {
|
|
||||||
edit_syllabus_eng_name('<%= edit_syllabus_eng_name_syllabus_path(@syllabus.id)%>');
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#courseMenu").mouseenter(function () {
|
|
||||||
$("#topnav_course_menu").show();
|
|
||||||
});
|
|
||||||
$("#courseMenu").mouseleave(function () {
|
|
||||||
$("#topnav_course_menu").hide();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
function leftCourseslistChange(){
|
|
||||||
$('#homepageLeftMenuCourses').slideToggle();
|
|
||||||
$('#hide_show_courseicon').toggleClass("homepageLeftMenuHideIcon");
|
|
||||||
$('#hide_show_courseicon').toggleClass("homepageLeftMenuMoreIcon");
|
|
||||||
|
|
||||||
}
|
|
||||||
function show_edit_base_info() {
|
|
||||||
$("#syllabus_base_info").html("<%=escape_javascript(render :partial => 'layouts/syllabus_edit_info', :locals => {:syllabus => @syllabus}) %>");
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -11,16 +11,13 @@
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% if is_teacher %>
|
<% if is_teacher %>
|
||||||
<div class="homepagePostSetting" >
|
<div class="sy_class_setting" >
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="sy_class_setting_icon">
|
||||||
<ul class="homepagePostSettiongText">
|
<ul class="sy_class_setting_text">
|
||||||
<li><%= link_to "班级配置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "postOptionLink" %></li>
|
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "sy_class_option" %></li>
|
||||||
<li><%= link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => @course},:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗", :class => "postOptionLink" %></li>
|
<li><%= link_to "复制班级", copy_course_course_path(@course.id),:remote=>true, :class => "sy_class_option" %></li>
|
||||||
<li><%= link_to "复制学期", copy_course_course_path(@course.id),:remote=>true, :class => "postOptionLink" %></li>
|
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "sy_class_option", :target => "_blank" %></li>
|
||||||
<% if @course.syllabus %>
|
|
||||||
<li><%= link_to "进入课程", syllabus_path(@course.syllabus), :class => "postOptionLink", :target => "_blank" %></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -45,7 +42,7 @@
|
||||||
<div class="sy_class_info fl ml15">
|
<div class="sy_class_info fl ml15">
|
||||||
<div class="sy_class_titbox">
|
<div class="sy_class_titbox">
|
||||||
<h3 class="fl sy_class_title"><%=@course.name %></h3>
|
<h3 class="fl sy_class_title"><%=@course.name %></h3>
|
||||||
<span class="icon_si fl mr20"><%=@course.is_public == 0 ? '私有' : '公开' %></span>
|
<span class="<%= @course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
||||||
<p class="sy_cgrey fl mt3">
|
<p class="sy_cgrey fl mt3">
|
||||||
<span class=" mr15">教师:<%= course_teacher_link teacher_num %></span>
|
<span class=" mr15">教师:<%= course_teacher_link teacher_num %></span>
|
||||||
<span class=" mr15">学生:<%= course_student_link student_num %></span>
|
<span class=" mr15">学生:<%= course_student_link student_num %></span>
|
||||||
|
@ -59,8 +56,18 @@
|
||||||
<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>
|
||||||
<span class=" mr15">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
|
<span class=" mr15">单位:<span class="sy_cblack"><%= get_occupation_from_user(@course.teacher).blank? ? '无' : get_occupation_from_user(@course.teacher) %></span></span>
|
||||||
</p>
|
</p>
|
||||||
<!--<a href="javascript:void(0);" class="sy_btn_orange mr10" > 教师身份</a>-->
|
<% if is_teacher %>
|
||||||
<% unless is_teacher %>
|
<%= link_to "班级设置", {:controller => 'courses', :action => 'settings', :id => @course}, :class => "sy_btn_grey mr10 fl" %>
|
||||||
|
<% end %>
|
||||||
|
<% is_TA = get_user_member_roles_course @course, User.current, 7 %>
|
||||||
|
<% is_TE = get_user_member_roles_course @course, User.current, 9 %>
|
||||||
|
<% is_ST = get_user_member_roles_course @course, User.current, 10 %>
|
||||||
|
<% if !is_teacher && (is_TA || is_TE) %>
|
||||||
|
<%= link_to '教师身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => 10, :tar_role => (is_TA ? 7 : 9)), :class => "sy_btn_orange mr10 fl", :title => "由学生身份切换至教师身份" %>
|
||||||
|
<% elsif is_teacher && is_ST %>
|
||||||
|
<%= link_to '学生身份', switch_role_course_path(@course, :user_id => User.current.id, :curr_role => (is_TA ? 7 : 9), :tar_role => 10), :class => "sy_btn_orange mr10 fl", :title => "由教师身份切换至学生身份" %>
|
||||||
|
<% end %>
|
||||||
|
<% unless (is_teacher || is_TA || is_TE) %>
|
||||||
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
|
<div id="join_in_course_header"><%= join_in_course_header(@course, User.current) %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
<div class="pr_info_join fl">
|
<div class="pr_info_join fl">
|
||||||
<!--关注:非项目成员-->
|
<!--关注:非项目成员-->
|
||||||
<% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
|
<div id="join_in_project_applied">
|
||||||
<span><%= watcher_link_for_project(@project, User.current) %></span>
|
<%= render :partial => "projects/applied_status" %>
|
||||||
<% end %>
|
</div>
|
||||||
<!--加入项目 -->
|
|
||||||
<% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
|
|
||||||
<%= join_in_project_link(@project, User.current) %>
|
|
||||||
<% end %>
|
|
||||||
<!--配置项目-->
|
<!--配置项目-->
|
||||||
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
|
<% if User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project) %>
|
||||||
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
|
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
|
||||||
|
|
|
@ -91,8 +91,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless show_nav?(course_feedback_count) %>
|
<% unless show_nav?(course_feedback_count) %>
|
||||||
<li id="sy_06" class="sy_icons_feedback">
|
<li id="sy_06" class="sy_icons_feedback">
|
||||||
<a href="<%=course_feedback_path(@course) %>">留言<span><%=course_feedback_count %></span></a>
|
<a href="<%=course_feedback_path(@course) %>">留言<span id="course_jour_count"><%=course_feedback_count %></span></a>
|
||||||
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}", :id => "course_jour_count"%>
|
<%= link_to "", course_feedback_path(@course), :class => 'sy_class_add', :title =>"#{l(:label_course_feedback)}"%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless show_nav?(course_poll_count) %>
|
<% unless show_nav?(course_poll_count) %>
|
||||||
|
|
|
@ -53,7 +53,8 @@
|
||||||
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %>
|
<%= image_tag(url_to_avatar(@project), :width => "60", :height => "60") %>
|
||||||
</div>
|
</div>
|
||||||
<div class="pr_info_id fl mb5 f14">
|
<div class="pr_info_id fl mb5 f14">
|
||||||
<%= l(:label_project_id)%><%= @project.id %>
|
<%= l(:label_project_ivite_code)%>
|
||||||
|
<%= (User.current.member_of?(@project) || User.current.admin?) ? @project.invite_code : "******" %>
|
||||||
</div>
|
</div>
|
||||||
<!--关注、申请加入/退出项目-->
|
<!--关注、申请加入/退出项目-->
|
||||||
<div id="join_exit_project_div">
|
<div id="join_exit_project_div">
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
<%= link_to '课程',{:controller => "users", :action => "user_courselist", :id => @user.id}, :class => "homepageMenuText" %>
|
<%= link_to '课程',{:controller => "users", :action => "user_courselist", :id => @user.id}, :class => "homepageMenuText" %>
|
||||||
|
|
||||||
<% if is_current_user%>
|
<% if is_current_user%>
|
||||||
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
<%# if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||||
<div class="courseMenu" id="courseMenu">
|
<div class="courseMenu" id="courseMenu">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
||||||
|
@ -211,9 +211,9 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% else%>
|
<%# else%>
|
||||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入班级"%>
|
<%#=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入班级"%>
|
||||||
<% end%>
|
<%# end%>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -245,8 +245,21 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="homepageLeftMenuBlock">
|
<div class="homepageLeftMenuBlock">
|
||||||
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :class => "homepageMenuText" %>
|
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :class => "homepageMenuText" %>
|
||||||
<% if is_current_user%>
|
<% if is_current_user %>
|
||||||
<%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :style => "margin-right:10px;", :title => "新建项目"%>
|
<div class="courseMenu" id="projectMenu">
|
||||||
|
<ul>
|
||||||
|
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
||||||
|
<ul class="topnav_course_menu" id="topnav_project_menu">
|
||||||
|
<li>
|
||||||
|
<%= link_to "新建项目", new_project_path(:host=> Setting.host_name), :class => "menuGrey"%>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<%= link_to "加入项目", applied_join_project_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<%# if @user.projects.visible.count > 0
|
<%# if @user.projects.visible.count > 0
|
||||||
|
@ -362,6 +375,12 @@
|
||||||
$("#courseMenu").mouseleave(function(){
|
$("#courseMenu").mouseleave(function(){
|
||||||
$("#topnav_course_menu").hide();
|
$("#topnav_course_menu").hide();
|
||||||
});
|
});
|
||||||
|
$("#projectMenu").mouseenter(function(){
|
||||||
|
$("#topnav_project_menu").show();
|
||||||
|
});
|
||||||
|
$("#projectMenu").mouseleave(function(){
|
||||||
|
$("#topnav_project_menu").hide();
|
||||||
|
});
|
||||||
function leftCourseslistChange(){
|
function leftCourseslistChange(){
|
||||||
$('#homepageLeftMenuCourses').slideToggle();
|
$('#homepageLeftMenuCourses').slideToggle();
|
||||||
$('#hide_show_courseicon').toggleClass("homepageLeftMenuHideIcon");
|
$('#hide_show_courseicon').toggleClass("homepageLeftMenuHideIcon");
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<% if @flash_message %>
|
||||||
|
alert("<%= @flash_message %>");
|
||||||
|
<% else%>
|
||||||
|
$("#applied_project_<%= @applied_message.id %>").html('<%= render :partial => "users/user_message_applide_action", :locals =>{:ma => @applied_message} %>');
|
||||||
|
<% end%>
|
|
@ -0,0 +1 @@
|
||||||
|
$("#applied_project_<%= @applied_message.id %>").html('<%= render :partial => "users/user_message_applide_action", :locals =>{:ma => @applied_message} %>');
|
|
@ -0,0 +1,9 @@
|
||||||
|
<% if !User.current.member_of?(@project) && User.current.login? && !User.current.admin %>
|
||||||
|
<span><%= watcher_link_for_project(@project, User.current) %></span>
|
||||||
|
<!--加入项目 -->
|
||||||
|
<% if AppliedProject.where(:user_id => User.current, :project_id => @project_id).first.nil? %>
|
||||||
|
<%= join_in_project_link(@project, User.current) %>
|
||||||
|
<% else %>
|
||||||
|
等待审批
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -55,12 +55,6 @@
|
||||||
<%= link_to "+"+l(:project_gitlab_create_repository), url_for(:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories') , :class => "subnav_green" %>
|
<%= link_to "+"+l(:project_gitlab_create_repository), url_for(:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories') , :class => "subnav_green" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<!--quality_analysis-->
|
|
||||||
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
|
||||||
<div class="subNav">
|
|
||||||
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "f14 c_blue02" %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- more -->
|
<!-- more -->
|
||||||
<div class="subNav subNav_jiantou" id="expand_tools_expand"><%= l(:label_project_more) %></div>
|
<div class="subNav subNav_jiantou" id="expand_tools_expand"><%= l(:label_project_more) %></div>
|
||||||
|
|
|
@ -92,32 +92,6 @@
|
||||||
<% if roles.any? %>
|
<% if roles.any? %>
|
||||||
<div class="members_right">
|
<div class="members_right">
|
||||||
<!-- applied -->
|
<!-- applied -->
|
||||||
<% if @project.applied_projects.any? %>
|
|
||||||
<div class="members_jion">
|
|
||||||
<p class="c_blue mb10 fb"><%= l(:label_apply_project) %></p>
|
|
||||||
<%= form_for(@applied_members, {:as => :membership, :url => project_memberships_path(@project), :remote => true, :method => :post}) do |f| %>
|
|
||||||
<div id="principals_for_applied_member">
|
|
||||||
<%= render_principals_for_applied_members_new(@project) %>
|
|
||||||
</div>
|
|
||||||
<ul class="mb10">
|
|
||||||
<li><%= l(:label_role_plural) %>:</li>
|
|
||||||
<% roles.each do |role| %>
|
|
||||||
<li>
|
|
||||||
<%= check_box_tag 'membership[role_ids][]', role.id %>
|
|
||||||
<label ><%= h role %></label >
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
<a remote="true" href="javascript:void(0)" class="blue_btn fl" onclick="$('#new_membership').submit();">
|
|
||||||
<%= l(:label_approve) %>
|
|
||||||
</a>
|
|
||||||
<a remote="true" href="javascript:void(0)" class="grey_btn fl ml10" onclick="refusal_applied_member();">
|
|
||||||
<%= l(:label_refusal) %>
|
|
||||||
</a>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% end %><!--members_jion end-->
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<!-- add members -->
|
<!-- add members -->
|
||||||
<p class="c_blue fb mt10 mb5"><%= l(:label_member_new) %></p>
|
<p class="c_blue fb mt10 mb5"><%= l(:label_member_new) %></p>
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch ), :remote => true, :class => "btn_zipdown fr" %>
|
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch ), :remote => true, :class => "btn_zipdown fr" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<!--quality_analysis-->
|
||||||
|
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
||||||
|
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="repository_con" style="line-height:1.9;">
|
<div class="repository_con" style="line-height:1.9;">
|
||||||
<% if @entries.nil? %>
|
<% if @entries.nil? %>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :class => "sy_classlist_title fl",
|
<%= link_to course.name+"("+current_time_and_term_short(course)+")", course_path(course.id,:host=>Setting.host_course), :class => "sy_classlist_title fl",
|
||||||
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+"("+current_time_and_term(course)+")"%>
|
:style => 'color:#000',:id => "show_course_#{course.id}", :target => '_blank', :title => (course.is_public? ? "公开班级:":"私有班级:")+course.name+"("+current_time_and_term(course)+")"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="icon_si fl mr20"><%=course.is_public? ? '公开' : '私有' %></span>
|
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p class="sy_cgrey">
|
<p class="sy_cgrey">
|
||||||
<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>
|
||||||
|
|
|
@ -6,13 +6,13 @@
|
||||||
<%= labelled_form_for @syllabus do |f| %>
|
<%= labelled_form_for @syllabus do |f| %>
|
||||||
<li class="ml45">
|
<li class="ml45">
|
||||||
<label><span class="c_red">*</span> 课程名称 :</label>
|
<label><span class="c_red">*</span> 课程名称 :</label>
|
||||||
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:设计管理" maxlength="100" onkeyup="regex_syllabus_name();">
|
<input type="text" name="title" id="new_syllabus_name" class="name_input" placeholder="例如:软件工程" maxlength="100" onkeyup="regex_syllabus_name();">
|
||||||
<span class="c_red" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
<span class="c_red" id="new_syllabus_name_notice" style="display: none;">课程名称不能为空且至少有两个字符</span>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<li class="ml45">
|
<li class="ml45">
|
||||||
<label><span class="c_white">*</span> <%= l(:label_tags_course_eng_name)%> :</label>
|
<label><span class="c_white">*</span> <%= l(:label_tags_course_eng_name)%> :</label>
|
||||||
<input type="text" name="eng_name" id="new_syllabus_eng_name" placeholder="例如:Management of design" class="name_input" maxlength="100">
|
<input type="text" name="eng_name" id="new_syllabus_eng_name" placeholder="例如:Software Engineering" class="name_input" maxlength="100">
|
||||||
<!--<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>-->
|
<!--<span class="c_red" id="new_course_class_period_notice" style="display: none;"></span>-->
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<% comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3) %>
|
<% comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= @syllabus.id %>">
|
<div class="" id="reply_div_<%= @syllabus.id %>">
|
||||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'Syllabus', :activity_id => @syllabus.id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
<ul>
|
|
||||||
<% comments.each do |comment| %>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function(){
|
|
||||||
showNormalImage('reply_content_<%= comment.id %>');
|
|
||||||
autoUrl('reply_content_<%= comment.id %>');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
|
||||||
<div class="homepagePostReplyPortrait">
|
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
|
||||||
</div>
|
|
||||||
<div class="homepagePostReplyDes">
|
|
||||||
<div class="homepagePostReplyPublisher">
|
|
||||||
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
|
||||||
<%= time_from_now(comment.created_time) %>
|
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
|
||||||
<% if comment.class == Journal %>
|
|
||||||
<% if comment.details.any? %>
|
|
||||||
<% details_to_strings(comment.details).each do |string| %>
|
|
||||||
<p><%= string %></p>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<P><%= comment.notes.html_safe %></P>
|
|
||||||
<% else %>
|
|
||||||
<%= comment.content_detail.html_safe %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
<% unless courses.nil? %>
|
||||||
|
<% courses.each_with_index do |course, i| %>
|
||||||
|
<li class="syllabus_class_list <%=i > 2 ? 'none' : '' %>">
|
||||||
|
<% 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 class="icons_sy_cir "></span>
|
||||||
|
<div class="fl">
|
||||||
|
<div class="syllabus_class_w ">
|
||||||
|
<p class="syllabus_class_title fl"><%=course.name %></p>
|
||||||
|
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl"></span>
|
||||||
|
<span class="fr sy_p_grey hidden" style="max-width: 120px;">主讲老师:<%=course.teacher.show_name %></span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<p class="fl grayTxt ">更新:<%=format_date Time.at(course.updatetime) %><span class="mr10"></span>学期:<%=current_time_and_term(course) %></p>
|
||||||
|
<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>
|
||||||
|
<span class="icons_sy_arrow fl mt19 ml10" ></span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if courses.count > 3 %>
|
||||||
|
<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>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -5,7 +5,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
||||||
<a href="javascript:void(0);" class="newsGrey">
|
<a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
<%= link_to User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}", user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
||||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||||
|
@ -18,14 +18,14 @@
|
||||||
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
|
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
|
||||||
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
||||||
<div class="fl">课程描述:</div>
|
<div class="fl">课程描述:</div>
|
||||||
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %></div> <p>申请职位:<%= ma.content == '9' ? "教师" : "教辅"%></p>
|
<div class="ml60"><%= Course.find(ma.course_id).description.html_safe if Course.find(ma.course_id).description %></div> <p>申请职位:<%= ma.content.include?('9') ? "教师" : "教辅"%></p>
|
||||||
</div>
|
</div>
|
||||||
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
|
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContentWarn2' : 'homepageHomeworkContentWarn' %> fl">
|
||||||
<span id="deal_info_<%=ma.id%>">
|
<span id="deal_info_<%=ma.id%>">
|
||||||
<% if ma.status == 0 || ma.status.nil?%>
|
<% if ma.status == 0 || ma.status.nil?%>
|
||||||
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||||
|
|
|
|
||||||
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true'%>
|
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||||
<% elsif ma.status == 1%> <!-- 同意 -->
|
<% elsif ma.status == 1%> <!-- 同意 -->
|
||||||
您已经同意了该申请
|
您已经同意了该申请
|
||||||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :homepage => homepage},
|
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :homepage => homepage, :user_id => user_id},
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_reply)) if !comment.root.locked? %>
|
:title => l(:button_reply)) if !comment.root.locked? %>
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
<% if comment.author == User.current %>
|
<% if comment.author == User.current %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id, :homepage => homepage},
|
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id, :homepage => homepage, :user_id => user_id},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:class => 'fr mr20',
|
:class => 'fr mr20',
|
||||||
|
|
|
@ -76,6 +76,20 @@
|
||||||
:class => 'fr mr20',
|
:class => 'fr mr20',
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if comment.user_id == User.current.id %>
|
) if comment.user_id == User.current.id %>
|
||||||
|
<% elsif type == 'Syllabus' %>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'users', :action => 'reply_to', :reply_id => comment.id, :type => type},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
<% if User.current.admin? || User.current == Syllabus.find(activity_id).user || comment.user == User.current%>
|
||||||
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="homepagePostReplyBanner">
|
<div class="homepagePostReplyBanner" id="reply_banner_<%=user_activity_id %>">
|
||||||
<div class="homepagePostReplyBannerCount">
|
<div class="homepagePostReplyBannerCount">
|
||||||
<span>回复</span>
|
<span>回复</span>
|
||||||
<span class="reply_iconup" > ︿</span>
|
<span class="reply_iconup" > ︿</span>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% elsif @type == 'BlogComment' %>
|
<% elsif @type == 'BlogComment' %>
|
||||||
<%= form_for('new_form', :url => {:controller => 'blog_comments',:action => 'reply', :id => reply.id, :blog_id => reply.blog.id, :user_id => User.current.id}, :method => "post", :remote => true) do |f| %>
|
<%= form_for('new_form', :url => {:controller => 'blog_comments',:action => 'reply', :id => reply.id, :blog_id => reply.blog.id, :user_id => @user_id}, :method => "post", :remote => true) do |f| %>
|
||||||
<input type="hidden" name="blog_comment[title]" value="RE:<%=(BlogComment.find @activity_id).title %>" id="reply_subject">
|
<input type="hidden" name="blog_comment[title]" value="RE:<%=(BlogComment.find @activity_id).title %>" id="reply_subject">
|
||||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>@user_activity_id %>
|
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>@user_activity_id %>
|
||||||
<%= hidden_field_tag 'parent_id', params[:parent_id], :value => reply.id %>
|
<%= hidden_field_tag 'parent_id', params[:parent_id], :value => reply.id %>
|
||||||
|
@ -82,6 +82,15 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p nhname='contentmsg_<%= reply.id%>' class="fl"></p>
|
<p nhname='contentmsg_<%= reply.id%>' class="fl"></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% elsif @type == 'Syllabus' %>
|
||||||
|
<%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_syllabus', :id => reply.id},:method => "post", :remote => true) do |f| %>
|
||||||
|
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||||
|
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply_message"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||||
|
<% end%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
<div class="syllabus_category">
|
||||||
|
<% if @type.to_i == 2 %>
|
||||||
|
<%= link_to "", {:controller => 'users', :action => 'sort_syllabus_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :style => "margin-right: 5px;", :remote => true %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to "", {:controller => 'users', :action => 'sort_syllabus_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortdownbtn sort_no fr", :style => "margin-right: 5px;", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to "人气", {:controller => 'users', :action => 'sort_syllabus_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortTxt fr", :remote => true %>
|
||||||
|
<% if @type.to_i == 1 %>
|
||||||
|
<%= link_to "", {:controller => 'users', :action => 'sort_syllabus_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :remote => true %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to "", {:controller => 'users', :action => 'sort_syllabus_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortdownbtn sort_no fr", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to "时间", {:controller => 'users', :action => 'sort_syllabus_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortTxt fr", :remote => true %>
|
||||||
|
<span class="grayTxt fl "><%=@user == User.current ? "我" : "他" %><%= list_type == 1 ? "创建" : "加入"%>的课程</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% if syllabuses.any? %>
|
||||||
|
<% syllabuses.each_with_index do |syllabus, index|%>
|
||||||
|
<div class="syllabus_courses_box">
|
||||||
|
<% course_count = syllabus.courses.not_deleted.count %>
|
||||||
|
<div class="syllabus_courses_list" onclick="expand_courses(<%=syllabus.id %>,<%=course_count %>);" id="syllabus_courses_list_<%= syllabus.id %>">
|
||||||
|
<div class="<%=index == 0 ? 'sy_courses_open' : 'sy_courses_close' %>">
|
||||||
|
<span class="<%=index == 0 && course_count != 0 ? 'icons_sy_open' : 'icons_sy_close' %> fl mr5"></span>
|
||||||
|
<h3 class="syllabus_courses_title fl"><%=syllabus.title %></h3>
|
||||||
|
</div>
|
||||||
|
<p class="fl sy_p_grey">更新时间:<%=format_date syllabus.updated_at %>
|
||||||
|
<span class="mr10"></span>创建老师:<%=syllabus.user.show_name %>
|
||||||
|
<span class="mr10"></span>班级:<%=course_count %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="syllabus_class_box <%=index == 0 ? '' : 'none' %>">
|
||||||
|
<ul id="syllabus_course_ul_<%=syllabus.id %>">
|
||||||
|
<% if index == 0 %>
|
||||||
|
<% courses = syllabus.courses.not_deleted.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc") %>
|
||||||
|
<%= render :partial => 'users/courses_list', :locals => {:courses => courses, :syllabus => syllabus}%>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div><!--syllabus_class_box end-->
|
||||||
|
|
||||||
|
<div class="homepagePostSetting">
|
||||||
|
<ul>
|
||||||
|
<li class="icons_sy_setting">
|
||||||
|
<ul class="homepagePostSettiongText">
|
||||||
|
<li>
|
||||||
|
<%=link_to '查看课程', syllabus_path(syllabus.id), :class => 'postOptionLink',:target =>'_blank', :title => '查看课程' %>
|
||||||
|
</li>
|
||||||
|
<% if User.current == syllabus.user %>
|
||||||
|
<li><%=link_to '删除课程', delete_syllabus_syllabus_path(syllabus), :class => 'postOptionLink', :remote => 'true'%></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
|
<% end %>
|
|
@ -50,7 +50,7 @@
|
||||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 0}%>
|
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 0, :user_id => activity.author_id}%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
<div class="mt5 fl">
|
<div class="mt5 fl">
|
||||||
<!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) -->
|
<!-- , user_import_resource_user_path(User.current.id,:homework_id=>container.id) -->
|
||||||
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" title="请选择文件上传">上传附件</a>
|
<a href="javascript:void(0);" class="AnnexBtn fl mt3 mr15" onclick="$('#_file').click();" title="请选择文件上传">上传附件</a>
|
||||||
<%= link_to "资源库", user_ref_resource_search_user_path(User.current.id, :homework_id => container.id), :class => "FilesBtn fl mt3 mr15", :title => "请从资源库中选择文件作为作品的附件", :remote => true %>
|
<%= link_to "资源库", user_ref_resource_search_user_path(User.current.id, :homework_id => container.id), :class => "FilesBtn fl mt3 mr15", :title => "请从资源库中选择文件作为作业的附件", :remote => true %>
|
||||||
<% if defined?(has_program) && has_program %>
|
<% if defined?(has_program) && has_program %>
|
||||||
<div id="program_setting" class="fl">
|
<div id="program_setting" class="fl">
|
||||||
<a href="javascript:void(0);" class="ProBtn fl mt3"title="请设置编程语言和输入测试集">编程</a>
|
<a href="javascript:void(0);" class="ProBtn fl mt3"title="请设置编程语言和输入测试集">编程</a>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<div id="user_join_syllabus_list">
|
||||||
|
<%= render :partial => "users/syllabus_course_list", :locals => {:syllabuses => @join_syllabuses, :list_type => 2} %>
|
||||||
|
</div>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<% if allow_to_show(ma) %>
|
||||||
|
:<%= link_to "同意", allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id), :remote => true, :method => :post, :class => "link-blue"%> |
|
||||||
|
<%= link_to "拒绝", refused_allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id), :remote => true, :method => :get, :class => "link-blue" %>
|
||||||
|
<% elsif ma.status == 4 %>
|
||||||
|
<span class="fontGrey3">被拒绝</span>
|
||||||
|
<% elsif ma.status == 5 %>
|
||||||
|
<span class="fontGrey3">您已拒绝</span>
|
||||||
|
<% elsif ma.status == 6 %>
|
||||||
|
<span class="fontGrey3">已通过</span>
|
||||||
|
<% elsif ma.status == 7 %>
|
||||||
|
<span class="fontGrey3">您已同意</span>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<%=link_to applied_project_users(ma), user_path(applied_project_users(ma)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||||
|
<span class="homepageNewsType fl"><%= applied_project_tip(ma) %></span>
|
|
@ -30,5 +30,26 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<% elsif ma && ma.applied_type == "AppliedProject" %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<li class="homepageNewsPortrait fl">
|
||||||
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(applied_project_users(ma)), :width => "30", :height => "30"), user_path(applied_project_users(ma)), :target => '_blank' %></a>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsPubType fl">
|
||||||
|
<%= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsContent fl" style="width:283px;"><a href="javascript:void(0);" class="newsGrey">
|
||||||
|
以“<%= applied_project_message_type(ma.role) %>”身份加入
|
||||||
|
<% project = Project.find(ma.project_id) %>
|
||||||
|
<%= link_to project.name, project_path(ma.project_id), :class => "link-blue", :target => '_blank', :title => "#{project.name}" %>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class="fl" style="width:71px; height:49px;">
|
||||||
|
<span id="applied_project_<%= ma.id %>">
|
||||||
|
<%= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -586,9 +586,9 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to ma.status == 1 ?
|
<%= link_to ma.status == 1 ?
|
||||||
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过'
|
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content.include?('9') ? '教师' : '教辅')+'申请已通过'
|
||||||
:
|
:
|
||||||
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
'您申请成为班级"'+Course.find(ma.course_id).name+'"的'+(ma.content.include?('9') ? '教师' : '教辅')+'的申请被拒绝', course_path(Course.find(ma.course_id)),
|
||||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||||
|
|
|
@ -1,132 +1,3 @@
|
||||||
<div class="syllabus_box" id="course-list">
|
<div id="user_syllabus_list">
|
||||||
<h2 class="syllabus_h2_top"><span class="icon_course fl mt7 mr5"></span>课程列表</h2>
|
<%= render :partial => "users/syllabus_course_list", :locals => {:syllabuses => @my_syllabuses, :list_type => 1} %>
|
||||||
<div class="syllabus_category">
|
</div>
|
||||||
<span class="grayTxt fl">排序:</span>
|
|
||||||
<%= link_to "时间", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortTxt fl", :remote => true %>
|
|
||||||
<% if @type.to_i == 1 %>
|
|
||||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fl", :remote => true %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortdownbtn sort_no fl", :remote => true %>
|
|
||||||
<% end %>
|
|
||||||
<%= link_to "人气", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortTxt fl", :remote => true %>
|
|
||||||
<% if @type.to_i == 2 %>
|
|
||||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fl", :remote => true %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to "", {:controller => 'users', :action => 'user_courselist', :id =>@user, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortdownbtn sort_no fl", :remote => true %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% if @syllabus.any? %>
|
|
||||||
<% @syllabus.each_with_index do |syllabus, index|%>
|
|
||||||
<div class="syllabus_courses_box">
|
|
||||||
<% courses = @courses.where("syllabus_id = #{syllabus.id}").select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("time desc") %>
|
|
||||||
<div class="syllabus_courses_list">
|
|
||||||
<div class="<%=index == 0 ? 'sy_courses_open' : 'sy_courses_close' %>">
|
|
||||||
<span class="<%=index == 0 && !courses.empty? ? 'icons_sy_open' : 'icons_sy_close' %> fl mr5"></span>
|
|
||||||
<h3 class="syllabus_courses_title fl"><%=syllabus.title %></h3>
|
|
||||||
</div>
|
|
||||||
<p class="fl sy_p_grey">更新时间:<%=format_date syllabus.updated_at %>
|
|
||||||
<span class="mr10"></span>创建老师:<%=syllabus.user.show_name %>
|
|
||||||
<span class="mr10"></span>班级:<%=courses.count %>
|
|
||||||
</p>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="syllabus_class_box <%=index == 0 ? '' : 'none' %>">
|
|
||||||
<ul id="syllabus_course_ul_<%=syllabus.id %>">
|
|
||||||
<% unless courses.nil? %>
|
|
||||||
<% courses.each_with_index do |course, i| %>
|
|
||||||
<li class="syllabus_class_list <%=i > 2 ? 'none' : '' %>">
|
|
||||||
<a href="<%=course_path(course.id) %>" target="_blank">
|
|
||||||
<span class="icons_sy_cir "></span>
|
|
||||||
<div class="fl">
|
|
||||||
<div class="syllabus_class_w ">
|
|
||||||
<p class="syllabus_class_title fl"><%=course.name %></p>
|
|
||||||
<span class="fr sy_p_grey hidden" style="max-width: 120px;">主讲老师:<%=course.teacher.show_name %></span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<p class="fl grayTxt ">更新:<%=format_date Time.at(course.updatetime) %><span class="mr10"></span>学期:<%=current_time_and_term(course) %></p>
|
|
||||||
<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>
|
|
||||||
<span class="icons_sy_arrow fl mt19 ml10" ></span>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% if courses.count > 3 %>
|
|
||||||
<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>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</div><!--syllabus_class_box end-->
|
|
||||||
|
|
||||||
<div class="homepagePostSetting">
|
|
||||||
<ul>
|
|
||||||
<li class="icons_sy_setting">
|
|
||||||
<ul class="homepagePostSettiongText">
|
|
||||||
<li>
|
|
||||||
<%=link_to '查看课程', syllabus_path(syllabus.id), :class => 'postOptionLink',:target =>'_blank', :title => '查看课程' %>
|
|
||||||
</li>
|
|
||||||
<% if User.current == syllabus.user %>
|
|
||||||
<li><%=link_to '删除课程', delete_syllabus_syllabus_path(syllabus), :class => 'postOptionLink', :remote => 'true'%></li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<div>
|
|
||||||
<ul class="wlist" id="pages" >
|
|
||||||
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
|
|
||||||
</ul>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
//如果右边的列表比左边的高度低则将右边的高度设为与左边对齐
|
|
||||||
$(function() {
|
|
||||||
var leftHeight = $("#LSide").height() - $(".fontGrey5").height() - 20;
|
|
||||||
var rightHeight = $(".homepageRight").height();
|
|
||||||
if (rightHeight < leftHeight) {
|
|
||||||
var diffHeight = leftHeight - rightHeight;
|
|
||||||
var tmpHeight = $(".syllabus_box").height() + diffHeight;
|
|
||||||
$(".syllabus_box").css("minHeight", tmpHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
$(".syllabus_courses_list").each(function(){
|
|
||||||
var syStaust = $(this).children(":first-child");
|
|
||||||
var classNum = $(this).next().children().children("li").size();
|
|
||||||
|
|
||||||
if(classNum>0){
|
|
||||||
if (syStaust.hasClass("sy_courses_open")){
|
|
||||||
$(this).toggle(function(){
|
|
||||||
$(this).next().hide();
|
|
||||||
$(this).children(":first-child").children(":first-child").addClass("icons_sy_close").removeClass("icons_sy_open");
|
|
||||||
},function(){
|
|
||||||
$(this).next().show();
|
|
||||||
$(this).children(":first-child").children(":first-child").addClass("icons_sy_open").removeClass("icons_sy_close");
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
$(this).toggle(function(){
|
|
||||||
$(this).next().show();
|
|
||||||
$(this).children(":first-child").children(":first-child").addClass("icons_sy_open").removeClass("icons_sy_close");
|
|
||||||
},function(){
|
|
||||||
$(this).next().hide();
|
|
||||||
$(this).children(":first-child").children(":first-child").addClass("icons_sy_close").removeClass("icons_sy_open");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
|
@ -5,11 +5,9 @@ $('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :part
|
||||||
<% elsif params[:type] == 'Message' %>
|
<% elsif params[:type] == 'Message' %>
|
||||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i,:is_course => @is_course, :is_board => @is_board}) %>');
|
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i,:is_course => @is_course, :is_board => @is_board}) %>');
|
||||||
<% elsif params[:type] == 'BlogComment' %>
|
<% elsif params[:type] == 'BlogComment' %>
|
||||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i, :homepage => @homepage}) %>');
|
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i, :homepage => @homepage, :user_id => @user_id}) %>');
|
||||||
<% elsif params[:type] == 'OrgDocumentComment' %>
|
<% elsif params[:type] == 'OrgDocumentComment' %>
|
||||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
|
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
|
||||||
<% elsif params[:type] == 'News' || params[:type] == 'Issue' %>
|
<% elsif params[:type] == 'News' || params[:type] == 'Issue' || params[:type] == 'Syllabus' %>
|
||||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
|
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :user_activity_id => @user_activity_id, :type => @type, :activity_id => params[:id].to_i}) %>');
|
||||||
<% else %>
|
|
||||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals}) %>');
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<% unless @courses.empty? %>
|
||||||
|
$("#syllabus_course_ul_<%=@syllabus.id %>").html("<%=escape_javascript(render :partial => 'users/courses_list', :locals => {:courses => @courses, :syllabus => @syllabus}) %>");
|
||||||
|
$("#syllabus_course_ul_<%=@syllabus.id %>").parent().show();
|
||||||
|
$("#syllabus_course_ul_<%=@syllabus.id %>").parent().prev().children(":first-child").children(":first-child").toggleClass("icons_sy_close").toggleClass("icons_sy_open");
|
||||||
|
<% end %>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<% if @list_type.to_i == 1 %>
|
||||||
|
$("#user_syllabus_list").html('<%= escape_javascript(render :partial => "users/syllabus_course_list", :locals => {:syllabuses => @syllabuses, :list_type => 1}) %>');
|
||||||
|
<% else %>
|
||||||
|
$("#user_join_syllabus_list").html('<%= escape_javascript(render :partial => "users/syllabus_course_list", :locals => {:syllabuses => @syllabuses, :list_type => 2}) %>');
|
||||||
|
<% end %>
|
|
@ -1 +1,35 @@
|
||||||
<%= render :partial => 'users/user_syllabus_list'%>
|
<div class="syllabus_box" id="course-list">
|
||||||
|
<h2 class="syllabus_h2_top"><span class="icon_course fl mt7 mr5"></span>课程列表</h2>
|
||||||
|
|
||||||
|
<%= render :partial => 'users/user_syllabus_list'%>
|
||||||
|
<div class="" style="height:20px; background:#eaebec;"></div>
|
||||||
|
<%= render :partial => 'users/user_join_syllabus_list'%>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
//如果右边的列表比左边的高度低则将右边的高度设为与左边对齐
|
||||||
|
$(function() {
|
||||||
|
var leftHeight = $("#LSide").height() - $(".fontGrey5").height() - 20;
|
||||||
|
var rightHeight = $(".homepageRight").height();
|
||||||
|
if (rightHeight < leftHeight) {
|
||||||
|
var diffHeight = leftHeight - rightHeight;
|
||||||
|
var tmpHeight = $(".syllabus_box").height() + diffHeight;
|
||||||
|
$(".syllabus_box").css("minHeight", tmpHeight);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
function expand_courses(id, count){
|
||||||
|
var div = $("#syllabus_courses_list_"+id);
|
||||||
|
var classNum = div.next().children().children("li").size();
|
||||||
|
if(classNum>0){
|
||||||
|
div.next().toggle();
|
||||||
|
div.children(":first-child").children(":first-child").toggleClass("icons_sy_close").toggleClass("icons_sy_open");
|
||||||
|
} else if(count > 0) {
|
||||||
|
var str = div.next().children().eq(0).attr('id');
|
||||||
|
var id = str.substring(19);
|
||||||
|
$.get(
|
||||||
|
'/users/expand_courses?syllabus_id=' + id
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -1,6 +1,6 @@
|
||||||
<% if @journal_destroyed.nil? %>
|
<% if @journal_destroyed.nil? %>
|
||||||
alert('<%=l(:notice_failed_delete)%>');
|
alert('<%=l(:notice_failed_delete)%>');
|
||||||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication','HomeworkCommon'].include? @journal_destroyed.jour_type)%>
|
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication','HomeworkCommon','Syllabus'].include? @journal_destroyed.jour_type)%>
|
||||||
<% if @is_user%>
|
<% if @is_user%>
|
||||||
<% if @activity %>
|
<% if @activity %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
||||||
|
@ -18,12 +18,15 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if @bid && @jours_count %>
|
<% if @bid && @jours_count %>
|
||||||
$('#jours_count').html("<%= @jours_count %>");
|
$('#jours_count').html("<%= @jours_count %>");
|
||||||
|
<% elsif @syllabus %>
|
||||||
|
$("#reply_banner_<%=@syllabus.id %>").replaceWith("<%=escape_javascript(render :partial => 'users/reply_banner', :locals => {:count => @count, :activity => @syllabus, :user_activity_id => @syllabus.id}) %>");
|
||||||
|
$("#reply_div_<%=@syllabus.id %>").html("<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @comments, :type => 'Syllabus', :user_activity_id => @syllabus.id, :activity_id => @syllabus.id}) %>");
|
||||||
<% elsif @course && @jours_count%>
|
<% elsif @course && @jours_count%>
|
||||||
<% if @user_activity_id %>
|
<% if @user_activity_id %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
||||||
sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity");
|
sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity");
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#course_jour_count').html("(<%= @jours_count %>)");
|
$('#course_jour_count').html("<%= @jours_count %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif @user && @jours_count%>
|
<% elsif @user && @jours_count%>
|
||||||
$('#jour_count').html("<%= @jours_count %>");
|
$('#jour_count').html("<%= @jours_count %>");
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
$("#reply_banner_<%=@syllabus.id %>").replaceWith("<%=escape_javascript(render :partial => 'users/reply_banner', :locals => {:count => @count, :activity => @syllabus, :user_activity_id => @syllabus.id}) %>");
|
||||||
|
$("#reply_div_<%=@syllabus.id %>").html("<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @comments, :type => 'Syllabus', :activity_id => @syllabus.id}) %>");
|
|
@ -48,6 +48,7 @@ zh:
|
||||||
# 左边栏
|
# 左边栏
|
||||||
#
|
#
|
||||||
label_project_id: "项目ID:"
|
label_project_id: "项目ID:"
|
||||||
|
label_project_ivite_code: "邀请码:"
|
||||||
|
|
||||||
label_agree_join_project: 同意加入
|
label_agree_join_project: 同意加入
|
||||||
label_apply_project: "+申请加入"
|
label_apply_project: "+申请加入"
|
||||||
|
@ -55,7 +56,7 @@ zh:
|
||||||
label_exit_project: 退出项目
|
label_exit_project: 退出项目
|
||||||
label_apply_project_waiting: 已处理申请,请等待管理员审核
|
label_apply_project_waiting: 已处理申请,请等待管理员审核
|
||||||
label_member_of_project: 该用户已经是项目成员了!
|
label_member_of_project: 该用户已经是项目成员了!
|
||||||
label_unapply_project: 取消申请
|
label_unapply_project: 等待审批
|
||||||
lable_sure_exit_project: 是否确认退出该项目
|
lable_sure_exit_project: 是否确认退出该项目
|
||||||
label_friend_organization: 圈子模式
|
label_friend_organization: 圈子模式
|
||||||
label_research_group: 研讨模式
|
label_research_group: 研讨模式
|
||||||
|
|
|
@ -563,6 +563,7 @@ RedmineApp::Application.routes.draw do
|
||||||
post "user_commit_homework"
|
post "user_commit_homework"
|
||||||
post 'user_select_homework'
|
post 'user_select_homework'
|
||||||
get 'all_journals'
|
get 'all_journals'
|
||||||
|
get 'expand_courses'
|
||||||
end
|
end
|
||||||
|
|
||||||
member do
|
member do
|
||||||
|
@ -619,6 +620,8 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'user_courselist', :to => 'users#user_courselist', :via => :get, :as => "user_courselist"
|
match 'user_courselist', :to => 'users#user_courselist', :via => :get, :as => "user_courselist"
|
||||||
match 'user_projectlist', :to => 'users#user_projectlist', :via => :get, :as => "user_projectlist"
|
match 'user_projectlist', :to => 'users#user_projectlist', :via => :get, :as => "user_projectlist"
|
||||||
|
|
||||||
|
match 'sort_syllabus_list', :to => 'users#sort_syllabus_list', :via => :get, :as => "sort_syllabus_list"
|
||||||
|
|
||||||
get 'edit_brief_introduction'
|
get 'edit_brief_introduction'
|
||||||
get "user_resource"
|
get "user_resource"
|
||||||
get "import_resources"
|
get "import_resources"
|
||||||
|
@ -721,8 +724,9 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'issues/:object_id/watchers', :to => 'watchers#create', :object_type => 'issue'
|
post 'issues/:object_id/watchers', :to => 'watchers#create', :object_type => 'issue'
|
||||||
delete 'issues/:object_id/watchers/:user_id' => 'watchers#destroy', :object_type => 'issue'
|
delete 'issues/:object_id/watchers/:user_id' => 'watchers#destroy', :object_type => 'issue'
|
||||||
|
|
||||||
post 'appliedproject/applied', :to => 'applied_project#applied_join_project', :as => 'appliedproject'
|
post 'applied_project/applied_join', :to => 'applied_project#applied_join_project', :as => 'applied_join_project'
|
||||||
delete 'appliedproject/applied', :to => 'applied_project#unapplied_join_project'
|
post 'applied_project/applied_project_info', :to => 'applied_project#applied_project_info', :as => 'applied_project_info'
|
||||||
|
delete 'applied_project/applied', :to => 'applied_project#unapplied_join_project', :as => 'unapplied_join_project'
|
||||||
|
|
||||||
resources :projects do
|
resources :projects do
|
||||||
member do
|
member do
|
||||||
|
@ -766,6 +770,8 @@ RedmineApp::Application.routes.draw do
|
||||||
collection do
|
collection do
|
||||||
get 'autocomplete'
|
get 'autocomplete'
|
||||||
get 'appliedproject'
|
get 'appliedproject'
|
||||||
|
post 'allow_to_join_project'
|
||||||
|
get 'refused_allow_to_join_project'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1156,9 +1162,12 @@ RedmineApp::Application.routes.draw do
|
||||||
get "homework_search"
|
get "homework_search"
|
||||||
get "show_comparecode"
|
get "show_comparecode"
|
||||||
get "statistics_course"
|
get "statistics_course"
|
||||||
|
get "switch_role"
|
||||||
end
|
end
|
||||||
collection do
|
collection do
|
||||||
match 'join_private_courses', :via => [:get, :post]
|
match 'join_private_courses', :via => [:get, :post]
|
||||||
|
post "join_course_multi_role"
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
match '/member', :to => 'courses#member', :as => 'member', :via => :get
|
match '/member', :to => 'courses#member', :as => 'member', :via => :get
|
||||||
|
@ -1240,6 +1249,7 @@ RedmineApp::Application.routes.draw do
|
||||||
post 'words/:id/leave_syllabus_message', :to => 'words#leave_syllabus_message', :as => "leave_syllabus_message"
|
post 'words/:id/leave_syllabus_message', :to => 'words#leave_syllabus_message', :as => "leave_syllabus_message"
|
||||||
post 'words/:id/leave_homework_message', :to => 'words#leave_homework_message', :as => "leave_homework_message"
|
post 'words/:id/leave_homework_message', :to => 'words#leave_homework_message', :as => "leave_homework_message"
|
||||||
post 'words/:id/reply_to_homework', :to => 'words#reply_to_homework', :as => "reply_to_homework"
|
post 'words/:id/reply_to_homework', :to => 'words#reply_to_homework', :as => "reply_to_homework"
|
||||||
|
post 'words/:id/reply_to_syllabus', :to => 'words#reply_to_syllabus', :as => "reply_to_syllabus"
|
||||||
|
|
||||||
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
post 'join_in/join', :to => 'courses#join', :as => 'join'
|
||||||
delete 'join_in/join', :to => 'courses#unjoin'
|
delete 'join_in/join', :to => 'courses#unjoin'
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddInviteCodeToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :invite_code, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddColumnToMemberRole < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :member_roles, :is_current, :integer, :default => 1
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddQrcodeToProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :projects, :qrcode, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddRoleToAppliedProject < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :applied_projects, :role, :integer, :default => 0
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddAppliedUserIdToAppliedMessage < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :applied_messages, :applied_user_id, :integer
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddRoleToAppliedMessage < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :applied_messages, :role, :integer
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddProjectIdToAppliedMessage < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :applied_messages, :project_id, :integer
|
||||||
|
end
|
||||||
|
end
|
5014
db/schema.rb
5014
db/schema.rb
File diff suppressed because it is too large
Load Diff
|
@ -36,7 +36,7 @@
|
||||||
<script src="/javascripts/wechat/directives/form_validate.js"></script>
|
<script src="/javascripts/wechat/directives/form_validate.js"></script>
|
||||||
<script src="/javascripts/wechat/directives/input_auto.js"></script>
|
<script src="/javascripts/wechat/directives/input_auto.js"></script>
|
||||||
<script src="/javascripts/wechat/directives/loading_spinner.js"></script>
|
<script src="/javascripts/wechat/directives/loading_spinner.js"></script>
|
||||||
<script src="/javascripts/wechat/directives/ellipsis.js"></script>
|
<!--<script src="/javascripts/wechat/directives/ellipsis.js"></script>-->
|
||||||
<script src="/javascripts/wechat/controllers/reg.js"></script>
|
<script src="/javascripts/wechat/controllers/reg.js"></script>
|
||||||
<script src="/javascripts/wechat/controllers/login.js"></script>
|
<script src="/javascripts/wechat/controllers/login.js"></script>
|
||||||
<script src="/javascripts/wechat/controllers/activity.js"></script>
|
<script src="/javascripts/wechat/controllers/activity.js"></script>
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
|
|
||||||
<div class="blue-title">管理课程</div>
|
<div class="blue-title">管理课程</div>
|
||||||
<form novalidate name="classForm">
|
<form novalidate name="classForm">
|
||||||
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">课程</span><input ng-change="syllabus.change = true" ng-class="['new-class-input ml25', {'c-grey':syllabus.change} ]" ng-model="syllabus.tmptitle" required placeholder="请输入课程名,如:软件工程" /></div>
|
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">课程名称</span><input ng-change="syllabus.change = true" ng-class="['new-class-input ml25', {'c-grey':syllabus.change} ]" ng-model="syllabus.tmptitle" required placeholder="如:软件工程" /></div>
|
||||||
|
|
||||||
<div class="course-list-row f13 c-grey3 mt10" ng-repeat="course in syllabus.courses" ng-show="course.can_setting"><span class="fl ml15 c-grey3">班级</span><input ng-change="course.change = true" required ng-class="['new-class-input ml25', {'c-grey':course.change} ]" ng-model="course.tmpname" placeholder="请输入班级名,如:计算机学院A班" /><a ng-click="deleteClass($index)" class="fr mr10 c-grey6 delete-class-link">删除</a></div>
|
<div class="course-list-row f13 c-grey3 mt10" ng-repeat="course in syllabus.courses" ng-show="course.can_setting"><span class="fl ml15 c-grey3">班级名称</span><input ng-change="course.change = true" required ng-class="['new-class-input ml25', {'c-grey':course.change} ]" ng-model="course.tmpname" placeholder="如:软件工程计算机学院A班" /><a ng-click="deleteClass($index)" class="fr mr10 c-grey6 delete-class-link">删除</a></div>
|
||||||
<div class="tac"><a ng-click="addClass()" class="link-blue2 f13 mt15 inline-block add-class-link">+新增班级</a></div>
|
<div class="tac"><a ng-click="addClass()" class="link-blue2 f13 mt15 inline-block add-class-link">+新增班级</a></div>
|
||||||
<a ng-click="newClass(classForm, syllabus)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
|
<a ng-click="newClass(classForm, syllabus)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<form novalidate name="classForm">
|
<form novalidate name="classForm">
|
||||||
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">项目名称</span><input class="new-class-input ml25" ng-model="project.name" required placeholder="如:团队协作方法与机制研究" /></div>
|
<div class="course-list-row f13 c-grey3 mt30"><span class="fl ml15 c-grey3">项目名称</span><input class="new-class-input ml25" ng-model="project.name" required placeholder="如:团队协作方法与机制研究" /></div>
|
||||||
<a ng-click="newProject(classForm, project)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
|
<a ng-click="newProject(classForm, project)" ng-class="['finish-btn', {'btn-disabled':!classForm.$valid} ]" >完成</a>
|
||||||
<div class="f12 c-grey6" style="width:143px; margin:0 auto;">
|
<div class="f12 c-grey6 tac">
|
||||||
<span class="f13 fb c-grey3">项目功能特性(微信版)</span>
|
<span class="f13 fb c-grey3">项目功能特性(微信版)</span>
|
||||||
<ul class="project-intro mb15 mt5">
|
<ul class="project-intro mb15 mt5">
|
||||||
<li>创建项目、加入项目</li>
|
<li>创建项目、加入项目</li>
|
||||||
|
@ -13,8 +13,6 @@
|
||||||
<li>浏览、回复项目动态</li>
|
<li>浏览、回复项目动态</li>
|
||||||
<li>点赞、分享项目动态</li>
|
<li>点赞、分享项目动态</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
|
||||||
<div class="f12 c-grey6" style="width:156px; margin:0 auto;">
|
|
||||||
<span class="f13 fb c-grey3">更多项目特性(浏览器版)</span>
|
<span class="f13 fb c-grey3">更多项目特性(浏览器版)</span>
|
||||||
<ul class="project-intro mt5">
|
<ul class="project-intro mt5">
|
||||||
<li>发布任务、问题跟踪</li>
|
<li>发布任务、问题跟踪</li>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 22 KiB |
|
@ -1492,6 +1492,25 @@ function pop_up_box(value,tWidth,tTop,tLeft){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 公共弹框样式
|
||||||
|
function pop_box_new(value, Width, Top, Left){
|
||||||
|
$("#ajax-modal").html(value);
|
||||||
|
showModal('ajax-modal', Width + 'px');
|
||||||
|
$('#ajax-modal').siblings().remove();
|
||||||
|
$('#ajax-modal').parent().css({"top": Top+"%","left": Left+"%","transform":"translate(-50%,-50%)","padding":"0","border":"none"});
|
||||||
|
$('#ajax-modal').css({"padding":"0"});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 公共提示弹框样式
|
||||||
|
//function pop_box_tip_new(value, Width, Top, Left){
|
||||||
|
// $("#ajax-modal").html(value);
|
||||||
|
// showModal('ajax-modal', Width + 'px');
|
||||||
|
// $('#ajax-modal').siblings().remove();
|
||||||
|
// $('#ajax-modal').parent().css({"top": Top+"%","left": Left+"%","transform":"translate(-50%,-50%)","padding":"0","border":"none"});
|
||||||
|
// $('#ajax-modal').css({"padding":"0"});
|
||||||
|
//}
|
||||||
|
|
||||||
//显示的时候根据当前网址是http 还是https 选择视频显示方式直接显示还是弹框
|
//显示的时候根据当前网址是http 还是https 选择视频显示方式直接显示还是弹框
|
||||||
function autoMedia(id){
|
function autoMedia(id){
|
||||||
var rootPath = getRootPath();
|
var rootPath = getRootPath();
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
/**
|
/**
|
||||||
* Created by Tim on 7/22/16.
|
* Created by Tim on 7/22/16.
|
||||||
*/
|
*/
|
||||||
app.directive('ellipsisShow',["$timeout",function(timer){
|
//app.directive('ellipsisShow',["$timeout",function(timer){
|
||||||
return{
|
// return{
|
||||||
restrict: 'A',
|
// restrict: 'A',
|
||||||
scope: {},
|
// scope: {},
|
||||||
link: function(scope, element){
|
// link: function(scope, element){
|
||||||
timer(function() {
|
// timer(function() {
|
||||||
var textSplit = element.text().split(" ");
|
// var textSplit = element.text().split(" ");
|
||||||
var newContent = [];
|
// var newContent = [];
|
||||||
element.text("");
|
// element.text("");
|
||||||
for (var i = 0; i < textSplit.length; i++) {
|
// for (var i = 0; i < textSplit.length; i++) {
|
||||||
newContent = newContent + " " + textSplit[i];
|
// newContent = newContent + " " + textSplit[i];
|
||||||
element.text(newContent);
|
// element.text(newContent);
|
||||||
if(element[0].scrollHeight >= 100){
|
// if(element[0].scrollHeight >= 100){
|
||||||
newContent = newContent + " " + textSplit[i+1] + " " + textSplit[i+2] + " " + textSplit[i+3] + " " + textSplit[i+4] + "...";
|
// newContent = newContent + " " + textSplit[i+1] + " " + textSplit[i+2] + " " + textSplit[i+3] + " " + textSplit[i+4] + "...";
|
||||||
element.text(newContent);
|
// element.text(newContent);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}]);
|
//}]);
|
|
@ -51,6 +51,10 @@ a.btn_message_free{ background:#ff5722; display:block; text-align:center; color
|
||||||
.break_word{word-break: break-all;word-wrap: break-word;}
|
.break_word{word-break: break-all;word-wrap: break-word;}
|
||||||
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
|
.break_word_firefox{white-space: pre-wrap !important;word-break: break-all;}
|
||||||
|
|
||||||
|
/*显隐*/
|
||||||
|
.undis {display:none;}
|
||||||
|
.dis {display:inline-block;}
|
||||||
|
|
||||||
/* font & color */
|
/* font & color */
|
||||||
h2{ font-size:18px;} /*color:#269ac9;*/
|
h2{ font-size:18px;} /*color:#269ac9;*/
|
||||||
h3{ font-size:14px;}/* color:#e8770d;*/
|
h3{ font-size:14px;}/* color:#e8770d;*/
|
||||||
|
@ -520,7 +524,6 @@ a:hover.bgreen_n_btn{background:#08a384;}
|
||||||
.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
|
.upbtn{ margin:40px 0 0 15px; display:block; padding:2px 5px; border:1px solid #eaeaea;}
|
||||||
.upbtn:hover{color:#64bdd9;cursor: pointer;}
|
.upbtn:hover{color:#64bdd9;cursor: pointer;}
|
||||||
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
|
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
|
||||||
.undis{display:none;}
|
|
||||||
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
.red_btn_cir{ background:#e74c3c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
||||||
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
.green_btn_cir{ background:#28be6c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
||||||
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
.green_homework_btn_cir{ background:#28be6c; padding:1px 3px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
|
||||||
|
@ -542,6 +545,38 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
|
||||||
.borderRadius {border-radius:5px;}
|
.borderRadius {border-radius:5px;}
|
||||||
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||||
a:hover.Blue-btn{ background:#3598db; color:#fff;}
|
a:hover.Blue-btn{ background:#3598db; color:#fff;}
|
||||||
|
|
||||||
|
/*20160725 项目申请按钮*/
|
||||||
|
a.sy_btn_grey{
|
||||||
|
display:inline-block;
|
||||||
|
color: #333;
|
||||||
|
background: #e1e1e1;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
padding:0 15px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
-moz-border-radius:3px;
|
||||||
|
-o-border-radius:3px;
|
||||||
|
border-radius:3px;
|
||||||
|
}
|
||||||
|
a:hover.sy_btn_grey{ background: #c3c3c3;}
|
||||||
|
a.sy_btn_blue{
|
||||||
|
display:inline-block;
|
||||||
|
color: #fff;
|
||||||
|
background: #3b94d6;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
padding:0 15px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
-webkit-border-radius:3px;
|
||||||
|
-moz-border-radius:3px;
|
||||||
|
-o-border-radius:3px;
|
||||||
|
border-radius:3px;
|
||||||
|
}
|
||||||
|
a:hover.sy_btn_blue{ background: #2788d0;}
|
||||||
/* commonpic */
|
/* commonpic */
|
||||||
.pic_date{ display:block; background:url(/images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; }
|
.pic_date{ display:block; background:url(/images/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; }
|
||||||
.pic_add{ display:block; background:url(/images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; }
|
.pic_add{ display:block; background:url(/images/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; }
|
||||||
|
|
|
@ -54,8 +54,6 @@ a:hover.UsersApBtn{border:1px solid #888888; }
|
||||||
/* 代码查重弹框 */
|
/* 代码查重弹框 */
|
||||||
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
a.Blue-btn{ display:block; margin-right:15px;width:65px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
|
||||||
a:hover.Blue-btn{ background:#3598db; color:#fff;}
|
a:hover.Blue-btn{ background:#3598db; color:#fff;}
|
||||||
.fl{ float:left;}
|
|
||||||
.fr{ float:right;}
|
|
||||||
.blue-border-box{ width:500px; padding:20px; margin:0 auto; background:#fff;}
|
.blue-border-box{ width:500px; padding:20px; margin:0 auto; background:#fff;}
|
||||||
.box-con h4{ font-size:14px; font-weight: bold; width:450px; text-align:center;}
|
.box-con h4{ font-size:14px; font-weight: bold; width:450px; text-align:center;}
|
||||||
.box-con{ width:450px; margin:0 auto; text-align:center;}
|
.box-con{ width:450px; margin:0 auto; text-align:center;}
|
||||||
|
@ -138,10 +136,6 @@ span.author { font-size: 0.9em; color: #888; }
|
||||||
.ReplyToMessageInputContainer {width: 582px;float: left;}
|
.ReplyToMessageInputContainer {width: 582px;float: left;}
|
||||||
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
|
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
|
||||||
|
|
||||||
/*课程列表界面样式*/
|
|
||||||
a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
|
|
||||||
a:hover.course-title{ color:#269ac9;}
|
|
||||||
|
|
||||||
/*我的课程*/
|
/*我的课程*/
|
||||||
.courses_top{ height:27px; border-bottom:3px solid #ebebeb;}
|
.courses_top{ height:27px; border-bottom:3px solid #ebebeb;}
|
||||||
.courses_h2{ font-size:16px; font-weight:bold; color:#64bddb; border-bottom:3px solid #64bddb; padding-bottom:3px; padding-right:3px;}
|
.courses_h2{ font-size:16px; font-weight:bold; color:#64bddb; border-bottom:3px solid #64bddb; padding-bottom:3px; padding-right:3px;}
|
||||||
|
|
|
@ -27,8 +27,6 @@ a.saveBtn:hover {background-color:#297fb8;}
|
||||||
.orgMemContainer {width:268px;}
|
.orgMemContainer {width:268px;}
|
||||||
.orgMemberAdd {float:right;}
|
.orgMemberAdd {float:right;}
|
||||||
.orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;}
|
.orgAddSearch {border:1px solid #dddddd; outline:none; width:180px; height:22px; color:#9b9b9b;}
|
||||||
.undis {display:none;}
|
|
||||||
.dis {display:inline-block;}
|
|
||||||
|
|
||||||
a.org_member_btn{ padding:1px 5px; background:#15bccf; color:#fff;}
|
a.org_member_btn{ padding:1px 5px; background:#15bccf; color:#fff;}
|
||||||
|
|
||||||
|
|
|
@ -332,4 +332,97 @@ a.contributor_course{float: right; color: #888; font-size: 12px; font-weight: no
|
||||||
.relatePWrap{max-height: 210px;overflow:hidden;}
|
.relatePWrap{max-height: 210px;overflow:hidden;}
|
||||||
|
|
||||||
/*20160622代码分析弹窗*/
|
/*20160622代码分析弹窗*/
|
||||||
.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
|
.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
|
||||||
|
|
||||||
|
/*公共弹框*/
|
||||||
|
/* 按钮*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* 加入班级弹窗 */
|
||||||
|
#sy_popup_box{
|
||||||
|
width:460px;
|
||||||
|
background:#fff;
|
||||||
|
padding-bottom:30px;
|
||||||
|
-webkit-border-radius:5px;
|
||||||
|
-moz-border-radius:5px;
|
||||||
|
-o-border-radius:5px;
|
||||||
|
border-radius:5px;
|
||||||
|
box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);
|
||||||
|
}
|
||||||
|
.sy_popup_top{
|
||||||
|
background:#3b94d6;
|
||||||
|
height:40px;
|
||||||
|
-webkit-border-radius: 5px 5px 0px 0px;
|
||||||
|
-moz-border-radius: 5px 5px 0px 0px;
|
||||||
|
-o-border-radius: 5px 5px 0px 0px;
|
||||||
|
border-radius: 5px 5px 0px 0px;
|
||||||
|
}
|
||||||
|
.sy_popup_top h3{
|
||||||
|
font-size:18px;
|
||||||
|
color:#fff;
|
||||||
|
font-weight:normal;
|
||||||
|
line-height:40px;
|
||||||
|
padding-left:10px;
|
||||||
|
}
|
||||||
|
a.sy_icons_close{
|
||||||
|
width:20px;
|
||||||
|
height:20px;
|
||||||
|
display:block;
|
||||||
|
background: url(/images/sy/sy_icons_close.png) 0 0px no-repeat;
|
||||||
|
margin:8px 10px 0 0;
|
||||||
|
}
|
||||||
|
a:hover.sy_icons_close{
|
||||||
|
background: url(/images/sy/sy_icons_close.png) -40px 0px no-repeat;
|
||||||
|
}
|
||||||
|
.sy_popup_con{
|
||||||
|
margin:30px auto 0;
|
||||||
|
font-size:14px;
|
||||||
|
width:330px;
|
||||||
|
}
|
||||||
|
.sy_popup_add label{
|
||||||
|
display:block;
|
||||||
|
float:left;
|
||||||
|
width:85px;
|
||||||
|
text-align:right;
|
||||||
|
line-height:40px;
|
||||||
|
}
|
||||||
|
.sy_popup_add li{
|
||||||
|
line-height:40px;
|
||||||
|
}
|
||||||
|
.sy_input_txt{
|
||||||
|
border:1px solid #dedede;
|
||||||
|
height:36px;
|
||||||
|
background:#fff;
|
||||||
|
padding:0 5px;
|
||||||
|
width:220px;
|
||||||
|
}
|
||||||
|
.sy_popup_con02{
|
||||||
|
margin:30px auto 0;
|
||||||
|
font-size:14px;
|
||||||
|
text-align:center;
|
||||||
|
width:360px;
|
||||||
|
}
|
||||||
|
.sy_popup_con02 ul li p{
|
||||||
|
margin-bottom:15px;
|
||||||
|
text-align:center;
|
||||||
|
font-size:14px;
|
||||||
|
color:#616161;
|
||||||
|
}
|
||||||
|
.sy_popup_con02 a{ margin:0 auto;}
|
||||||
|
.sy_popup_top_tishi{ background:#ededed; }
|
||||||
|
.sy_popup_top_tishi h3{color:#616161; font-size:16px;}
|
||||||
|
a.sy_icons_close02{
|
||||||
|
width:20px;
|
||||||
|
height:20px;
|
||||||
|
display:block;
|
||||||
|
background: url(/images/sy/sy_icons_close02.png) 0 0px no-repeat;
|
||||||
|
margin:8px 10px 0 0;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
a:hover.sy_icons_close02{
|
||||||
|
background: url(/images/sy/sy_icons_close02.png) -40px 0px no-repeat;
|
||||||
|
}
|
|
@ -471,8 +471,6 @@ a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-r
|
||||||
a.postRouteLink {font-weight:bold; color:#484848;}
|
a.postRouteLink {font-weight:bold; color:#484848;}
|
||||||
a.postRouteLink:hover {text-decoration:underline;}
|
a.postRouteLink:hover {text-decoration:underline;}
|
||||||
|
|
||||||
.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;}
|
|
||||||
.homepagePostSetting ul li:hover ul {display:block;}
|
|
||||||
.resourceSendO {width:65px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-48px; top:20px; padding:2px 0px; display:none;}
|
.resourceSendO {width:65px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-48px; top:20px; padding:2px 0px; display:none;}
|
||||||
|
|
||||||
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
|
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
|
||||||
|
@ -499,7 +497,6 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
|
||||||
.wlist_select a{background-color: #64bdd9;cursor: default;}
|
.wlist_select a{background-color: #64bdd9;cursor: default;}
|
||||||
|
|
||||||
/*博客列表界面样式*/
|
/*博客列表界面样式*/
|
||||||
a{text-decoration:none}
|
|
||||||
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
|
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
|
||||||
/*.bloglistbox{ min-height:690px;}*/
|
/*.bloglistbox{ min-height:690px;}*/
|
||||||
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
|
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
|
||||||
|
@ -517,12 +514,24 @@ a:hover.list-title{ color:#269ac9;}
|
||||||
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
|
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
|
||||||
.list-file li{ line-height:1.9;}
|
.list-file li{ line-height:1.9;}
|
||||||
.list-info span{ margin-left:5px;}
|
.list-info span{ margin-left:5px;}
|
||||||
.pages a{ display:block; border:1px solid #d1d1d1; color:#000; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
|
/*20160727大纲新增样式*/
|
||||||
.pages a:hover{ background-color:#269ac9; color:#fff;}
|
.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
|
||||||
|
.sortTxt{ color:#000;}
|
||||||
|
.sortTxt:hover{ color:#28be6c;}
|
||||||
|
a.sort_no{ background: url(/images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
||||||
|
a.list-title{ font-size:14px; font-weight: bold; color:#000; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
|
||||||
|
|
||||||
|
/*翻页*/
|
||||||
|
.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
|
||||||
|
.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
||||||
a.pages-big{ width:50px;}
|
a.pages-big{ width:50px;}
|
||||||
.pages .active{ background-color:#269ac9; color:#fff;}
|
.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
||||||
.pages{width:330px; margin:20px auto 10px;}
|
.pages{width:330px; margin:20px auto 10px;}
|
||||||
|
|
||||||
|
/*课程列表界面样式*/
|
||||||
|
a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
|
||||||
|
a:hover.course-title{ color:#269ac9;}
|
||||||
|
|
||||||
/*视频播放默认图标*/
|
/*视频播放默认图标*/
|
||||||
.mediaIco{margin: 30px 0 30px 20px;width: 200px;}
|
.mediaIco{margin: 30px 0 30px 20px;width: 200px;}
|
||||||
a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;}
|
a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;}
|
||||||
|
@ -543,8 +552,6 @@ a:hover.st_img { border:1px solid #1c9ec7; }
|
||||||
.searchCourseImage {width:75px; margin-right:10px;}
|
.searchCourseImage {width:75px; margin-right:10px;}
|
||||||
.searchContentDes {width:883px;}
|
.searchContentDes {width:883px;}
|
||||||
.searchTag {font-size:12px; color:#ffffff; background-color:#7ec8e4; height:16px; min-height:16px; max-height:16px; float:left; line-height:16px; padding:0px 3px;}
|
.searchTag {font-size:12px; color:#ffffff; background-color:#7ec8e4; height:16px; min-height:16px; max-height:16px; float:left; line-height:16px; padding:0px 3px;}
|
||||||
.undis {display:none;}
|
|
||||||
.dis {display:inline-block;}
|
|
||||||
.numRed {color:#FF6600;}
|
.numRed {color:#FF6600;}
|
||||||
.pageRoll {float:right; border-left:1px solid #dddddd; margin-top:15px;}
|
.pageRoll {float:right; border-left:1px solid #dddddd; margin-top:15px;}
|
||||||
.pageCell {border:1px solid #dddddd; padding:5px 12px; float:left; margin-left:-1px; position:relative;}
|
.pageCell {border:1px solid #dddddd; padding:5px 12px; float:left; margin-left:-1px; position:relative;}
|
||||||
|
@ -938,10 +945,10 @@ a:hover.member_btn{ background:#329cbd;}
|
||||||
.search_form_course{margin-top:8px;margin-left:8px;}
|
.search_form_course{margin-top:8px;margin-left:8px;}
|
||||||
|
|
||||||
/*信息*/
|
/*信息*/
|
||||||
.project_info{ background:#fff; padding:10px; padding-right:0px;width:222px; padding-right:8px; margin-bottom:10px;}
|
.project_info{ background:#fff; padding:10px 8px; width:224px; margin-bottom:10px;}
|
||||||
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
|
.pr_info_id{ width:137px; color:#5a5a5a; font-size:14px; margin-top:5px;}
|
||||||
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
|
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
|
||||||
.pr_info_logo:hover{ border:1px solid #64bdd9; }
|
.pr_info_logo:hover{ border:1px solid #297fb8; }
|
||||||
.pr_info_join{}
|
.pr_info_join{}
|
||||||
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#269ac9; float:left; }
|
a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#269ac9; float:left; }
|
||||||
a.pr_join_a_quit{ color:#fff; display:block; padding:0 2px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#269ac9; float:left; }
|
a.pr_join_a_quit{ color:#fff; display:block; padding:0 2px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#269ac9; float:left; }
|
||||||
|
@ -977,6 +984,8 @@ a:hover.pr_join_a{ background:#298fbd;}
|
||||||
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
|
.lg-foot:hover{ color:#787b7e; border:1px solid #d4d4d4;}
|
||||||
/****标签(和资源库的tag样式一致)***/
|
/****标签(和资源库的tag样式一致)***/
|
||||||
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
|
.project_Label{ width:220px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px;}
|
||||||
|
/*.project_Label{ width:218px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px; border:1px solid #dddddd;}*/
|
||||||
|
.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
|
||||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
||||||
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
||||||
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
||||||
|
|
|
@ -103,8 +103,11 @@ div#menu ul ul ul li a{ width:185px; overflow:hidden; white-space: nowrap; text-
|
||||||
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
|
.homepageNewsPubTypeHomework {width:270px; font-size:12px; color:#888888; display: block; white-space:nowrap;}
|
||||||
.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
.homepageNewsContent {width:355px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||||
.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
|
.homepageSystenMessageContent {width:281px; max-width:291px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden;text-overflow:ellipsis;max-height: 49px; }
|
||||||
|
|
||||||
.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
.homepageHomeworkContentWarn {width:110px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||||
.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
.homepageHomeworkContent {width:235px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||||
|
.homepageHomeworkContentWarn2 {width:60px; max-width:365px; margin-right:10px; font-size:12px; color:red; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||||
|
.homepageHomeworkContent2 {width:285px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||||
|
|
||||||
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
|
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
|
||||||
.loadMore {font-size:14px;width:748px; text-align:center; display:block; border:1px solid #dddddd; background-color:#ffffff; float:right;padding:5px 0; letter-spacing: 1px;}
|
.loadMore {font-size:14px;width:748px; text-align:center; display:block; border:1px solid #dddddd; background-color:#ffffff; float:right;padding:5px 0; letter-spacing: 1px;}
|
||||||
|
@ -239,9 +242,9 @@ a.postReplyCancel:hover {color:#ffffff;}
|
||||||
.whiteSettingIcon {background:url(/images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
.whiteSettingIcon {background:url(/images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||||
.whiteSettingIcon:hover {background:url(/images/homepage_icon.png) -93px -44px no-repeat;}
|
.whiteSettingIcon:hover {background:url(/images/homepage_icon.png) -93px -44px no-repeat;}
|
||||||
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;text-align:center;}
|
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;text-align:center;}
|
||||||
a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
a.postOptionLink:hover {color:#ffffff; background-color:#3b94d6;}
|
||||||
a.postOptionLink2 {color:#616060; display:block; width:35px; padding:0px 15px;}
|
a.postOptionLink2 {color:#616060; display:block; width:35px; padding:0px 15px;}
|
||||||
a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
|
a.postOptionLink2:hover {color:#ffffff; background-color:#3b94d6;}
|
||||||
.homepagePostReplyPortrait {float:left; width:33px;}
|
.homepagePostReplyPortrait {float:left; width:33px;}
|
||||||
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
|
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
|
||||||
.homepagePostReplyDes {float:left; width:642px; margin-left:15px;}
|
.homepagePostReplyDes {float:left; width:642px; margin-left:15px;}
|
||||||
|
@ -337,7 +340,6 @@ a.projectsLineGrey:hover {color:#ffffff;}
|
||||||
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
||||||
a.homepageMenuControl {float:left; width:180px;}
|
a.homepageMenuControl {float:left; width:180px;}
|
||||||
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
|
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
|
||||||
.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
|
|
||||||
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
|
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
|
||||||
.homepageRightBanner {width:718px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; border:1px solid #dddddd;}
|
.homepageRightBanner {width:718px; margin:0px auto; float:right; background-color: #ffffff; padding:10px 15px; border:1px solid #dddddd;}
|
||||||
.homepageRightBannerImg{width:1000px; margin:0px auto; height: 60px; margin-top: 10px; background:url(/images/TeachersDay.jpg)}
|
.homepageRightBannerImg{width:1000px; margin:0px auto; height: 60px; margin-top: 10px; background:url(/images/TeachersDay.jpg)}
|
||||||
|
|
|
@ -15,6 +15,7 @@ a.sy_cmore{ font-size:12px; color:#888; font-weight:normal;}
|
||||||
a:hover.sy_cmore{color: #ee4a1f;}
|
a:hover.sy_cmore{color: #ee4a1f;}
|
||||||
/* 按钮*/
|
/* 按钮*/
|
||||||
a.btn_orange_big{
|
a.btn_orange_big{
|
||||||
|
display:inline-block;
|
||||||
border: 1px solid #ee4a1f;
|
border: 1px solid #ee4a1f;
|
||||||
color: #ee4a1f;
|
color: #ee4a1f;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -32,6 +33,7 @@ a:hover.btn_orange_big{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
a.btn_green_big{
|
a.btn_green_big{
|
||||||
|
display:inline-block;
|
||||||
border: 1px solid #60b25e;
|
border: 1px solid #60b25e;
|
||||||
color: #60b25e;
|
color: #60b25e;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -49,6 +51,7 @@ a:hover.btn_green_big{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
a.sy_btn_green{
|
a.sy_btn_green{
|
||||||
|
display:inline-block;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #60b25e;
|
background: #60b25e;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -62,34 +65,35 @@ a.sy_btn_green{
|
||||||
border-radius:3px;
|
border-radius:3px;
|
||||||
}
|
}
|
||||||
a:hover.sy_btn_green{ background: #51a74f;}
|
a:hover.sy_btn_green{ background: #51a74f;}
|
||||||
a.sy_btn_grey{
|
|
||||||
color: #333;
|
/*a.sy_btn_grey{*/
|
||||||
background: #e1e1e1;
|
/*color: #333;*/
|
||||||
text-align: center;
|
/*background: #e1e1e1;*/
|
||||||
font-size: 12px;
|
/*text-align: center;*/
|
||||||
padding:0 15px;
|
/*font-size: 12px;*/
|
||||||
height: 30px;
|
/*padding:0 15px;*/
|
||||||
line-height: 30px;
|
/*height: 30px;*/
|
||||||
-webkit-border-radius:3px;
|
/*line-height: 30px;*/
|
||||||
-moz-border-radius:3px;
|
/*-webkit-border-radius:3px;*/
|
||||||
-o-border-radius:3px;
|
/*-moz-border-radius:3px;*/
|
||||||
border-radius:3px;
|
/*-o-border-radius:3px;*/
|
||||||
}
|
/*border-radius:3px;*/
|
||||||
a:hover.sy_btn_grey{ background: #c3c3c3;}
|
/*}*/
|
||||||
a.sy_btn_blue{
|
/*a:hover.sy_btn_grey{ background: #c3c3c3;}*/
|
||||||
color: #fff;
|
/*a.sy_btn_blue{*/
|
||||||
background: #3b94d6;
|
/*color: #fff;*/
|
||||||
text-align: center;
|
/*background: #3b94d6;*/
|
||||||
font-size: 12px;
|
/*text-align: center;*/
|
||||||
padding:0 15px;
|
/*font-size: 12px;*/
|
||||||
height: 30px;
|
/*padding:0 15px;*/
|
||||||
line-height: 30px;
|
/*height: 30px;*/
|
||||||
-webkit-border-radius:3px;
|
/*line-height: 30px;*/
|
||||||
-moz-border-radius:3px;
|
/*-webkit-border-radius:3px;*/
|
||||||
-o-border-radius:3px;
|
/*-moz-border-radius:3px;*/
|
||||||
border-radius:3px;
|
/*-o-border-radius:3px;*/
|
||||||
}
|
/*border-radius:3px;*/
|
||||||
a:hover.sy_btn_blue{ background: #2788d0;}
|
/*}*/
|
||||||
|
/*a:hover.sy_btn_blue{ background: #2788d0;}*/
|
||||||
/* 排序 */
|
/* 排序 */
|
||||||
.sy_category{
|
.sy_category{
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
@ -98,51 +102,7 @@ a:hover.sy_btn_blue{ background: #2788d0;}
|
||||||
border-bottom:1px solid #ddd;
|
border-bottom:1px solid #ddd;
|
||||||
}
|
}
|
||||||
.sy_category span{ float: left;}
|
.sy_category span{ float: left;}
|
||||||
a.sortupbtn{
|
|
||||||
background: url(../images/sy/liststyle.png) 0 3px no-repeat;
|
|
||||||
width:12px;
|
|
||||||
height:17px;
|
|
||||||
display:block;
|
|
||||||
margin-right:10px;
|
|
||||||
cursor:pointer;
|
|
||||||
}
|
|
||||||
a.sortdownbtn{
|
|
||||||
background: url(../images/sy/liststyle.png) 0 -12px no-repeat;
|
|
||||||
width:12px;
|
|
||||||
height:17px;
|
|
||||||
display:block;
|
|
||||||
cursor:pointer;
|
|
||||||
}
|
|
||||||
/* 翻页 */
|
|
||||||
.pages a{
|
|
||||||
display:block;
|
|
||||||
border:1px solid #d1d1d1;
|
|
||||||
color:#888;
|
|
||||||
float:left;
|
|
||||||
width:30px;
|
|
||||||
text-align:center;
|
|
||||||
padding:3px 0;
|
|
||||||
line-height:1.9;
|
|
||||||
margin-right:5px;
|
|
||||||
}
|
|
||||||
.pages a:hover{
|
|
||||||
background-color:#3b94d6;
|
|
||||||
border:1px solid #3b94d6;
|
|
||||||
color:#fff;
|
|
||||||
}
|
|
||||||
a.pages-big{
|
|
||||||
width:50px;
|
|
||||||
}
|
|
||||||
.pages .active{
|
|
||||||
background-color:#3b94d6;
|
|
||||||
border:1px solid #3b94d6;
|
|
||||||
color:#fff;
|
|
||||||
}
|
|
||||||
.pages{
|
|
||||||
width:330px;
|
|
||||||
|
|
||||||
margin:20px auto 10px;
|
|
||||||
}
|
|
||||||
/* 输入框 */
|
/* 输入框 */
|
||||||
.sy_right_box input,.sy_right_box select{
|
.sy_right_box input,.sy_right_box select{
|
||||||
border:1px solid #ccc;
|
border:1px solid #ccc;
|
||||||
|
|
|
@ -1,19 +1,3 @@
|
||||||
/****标签(和资源库的tag样式一致)***/
|
|
||||||
.project_Label{ width:218px; padding:10px; background:#fff; margin-top:10px; padding-top:5px; margin-bottom:10px; border:1px solid #dddddd;}
|
|
||||||
.project_Label_New {width:218px; padding-left:10px; background:#fff; margin-top:15px; margin-bottom:10px;}
|
|
||||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
|
||||||
.submit{height:21px;border:0; cursor:pointer; background:url(../images/btn.png) no-repeat 0 0;width:42px; margin-top:2px; margin-left:3px; }
|
|
||||||
.isTxt{background:#fbfbfb url(../images/inputBg.png) repeat-x left top;height:22px;line-height:22px;border:1px solid #c1c1c1;padding:0 5px;color:#666666;}
|
|
||||||
.re_tag{ width: auto; padding:0 5px; padding-top:2px; border:1px solid #f8df8c; background:#fffce6; margin-right:5px; }
|
|
||||||
.re_tag a{ color:#0d90c3;}
|
|
||||||
.tag_h{ }
|
|
||||||
.tag_h span,.tag_h a{ margin-bottom:5px;}
|
|
||||||
/*信息*/
|
|
||||||
.project_info{ background:#fff; padding:10px 8px; width:222px; margin-bottom:10px; border:1px solid #dddddd;}
|
|
||||||
.pr_info_id{ width:130px; color:#5a5a5a; font-size:14px; margin-top:5px;}
|
|
||||||
.pr_info_logo{ border:1px solid #eaeaea; width:60px; height:60px; padding:1px;}
|
|
||||||
.pr_info_logo:hover{ border:1px solid #297fb8; }
|
|
||||||
|
|
||||||
/*课程大纲*/
|
/*课程大纲*/
|
||||||
input.syllabus_input{
|
input.syllabus_input{
|
||||||
border:none;
|
border:none;
|
||||||
|
@ -110,38 +94,9 @@ 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; width:500px; margin-bottom:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
.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;}
|
||||||
.dis {display:block;}
|
|
||||||
.undis {display:none;}
|
|
||||||
|
|
||||||
/*班级列表界面(用的博客列表的样式)*/
|
|
||||||
.listbox{ width:730px; background-color:#fff; border:1px solid #ddd; padding:10px; }
|
|
||||||
.bloglistbox{ min-height:690px;}
|
|
||||||
.list-h2{ font-size:16px; font-weight:bold; color:#000; padding-bottom:5px;}
|
|
||||||
.category2{ }
|
|
||||||
.list_title{padding:10px 0; border-bottom:1px solid #ddd;}
|
|
||||||
.category2 a,.category2 span{ float:left; margin-right:5px;}
|
|
||||||
.grayTxt{ color:#9093a6;}
|
|
||||||
.sortTxt{ color:#000;}
|
|
||||||
.sortTxt:hover{ color:#28be6c;}
|
|
||||||
a.sortupbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 3px no-repeat; width:12px; height:17px; display:block; margin-right:10px; cursor:pointer;}
|
|
||||||
a.sortdownbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
|
||||||
a.sort_no{ background: url(../images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
|
|
||||||
.item_list{ display:block; width:5px; height:5px;-webkit-border-radius: 25px;border-radius:25px; background-color:#adadad; margin:10px 10px 0 0;}
|
|
||||||
a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
|
|
||||||
a:hover.list-title{ color:#269ac9;}
|
|
||||||
.c_red{ font-weight:normal; font-size:12px;}
|
|
||||||
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
|
|
||||||
.list-file li{ line-height:1.9;}
|
|
||||||
.list-info span{ margin-left:5px;}
|
|
||||||
.pages a{ display:block; border:1px solid #d1d1d1; color:#888; float:left; width:30px; text-align:center; padding:3px 0; line-height:1.9; margin-right:5px; }
|
|
||||||
.pages a:hover{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
|
||||||
a.pages-big{ width:50px;}
|
|
||||||
.pages .active{ background-color:#3b94d6; border:1px solid #3b94d6; color:#fff;}
|
|
||||||
.pages{width:330px; margin:20px auto 10px;}
|
|
||||||
a.course-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:590px;}
|
|
||||||
a:hover.course-title{ color:#269ac9;}
|
|
||||||
|
|
||||||
/*新建页面*/
|
/*新建页面*/
|
||||||
.name_input{ border:1px solid #64bdd9; height:16px; width:310px; background:#fff; margin-bottom:10px; padding:5px;}
|
.name_input{ border:1px solid #64bdd9; height:16px; width:310px; background:#fff; margin-bottom:10px; padding:5px;}
|
||||||
|
@ -208,12 +163,6 @@ a:hover.course-title{ color:#269ac9;}
|
||||||
.sy_tab_nomal {
|
.sy_tab_nomal {
|
||||||
border-bottom:none;
|
border-bottom:none;
|
||||||
}
|
}
|
||||||
.undis {
|
|
||||||
display:none;
|
|
||||||
}
|
|
||||||
.dis {
|
|
||||||
display:block;
|
|
||||||
}
|
|
||||||
/* 课程大纲 */
|
/* 课程大纲 */
|
||||||
.icons_tishi{
|
.icons_tishi{
|
||||||
width: 110px;
|
width: 110px;
|
||||||
|
@ -324,22 +273,22 @@ a:hover.sy_teachers_name{
|
||||||
border:1px solid #e5e5e5;
|
border:1px solid #e5e5e5;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.homepagePostSetting {
|
.sy_class_setting {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
width:20px;
|
width:20px;
|
||||||
height:20px;
|
height:20px;
|
||||||
right:10px;
|
right:10px;
|
||||||
top:10px;
|
top:10px;
|
||||||
}
|
}
|
||||||
.homepagePostSetting ul li:hover ul {
|
.sy_class_setting ul li:hover ul {
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
.homepagePostSettingIcon {
|
.sy_class_setting_icon {
|
||||||
background:url(../images/sy/icons_sy.png) 1px -408px no-repeat;
|
background:url(../images/homepage_icon.png) -93px -5px no-repeat;
|
||||||
width:20px;
|
width:20px;
|
||||||
height:20px;
|
height:20px;
|
||||||
}
|
}
|
||||||
.homepagePostSettiongText {
|
.sy_class_setting_text {
|
||||||
width:75px;
|
width:75px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height:2;
|
line-height:2;
|
||||||
|
@ -355,16 +304,16 @@ a:hover.sy_teachers_name{
|
||||||
display:none;
|
display:none;
|
||||||
box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);
|
box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5);
|
||||||
}
|
}
|
||||||
.homepagePostSettingIcon:hover {
|
.sy_class_setting_icon:hover {
|
||||||
background:url(../images/sy/icons_sy.png) -28px -408px no-repeat;
|
background:url(../images/homepage_icon.png) -93px -44px no-repeat;
|
||||||
}
|
}
|
||||||
a.postOptionLink {
|
a.sy_class_option {
|
||||||
color:#616060;
|
color:#616060;
|
||||||
display:block;
|
display:block;
|
||||||
width:55px;
|
width:55px;
|
||||||
padding:0px 10px;
|
padding:0px 10px;
|
||||||
}
|
}
|
||||||
a.postOptionLink:hover {
|
a.sy_class_option:hover {
|
||||||
color:#fff;
|
color:#fff;
|
||||||
background-color:#3b94d6;
|
background-color:#3b94d6;
|
||||||
}
|
}
|
||||||
|
@ -403,6 +352,27 @@ a.postOptionLink:hover {
|
||||||
padding-left:10px;
|
padding-left:10px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
|
.hw_icon_private{
|
||||||
|
display:block;
|
||||||
|
width:30px;
|
||||||
|
height:22px;
|
||||||
|
background:url(../images/sy/icons_sy.png) 0 -458px no-repeat;
|
||||||
|
color:#fff;
|
||||||
|
font-size:12px;
|
||||||
|
padding-left:10px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
.hw_icon_open{
|
||||||
|
display:block;
|
||||||
|
width:30px;
|
||||||
|
height:22px;
|
||||||
|
background:url(../images/sy/icons_sy.png) 0 -436px no-repeat;
|
||||||
|
color:#fff;
|
||||||
|
font-size:12px;
|
||||||
|
padding-left:10px;
|
||||||
|
line-height: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
.sy_class_titbox{margin-bottom:5px; padding-top:10px; }
|
.sy_class_titbox{margin-bottom:5px; padding-top:10px; }
|
||||||
a.sy_btn_orange{
|
a.sy_btn_orange{
|
||||||
display:block;
|
display:block;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue