Merge branch 'szzh' of http://repository.trustie.net/xianbo/trustie2 into szzh
This commit is contained in:
commit
b9bac42c1a
|
@ -631,6 +631,11 @@ class CoursesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def feedback
|
def feedback
|
||||||
|
@course.journals_for_messages.each do |messages|
|
||||||
|
query = messages.course_messages.where("user_id = ?", User.current.id)
|
||||||
|
query.update_all(:viewed => true);
|
||||||
|
end
|
||||||
|
|
||||||
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
|
if (User.current.admin? || @course.is_public == 1 || (@course.is_public == 0 && User.current.member_of_course?(@course)))
|
||||||
page = params[:page]
|
page = params[:page]
|
||||||
# Find the page of the requested reply
|
# Find the page of the requested reply
|
||||||
|
|
|
@ -137,6 +137,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@user = User.current
|
@user = User.current
|
||||||
|
@is_in_course = params[:is_in_course]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{render :layout => 'new_base_user'}
|
format.html{render :layout => 'new_base_user'}
|
||||||
end
|
end
|
||||||
|
@ -173,7 +174,11 @@ class HomeworkCommonController < ApplicationController
|
||||||
if @homework.save
|
if @homework.save
|
||||||
@homework_detail_manual.save if @homework_detail_manual
|
@homework_detail_manual.save if @homework_detail_manual
|
||||||
@homework_detail_programing.save if @homework_detail_programing
|
@homework_detail_programing.save if @homework_detail_programing
|
||||||
redirect_to user_homeworks_user_path(User.current.id)
|
if params[:is_in_course] == "1"
|
||||||
|
redirect_to homework_common_index_path(:course => @course.id)
|
||||||
|
else
|
||||||
|
redirect_to user_homeworks_user_path(User.current.id)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -181,7 +186,13 @@ class HomeworkCommonController < ApplicationController
|
||||||
def destroy
|
def destroy
|
||||||
if @homework.destroy
|
if @homework.destroy
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {redirect_to user_homeworks_user_path(User.current.id)}
|
format.html {
|
||||||
|
if params[:is_in_course] == "1"
|
||||||
|
redirect_to homework_common_index_path(:course => @course.id)
|
||||||
|
else
|
||||||
|
redirect_to user_homeworks_user_path(User.current.id)
|
||||||
|
end
|
||||||
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -206,6 +217,9 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
@homework_detail_manual.update_column('comment_status', 2)
|
@homework_detail_manual.update_column('comment_status', 2)
|
||||||
@statue = 1
|
@statue = 1
|
||||||
|
# 匿评开启消息邮件通知
|
||||||
|
send_message_anonymous_comment(@homework, m_status = 2)
|
||||||
|
Mailer.send_mail_anonymous_comment_open(@homework).deliver
|
||||||
else
|
else
|
||||||
@statue = 2
|
@statue = 2
|
||||||
end
|
end
|
||||||
|
@ -224,12 +238,22 @@ class HomeworkCommonController < ApplicationController
|
||||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
||||||
student_work.save
|
student_work.save
|
||||||
end
|
end
|
||||||
|
# 匿评关闭消息邮件通知
|
||||||
|
send_message_anonymous_comment(@homework, m_status = 3)
|
||||||
|
Mailer.send_mail_anonymous_comment_close(@homework).deliver
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 开启/关闭匿评消息通知
|
||||||
|
def send_message_anonymous_comment(homework, m_status )
|
||||||
|
# status 标记匿评状态 1为关闭 0为开启
|
||||||
|
course = @homework.course
|
||||||
|
course.student.each do |st|
|
||||||
|
@homework.course_messages << CourseMessage.new(:user_id => st.student_id, :course_id => course.id, :viewed => false, :status => m_status)
|
||||||
|
end
|
||||||
|
end
|
||||||
#提示
|
#提示
|
||||||
def alert_anonymous_comment
|
def alert_anonymous_comment
|
||||||
@cur_size = 0
|
@cur_size = 0
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ProjectsController < ApplicationController
|
||||||
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
|
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
|
||||||
before_filter :file, :statistics #:watcherlist
|
before_filter :file, :statistics #:watcherlist
|
||||||
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
||||||
before_filter :memberAccess, only: :member
|
# before_filter :memberAccess, only: :member
|
||||||
|
|
||||||
# accept_rss_auth :index
|
# accept_rss_auth :index
|
||||||
accept_api_auth :index, :show, :create, :update, :destroy
|
accept_api_auth :index, :show, :create, :update, :destroy
|
||||||
|
@ -358,24 +358,57 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 项目邀请用户加入实现过程
|
||||||
# 两种情况:1、系统外用户;2、系统内用户 (通过邮件判定)
|
# 两种情况:1、系统外用户;2、系统内用户 (通过邮件判定)
|
||||||
def send_mail_to_member
|
def send_mail_to_member
|
||||||
|
# 该邮箱未注册过
|
||||||
if !params[:mail].blank? && User.find_by_mail(params[:mail].to_s).nil?
|
if !params[:mail].blank? && User.find_by_mail(params[:mail].to_s).nil?
|
||||||
email = params[:mail]
|
if !User.where("login =?", params[:mail]).first.nil?
|
||||||
Mailer.run.send_invite_in_project(email, @project, User.current)
|
# 用户名唯一,用户修改邮箱,未修改用户名,用户名等同邮箱的情况,默认改用户已经注册
|
||||||
@is_zhuce = false
|
user = User.find_by_login(params[:mail].to_s)
|
||||||
flash[:notice] = l(:notice_email_sent, :value => email)
|
if !user.member_of?(@project)
|
||||||
|
# 如果已经邀请过该用户,则不重复发送
|
||||||
|
if InviteList.where("project_id =? and mail =?", @project.id, params[:mail].to_s).first.nil?
|
||||||
|
email = params[:mail]
|
||||||
|
Mailer.request_member_to_project(email, @project, User.current).deliver
|
||||||
|
flash[:notice] = l(:notice_email_sent, :value => email)
|
||||||
|
else
|
||||||
|
flash[:error] = l(:notice_email_invited)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
flash[:error] = l(:label_member_of_project, :value => email)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
email = params[:mail]
|
||||||
|
Mailer.send_invite_in_project(email, @project, User.current).deliver
|
||||||
|
@is_zhuce = false
|
||||||
|
flash[:notice] = l(:notice_email_sent, :value => email)
|
||||||
|
end
|
||||||
|
|
||||||
|
# 邮箱地址已被注册
|
||||||
elsif !User.find_by_mail(params[:mail].to_s).nil?
|
elsif !User.find_by_mail(params[:mail].to_s).nil?
|
||||||
user = User.find_by_mail(params[:mail].to_s)
|
user = User.find_by_mail(params[:mail].to_s)
|
||||||
if !user.member_of?(@project)
|
if !user.member_of?(@project)
|
||||||
email = params[:mail]
|
# 如果已经邀请过该用户,则不重复发送
|
||||||
Mailer.run.request_member_to_project(email, @project, User.current)
|
invite_list = InviteList.where("project_id =? and mail =?", @project.id, params[:mail].to_s).first
|
||||||
flash[:notice] = l(:notice_email_sent, :value => email)
|
if invite_list.nil?
|
||||||
|
email = params[:mail]
|
||||||
|
Mailer.request_member_to_project(email, @project, User.current).deliver
|
||||||
|
flash[:notice] = l(:notice_email_sent, :value => email)
|
||||||
|
else
|
||||||
|
# 已经发送过了,则隔3小时才能再次发送
|
||||||
|
if Time.now - invite_list.created_at > 10800
|
||||||
|
email = params[:mail]
|
||||||
|
Mailer.request_member_to_project(email, @project, User.current).deliver
|
||||||
|
flash[:notice] = l(:notice_email_sent, :value => email)
|
||||||
|
else
|
||||||
|
flash[:error] = l(:notice_email_invited)
|
||||||
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
flash[:error] = l(:label_member_of_project, :value => email)
|
flash[:error] = l(:label_member_of_project, :value => email)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
flash[:error] = l(:notice_registed_error, :value => email)
|
|
||||||
@is_zhuce = true
|
@is_zhuce = true
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -383,25 +416,26 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#发送邮件邀请新用户
|
# 发送邮件邀请新用户页面对应方法
|
||||||
def invite_members_by_mail
|
def invite_members_by_mail
|
||||||
if User.current.member_of?(@project) || User.current.admin?
|
if User.current.member_of?(@project) || User.current.admin?
|
||||||
@inviter_lists = InviteList.where(project_id:@project.id).all
|
@inviter_lists = InviteList.where(project_id:@project.id).order("created_at desc")
|
||||||
@inviters = []
|
|
||||||
@waiters = []
|
# @inviters = []
|
||||||
unless @inviter_lists.blank?
|
# @waiters = []
|
||||||
@inviter_lists.each do|inviter_list|
|
# unless @inviter_lists.blank?
|
||||||
unless inviter_list.user.nil?
|
# @inviter_lists.each do|inviter_list|
|
||||||
if inviter_list.user.member_of?(@project)
|
# unless inviter_list.user.nil?
|
||||||
@inviters << inviter_list.user
|
# if inviter_list.user.member_of?(@project)
|
||||||
@inviters_count = @inviters.size
|
# @inviters << inviter_list.user
|
||||||
else
|
# @inviters_count = @inviters.size
|
||||||
@waiters << inviter_list.user
|
# else
|
||||||
@waiters_count = @waiters.size
|
# @waiters << inviter_list.user
|
||||||
end
|
# @waiters_count = @waiters.size
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
@is_zhuce = false
|
@is_zhuce = false
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
@ -413,16 +447,16 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
# 邀请Trustie注册用户
|
# 邀请Trustie注册用户
|
||||||
def invite_members
|
# def invite_members
|
||||||
if User.current.member_of?(@project) || User.current.admin?
|
# if User.current.member_of?(@project) || User.current.admin?
|
||||||
@member ||= @project.members.new
|
# @member ||= @project.members.new
|
||||||
respond_to do |format|
|
# respond_to do |format|
|
||||||
format.html
|
# format.html
|
||||||
end
|
# end
|
||||||
else
|
# else
|
||||||
render_403
|
# render_403
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
end
|
end
|
||||||
|
@ -430,6 +464,10 @@ class ProjectsController < ApplicationController
|
||||||
# by young
|
# by young
|
||||||
# include CoursesHelper
|
# include CoursesHelper
|
||||||
def member
|
def member
|
||||||
|
# 消息"同意加入项目"
|
||||||
|
if params[:message_id]
|
||||||
|
message_invite(params[:message_id], params[:key])
|
||||||
|
end
|
||||||
# params[:login]为邮箱邀请用户加入,主要功能:
|
# params[:login]为邮箱邀请用户加入,主要功能:
|
||||||
# 1、自动注册
|
# 1、自动注册
|
||||||
# 2、加入项目、创建角色
|
# 2、加入项目、创建角色
|
||||||
|
@ -451,6 +489,10 @@ class ProjectsController < ApplicationController
|
||||||
flash[:notice] = l(:label_mail_invite_success)
|
flash[:notice] = l(:label_mail_invite_success)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# 私有项目非项目成员无法访问成员列表
|
||||||
|
unless @project.is_public?
|
||||||
|
return render_403 unless User.current.member_of?(@project)
|
||||||
|
end
|
||||||
## 有角色参数的才是课程,没有的就是项目
|
## 有角色参数的才是课程,没有的就是项目
|
||||||
@render_file = 'project_member_list'
|
@render_file = 'project_member_list'
|
||||||
# 判断是否课程
|
# 判断是否课程
|
||||||
|
@ -481,6 +523,14 @@ class ProjectsController < ApplicationController
|
||||||
@members = paginateHelper @members
|
@members = paginateHelper @members
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def message_invite(message_id, key)
|
||||||
|
forge_message = ForgeMessage.find(message_id)
|
||||||
|
if key == forge_message.secret_key
|
||||||
|
Member.create(:role_ids => [4], :user_id => forge_message.user_id, :project_id => forge_message.project_id)
|
||||||
|
UserGrade.create(:user_id => forge_message.user_id, :project_id => forge_message.project_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#判断指定用户是否为课程教师
|
#判断指定用户是否为课程教师
|
||||||
def isCourseTeacher(id)
|
def isCourseTeacher(id)
|
||||||
result = false
|
result = false
|
||||||
|
|
|
@ -38,14 +38,15 @@ class SystemMessagesController < ApplicationController
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@system_messages = SystemMessage.new
|
@system_messages = SystemMessage.new
|
||||||
@system_messages.content = params[:system_message][:content]
|
@system_messages.description = params[:system_message][:description]
|
||||||
|
@system_messages.subject = params[:system_message][:subject]
|
||||||
@system_messages.user_id = User.current.id
|
@system_messages.user_id = User.current.id
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
if @system_messages.save
|
if @system_messages.save
|
||||||
format.html {redirect_to user_message_path(User.current, :type => "system_messages")}
|
format.html {redirect_to user_system_messages_path(User.current)}
|
||||||
flash[:notice] = l(:notice_successful_message)
|
flash[:notice] = l(:notice_successful_message)
|
||||||
else
|
else
|
||||||
if params[:system_message][:content].empty?
|
if params[:system_messages][:description].empty?
|
||||||
flash[:error] = l(:label_content_blank_fail)
|
flash[:error] = l(:label_content_blank_fail)
|
||||||
else
|
else
|
||||||
flash[:error] = l(:label_admin_message_fail)
|
flash[:error] = l(:label_admin_message_fail)
|
||||||
|
|
|
@ -40,7 +40,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_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages]
|
||||||
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
|
||||||
|
@ -101,18 +101,20 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
# 记录当前点击按钮的时间
|
# 记录当前点击按钮的时间
|
||||||
# 考虑到用户未退出刷新消息页面
|
# 考虑到用户未退出刷新消息页面
|
||||||
if OnclickTime.where("user_id =?", User.current).first.nil?
|
message_time = OnclickTime.where("user_id =?", User.current).first
|
||||||
|
if message_time.nil?
|
||||||
message_new_time = OnclickTime.new
|
message_new_time = OnclickTime.new
|
||||||
message_new_time.user_id = User.current.id
|
message_new_time.user_id = User.current.id
|
||||||
message_new_time.onclick_time = Time.now
|
message_new_time.onclick_time = Time.now
|
||||||
message_new_time.save
|
message_new_time.save
|
||||||
else
|
else
|
||||||
message_new_time = OnclickTime.where("user_id =?", User.current).first
|
# 24小时内显示
|
||||||
message_last_time = message_new_time.onclick_time
|
contrast_time = Time.now - 86400
|
||||||
message_new_time.update_attributes(:onclick_time => Time.now)
|
message_time.update_attributes(:onclick_time => Time.now)
|
||||||
end
|
end
|
||||||
@user_system_messages = SystemMessage.where("created_at >?", message_last_time).order("created_at desc")
|
@user_system_messages = SystemMessage.where("created_at >?", contrast_time).order("created_at desc")
|
||||||
# 当前用户查看消息,则设置消息为已读
|
# 当前用户查看消息,则设置消息为已读
|
||||||
|
# DO 待优化,只需查出符合条件的再更新
|
||||||
if params[:viewed] == "all"
|
if params[:viewed] == "all"
|
||||||
course_querys = @user.course_messages
|
course_querys = @user.course_messages
|
||||||
forge_querys = @user.forge_messages
|
forge_querys = @user.forge_messages
|
||||||
|
@ -142,8 +144,8 @@ class UsersController < ApplicationController
|
||||||
@message_alls << message_all.message
|
@message_alls << message_all.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
when 'system_messages'
|
# when 'system_messages'
|
||||||
@message_alls = SystemMessage.order("created_at desc").all
|
# @message_alls = SystemMessage.order("created_at desc").all
|
||||||
when 'apply'
|
when 'apply'
|
||||||
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
|
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
|
||||||
when 'homework'
|
when 'homework'
|
||||||
|
@ -193,6 +195,15 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 系统消息
|
||||||
|
def user_system_messages
|
||||||
|
@sytem_messages = SystemMessage.order("created_at desc").all
|
||||||
|
@sytem_messages = paginateHelper @sytem_messages, 10
|
||||||
|
respond_to do |format|
|
||||||
|
format.html{render :layout=>'new_base_user'}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def user_projects_index
|
def user_projects_index
|
||||||
if User.current.admin?
|
if User.current.admin?
|
||||||
memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}").first
|
memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}").first
|
||||||
|
@ -622,12 +633,11 @@ class UsersController < ApplicationController
|
||||||
redirect_to signin_url
|
redirect_to signin_url
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
# 更新用户留言消息状态
|
# 自己访问自己的页面才更新消息状态
|
||||||
@user.journals_for_messages.each do |jour_message|
|
if User.current == @user
|
||||||
jour_message.user_feedback_messages.each do |userfeedback_message|
|
journals_messages = UserFeedbackMessage.where("user_id =? and journals_for_message_type =? and viewed =?", User.current.id, "JournalsForMessage", 0)
|
||||||
if User.current.id == userfeedback_message.user_id
|
journals_messages.each do |journals_message|
|
||||||
userfeedback_message.update_attributes(:viewed => true)
|
journals_message.update_attributes(:viewed => true)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
require 'zip'
|
require 'zip'
|
||||||
class ZipdownController < ApplicationController
|
class ZipdownController < ApplicationController
|
||||||
#查找项目(课程)
|
#查找项目(课程)
|
||||||
before_filter :find_project_by_bid_id, :only => [:assort]
|
before_filter :find_project_by_bid_id, :only => [:assort]
|
||||||
|
@ -7,7 +7,7 @@ class ZipdownController < ApplicationController
|
||||||
SAVE_FOLDER = "#{Rails.root}/files"
|
SAVE_FOLDER = "#{Rails.root}/files"
|
||||||
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
|
OUTPUT_FOLDER = "#{Rails.root}/files/archiveZip"
|
||||||
|
|
||||||
#统一下载功能
|
#统一下载功能
|
||||||
def download
|
def download
|
||||||
if User.current.logged?
|
if User.current.logged?
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -2368,7 +2368,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def student_anonymous_comment homework
|
def student_anonymous_comment homework
|
||||||
if homework.homework_type == 1 && homework.homework_detail_manual
|
if homework.homework_detail_manual
|
||||||
case homework.homework_detail_manual.comment_status
|
case homework.homework_detail_manual.comment_status
|
||||||
when 1
|
when 1
|
||||||
"<span class='fr mr10 pr_join_span '>未开启匿评</span>".html_safe
|
"<span class='fr mr10 pr_join_span '>未开启匿评</span>".html_safe
|
||||||
|
@ -2377,10 +2377,6 @@ module ApplicationHelper
|
||||||
when 3
|
when 3
|
||||||
"<span class='fr mr10 pr_join_span '>匿评已结束</span>".html_safe
|
"<span class='fr mr10 pr_join_span '>匿评已结束</span>".html_safe
|
||||||
end
|
end
|
||||||
elsif homework.homework_type == 0
|
|
||||||
"<span class='fr mr10 pr_join_span '>未启用匿评</span>".html_safe
|
|
||||||
elsif homework.homework_type == 2
|
|
||||||
"<span class='fr mr10 pr_join_span '> 编程作业 </span>".html_safe
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,17 @@ module ProjectsHelper
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 被邀请成员的状态
|
||||||
|
def status_for_ivitied(ivite_list, project)
|
||||||
|
if ivite_list.user.member_of?(project)
|
||||||
|
value = "已经加入了项目!"
|
||||||
|
elsif ivite_list.user.active?
|
||||||
|
value = "邀请已发送,等待用户加入!"
|
||||||
|
else
|
||||||
|
value = "邀请已发送,等待用户激活账号!"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Added by young
|
# Added by young
|
||||||
def course_settings_tabs
|
def course_settings_tabs
|
||||||
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'},
|
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'},
|
||||||
|
|
|
@ -6,7 +6,7 @@ module StudentWorkHelper
|
||||||
def user_projects_option
|
def user_projects_option
|
||||||
projects = User.current.projects.visible
|
projects = User.current.projects.visible
|
||||||
not_have_project = []
|
not_have_project = []
|
||||||
not_have_project << "没有可选项目,请直接为本作品创建一个项目"
|
not_have_project << "请选择关联项目"
|
||||||
not_have_project << 0
|
not_have_project << 0
|
||||||
type = []
|
type = []
|
||||||
type << not_have_project
|
type << not_have_project
|
||||||
|
|
|
@ -8,7 +8,7 @@ class ForgeMessage < ActiveRecord::Base
|
||||||
TYPE_OF_WIKI_ACT = "Wiki"
|
TYPE_OF_WIKI_ACT = "Wiki"
|
||||||
TYPE_OF_NEWS_ACT = "News"
|
TYPE_OF_NEWS_ACT = "News"
|
||||||
|
|
||||||
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed
|
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key
|
||||||
|
|
||||||
belongs_to :forge_message ,:polymorphic => true
|
belongs_to :forge_message ,:polymorphic => true
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
|
@ -4,6 +4,6 @@ class HomeworkDetailPrograming < ActiveRecord::Base
|
||||||
belongs_to :homework_common
|
belongs_to :homework_common
|
||||||
|
|
||||||
def language_name
|
def language_name
|
||||||
%W(c c++).at(self.language.to_i - 1)
|
%W(C C++).at(self.language.to_i - 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class InviteList < ActiveRecord::Base
|
class InviteList < ActiveRecord::Base
|
||||||
attr_accessible :project_id, :user_id
|
attr_accessible :project_id, :user_id, :mail
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
|
|
|
@ -190,13 +190,45 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# 课程作品留言消息通知
|
# 课程/作品回复 留言消息通知
|
||||||
def act_as_course_message
|
def act_as_course_message
|
||||||
if self.jour_type == 'StudentWorksScore'
|
if self.jour_type == 'StudentWorksScore'
|
||||||
if self.user_id != self.jour.user_id
|
if self.user_id != self.jour.user_id
|
||||||
self.course_messages << CourseMessage.new(:user_id => self.jour.user_id,:course_id => self.jour.student_work.homework_common.course.id, :viewed => false)
|
self.course_messages << CourseMessage.new(:user_id => self.jour.user_id,:course_id => self.jour.student_work.homework_common.course.id, :viewed => false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# 课程留言
|
||||||
|
if self.jour_type == 'Course'
|
||||||
|
receivers = []
|
||||||
|
teachers = []
|
||||||
|
# 获取课程的老师
|
||||||
|
self.jour.members.each do |m|
|
||||||
|
if m.user.allowed_to?(:as_teacher, self.jour)
|
||||||
|
teachers << m
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if self.reply_id == 0 # 主留言,即不是回复某条留言
|
||||||
|
teachers.each do |teacher|
|
||||||
|
if teacher.user_id != self.user_id
|
||||||
|
receivers << teacher.user_id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else # 留言回复
|
||||||
|
reply_to = User.find(self.reply_id)
|
||||||
|
if self.user_id != self.reply_id # 添加我回复的那个人
|
||||||
|
receivers << reply_to.id
|
||||||
|
end
|
||||||
|
# 给老师发送。 过滤条件:老师自己给自己发;回复对象为老师则排除改老师
|
||||||
|
teachers.each do |teacher|
|
||||||
|
if teacher.user_id != self.user_id && self.reply_id != teacher.user_id
|
||||||
|
receivers << teacher.user_id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
receivers.each do |r|
|
||||||
|
self.course_messages << CourseMessage.new(:user_id => r, :course_id => self.jour.id, :viewed => false)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# 用户留言消息通知
|
# 用户留言消息通知
|
||||||
|
|
|
@ -47,10 +47,46 @@ class Mailer < ActionMailer::Base
|
||||||
MailerProxy.new(self)
|
MailerProxy.new(self)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 作业匿评开启
|
||||||
|
def send_mail_anonymous_comment_open(homework_common)
|
||||||
|
course = homework_common.course
|
||||||
|
recipients ||= []
|
||||||
|
course.student.each do |student|
|
||||||
|
user = User.find(student.student_id)
|
||||||
|
@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
|
||||||
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
|
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
|
||||||
|
@anonymous_comment_close_name = homework_common.name
|
||||||
|
@author = homework_common.user
|
||||||
|
#收件人邮箱
|
||||||
|
recipients << user.mail
|
||||||
|
end
|
||||||
|
mail :to => recipients,
|
||||||
|
:subject => @subject
|
||||||
|
end
|
||||||
|
|
||||||
|
# 作业匿评关闭
|
||||||
|
def send_mail_anonymous_comment_close(homework_common)
|
||||||
|
course = homework_common.course
|
||||||
|
recipients ||= []
|
||||||
|
course.student.each do |student|
|
||||||
|
user = User.find(student.student_id)
|
||||||
|
@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
|
||||||
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
|
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
|
||||||
|
@anonymous_comment_close_name = homework_common.name
|
||||||
|
@author = homework_common.user
|
||||||
|
#收件人邮箱
|
||||||
|
recipients << user.mail
|
||||||
|
end
|
||||||
|
mail :to => recipients,
|
||||||
|
:subject => @subject
|
||||||
|
end
|
||||||
|
|
||||||
# author: alan
|
# author: alan
|
||||||
# 发送邀请未注册用户加入项目邮件
|
# 邀请未注册用户加入项目
|
||||||
# 功能: 在加入项目的同时自动注册用户
|
# 功能: 在加入项目的同时自动注册用户
|
||||||
def send_invite_in_project(email, project, invitor)
|
def send_invite_in_project(email, project, invitor)
|
||||||
@email = email
|
@email = email
|
||||||
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
|
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
|
||||||
@password = newpass(6)
|
@password = newpass(6)
|
||||||
|
@ -59,8 +95,8 @@ class Mailer < ActionMailer::Base
|
||||||
login = login.sub(/%40/,'@')
|
login = login.sub(/%40/,'@')
|
||||||
us = UsersService.new
|
us = UsersService.new
|
||||||
# 自动激活用户
|
# 自动激活用户
|
||||||
user = us.register_auto(login, @email, @password)
|
user = us.register_auto(login, email, @password)
|
||||||
InviteList.create(:user_id => user.id, :project_id => project.id)
|
InviteList.create(:user_id => user.id, :project_id => project.id, :mail =>email)
|
||||||
User.current = user unless User.current.nil?
|
User.current = user unless User.current.nil?
|
||||||
@user = user
|
@user = user
|
||||||
@token = Token.get_token_from_user(user, 'autologin')
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
|
@ -76,15 +112,23 @@ class Mailer < ActionMailer::Base
|
||||||
@project_name = "#{project.name}"
|
@project_name = "#{project.name}"
|
||||||
@user = user
|
@user = user
|
||||||
@project = project
|
@project = project
|
||||||
inviter_lists = InviteList.where(project_id:@project.id, user_id:@user.id).all
|
if InviteList.where("project_id= ? and user_id =? and mail =?", project.id, @user.id, email).first.nil?
|
||||||
if inviter_lists.blank?
|
InviteList.create(:user_id => user.id, :project_id => project.id, :mail => email)
|
||||||
InviteList.create(:user_id => user.id, :project_id => project.id)
|
|
||||||
end
|
end
|
||||||
@token = Token.get_token_from_user(user, 'autologin')
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
@project_url = url_for(:controller => 'projects', :action => 'member', :id => project.id, :user_id => user.id, :mail => true, :token => @token.value)
|
@project_url = url_for(:controller => 'projects', :action => 'member', :id => project.id, :user_id => user.id, :mail => true, :token => @token.value)
|
||||||
|
# 发送消息邀请
|
||||||
|
send_message_request_member(user,project)
|
||||||
|
# end
|
||||||
mail :to => email, :subject => @subject
|
mail :to => email, :subject => @subject
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 邀请信息消息 注:forge_message_id 为邀请人ID(特殊情况)
|
||||||
|
def send_message_request_member(user, project)
|
||||||
|
key = newpass(6).to_s
|
||||||
|
ForgeMessage.create(:user_id => user.id, :project_id => project.id, :forge_message_type => "ProjectInvite",:forge_message_id => User.current.id, :viewed => false, :secret_key =>key)
|
||||||
|
end
|
||||||
|
|
||||||
# author: alan
|
# author: alan
|
||||||
# 根据用户选择发送个人日报或周报
|
# 根据用户选择发送个人日报或周报
|
||||||
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
||||||
|
@ -208,6 +252,20 @@ class Mailer < ActionMailer::Base
|
||||||
mail :to => user.mail,:subject => subject if has_content
|
mail :to => user.mail,:subject => subject if has_content
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 作业截止时间邮件提醒
|
||||||
|
def homework_endtime__added(homework_common, user_id)
|
||||||
|
user = User.find(user_id)
|
||||||
|
@subject = "#{l(:mail_homework)}#{homework_common.name}#{l(:mail_homework_endtime)} "
|
||||||
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
|
@homework_endtime_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
|
||||||
|
@homework_endtime_name = homework_common.name
|
||||||
|
@author = homework_common.user
|
||||||
|
#收件人邮箱
|
||||||
|
recipient = user.mail
|
||||||
|
mail :to => recipient,
|
||||||
|
:subject => "#{l(:mail_homework)}#{homework_common.name}#{l(:mail_homework_endtime)} "
|
||||||
|
end
|
||||||
|
|
||||||
# 公共讨论区发帖、回帖添加邮件发送信息
|
# 公共讨论区发帖、回帖添加邮件发送信息
|
||||||
def forum_message_added(memo)
|
def forum_message_added(memo)
|
||||||
@memo = memo
|
@memo = memo
|
||||||
|
|
|
@ -30,6 +30,9 @@ class Member < ActiveRecord::Base
|
||||||
validate :validate_role
|
validate :validate_role
|
||||||
|
|
||||||
before_destroy :set_issue_category_nil
|
before_destroy :set_issue_category_nil
|
||||||
|
# 删除项目成员一并删除该成员的邀请记录
|
||||||
|
after_destroy :delete_ivite_list
|
||||||
|
|
||||||
|
|
||||||
def role
|
def role
|
||||||
end
|
end
|
||||||
|
@ -97,6 +100,16 @@ class Member < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 删除成员一并删除该成员的邀请信息
|
||||||
|
def delete_ivite_list
|
||||||
|
member_invite_lists = InviteList.where("user_id =? and project_id =?", self.user_id, self.project_id)
|
||||||
|
unless member_invite_lists.nil?
|
||||||
|
member_invite_lists.each do |member_invite_list|
|
||||||
|
member_invite_list.destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Find or initilize a Member with an id, attributes, and for a Principal
|
# Find or initilize a Member with an id, attributes, and for a Principal
|
||||||
def self.edit_membership(id, new_attributes, principal=nil)
|
def self.edit_membership(id, new_attributes, principal=nil)
|
||||||
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal)
|
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal)
|
||||||
|
|
|
@ -66,8 +66,8 @@ class Project < ActiveRecord::Base
|
||||||
# has_many :students_for_courses, :dependent => :destroy
|
# has_many :students_for_courses, :dependent => :destroy
|
||||||
has_many :student, :through => :students_for_courses, :source => :user
|
has_many :student, :through => :students_for_courses, :source => :user
|
||||||
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
||||||
has_many :applied_projects
|
has_many :applied_projects, :dependent => :destroy
|
||||||
has_many :invite_lists
|
has_many :invite_lists, :dependent => :destroy
|
||||||
has_one :dts
|
has_one :dts
|
||||||
|
|
||||||
# end
|
# end
|
||||||
|
|
|
@ -31,9 +31,8 @@ class StudentWork < ActiveRecord::Base
|
||||||
else
|
else
|
||||||
self.system_score = last_test.test_score
|
self.system_score = last_test.test_score
|
||||||
end
|
end
|
||||||
set_final_score self.homework_common,self
|
|
||||||
end
|
end
|
||||||
|
set_final_score self.homework_common,self
|
||||||
end
|
end
|
||||||
def set_src
|
def set_src
|
||||||
self.description = last_test.src if last_test
|
self.description = last_test.src if last_test
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
class SystemMessage < ActiveRecord::Base
|
class SystemMessage < ActiveRecord::Base
|
||||||
attr_accessible :content, :id, :user_id
|
attr_accessible :content, :id, :user_id, :description, :subject
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
validates :content, presence: true
|
validates :subject, presence: true
|
||||||
validates_length_of :content, maximum: 255
|
# validates :description, presence: true
|
||||||
|
validates_length_of :description, maximum: 10000
|
||||||
end
|
end
|
||||||
|
|
|
@ -140,7 +140,7 @@ class User < Principal
|
||||||
has_many :issue_assigns, :class_name => 'ForgeMessage', :conditions => 'viewed=0 and forge_message_type="Issue"'
|
has_many :issue_assigns, :class_name => 'ForgeMessage', :conditions => 'viewed=0 and forge_message_type="Issue"'
|
||||||
has_many :status_updates, :class_name => 'ForgeMessage', :conditions => 'viewed=0 and forge_message_type="Journal"'
|
has_many :status_updates, :class_name => 'ForgeMessage', :conditions => 'viewed=0 and forge_message_type="Journal"'
|
||||||
# 邮件邀请状态
|
# 邮件邀请状态
|
||||||
# has_many :invite_lists
|
has_many :invite_lists, :dependent => :destroy
|
||||||
# end
|
# end
|
||||||
|
|
||||||
######added by nie
|
######added by nie
|
||||||
|
@ -213,6 +213,8 @@ class User < Principal
|
||||||
# added by fq
|
# added by fq
|
||||||
after_create :act_as_activity, :add_onclick_time
|
after_create :act_as_activity, :add_onclick_time
|
||||||
# end
|
# end
|
||||||
|
# 更新邮箱用户或用户名的同事,同步更新邀请信息
|
||||||
|
after_update :update_invite_list
|
||||||
|
|
||||||
scope :in_group, lambda {|group|
|
scope :in_group, lambda {|group|
|
||||||
group_id = group.is_a?(Group) ? group.id : group.to_i
|
group_id = group.is_a?(Group) ? group.id : group.to_i
|
||||||
|
@ -1010,6 +1012,16 @@ class User < Principal
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 更新邮箱的同事,更新invite_lists表中的邮箱信息
|
||||||
|
def update_invite_list
|
||||||
|
invite_lists = InviteList.where("user_id =?",self.id).all
|
||||||
|
unless invite_lists.blank?
|
||||||
|
invite_lists.each do |invite_list|
|
||||||
|
invite_list.update_attribute(:mail, self.mail)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Removes references that are not handled by associations
|
# Removes references that are not handled by associations
|
||||||
# Things that are not deleted are reassociated with the anonymous user
|
# Things that are not deleted are reassociated with the anonymous user
|
||||||
def remove_references_before_destroy
|
def remove_references_before_destroy
|
||||||
|
|
|
@ -3,11 +3,17 @@
|
||||||
<%=l(:label_system_message)%>
|
<%=l(:label_system_message)%>
|
||||||
</h3><br/>
|
</h3><br/>
|
||||||
<div style="padding-top: 20px; padding-left: 5px;">
|
<div style="padding-top: 20px; padding-left: 5px;">
|
||||||
<%= form_for(@admin_messages, :html => {:id =>'system_message-form'}) do |f| %>
|
<%= form_for(@admin_messages, :html => {:id =>'system_messages-form'}) do |f| %>
|
||||||
<div class="field">
|
<li>
|
||||||
<%= f.kindeditor :content,:width=>'87%',:editor_id=>'system_message_editor' %>
|
<label><span class="">*</span> <%= l(:field_title) %> :</label>
|
||||||
|
<input type="text" name="system_message[subject]" class="hwork_input_news" id="system_message_subject" width="576px" onblur="regexTitle($(this));" maxlength="255" placeholder="255个字符以内" value="">
|
||||||
|
<p id="title_notice_span" class="ml55"></p>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label class="fl" > <span class="c_red"></span> <%= l(:field_description) %> :</label>
|
||||||
|
<%= f.kindeditor :description,:width=>'87.5%',:editor_id=>'system_message_editor' %>
|
||||||
<p id="content_notice_span" class="ml55"></p>
|
<p id="content_notice_span" class="ml55"></p>
|
||||||
</div>
|
</li>
|
||||||
<div>
|
<div>
|
||||||
<p id="content_notice_span" class="ml55"></p>
|
<p id="content_notice_span" class="ml55"></p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,14 +25,8 @@
|
||||||
<script>
|
<script>
|
||||||
function system_message_length() {
|
function system_message_length() {
|
||||||
var obj = system_message_editor.html();
|
var obj = system_message_editor.html();
|
||||||
if (obj.length == 0) {
|
if (obj.length > 10000) {
|
||||||
$("#content_notice_span").text("内容不能为空");
|
$("#content_notice_span").text("内容过长,超过10000个字符");
|
||||||
$("#content_notice_span").css('color', '#ff0000');
|
|
||||||
$("#content_notice_span").focus();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (obj.length > 255) {
|
|
||||||
$("#content_notice_span").text("内容过长,超过255个字符");
|
|
||||||
$("#content_notice_span").css('color', '#ff0000');
|
$("#content_notice_span").css('color', '#ff0000');
|
||||||
$("#content_notice_span").focus();
|
$("#content_notice_span").focus();
|
||||||
return false;
|
return false;
|
||||||
|
@ -37,10 +37,27 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function regexTitle(obj){
|
||||||
|
var title = obj.val();
|
||||||
|
if(title.length == 0)
|
||||||
|
{
|
||||||
|
$("#title_notice_span").text("标题不能为空").css("color", "#ff0000").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if(title.length > 255)
|
||||||
|
{
|
||||||
|
$("#title_notice_span").text("标题长度过长,不能超过255个字符").css("color", "#ff0000").focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$("#title_notice_span").text("填写正确").css("color", "#008000");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
function submit_message() {
|
function submit_message() {
|
||||||
|
|
||||||
if (system_message_length()) {
|
if (system_message_length() && regexTitle($("#system_message_subject"))) {
|
||||||
$("#system_message-form").submit();
|
$("#system_messages-form").submit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<!-- 老师身份才可以发布作业 -->
|
<!-- 老师身份才可以发布作业 -->
|
||||||
<div class="HomeWork mb10">
|
<div class="HomeWork mb10">
|
||||||
<%= form_for @homework do |f| %>
|
<%= form_for @homework do |f| %>
|
||||||
|
<input type="text" name="is_in_course" class="none" value="<%= @is_in_course%>"/>
|
||||||
<div id="HomeWorkCon">
|
<div id="HomeWorkCon">
|
||||||
<%= render :partial => 'users/user_homework_form', :locals => { :homework => @homework,:f => f,:edit_mode => true } %>
|
<%= render :partial => 'users/user_homework_form', :locals => { :homework => @homework,:f => f,:edit_mode => true } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
</p>
|
</p>
|
||||||
<% if @is_teacher%>
|
<% if @is_teacher%>
|
||||||
<%= homework_anonymous_comment(homework)%>
|
<%= homework_anonymous_comment(homework)%>
|
||||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework,:is_in_course => 1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
||||||
<%= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
|
<%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit") %>
|
||||||
<% elsif @is_student%>
|
<% elsif @is_student%>
|
||||||
<%= student_anonymous_comment homework %>
|
<%= student_anonymous_comment homework %>
|
||||||
<%= student_new_homework homework %>
|
<%= student_new_homework homework %>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
|
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
|
||||||
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
|
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
|
||||||
|
|
||||||
<div class="text-diff">
|
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
|
||||||
<%= simple_format_without_paragraph @diff.to_html %>
|
<%= @diff.to_html.gsub("<","<").gsub(">",">").gsub(""","\"").gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"").html_safe %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
|
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>
|
||||||
|
|
|
@ -36,21 +36,6 @@
|
||||||
<%#= render :partial => 'layouts/new_header'%>
|
<%#= render :partial => 'layouts/new_header'%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<!--TopBar begin-->
|
|
||||||
<div id="TopBar">
|
|
||||||
<div class="topbar_info02 fl">
|
|
||||||
<h2>
|
|
||||||
<a href="http://<%= Setting.host_name %>" target="_blank" class="c_blue">
|
|
||||||
<%= l(:label_projects_community) %>
|
|
||||||
</a>
|
|
||||||
</h2>
|
|
||||||
<p class="hidden">
|
|
||||||
<%= l(:label_user_location) %> :
|
|
||||||
<%= link_to l(:field_homepage), home_path %> > <a href="http://<%= Setting.host_name %>"><%=l(:label_project_hosting_platform) %> </a>><%= link_to @project.name, project_path(@project.id) %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div><!--TopBar end-->
|
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div id="LSide" class="fl">
|
<div id="LSide" class="fl">
|
||||||
<div class="project_info">
|
<div class="project_info">
|
||||||
|
@ -113,9 +98,9 @@
|
||||||
</div>
|
</div>
|
||||||
<ul class="navContent " style="display:block" id="navContent_invit">
|
<ul class="navContent " style="display:block" id="navContent_invit">
|
||||||
<li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li>
|
<li><%= link_to l(:label_invite_new_user), :controller=>"projects", :action=>"invite_members_by_mail", :id => @project %></li>
|
||||||
<% if User.current.allowed_to?(:manage_members, @project) %>
|
<!--<%# if User.current.allowed_to?(:manage_members, @project) %>-->
|
||||||
<li><%= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li>
|
<!--<li><%#= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li>-->
|
||||||
<% end %>
|
<!--<%# end %>-->
|
||||||
</ul>
|
</ul>
|
||||||
<% end %><!--end-->
|
<% end %><!--end-->
|
||||||
<!--menu 左侧工具栏 -->
|
<!--menu 左侧工具栏 -->
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
|
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||||
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
|
<span style="float: left; width: 526px">
|
||||||
|
<p><%=link_to @author, user_url(@author) %> 发布的作业:<%=link_to @homework_endtime_name, @homework_endtime_url%> <span style="color: red">截止时间快到了!</span></p>
|
||||||
|
<p style="color: red;font-size: 12px;">如果您还未交作业,请赶紧提交作业!</p>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
|
</div>
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
<span style="float: left; width: 526px">
|
<span style="float: left; width: 526px">
|
||||||
<p><span style="color:#1b55a7; font-weight:bold;"><%= @invitor_name %></span> 邀请您加入项目:<span style="color:#1b55a7; font-weight:bold;"><%= @project_name %></span> </p>
|
<p><span style="color:#1b55a7; font-weight:bold;"><%= @invitor_name %></span> 邀请您加入项目:<span style="color:#1b55a7; font-weight:bold;"><%=link_to @project_name, project_url(@project) %></span> </p>
|
||||||
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
<p>点击“同意加入”按钮,即可快速加入项目!</p> <br/>
|
<p>点击“同意加入”按钮,即可快速加入项目,查看项目相关信息!</p> <br/>
|
||||||
<label class="mail_reply">
|
<label class="mail_reply">
|
||||||
<%= link_to( l(:label_agree_join_project), @project_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
|
<%= link_to( l(:label_agree_join_project), @project_url, :class => "mail_reply", :style =>'display:block; float:right; width:80px; text-align:center; height:30px; background:#15bccf; color:#fff; font-weight:normal; font-size:14px; line-height: 30px;') %>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
|
|
||||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||||
|
|
||||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
<span style="float: left; width: 526px">
|
<span style="float: left; width: 526px">
|
||||||
<p><%= @subject %> </p>
|
<p><%= @subject %> </p>
|
||||||
|
@ -9,13 +7,9 @@
|
||||||
<p> <%= link_to @project_url, @project_url%></p>
|
<p> <%= link_to @project_url, @project_url%></p>
|
||||||
<p>您的账号为:<%= @email %></p>
|
<p>您的账号为:<%= @email %></p>
|
||||||
<p>密码为: <%= @password %></p>
|
<p>密码为: <%= @password %></p>
|
||||||
|
<p style="color: red;font-size: 12px;">为了您的账号安全,请勿将邮件信息告知他人!</p>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
|
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||||
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
|
<span style="float: left; width: 526px">
|
||||||
|
<p><%=link_to @author, user_url(@author) %> 发布的作业:<%=link_to @anonymous_comment_close_name, @anonymous_comment_close_url%> <span style="color: red; padding-left: 10px;">已经关闭了匿评!</span></p>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
|
</div>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
|
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||||
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
|
<span style="float: left; width: 526px">
|
||||||
|
<p><%=link_to @author, user_url(@author) %> 发布的作业:<%=link_to @anonymous_comment_close_name, @anonymous_comment_close_url%> <span style="color: red; padding-left: 10px;">已经开启匿评了!</span></p>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
|
||||||
|
</div>
|
|
@ -1,3 +1,9 @@
|
||||||
|
<style type="text/css">
|
||||||
|
span{
|
||||||
|
word-break:break-all;
|
||||||
|
word-wrap:break-word;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<%
|
<%
|
||||||
btn_tips = l(:label_news_new)
|
btn_tips = l(:label_news_new)
|
||||||
label_tips = l(:label_news)
|
label_tips = l(:label_news)
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
$("#valid_email").text("<%= l(:label_email_format_error)%>");
|
$("#valid_email").text("<%= l(:label_email_format_error)%>");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(email.split('@')[0].length >= 20)
|
else if(email.length > 25)
|
||||||
{
|
{
|
||||||
$("#valid_email").text("邮箱名过长,最长为20个字符");
|
$("#valid_email").text("邮箱名过长,最长为25个字符");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -85,7 +85,39 @@
|
||||||
<%= l(:label_send_email)%>
|
<%= l(:label_send_email)%>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%# 邀请用户的状态 %>
|
<%# 邀请用户的状态 %>
|
||||||
|
<% unless @inviter_lists.blank? %>
|
||||||
|
<div class="section">
|
||||||
|
<div class="section-header">
|
||||||
|
<div class="desc">项目成员邀请状态列表</div>
|
||||||
|
</div>
|
||||||
|
<div class="invitations-records">
|
||||||
|
<% @inviter_lists.each do |inviter_list| %>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<% if inviter_list.user != nil %>
|
||||||
|
<tr>
|
||||||
|
<td class="email"><%= inviter_list.user.mail %></td>
|
||||||
|
<td class="text-name">
|
||||||
|
<% if inviter_list.user.active? %>
|
||||||
|
<%=link_to inviter_list.user.name, user_path(inviter_list.user), :class => "c_eblue" %>
|
||||||
|
<% else %>
|
||||||
|
<span class="unactive"><%= inviter_list.user.name %></span>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
|
<td class="text-status"><%= status_for_ivitied(inviter_list, @project) %></td>
|
||||||
|
<!--<td class="text-time"><%#= time_tag(inviter_list.created_at).html_safe %></td>-->
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
<% unless @inviter_lists.blank? %>
|
<% unless @inviter_lists.blank? %>
|
||||||
<div>
|
<div>
|
||||||
<% unless @inviters_count.nil? %>
|
<% unless @inviters_count.nil? %>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- 成绩 -->
|
<!-- 成绩 -->
|
||||||
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
|
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||||
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
<li class="hworkList50 <%= score_color score%> student_final_scor_info">
|
||||||
<%= score.nil? ? "--" : format("%.1f",score)%>
|
<%= score.nil? ? "--" : format("%.1f",score)%>
|
||||||
<% unless score.nil?%>
|
<% unless score.nil?%>
|
||||||
|
|
|
@ -87,13 +87,13 @@
|
||||||
<div class="dis" id="tbc_01">
|
<div class="dis" id="tbc_01">
|
||||||
<div class="codeList">
|
<div class="codeList">
|
||||||
<span class="fl mt3">
|
<span class="fl mt3">
|
||||||
<%= link_to "所有作品<font class='f12 c_red'>[共#{@homework.student_works.count}份]</font>".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%>
|
<%= link_to "所有作品<font class='f12 c_red'>[共#{@stundet_works.count}份]</font>".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%>
|
||||||
</span>
|
</span>
|
||||||
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
|
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
|
||||||
<form class="resourcesSearchloadBox fr">
|
<div class="resourcesSearchloadBox fr">
|
||||||
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="输入资源关键词进行搜索" class="searchResource" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
|
<input type="text" id="course_student_name" value="<%= @name%>" placeholder="姓名、学号、邮箱" class="searchResource" onkeypress="SearchByName('<%= student_work_index_path(:homework => @homework.id)%>',event);"/>
|
||||||
<a class="homepageSearchIcon" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
|
<a class="homepageSearchIcon" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
|
||||||
</form>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,13 +12,38 @@
|
||||||
<% end %> TO <!--+"(课程名称)" -->
|
<% end %> TO <!--+"(课程名称)" -->
|
||||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostTitle break_word"> <!--+"(作业名称)"-->
|
<div class="homepagePostTitle hidden m_w530 fl"> <!--+"(作业名称)"-->
|
||||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||||
</div>
|
</div>
|
||||||
|
<% if activity.homework_detail_manual.comment_status == 1%>
|
||||||
|
<span class="grey_btn_cir ml10">未开启匿评</span>
|
||||||
|
<% elsif activity.homework_detail_manual.comment_status == 2%>
|
||||||
|
<span class="green_btn_cir ml10">匿评中</span>
|
||||||
|
<% elsif activity.homework_detail_manual.comment_status == 3%>
|
||||||
|
<span class="grey_btn_cir ml10">匿评已结束</span>
|
||||||
|
<% end%>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<div class="homepagePostSubmit">
|
<div class="homepagePostSubmit">
|
||||||
<%= student_work_activity_submit_status(homework: activity) %>
|
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
||||||
|
<%= user_for_homework_common activity,is_teacher %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<% if activity.homework_type == 2 && is_teacher%>
|
||||||
|
<div class="homepagePostSubmit">
|
||||||
|
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.homework_type == 2%>
|
||||||
|
<div class="homepagePostDeadline mr15">
|
||||||
|
语言:
|
||||||
|
<% if activity.homework_detail_programing.language.to_i == 1%>
|
||||||
|
C
|
||||||
|
<% elsif activity.homework_detail_programing.language.to_i == 2%>
|
||||||
|
C++
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
|
<div class="homepagePostDeadline">截止时间:<%= activity.end_time.to_s %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
|
<div class="homepagePostIntro break_word upload_img" id="activity_description_<%= user_activity_id%>">
|
||||||
|
|
|
@ -59,10 +59,10 @@
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
<ul class="homepagePostSettiongText">
|
<ul class="homepagePostSettiongText">
|
||||||
<li>
|
<li>
|
||||||
<%= link_to l(:button_edit),edit_homework_common_path(homework_common), :class => "postOptionLink"%>
|
<%= link_to l(:button_edit),edit_homework_common_path(homework_common,:is_in_course => 0), :class => "postOptionLink"%>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= homework_anonymous_comment homework_common %>
|
<%= homework_anonymous_comment homework_common %>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
<span class="f12 c_red db mt5 fl">温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测和提交。</span>
|
<span class="f12 c_red db mt5 fl">温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测。</span>
|
||||||
<a href="javascript:void(0);" class="BlueCirBtn fr">确 定</a>
|
<a href="javascript:void(0);" class="BlueCirBtn fr">确 定</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
<div class="homepageRightBanner">
|
<div class="homepageRightBanner">
|
||||||
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
|
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></div>
|
||||||
<ul class="resourcesSelect">
|
<ul class="resourcesSelect">
|
||||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
<ul class="newsType">
|
<ul class="newsType">
|
||||||
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
||||||
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
||||||
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
||||||
<%# 课程相关消息 %>
|
<%# 课程相关消息 %>
|
||||||
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
||||||
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
||||||
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
|
||||||
<!--<li><%#= link_to "通知回复", user_message_path(User.current, :type => 'course_news_reply'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "通知回复", user_message_path(User.current, :type => 'course_news_reply'), :class => "resourcesGrey" %></li>-->
|
||||||
<!--<li><%#= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>-->
|
<!--<li><%#= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>-->
|
||||||
<!--<li><%#= link_to "作品评阅", user_message_path(User.current, :type => 'works_reviewers'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "作品评阅", user_message_path(User.current, :type => 'works_reviewers'), :class => "resourcesGrey" %></li>-->
|
||||||
<!--<li><%#= link_to "作品讨论", user_message_path(User.current, :type => 'works_reply'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "作品讨论", user_message_path(User.current, :type => 'works_reply'), :class => "resourcesGrey" %></li>-->
|
||||||
<%# 项目相关消息 %>
|
<%# 项目相关消息 %>
|
||||||
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
|
||||||
<!--<li><%#= link_to "问题更新", user_message_path(User.current, :type => 'issue_update'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "问题更新", user_message_path(User.current, :type => 'issue_update'), :class => "resourcesGrey" %></li>-->
|
||||||
<!--<li><%#= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>-->
|
||||||
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>-->
|
||||||
<!--<li><%#= link_to "新闻回复", user_message_path(User.current, :type => 'forge_news_reply'), :class => "resourcesGrey" %></li>-->
|
<!--<li><%#= link_to "新闻回复", user_message_path(User.current, :type => 'forge_news_reply'), :class => "resourcesGrey" %></li>-->
|
||||||
<%# 项目相关消息 %>
|
<%# 项目相关消息 %>
|
||||||
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
|
||||||
<%# 系统贴吧 %>
|
<%# 系统贴吧 %>
|
||||||
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
|
||||||
<%# 系统消息 %>
|
<%# 系统消息 %>
|
||||||
<li><%= link_to "系统消息", user_message_path(User.current, :type => 'system_messages'), :class => "resourcesGrey" %></li>
|
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="resources mt10" id="users_setting">
|
<div class="resources mt10" id="users_setting">
|
||||||
<div>
|
<div>
|
||||||
<% if @message_alls.count >0 %>
|
<% if @message_alls.count >0 || @user_system_messages.count >0 %>
|
||||||
<% if params[:type].nil? || params[:type] == "unviewed" %>
|
<% if params[:type].nil? || params[:type] == "unviewed" %>
|
||||||
<div class="newsReadSetting">
|
<div class="newsReadSetting">
|
||||||
有 <span class="c_red"><%= unviewed_message(@user) %></span> 条未读
|
有 <span class="c_red"><%= unviewed_message(@user) %></span> 条未读
|
||||||
|
@ -42,36 +42,42 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# 系统消息 %>
|
<%# 系统消息 %>
|
||||||
<% if params[:type] != 'system_messages' %>
|
<% if params[:type] != 'system_messages' %>
|
||||||
<% @user_system_messages.each do |usm| %>
|
<% @user_system_messages.each do |usm| %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
<a href="javascript:void(0);">
|
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %></div></a>
|
||||||
<div class="navHomepageLogo fl">
|
</li>
|
||||||
<%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %>
|
<li class="homepageNewsPubType fl">
|
||||||
</div>
|
<span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span>
|
||||||
</a>
|
</li>
|
||||||
</li>
|
<span style="color: red;float: left">【系统消息】</span><li class="homepageSystenMessageContent fl" id="content_<%= usm.id %>">
|
||||||
<li class="homepageNewsPubType fl">
|
<li class="homepageSystenMessageContent fl">
|
||||||
<span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span>
|
|
||||||
</li>
|
<%= link_to usm.subject.nil? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
|
||||||
<li class="homepageNewsContent fl">
|
:id => "content_link_#{usm.id}",
|
||||||
<%= link_to usm.content.html_safe, user_message_path(User.current, :type => "system_messages"),
|
:onmouseover =>"message_titile_show($(this),event);",
|
||||||
:class => "newsRed",
|
:onmouseout => "message_titile_hide($(this));"
|
||||||
:onmouseover => "message_titile_show($(this),event);",
|
%>
|
||||||
:onmouseout => "message_titile_hide($(this));"
|
</li>
|
||||||
%>
|
<div style="display:none;" class="message_title_red system_message_style">
|
||||||
</li>
|
<% unless usm.subject.nil? %>
|
||||||
<div style="display:none;" class="message_title_red">
|
<p><strong>标题:</strong><%= usm.subject %></p>
|
||||||
<%= usm.content.html_safe %>
|
<% end %>
|
||||||
</div>
|
<% if usm.description.nil? && usm.content.nil? %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
|
|
||||||
</ul>
|
<% else %>
|
||||||
<% end %>
|
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.html_safe %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# 课程消息 %>
|
</div>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<!--总消息列表-->
|
||||||
<% unless @message_alls.nil? %>
|
<% unless @message_alls.nil? %>
|
||||||
<% @message_alls.each do |ma| %>
|
<% @message_alls.each do |ma| %>
|
||||||
|
<%# 课程消息 %>
|
||||||
<% if ma.class == CourseMessage %>
|
<% if ma.class == CourseMessage %>
|
||||||
<% if ma.course_message_type == "News" %>
|
<% if ma.course_message_type == "News" %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
|
@ -80,7 +86,15 @@
|
||||||
<li class="homepageNewsContent fl">
|
<li class="homepageNewsContent fl">
|
||||||
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
|
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
|
||||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.course_message.title}" %></li>
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>标题:</strong><%= ma.course_message.title %></p>
|
||||||
|
<% unless ma.course_message.description.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -93,18 +107,32 @@
|
||||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></li>
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
||||||
<div style="display: none" class="message_title">
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
<%= ma.course_message.comments.html_safe %>
|
<p><strong>标题:</strong><%= ma.course_message.commented.title %></p>
|
||||||
|
<% unless ma.course_message.comments.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.course_message.comments.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if ma.course_message_type == "HomeworkCommon" && ma.status != 1 %>
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业:</span></li>
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了作业:</span></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.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.course_message.name}" %></a></li>
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>标题:</strong><%= ma.course_message.name %></p>
|
||||||
|
<% unless ma.course_message.description.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -112,19 +140,89 @@
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||||||
<% if ma.viewed == 0 %>
|
<% if ma.viewed == 0 %>
|
||||||
<li class="homepageHomeworkContent fl">
|
<li class="homepageHomeworkContent fl">
|
||||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.course_message.name}" %>
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.name %>
|
||||||
|
</div>
|
||||||
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
<li class="homepageHomeworkContentWarn fl"> 截止时间快到了!</li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li class="homepageNewsContent fl">
|
<li class="homepageNewsContent fl">
|
||||||
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.course_message.name}" %>
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))"%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.name %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<!--作品开启匿评 待整合:时间紧-->
|
||||||
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||||
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||||||
|
<% if ma.viewed == 0 %>
|
||||||
|
<li class="homepageHomeworkContent fl">
|
||||||
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.name %>
|
||||||
|
</div>
|
||||||
|
<li class="homepageHomeworkContentWarn fl"> 开启匿评了!</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="homepageNewsContent fl">
|
||||||
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))"%>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.name %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<!--作品关闭匿评-->
|
||||||
|
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||||
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
|
||||||
|
<% if ma.viewed == 0 %>
|
||||||
|
<li class="homepageHomeworkContent fl">
|
||||||
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.name %>
|
||||||
|
</div>
|
||||||
|
<li class="homepageHomeworkContentWarn fl"> 匿评已经关闭!</li>
|
||||||
|
<% else %>
|
||||||
|
<li class="homepageNewsContent fl">
|
||||||
|
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))"%>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.name %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if ma.course_message_type == "Poll" %>
|
<% if ma.course_message_type == "Poll" %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
||||||
|
@ -132,7 +230,11 @@
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
|
||||||
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
||||||
:title => "#{ma.course_message.polls_name}" %></a></li>
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.polls_name %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -144,15 +246,27 @@
|
||||||
<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.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.course_message.subject.html_safe}" %></a></li>
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style" >
|
||||||
|
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
|
||||||
|
<% unless ma.course_message.content.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<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.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
<%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
|
||||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
<div style="display: none" class="message_title" >
|
<div style="display: none" class="message_title_red system_message_style" >
|
||||||
<%= ma.course_message.content.html_safe %>
|
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
|
||||||
|
<% unless ma.course_message.content.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
@ -165,23 +279,62 @@
|
||||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li>
|
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品:" : "重新评阅了作品:" %></span></li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<% unless ma.content.nil? %>
|
<% unless ma.content.nil? %>
|
||||||
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.content.html_safe}" %></a></li>
|
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style" >
|
||||||
|
<%= ma.content.html_safe %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if ma.course_message_type == "JournalsForMessage" %>
|
<% if ma.course_message_type == "JournalsForMessage" %>
|
||||||
<ul class="homepageNewsList fl">
|
<% if ma.course_message.jour_type == 'Course' %>
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了作品评论:</span></li>
|
<li class="homepageNewsPortrait fl">
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||||
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.course_message.notes}" %></a></li>
|
</li>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||||
</ul>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
|
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
|
||||||
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.notes.html_safe %>
|
||||||
|
</div>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<% else %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<li class="homepageNewsPortrait fl">
|
||||||
|
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||||
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
|
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.course_message.notes %>
|
||||||
|
</div>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!--项目消息-->
|
<!--项目消息-->
|
||||||
<% if ma.class == ForgeMessage %>
|
<% if ma.class == ForgeMessage %>
|
||||||
|
<!--申请加入项目-->
|
||||||
<% if ma.forge_message_type == "AppliedProject" %>
|
<% if ma.forge_message_type == "AppliedProject" %>
|
||||||
<ul class="homepageNewsList fl">
|
<ul class="homepageNewsList fl">
|
||||||
<li class="homepageNewsPortrait fl">
|
<li class="homepageNewsPortrait fl">
|
||||||
|
@ -192,8 +345,44 @@
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
|
||||||
</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.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.project}" %></a>
|
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.project %>
|
||||||
|
</div>
|
||||||
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
</ul>
|
||||||
|
<% end %>
|
||||||
|
<!--邀请加入项目-->
|
||||||
|
<% if ma.forge_message_type == "ProjectInvite" %>
|
||||||
|
<% inviter = User.find(ma.forge_message_id) %>
|
||||||
|
<ul class="homepageNewsList fl">
|
||||||
|
<li class="homepageNewsPortrait fl">
|
||||||
|
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %></a>
|
||||||
|
</li>
|
||||||
|
<li class="homepageNewsPubType fl">
|
||||||
|
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
|
||||||
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">邀请你加入项目:</span>
|
||||||
|
</li>
|
||||||
|
<li class="homepageHomeworkContent fl">
|
||||||
|
<%= link_to ma.project, project_path(ma.project),
|
||||||
|
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<%= ma.project %>
|
||||||
|
</div>
|
||||||
|
<% if User.current == @user %>
|
||||||
|
<li class="homepageHomeworkContentWarn fl">
|
||||||
|
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
|
||||||
|
:value => ma.secret_key,
|
||||||
|
:class => "green_btn_cir ml10",
|
||||||
|
:style => "color:#fff" %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -207,8 +396,17 @@
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派了问题给你:</span>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派了问题给你:</span>
|
||||||
</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.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.forge_message.subject}" %></a>
|
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
|
||||||
|
<% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
|
||||||
|
<div class="fl"><strong>描述:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -225,8 +423,14 @@
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
<%= link_to get_issue_des_update(ma.forge_message).html_safe,
|
<%= link_to get_issue_des_update(ma.forge_message).html_safe,
|
||||||
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{get_issue_des_update(ma.forge_message).html_safe}" %></a>
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style" >
|
||||||
|
<p><strong>问题标题:</strong><%= ma.forge_message.journalized.subject %></p>
|
||||||
|
<div class="fl"><strong>更新内容:</strong></div>
|
||||||
|
<div class="ml60"><%= get_issue_des_update(ma.forge_message).html_safe %></div>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -237,19 +441,31 @@
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
||||||
<% if ma.forge_message.parent_id.nil? %>
|
<% if ma.forge_message.parent_id.nil? %>
|
||||||
<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.forge_message.subject, project_boards_path(ma.forge_message.project,
|
<%= link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
|
||||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||||
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
:topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
|
||||||
|
<% unless ma.forge_message.content.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.forge_message.content.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<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.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
|
<%= link_to ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
|
||||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||||
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
:topic_id => ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
:onmouseout => "message_titile_hide($(this))" %></a></li>
|
||||||
<div style="display: none" class="message_title">
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
<%= ma.forge_message.content.html_safe %>
|
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
|
||||||
|
<% unless ma.forge_message.content.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.forge_message.content.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
@ -265,8 +481,18 @@
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
|
||||||
</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.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.title.html_safe}" %></a>
|
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
|
||||||
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>标题:</strong><%= ma.forge_message.title %></p>
|
||||||
|
<% unless ma.forge_message.description.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -278,8 +504,14 @@
|
||||||
<li class="homepageNewsContent fl">
|
<li class="homepageNewsContent fl">
|
||||||
<%= link_to "#{ma.forge_message.comments.html_safe}",
|
<%= link_to "#{ma.forge_message.comments.html_safe}",
|
||||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.forge_message.comments.html_safe}" %>
|
:onmouseover => "message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>新闻标题:</strong><%= ma.forge_message.commented.title %></p>
|
||||||
|
<div class="fl"><strong>评论内容:</strong></div>
|
||||||
|
<div class="ml60"><%= ma.forge_message.comments.html_safe %></div>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -298,16 +530,28 @@
|
||||||
<% if ma.memo.parent_id.nil? %>
|
<% if ma.memo.parent_id.nil? %>
|
||||||
<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.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.memo.subject}" %></a>
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
|
<p><strong>标题:</strong><%= ma.memo.subject %></p>
|
||||||
|
<% unless ma.memo.content.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.memo.content.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<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.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></a>
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
<div style="display: none" class="message_title">
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
<%= ma.memo.content.html_safe %>
|
<p><strong>标题:</strong><%= ma.memo.subject %></p>
|
||||||
|
<% unless ma.memo.content.nil? %>
|
||||||
|
<div class="fl"><strong>内容:</strong></div>
|
||||||
|
<div class="ml36"><%= ma.memo.content.html_safe %></div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
||||||
|
@ -330,7 +574,7 @@
|
||||||
:onmouseover =>"message_titile_show($(this),event)",
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
:onmouseout => "message_titile_hide($(this))" %></a>
|
:onmouseout => "message_titile_hide($(this))" %></a>
|
||||||
</li>
|
</li>
|
||||||
<div style="display: none" class="message_title" >
|
<div style="display: none" class="message_title_red system_message_style" >
|
||||||
<%= ma.journals_for_message.notes.html_safe %>
|
<%= ma.journals_for_message.notes.html_safe %>
|
||||||
</div>
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||||
|
@ -338,30 +582,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# 系统消息 %>
|
|
||||||
<% if ma.class == SystemMessage %>
|
|
||||||
<ul class="homepageNewsList fl">
|
|
||||||
<li class="homepageNewsPortrait fl">
|
|
||||||
<a href="javascript:void(0);">
|
|
||||||
<div class="navHomepageLogo fl">
|
|
||||||
<%=image_tag("/images/logo.png",width:"30px", height: "30px",class: "mt3")%>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="homepageNewsPubType fl"><span class="newsBlue homepageNewsPublisher" >Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span></li>
|
|
||||||
<li class="homepageNewsContent fl">
|
|
||||||
<%= link_to ma.content.html_safe, user_message_path(User.current, :type => "system_messages"),
|
|
||||||
:class => "#{params[:type]=="unviewed" ? "newsBlack" : "newsRed"}",
|
|
||||||
:onmouseover =>"message_titile_show($(this),event);",
|
|
||||||
:onmouseout => "message_titile_hide($(this));"
|
|
||||||
%>
|
|
||||||
</li>
|
|
||||||
<div style="display:none;" class="message_title_red">
|
|
||||||
<%= ma.content.html_safe%>
|
|
||||||
</div>
|
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
||||||
</ul>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<ul class="wlist" style=" border:none; padding-top: 15px;">
|
<ul class="wlist" style=" border:none; padding-top: 15px;">
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
|
@ -377,15 +597,32 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function message_titile_show(obj,e)
|
function message_titile_show(obj,e)
|
||||||
{
|
{
|
||||||
obj.parent().next("div").show();
|
obj.parent().next("div").show();
|
||||||
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
||||||
}
|
}
|
||||||
function message_titile_hide(obj)
|
function message_titile_hide(obj)
|
||||||
{
|
{
|
||||||
obj.parent().next("div").hide();
|
obj.parent().next("div").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function show_more_system_messages(list,content, id2, id3) {
|
||||||
|
$(list).toggleClass("show_more_li");
|
||||||
|
$(content).toggleClass("show_more_system_message");
|
||||||
|
var information = $(id2);
|
||||||
|
var val = information.attr("value");
|
||||||
|
if (val == "show_more") {
|
||||||
|
$(id2).text("[收起]");
|
||||||
|
information.attr("value", "hide_more");
|
||||||
|
information.attr("style", "color:#3ca5c6");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$(id2).text("[展开]");
|
||||||
|
information.attr("value", "show_more");
|
||||||
|
information.attr("style", "color:#0781b4;");
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
<div class="homepageRightBanner">
|
||||||
|
<div class="NewsBannerName">系统消息</div>
|
||||||
|
<ul class="resourcesSelect">
|
||||||
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
|
<ul class="newsType">
|
||||||
|
<li><%= link_to "全部",user_message_path(User.current), :class => "resourcesGrey" %></li>
|
||||||
|
<li><%= link_to "未读消息", user_message_path(User.current, :type => 'unviewed'), :class => "resourcesGrey" %></li>
|
||||||
|
<li><%= link_to "用户申请", user_message_path(User.current, :type => 'apply'), :class => "resourcesGrey" %></li>
|
||||||
|
<%# 课程相关消息 %>
|
||||||
|
<li><%= link_to "作业消息", user_message_path(User.current, :type => 'homework'), :class => "resourcesGrey" %></li>
|
||||||
|
<li><%= link_to "课程讨论",user_message_path(User.current, :type => 'course_message'), :class => "resourcesGrey" %></li>
|
||||||
|
<li><%= link_to "课程通知",user_message_path(User.current, :type => 'course_news'), :class => "resourcesGrey" %></li>
|
||||||
|
<!--<li><%#= link_to "通知回复", user_message_path(User.current, :type => 'course_news_reply'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<!--<li><%#= link_to "课程问卷", user_message_path(User.current, :type => 'poll'), :class => "resourcesGrey" %></a></li>-->
|
||||||
|
<!--<li><%#= link_to "作品评阅", user_message_path(User.current, :type => 'works_reviewers'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<!--<li><%#= link_to "作品讨论", user_message_path(User.current, :type => 'works_reply'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<%# 项目相关消息 %>
|
||||||
|
<li><%= link_to "项目任务", user_message_path(User.current, :type => 'issue'), :class => "resourcesGrey" %></li>
|
||||||
|
<!--<li><%#= link_to "问题更新", user_message_path(User.current, :type => 'issue_update'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<!--<li><%#= link_to "项目讨论区", user_message_path(User.current, :type => 'forge_message'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<!--<li><%#= link_to "项目新闻", user_message_path(User.current, :type => 'forge_news'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<!--<li><%#= link_to "新闻回复", user_message_path(User.current, :type => 'forge_news_reply'), :class => "resourcesGrey" %></li>-->
|
||||||
|
<%# 项目相关消息 %>
|
||||||
|
<li><%= link_to "贴吧帖子", user_message_path(User.current, :type => 'forum'), :class => "resourcesGrey" %></li>
|
||||||
|
<%# 系统贴吧 %>
|
||||||
|
<li><%= link_to "用户留言",user_message_path(User.current, :type => 'user_feedback'), :class => "resourcesGrey" %></li>
|
||||||
|
<%# 系统消息 %>
|
||||||
|
<li><%= link_to "系统消息", user_system_messages_path(User.current), :class => "resourcesGrey" %></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% @sytem_messages.each do |system_message| %>
|
||||||
|
<div class="resources mt10">
|
||||||
|
<div class="homepagePostBrief break_word">
|
||||||
|
<div class="homepagePostPortrait">
|
||||||
|
<%= image_tag("/images/logo.png", :width => "42", :height => "42",class: "mt3") %>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostDes">
|
||||||
|
<div class="homepagePostTo break_word">
|
||||||
|
<span class="fl"><span style="color:#0781b4;">Trustie平台 </span>发布了系统消息:</span>
|
||||||
|
<span style="color:#0781b4; max-width:470px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;vertical-align: top;"><%= system_message.subject.nil? ? "系统消息" : system_message.subject %></span>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p class="homepagePostIntro break_word upload_img">
|
||||||
|
<%= system_message.content.nil? ? system_message.description.html_safe : system_message.content.html_safe %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p class="homepagePostDeadline">截止时间:<%= format_time(system_message.created_at) %></p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<ul class="wlist" style=" border:none; padding-top: 15px;">
|
||||||
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
|
</ul>
|
|
@ -103,7 +103,7 @@ default:
|
||||||
# autologin_cookie_name: the name of the cookie (default: autologin)
|
# autologin_cookie_name: the name of the cookie (default: autologin)
|
||||||
# autologin_cookie_path: the cookie path (default: /)
|
# autologin_cookie_path: the cookie path (default: /)
|
||||||
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
# autologin_cookie_secure: true sets the cookie secure flag (default: false)
|
||||||
autologin_cookie_name: "autologin_trustie"
|
autologin_cookie_name:
|
||||||
autologin_cookie_path:
|
autologin_cookie_path:
|
||||||
autologin_cookie_secure:
|
autologin_cookie_secure:
|
||||||
|
|
||||||
|
@ -197,16 +197,10 @@ default:
|
||||||
#max_concurrent_ajax_uploads: 2
|
#max_concurrent_ajax_uploads: 2
|
||||||
#pic_types: "bmp,jpeg,jpg,png,gif"
|
#pic_types: "bmp,jpeg,jpg,png,gif"
|
||||||
|
|
||||||
repository_root_path: '/tmp/htdocs'
|
|
||||||
|
|
||||||
judge_server: 'http://judge.trustie.net/'
|
|
||||||
|
|
||||||
# specific configuration options for production environment
|
# specific configuration options for production environment
|
||||||
# that overrides the default ones
|
# that overrides the default ones
|
||||||
production:
|
production:
|
||||||
judge_server: 'http://192.168.80.21:8080/'
|
# CJK support
|
||||||
repository_root_path: '/home/pdl/redmine-2.3.2-0/apache2/htdocs'
|
|
||||||
cookie_domain: ".trustie.net"
|
|
||||||
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
|
||||||
email_delivery:
|
email_delivery:
|
||||||
delivery_method: :smtp
|
delivery_method: :smtp
|
||||||
|
|
|
@ -24,3 +24,7 @@ zh:
|
||||||
mail_course_title_userin: "在课程"
|
mail_course_title_userin: "在课程"
|
||||||
mail_course_homework_active: "中发布了作业"
|
mail_course_homework_active: "中发布了作业"
|
||||||
mail_attention: "请您关注!"
|
mail_attention: "请您关注!"
|
||||||
|
mail_homework_endtime: "作业截止时间快到了!"
|
||||||
|
mail_homework: "作业:"
|
||||||
|
mail_anonymous_comment_close: "作业匿评已经关闭!"
|
||||||
|
mail_anonymous_comment_open: "作业匿评已经开启!"
|
|
@ -347,7 +347,7 @@ zh:
|
||||||
#
|
#
|
||||||
# 邀请
|
# 邀请
|
||||||
#
|
#
|
||||||
label_invite_new_user: "发送邮件邀请新用户"
|
label_invite_new_user: "邀请用户加入项目"
|
||||||
label_invite_join: 邀请加入
|
label_invite_join: 邀请加入
|
||||||
label_invite_email_tips: 输入好友的邮箱地址,Trustie会自动为该好友注册平台账号!
|
label_invite_email_tips: 输入好友的邮箱地址,Trustie会自动为该好友注册平台账号!
|
||||||
notice_registed_error: 您输入的邮箱地址为空或者该邮箱已被注册!
|
notice_registed_error: 您输入的邮箱地址为空或者该邮箱已被注册!
|
||||||
|
|
|
@ -52,6 +52,8 @@ zh:
|
||||||
notice_not_authorized_archived_project: 要访问的项目已经归档。
|
notice_not_authorized_archived_project: 要访问的项目已经归档。
|
||||||
notice_not_authorized_message: 您访问的消息不存在!
|
notice_not_authorized_message: 您访问的消息不存在!
|
||||||
notice_email_sent: "邮件已发送至 %{value}"
|
notice_email_sent: "邮件已发送至 %{value}"
|
||||||
|
notice_email_login_used: 无法自动为该邮箱注册新用户,该邮箱地址已经有人作为登录名使用!
|
||||||
|
notice_email_invited: 已经向该邮箱发送过邀请,正在等待对方的回复,三小时后您可以再次发送邀请!
|
||||||
notice_email_error: "发送邮件时发生错误 (%{value})"
|
notice_email_error: "发送邮件时发生错误 (%{value})"
|
||||||
notice_feeds_access_key_reseted: 您的RSS存取键已被重置。
|
notice_feeds_access_key_reseted: 您的RSS存取键已被重置。
|
||||||
notice_api_access_key_reseted: 您的API访问键已被重置。
|
notice_api_access_key_reseted: 您的API访问键已被重置。
|
||||||
|
|
|
@ -390,6 +390,7 @@ RedmineApp::Application.routes.draw do
|
||||||
match 'users/:id/user_projects', :to => 'users#user_projects', :via => :get
|
match 'users/:id/user_projects', :to => 'users#user_projects', :via => :get
|
||||||
#消息
|
#消息
|
||||||
match 'users/:id/user_messages', :to => 'users#user_messages', :via => :get, :as => "user_message"
|
match 'users/:id/user_messages', :to => 'users#user_messages', :via => :get, :as => "user_message"
|
||||||
|
match 'users/:id/user_system_messages', :to => 'users#user_system_messages', :via => :get, :as => "user_system_messages"
|
||||||
#match 'users/:id/user_messages/:homework', :to => 'users#user_messages_homework', :via => :get, :as => "user_message_homewrok"
|
#match 'users/:id/user_messages/:homework', :to => 'users#user_messages_homework', :via => :get, :as => "user_message_homewrok"
|
||||||
|
|
||||||
|
|
||||||
|
@ -446,7 +447,7 @@ RedmineApp::Application.routes.draw do
|
||||||
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
get 'feedback', :action => 'feedback', :as => 'project_feedback'
|
||||||
get 'watcherlist', :action=> 'watcherlist'
|
get 'watcherlist', :action=> 'watcherlist'
|
||||||
|
|
||||||
get 'invite_members', :action=> 'invite_members'
|
# get 'invite_members', :action=> 'invite_members'
|
||||||
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
get 'invite_members_by_mail', :action=> 'invite_members_by_mail'
|
||||||
# get 'dts_repos', :aciton => 'dts_repos'
|
# get 'dts_repos', :aciton => 'dts_repos'
|
||||||
get 'send_mail_to_member', :action => 'send_mail_to_member'
|
get 'send_mail_to_member', :action => 'send_mail_to_member'
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddDescriptionToSystemMessage < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :system_messages, :description, :text
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddMailToInviteList < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :invite_lists, :mail, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddSubjectToSystemMessage < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :system_messages, :subject, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,9 @@
|
||||||
|
class NormalHomeworkType < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
HomeworkCommon.where("homework_type = 0").update_all(:homework_type => 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
HomeworkCommon.where("homework_type = 0").update_all(:homework_type => 1)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddSecretKeyToForgeMessage < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :forge_messages, :secret_key, :string
|
||||||
|
end
|
||||||
|
end
|
58
db/schema.rb
58
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20150917071652) do
|
ActiveRecord::Schema.define(:version => 20150918134804) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
|
create_table "discuss_demos", :force => true do |t|
|
||||||
|
t.string "title"
|
||||||
|
t.text "body"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "documents", :force => true do |t|
|
create_table "documents", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.integer "category_id", :default => 0, :null => false
|
t.integer "category_id", :default => 0, :null => false
|
||||||
|
@ -490,23 +497,26 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
|
||||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||||
|
|
||||||
create_table "dts", :force => true do |t|
|
create_table "dts", :primary_key => "Num", :force => true do |t|
|
||||||
t.string "IPLineCode"
|
t.string "Defect", :limit => 50
|
||||||
t.string "Description"
|
t.string "Category", :limit => 50
|
||||||
t.string "Num"
|
|
||||||
t.string "Variable"
|
|
||||||
t.string "TraceInfo"
|
|
||||||
t.string "Method"
|
|
||||||
t.string "File"
|
t.string "File"
|
||||||
t.string "IPLine"
|
t.string "Method"
|
||||||
t.string "Review"
|
t.string "Module", :limit => 20
|
||||||
t.string "Category"
|
t.string "Variable", :limit => 50
|
||||||
t.string "Defect"
|
t.integer "StartLine"
|
||||||
t.string "PreConditions"
|
t.integer "IPLine"
|
||||||
t.string "StartLine"
|
t.string "IPLineCode", :limit => 200
|
||||||
|
t.string "Judge", :limit => 15
|
||||||
|
t.integer "Review", :limit => 1
|
||||||
|
t.string "Description"
|
||||||
|
t.text "PreConditions", :limit => 2147483647
|
||||||
|
t.text "TraceInfo", :limit => 2147483647
|
||||||
|
t.text "Code", :limit => 2147483647
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at"
|
||||||
|
t.integer "id", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "enabled_modules", :force => true do |t|
|
create_table "enabled_modules", :force => true do |t|
|
||||||
|
@ -565,6 +575,7 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
t.integer "viewed"
|
t.integer "viewed"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.string "secret_key"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "forums", :force => true do |t|
|
create_table "forums", :force => true do |t|
|
||||||
|
@ -609,11 +620,12 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.date "publish_time"
|
t.date "publish_time"
|
||||||
t.date "end_time"
|
t.date "end_time"
|
||||||
t.integer "homework_type", :default => 1
|
t.integer "homework_type", :default => 1
|
||||||
t.string "late_penalty"
|
t.string "late_penalty"
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "teacher_priority", :default => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "homework_detail_manuals", :force => true do |t|
|
create_table "homework_detail_manuals", :force => true do |t|
|
||||||
|
@ -675,6 +687,7 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.string "mail"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "issue_categories", :force => true do |t|
|
create_table "issue_categories", :force => true do |t|
|
||||||
|
@ -906,7 +919,6 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
t.datetime "created_on"
|
t.datetime "created_on"
|
||||||
t.integer "comments_count", :default => 0, :null => false
|
t.integer "comments_count", :default => 0, :null => false
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.datetime "updated_on"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
||||||
|
@ -1352,8 +1364,10 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
|
||||||
create_table "system_messages", :force => true do |t|
|
create_table "system_messages", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "content"
|
t.string "content"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.text "description"
|
||||||
|
t.string "subject"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "taggings", :force => true do |t|
|
create_table "taggings", :force => true do |t|
|
||||||
|
|
|
@ -10,6 +10,8 @@ namespace :homework_endtime do
|
||||||
if homework_common.end_time.day - Date.today.day < 2 && homework_common.end_time.year == Date.today.year
|
if homework_common.end_time.day - Date.today.day < 2 && homework_common.end_time.year == Date.today.year
|
||||||
homework_common.course.student.each do |s|
|
homework_common.course.student.each do |s|
|
||||||
homework_common.course_messages << CourseMessage.new(:user_id => s.student_id, :course_id => homework_common.course_id, :viewed => false, :status => true)
|
homework_common.course_messages << CourseMessage.new(:user_id => s.student_id, :course_id => homework_common.course_id, :viewed => false, :status => true)
|
||||||
|
# 发送邮件通知
|
||||||
|
Mailer.homework_endtime__added(homework_common, s.student_id).deliver
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,137 +17,137 @@
|
||||||
focusColor: "#333"
|
focusColor: "#333"
|
||||||
//blurColor: "#999
|
//blurColor: "#999
|
||||||
};
|
};
|
||||||
var settings = $.extend({}, defaults, options || {});
|
// var settings = $.extend({}, defaults, options || {});
|
||||||
//页面装载CSS样式
|
// //页面装载CSS样式
|
||||||
if(settings.autoClass && $("#mailListAppendCss").size() === 0){
|
// if(settings.autoClass && $("#mailListAppendCss").size() === 0){
|
||||||
$('<style id="mailListAppendCss" type="text/css">.mailListBox{border:1px solid #369; background:#fff; font:12px/20px Arial;}.mailListDefault{padding:0 5px;cursor:pointer;white-space:nowrap;}.mailListFocus{padding:0 5px;cursor:pointer;white-space:nowrap;background:#369;color:white;}.mailListHlignt{color:red;}.mailListFocus .mailListHlignt{color:#fff;}</style>').appendTo($("head"));
|
// $('<style id="mailListAppendCss" type="text/css">.mailListBox{border:1px solid #369; background:#fff; font:12px/20px Arial;}.mailListDefault{padding:0 5px;cursor:pointer;white-space:nowrap;}.mailListFocus{padding:0 5px;cursor:pointer;white-space:nowrap;background:#369;color:white;}.mailListHlignt{color:red;}.mailListFocus .mailListHlignt{color:#fff;}</style>').appendTo($("head"));
|
||||||
}
|
// }
|
||||||
var cb = settings.boxClass, cl = settings.listClass, cf = settings.focusClass, cm = settings.markCalss; //插件的class变量
|
// var cb = settings.boxClass, cl = settings.listClass, cf = settings.focusClass, cm = settings.markCalss; //插件的class变量
|
||||||
var z = settings.zIndex, newArr = mailArr = settings.mailArr, hint = settings.textHint, text = settings.hintText, fc = settings.focusColor, bc = settings.blurColor;
|
// var z = settings.zIndex, newArr = mailArr = settings.mailArr, hint = settings.textHint, text = settings.hintText, fc = settings.focusColor, bc = settings.blurColor;
|
||||||
//创建邮件内部列表内容
|
//创建邮件内部列表内容
|
||||||
$.createHtml = function(str, arr, cur){
|
// $.createHtml = function(str, arr, cur){
|
||||||
var mailHtml = "";
|
// var mailHtml = "";
|
||||||
if($.isArray(arr)){
|
// if($.isArray(arr)){
|
||||||
$.each(arr, function(i, n){
|
// $.each(arr, function(i, n){
|
||||||
if(i === cur){
|
// if(i === cur){
|
||||||
mailHtml += '<div class="mailHover '+cf+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
|
// mailHtml += '<div class="mailHover '+cf+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
|
||||||
}else{
|
// }else{
|
||||||
mailHtml += '<div class="mailHover '+cl+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
|
// mailHtml += '<div class="mailHover '+cl+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
return mailHtml;
|
// return mailHtml;
|
||||||
};
|
// };
|
||||||
//一些全局变量
|
//一些全局变量
|
||||||
var index = -1, s;
|
var index = -1, s;
|
||||||
$(this).each(function(){
|
// $(this).each(function(){
|
||||||
var that = $(this), i = $(".justForJs").size();
|
// var that = $(this), i = $(".justForJs").size();
|
||||||
if(i > 0){ //只绑定一个文本框
|
// if(i > 0){ //只绑定一个文本框
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
var w = that.outerWidth(), h = that.outerHeight(); //获取当前对象(即文本框)的宽高
|
// var w = that.outerWidth(), h = that.outerHeight(); //获取当前对象(即文本框)的宽高
|
||||||
//样式的初始化
|
// //样式的初始化
|
||||||
that.wrap('<span style="display:inline-block;position:relative;"></span>')
|
// that.wrap('<span style="display:inline-block;position:relative;"></span>')
|
||||||
.before('<div id="mailListBox_'+i+'" class="justForJs '+cb+'" style="min-width:'+w+'px;_width:'+w+'px;position:absolute;left:-6000px;top:'+h+'px;z-index:'+z+';"></div>');
|
// .before('<div id="mailListBox_'+i+'" class="justForJs '+cb+'" style="min-width:'+w+'px;_width:'+w+'px;position:absolute;left:-6000px;top:'+h+'px;z-index:'+z+';"></div>');
|
||||||
var x = $("#mailListBox_" + i), liveValue; //列表框对象
|
// var x = $("#mailListBox_" + i), liveValue; //列表框对象
|
||||||
that.focus(function(){
|
// that.focus(function(){
|
||||||
//父标签的层级
|
// //父标签的层级
|
||||||
$(this).css("color", fc).parent().css("z-index", z);
|
// $(this).css("color", fc).parent().css("z-index", z);
|
||||||
//提示文字的显示与隐藏
|
// //提示文字的显示与隐藏
|
||||||
if(hint && text){
|
// if(hint && text){
|
||||||
var focus_v = $.trim($(this).val());
|
// var focus_v = $.trim($(this).val());
|
||||||
if(focus_v === text){
|
// if(focus_v === text){
|
||||||
$(this).val("");
|
// $(this).val("");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
//键盘事件
|
// //键盘事件
|
||||||
$(this).keyup(function(e){
|
// $(this).keyup(function(e){
|
||||||
s = v = $.trim($(this).val());
|
// s = v = $.trim($(this).val());
|
||||||
if(/@/.test(v)){
|
// if(/@/.test(v)){
|
||||||
s = v.replace(/@.*/, "");
|
// s = v.replace(/@.*/, "");
|
||||||
}
|
// }
|
||||||
if(v.length > 0){
|
// if(v.length > 0){
|
||||||
//如果按键是上下键
|
// //如果按键是上下键
|
||||||
if(e.keyCode === 38){
|
// if(e.keyCode === 38){
|
||||||
//向上
|
// //向上
|
||||||
if(index <= 0){
|
// if(index <= 0){
|
||||||
index = newArr.length;
|
// index = newArr.length;
|
||||||
}
|
// }
|
||||||
index--;
|
// index--;
|
||||||
}else if(e.keyCode === 40){
|
// }else if(e.keyCode === 40){
|
||||||
//向下
|
// //向下
|
||||||
if(index >= newArr.length - 1){
|
// if(index >= newArr.length - 1){
|
||||||
index = -1;
|
// index = -1;
|
||||||
}
|
// }
|
||||||
index++;
|
// index++;
|
||||||
}else if(e.keyCode === 13){
|
// }else if(e.keyCode === 13){
|
||||||
//回车
|
// //回车
|
||||||
if(index > -1 && index < newArr.length){
|
// if(index > -1 && index < newArr.length){
|
||||||
//如果当前有激活列表
|
// //如果当前有激活列表
|
||||||
$(this).val($("#mailList_"+index).text());
|
// $(this).val($("#mailList_"+index).text());
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
if(/@/.test(v)){
|
// if(/@/.test(v)){
|
||||||
index = -1;
|
// index = -1;
|
||||||
//获得@后面的值
|
// //获得@后面的值
|
||||||
//s = v.replace(/@.*/, "");
|
// //s = v.replace(/@.*/, "");
|
||||||
//创建新匹配数组
|
// //创建新匹配数组
|
||||||
var site = v.replace(/.*@/, "");
|
// var site = v.replace(/.*@/, "");
|
||||||
newArr = $.map(mailArr, function(n){
|
// newArr = $.map(mailArr, function(n){
|
||||||
var reg = new RegExp(site);
|
// var reg = new RegExp(site);
|
||||||
if(reg.test(n)){
|
// if(reg.test(n)){
|
||||||
return n;
|
// return n;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}else{
|
// }else{
|
||||||
newArr = mailArr;
|
// newArr = mailArr;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
x.html($.createHtml(s, newArr, index)).css("left", 0);
|
// x.html($.createHtml(s, newArr, index)).css("left", 0);
|
||||||
if(e.keyCode === 13){
|
// if(e.keyCode === 13){
|
||||||
//回车
|
// //回车
|
||||||
if(index > -1 && index < newArr.length){
|
// if(index > -1 && index < newArr.length){
|
||||||
//如果当前有激活列表
|
// //如果当前有激活列表
|
||||||
x.css("left", "-6000px");
|
// x.css("left", "-6000px");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}else{
|
// }else{
|
||||||
x.css("left", "-6000px");
|
// x.css("left", "-6000px");
|
||||||
}
|
// }
|
||||||
}).blur(function(){
|
// }).blur(function(){
|
||||||
if(hint && text){
|
// if(hint && text){
|
||||||
var blur_v = $.trim($(this).val());
|
// var blur_v = $.trim($(this).val());
|
||||||
if(blur_v === ""){
|
// if(blur_v === ""){
|
||||||
$(this).val(text);
|
// $(this).val(text);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
$(this).css("color", bc).unbind("keyup").parent().css("z-index",0);
|
// $(this).css("color", bc).unbind("keyup").parent().css("z-index",0);
|
||||||
x.css("left", "-6000px");
|
// x.css("left", "-6000px");
|
||||||
|
//
|
||||||
}).keydown(function(event){
|
// }).keydown(function(event){
|
||||||
if(event.keyCode == 13){
|
// if(event.keyCode == 13){
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
//鼠标经过列表项事件
|
// //鼠标经过列表项事件
|
||||||
//鼠标经过
|
// //鼠标经过
|
||||||
$(".mailHover").on("mouseover", function(){
|
// $(".mailHover").on("mouseover", function(){
|
||||||
index = Number($(this).attr("id").split("_")[1]);
|
// index = Number($(this).attr("id").split("_")[1]);
|
||||||
liveValue = $("#mailList_"+index).text();
|
// liveValue = $("#mailList_"+index).text();
|
||||||
x.children("." + cf).removeClass(cf).addClass(cl);
|
// x.children("." + cf).removeClass(cf).addClass(cl);
|
||||||
$(this).addClass(cf).removeClass(cl);
|
// $(this).addClass(cf).removeClass(cl);
|
||||||
});
|
// });
|
||||||
$(".mailHover").on("click", function(){
|
// $(".mailHover").on("click", function(){
|
||||||
$("#mail").val($(this).html());
|
// $("#mail").val($(this).html());
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
|
//
|
||||||
x.bind("mousedown", function(){
|
// x.bind("mousedown", function(){
|
||||||
that.val(liveValue);
|
// that.val(liveValue);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
};
|
};
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
|
@ -9,6 +9,10 @@ h4, .wiki h3 {font-size: 13px;}
|
||||||
h4 {border-bottom: 1px dotted #bbb;}
|
h4 {border-bottom: 1px dotted #bbb;}
|
||||||
li{list-style-type:none;}
|
li{list-style-type:none;}
|
||||||
/*huang*/
|
/*huang*/
|
||||||
|
|
||||||
|
.hwork_input_news{ border:1px solid #64bdd9; height:22px; width:594px; background:#fff; margin-bottom:10px; padding:5px;}
|
||||||
|
.ml55{ margin-left:55px;}
|
||||||
|
.fl {float:left;}
|
||||||
/*current position*/
|
/*current position*/
|
||||||
.contest_count{
|
.contest_count{
|
||||||
width: 20%;
|
width: 20%;
|
||||||
|
@ -2810,4 +2814,4 @@ img.school_avatar {
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin_message_warn{font-size: 12px;color: red;}
|
.admin_message_warn{font-size: 12px;color: red;}
|
||||||
a.btn_message_free{ background:#15BCCF; display:block; text-align:center; color:#fff; padding:3px 0; width:60px; margin-bottom:10px;}
|
a.btn_message_free{ background:#15BCCF; display:block; text-align:center; color:#fff; padding:3px 0; width:60px; margin-bottom:10px;margin-left: 58px;}
|
||||||
|
|
|
@ -68,6 +68,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.ml10{ margin-left:10px;}
|
.ml10{ margin-left:10px;}
|
||||||
.ml15{ margin-left:15px;}
|
.ml15{ margin-left:15px;}
|
||||||
.ml20{ margin-left:20px;}
|
.ml20{ margin-left:20px;}
|
||||||
|
.ml36{ margin-left:36px; }
|
||||||
.ml40{ margin-left:40px;}
|
.ml40{ margin-left:40px;}
|
||||||
.ml45{ margin-left:45px;}
|
.ml45{ margin-left:45px;}
|
||||||
.ml55{ margin-left:55px;}
|
.ml55{ margin-left:55px;}
|
||||||
|
@ -473,7 +474,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
|
||||||
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
||||||
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
|
||||||
.homepageEditProfile {width:16px; height:16px; border-radius:2px; background-color:#888888; position:absolute; right:5px; bottom:5px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
|
.homepageEditProfile {width:16px; height:16px; border-radius:2px; background-color:#888888; position:absolute; right:5px; bottom:5px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
|
||||||
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -14px -37px no-repeat; width:20px; height:20px; display:block;}
|
.homepageEditProfileIcon {background:url(../images/homepage_icon2.png) -14px -37px no-repeat; width:20px; height:20px; display:block;}
|
||||||
.homepageImageName {font-size:16px; color:#484848; height:25px; float:left; font-weight: bold; max-width:90px;overflow: hidden; white-space:nowrap; text-overflow:ellipsis;}
|
.homepageImageName {font-size:16px; color:#484848; height:25px; float:left; font-weight: bold; max-width:90px;overflow: hidden; white-space:nowrap; text-overflow:ellipsis;}
|
||||||
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
.homepageImageSexMan {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||||
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
|
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
|
||||||
|
@ -516,6 +517,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
|
||||||
.homepageNewsType {width:110px; padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
.homepageNewsType {width:110px; padding-left: 5px; font-size:12px; color:#888888; display:block;}
|
||||||
.homepageNewsPubType {width:220px; font-size:12px; color:#888888; display: block;}
|
.homepageNewsPubType {width:220px; font-size:12px; color:#888888; display: block;}
|
||||||
.homepageNewsContent {width:365px; 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:365px; 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:291px; 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:245px; 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:245px; max-width:365px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;max-height: 49px; }
|
||||||
|
|
||||||
|
@ -553,7 +555,7 @@ a.homepagePostTypeAll {background:url(../images/homepage_icon.png) -185px -308px
|
||||||
a.postTypeGrey {color:#888888;}
|
a.postTypeGrey {color:#888888;}
|
||||||
a.postTypeGrey:hover {color:#269ac9;}
|
a.postTypeGrey:hover {color:#269ac9;}
|
||||||
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
|
.homepagePostBrief {width:710px; margin:0px auto; position:relative;}
|
||||||
.homepagePostPortrait {float:left; width:50px;}
|
.homepagePostPortrait {float:left; width:42px;}
|
||||||
.homepagePostDes {float:left; width:645px; margin-left:15px;}
|
.homepagePostDes {float:left; width:645px; margin-left:15px;}
|
||||||
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
|
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
|
||||||
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
|
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
|
||||||
|
@ -990,8 +992,8 @@ img.ui-datepicker-trigger {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
.message_title{border: 1px solid #D4D4D4;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #E8E8E8;}
|
.message_title{border: 1px solid #9C9C9C;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff; max-width:400px;word-wrap:break-word; word-break:break-all;}
|
||||||
.message_title_red{border: 1px solid #D4D4D4;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #E8E8E8;color: red}
|
.message_title_red{border: 1px solid #484848;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #fff;background-image: -moz-linear-gradient(top, #fff, #E0E0E0);}
|
||||||
|
|
||||||
.description{display: none !important;}
|
.description{display: none !important;}
|
||||||
.ispublic-label{display: none !important;}
|
.ispublic-label{display: none !important;}
|
||||||
|
@ -1121,7 +1123,8 @@ a:hover.tijiao{ background:#0f99a9;}
|
||||||
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
|
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
|
||||||
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
|
#cboxNext{position:absolute; bottom:0px; left:63px; color:#444;}
|
||||||
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
|
#cboxClose{position:absolute; bottom:0; right:0; display:block; color:#444;}
|
||||||
|
.system_message_style {line-height: 19.1px; max-width: 681px;overflow:hidden; work-wrap: break-word; word-break: break-all;}
|
||||||
|
.system_message_style img {max-width: 100%;}
|
||||||
/*20150906关联项目LB*/
|
/*20150906关联项目LB*/
|
||||||
a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
|
a.RalationIcon{ background: url(../images/homepage_icon.png) -183px -396px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
|
||||||
a:hover.RalationIcon{background: url(../images/homepage_icon.png) -183px -428px no-repeat; color:#3598db;}
|
a:hover.RalationIcon{background: url(../images/homepage_icon.png) -183px -428px no-repeat; color:#3598db;}
|
||||||
|
|
|
@ -51,6 +51,100 @@ a:hover.icon_removem{background:url(../images/img_floatbox.png) -22px -61px no-
|
||||||
a.btn_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;}
|
a.btn_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;}
|
||||||
a:hover.btn_free{ background:#d63502;}
|
a:hover.btn_free{ background:#d63502;}
|
||||||
.status_inviter{color: #3CA5C6;font-weight: bold; font-size: 14px }
|
.status_inviter{color: #3CA5C6;font-weight: bold; font-size: 14px }
|
||||||
|
/*邮件邀请新列表*/
|
||||||
|
.section{background-color: #FFF;
|
||||||
|
border-width: 1px;
|
||||||
|
border-style: solid;
|
||||||
|
-moz-border-top-colors: none;
|
||||||
|
-moz-border-right-colors: none;
|
||||||
|
-moz-border-bottom-colors: none;
|
||||||
|
-moz-border-left-colors: none;
|
||||||
|
border-image: none;
|
||||||
|
border-color: #DAE1E8 #D3DDE5 #B6C8D8;
|
||||||
|
box-shadow: 0px 1px 0px 0px rgba(56, 61, 72, 0.09);
|
||||||
|
margin-bottom: 14px;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 20px;}
|
||||||
|
|
||||||
|
.section .section-header {
|
||||||
|
/*font-size: 24px;*/
|
||||||
|
font-weight: 200;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section .section-header div.desc {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height: 25px;
|
||||||
|
padding: 20px 15px;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitations-records {
|
||||||
|
border-top: 1px solid #DFE4E8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitations-records table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invitations-records tr {
|
||||||
|
border-bottom: 1px solid #EAEDED;
|
||||||
|
}
|
||||||
|
.invitations-records td.email {
|
||||||
|
width: 178px;
|
||||||
|
}
|
||||||
|
.invitations-records td {
|
||||||
|
transition-property: background;
|
||||||
|
transition-duration: 0.3s;
|
||||||
|
}
|
||||||
|
.invitations-records td, .invitations-records th {
|
||||||
|
padding: 15px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
/*th, td {*/
|
||||||
|
/*text-align: left;*/
|
||||||
|
/*vertical-align: top;*/
|
||||||
|
/*}*/
|
||||||
|
.invitations-records td.email {
|
||||||
|
max-width: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width:200px;
|
||||||
|
}
|
||||||
|
.invitations-records td.text-name {
|
||||||
|
max-width: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.invitations-records td.text-name span.unactive {
|
||||||
|
max-width: 200px;
|
||||||
|
color: #888;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
width: 200px;
|
||||||
|
}
|
||||||
|
.invitations-records td.text-status {
|
||||||
|
max-width: 290px;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
color: #7CAD37;
|
||||||
|
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
|
||||||
|
}
|
||||||
|
.invitations-records td.text-time {
|
||||||
|
max-width: 80px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #888;
|
||||||
|
display: block;
|
||||||
|
text-align: right;
|
||||||
|
width: 80px;
|
||||||
|
}
|
||||||
/*成员邀请*/
|
/*成员邀请*/
|
||||||
.invi_search{ }
|
.invi_search{ }
|
||||||
.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}
|
.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}
|
||||||
|
|
|
@ -150,6 +150,7 @@ a:hover.c_orange{color: #d33503;}
|
||||||
a.c_lorange{color:#ff9900;}
|
a.c_lorange{color:#ff9900;}
|
||||||
a:hover.c_lorange{color:#fff;}
|
a:hover.c_lorange{color:#fff;}
|
||||||
a.c_blue{ color:#15bccf;}
|
a.c_blue{ color:#15bccf;}
|
||||||
|
a.c_eblue{color: #3784D3}
|
||||||
a.c_setting_blue{color: #0781B4}
|
a.c_setting_blue{color: #0781B4}
|
||||||
a.c_dblue{ color:#09658c;}
|
a.c_dblue{ color:#09658c;}
|
||||||
a:hover.c_dblue{ color:#15bccf;}
|
a:hover.c_dblue{ color:#15bccf;}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FactoryGirl.define do
|
FactoryGirl.define do
|
||||||
factory :system_message do
|
factory :system_messages do
|
||||||
id 1
|
id 1
|
||||||
user_id 1
|
user_id 1
|
||||||
content "MyString"
|
content "MyString"
|
||||||
|
|
Loading…
Reference in New Issue