Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-09-18 17:54:13 +08:00
commit 80a6af596e
56 changed files with 1073 additions and 428 deletions

View File

@ -631,6 +631,11 @@ class CoursesController < ApplicationController
end
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)))
page = params[:page]
# Find the page of the requested reply

View File

@ -206,6 +206,7 @@ class HomeworkCommonController < ApplicationController
end
@homework_detail_manual.update_column('comment_status', 2)
@statue = 1
# send_message_homework(@homework)
else
@statue = 2
end
@ -224,12 +225,21 @@ class HomeworkCommonController < ApplicationController
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
# send_message_homework(@homework)
respond_to do |format|
format.js
end
end
# 开启/关闭匿评消息通知
# def send_message_homework(homework)
# # status 标记匿评状态 1为关闭 0为开启
# course = @homework.course
# course.student.each do |st|
# @homework.course_messages << CourseMessage.new(:user_id => st.user_id, :course_id => course.id, :viewed => false, :status => false)
# end
# end
#提示
def alert_anonymous_comment
@cur_size = 0

View File

@ -33,7 +33,7 @@ class ProjectsController < ApplicationController
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy, :calendar]
before_filter :file, :statistics #:watcherlist
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
before_filter :memberAccess, only: :member
# before_filter :memberAccess, only: :member
# accept_rss_auth :index
accept_api_auth :index, :show, :create, :update, :destroy
@ -358,24 +358,57 @@ class ProjectsController < ApplicationController
end
# 项目邀请用户加入实现过程
# 两种情况1、系统外用户2、系统内用户 (通过邮件判定)
def send_mail_to_member
# 该邮箱未注册过
if !params[:mail].blank? && User.find_by_mail(params[:mail].to_s).nil?
email = params[:mail]
Mailer.run.send_invite_in_project(email, @project, User.current)
@is_zhuce = false
flash[:notice] = l(:notice_email_sent, :value => email)
if !User.where("login =?", params[:mail]).first.nil?
# 用户名唯一,用户修改邮箱,未修改用户名,用户名等同邮箱的情况,默认改用户已经注册
user = User.find_by_login(params[:mail].to_s)
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?
user = User.find_by_mail(params[:mail].to_s)
if !user.member_of?(@project)
email = params[:mail]
Mailer.run.request_member_to_project(email, @project, User.current)
flash[:notice] = l(:notice_email_sent, :value => email)
# 如果已经邀请过该用户,则不重复发送
invite_list = InviteList.where("project_id =? and mail =?", @project.id, params[:mail].to_s).first
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
flash[:error] = l(:label_member_of_project, :value => email)
end
else
flash[:error] = l(:notice_registed_error, :value => email)
@is_zhuce = true
end
respond_to do |format|
@ -383,25 +416,26 @@ class ProjectsController < ApplicationController
end
end
#发送邮件邀请新用户
# 发送邮件邀请新用户页面对应方法
def invite_members_by_mail
if User.current.member_of?(@project) || User.current.admin?
@inviter_lists = InviteList.where(project_id:@project.id).all
@inviters = []
@waiters = []
unless @inviter_lists.blank?
@inviter_lists.each do|inviter_list|
unless inviter_list.user.nil?
if inviter_list.user.member_of?(@project)
@inviters << inviter_list.user
@inviters_count = @inviters.size
else
@waiters << inviter_list.user
@waiters_count = @waiters.size
end
end
end
end
@inviter_lists = InviteList.where(project_id:@project.id).order("created_at desc")
# @inviters = []
# @waiters = []
# unless @inviter_lists.blank?
# @inviter_lists.each do|inviter_list|
# unless inviter_list.user.nil?
# if inviter_list.user.member_of?(@project)
# @inviters << inviter_list.user
# @inviters_count = @inviters.size
# else
# @waiters << inviter_list.user
# @waiters_count = @waiters.size
# end
# end
# end
# end
@is_zhuce = false
respond_to do |format|
format.html
@ -413,16 +447,16 @@ class ProjectsController < ApplicationController
end
# 邀请Trustie注册用户
def invite_members
if User.current.member_of?(@project) || User.current.admin?
@member ||= @project.members.new
respond_to do |format|
format.html
end
else
render_403
end
end
# def invite_members
# if User.current.member_of?(@project) || User.current.admin?
# @member ||= @project.members.new
# respond_to do |format|
# format.html
# end
# else
# render_403
# end
# end
def edit
end
@ -451,6 +485,10 @@ class ProjectsController < ApplicationController
flash[:notice] = l(:label_mail_invite_success)
end
end
# 私有项目非项目成员无法访问成员列表
unless @project.is_public?
return render_403 unless User.current.member_of?(@project)
end
## 有角色参数的才是课程,没有的就是项目
@render_file = 'project_member_list'
# 判断是否课程

View File

@ -38,14 +38,15 @@ class SystemMessagesController < ApplicationController
return
end
@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
respond_to do |format|
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)
else
if params[:system_message][:content].empty?
if params[:system_messages][:description].empty?
flash[:error] = l(:label_content_blank_fail)
else
flash[:error] = l(:label_admin_message_fail)

View File

@ -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_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
:user_import_homeworks,:user_search_homeworks,:user_import_resource]
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages]
before_filter :auth_user_extension, only: :show
#before_filter :rest_user_score, only: :show
#before_filter :select_entry, only: :user_projects
@ -101,18 +101,20 @@ class UsersController < ApplicationController
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.user_id = User.current.id
message_new_time.onclick_time = Time.now
message_new_time.save
else
message_new_time = OnclickTime.where("user_id =?", User.current).first
message_last_time = message_new_time.onclick_time
message_new_time.update_attributes(:onclick_time => Time.now)
# 24小时内显示
contrast_time = Time.now - 86400
message_time.update_attributes(:onclick_time => Time.now)
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"
course_querys = @user.course_messages
forge_querys = @user.forge_messages
@ -142,8 +144,8 @@ class UsersController < ApplicationController
@message_alls << message_all.message
end
end
when 'system_messages'
@message_alls = SystemMessage.order("created_at desc").all
# when 'system_messages'
# @message_alls = SystemMessage.order("created_at desc").all
when 'apply'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?" , "AppliedProject", @user).order("created_at desc")
when 'homework'
@ -193,6 +195,15 @@ class UsersController < ApplicationController
end
end
# 系统消息
def user_system_messages
@sytem_messages = SystemMessage.order("created_at desc").all
@sytem_messages = paginateHelper @sytem_messages,25
respond_to do |format|
format.html{render :layout=>'new_base_user'}
end
end
def user_projects_index
if User.current.admin?
memberships = @user.memberships.all(conditions: "projects.project_type = #{Project::ProjectType_project}").first
@ -622,12 +633,11 @@ class UsersController < ApplicationController
redirect_to signin_url
return
end
# 更新用户留言消息状态
@user.journals_for_messages.each do |jour_message|
jour_message.user_feedback_messages.each do |userfeedback_message|
if User.current.id == userfeedback_message.user_id
userfeedback_message.update_attributes(:viewed => true)
end
# 自己访问自己的页面才更新消息状态
if User.current == @user
journals_messages = UserFeedbackMessage.where("user_id =? and journals_for_message_type =? and viewed =?", User.current.id, "JournalsForMessage", 0)
journals_messages.each do |journals_message|
journals_message.update_attributes(:viewed => true)
end
end
# end

View File

@ -76,6 +76,17 @@ module ProjectsHelper
return result
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
def course_settings_tabs
tabs = [{:name => 'info', :action => :edit_project, :partial => 'projects/edit', :label => :label_information_plural, :course=>'1'},

View File

@ -6,7 +6,7 @@ module StudentWorkHelper
def user_projects_option
projects = User.current.projects.visible
not_have_project = []
not_have_project << "没有可选项目,请直接为本作品创建一个项目"
not_have_project << "请选择关联项目"
not_have_project << 0
type = []
type << not_have_project

View File

@ -4,6 +4,6 @@ class HomeworkDetailPrograming < ActiveRecord::Base
belongs_to :homework_common
def language_name
%W(c c++).at(self.language.to_i - 1)
%W(C C++).at(self.language.to_i - 1)
end
end

View File

@ -1,5 +1,5 @@
class InviteList < ActiveRecord::Base
attr_accessible :project_id, :user_id
attr_accessible :project_id, :user_id, :mail
belongs_to :user
belongs_to :project

View File

@ -190,13 +190,45 @@ class JournalsForMessage < ActiveRecord::Base
end
end
# 课程作品留言消息通知
# 课程/作品回复 留言消息通知
def act_as_course_message
if self.jour_type == 'StudentWorksScore'
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)
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
# 用户留言消息通知

View File

@ -48,9 +48,9 @@ class Mailer < ActionMailer::Base
end
# author: alan
# 发送邀请未注册用户加入项目邮件
# 邀请未注册用户加入项目
# 功能: 在加入项目的同时自动注册用户
def send_invite_in_project(email, project, invitor)
def send_invite_in_project(email, project, invitor)
@email = email
@subject = "#{invitor.name} #{l(:label_invite_project)} #{project.name} "
@password = newpass(6)
@ -59,8 +59,8 @@ class Mailer < ActionMailer::Base
login = login.sub(/%40/,'@')
us = UsersService.new
# 自动激活用户
user = us.register_auto(login, @email, @password)
InviteList.create(:user_id => user.id, :project_id => project.id)
user = us.register_auto(login, email, @password)
InviteList.create(:user_id => user.id, :project_id => project.id, :mail =>email)
User.current = user unless User.current.nil?
@user = user
@token = Token.get_token_from_user(user, 'autologin')
@ -76,15 +76,22 @@ class Mailer < ActionMailer::Base
@project_name = "#{project.name}"
@user = user
@project = project
inviter_lists = InviteList.where(project_id:@project.id, user_id:@user.id).all
if inviter_lists.blank?
InviteList.create(:user_id => user.id, :project_id => project.id)
if InviteList.where("project_id= ? and user_id =? and mail =?", project.id, @user.id, email).first.nil?
InviteList.create(:user_id => user.id, :project_id => project.id, :mail => email)
end
@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)
# 发送消息邀请
send_message(user,project)
# end
mail :to => email, :subject => @subject
end
# 邀请信息消息 注forge_message_id 为邀请人ID(特殊情况)
def send_message(user, project)
ForgeMessage.create(:user_id => user.id, :project_id => project.id, :forge_message_type => "Project_Invite",:forge_message_id => User.current.id, :viewed => false)
end
# author: alan
# 根据用户选择发送个人日报或周报
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
@ -208,6 +215,20 @@ class Mailer < ActionMailer::Base
mail :to => user.mail,:subject => subject if has_content
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)
@memo = memo

View File

@ -30,6 +30,9 @@ class Member < ActiveRecord::Base
validate :validate_role
before_destroy :set_issue_category_nil
# 删除项目成员一并删除该成员的邀请记录
after_destroy :delete_ivite_list
def role
end
@ -97,6 +100,16 @@ class Member < ActiveRecord::Base
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
def self.edit_membership(id, new_attributes, principal=nil)
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal)

View File

@ -66,8 +66,8 @@ class Project < ActiveRecord::Base
# has_many :students_for_courses, :dependent => :destroy
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_many :applied_projects
has_many :invite_lists
has_many :applied_projects, :dependent => :destroy
has_many :invite_lists, :dependent => :destroy
has_one :dts
# end

View File

@ -31,9 +31,8 @@ class StudentWork < ActiveRecord::Base
else
self.system_score = last_test.test_score
end
set_final_score self.homework_common,self
end
set_final_score self.homework_common,self
end
def set_src
self.description = last_test.src if last_test

View File

@ -1,7 +1,8 @@
class SystemMessage < ActiveRecord::Base
attr_accessible :content, :id, :user_id
attr_accessible :content, :id, :user_id, :description, :subject
belongs_to :user
validates :content, presence: true
validates_length_of :content, maximum: 255
validates :subject, presence: true
# validates :description, presence: true
validates_length_of :description, maximum: 10000
end

View File

@ -140,7 +140,7 @@ class User < Principal
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 :invite_lists
has_many :invite_lists, :dependent => :destroy
# end
######added by nie
@ -213,6 +213,8 @@ class User < Principal
# added by fq
after_create :act_as_activity, :add_onclick_time
# end
# 更新邮箱用户或用户名的同事,同步更新邀请信息
after_update :update_invite_list
scope :in_group, lambda {|group|
group_id = group.is_a?(Group) ? group.id : group.to_i
@ -1010,6 +1012,16 @@ class User < Principal
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
# Things that are not deleted are reassociated with the anonymous user
def remove_references_before_destroy

View File

@ -3,11 +3,17 @@
<%=l(:label_system_message)%>
</h3><br/>
<div style="padding-top: 20px; padding-left: 5px;">
<%= form_for(@admin_messages, :html => {:id =>'system_message-form'}) do |f| %>
<div class="field">
<%= f.kindeditor :content,:width=>'87%',:editor_id=>'system_message_editor' %>
<%= form_for(@admin_messages, :html => {:id =>'system_messages-form'}) do |f| %>
<li>
<label><span class="">*</span>&nbsp;<%= l(:field_title) %>&nbsp;&nbsp;</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" >&nbsp;&nbsp;<span class="c_red"></span>&nbsp;<%= l(:field_description) %>&nbsp;&nbsp;</label>
<%= f.kindeditor :description,:width=>'87.5%',:editor_id=>'system_message_editor' %>
<p id="content_notice_span" class="ml55"></p>
</div>
</li>
<div>
<p id="content_notice_span" class="ml55"></p>
</div>
@ -19,14 +25,8 @@
<script>
function system_message_length() {
var obj = system_message_editor.html();
if (obj.length == 0) {
$("#content_notice_span").text("内容不能为空");
$("#content_notice_span").css('color', '#ff0000');
$("#content_notice_span").focus();
return false;
}
else if (obj.length > 255) {
$("#content_notice_span").text("内容过长超过255个字符");
if (obj.length > 10000) {
$("#content_notice_span").text("内容过长超过10000个字符");
$("#content_notice_span").css('color', '#ff0000');
$("#content_notice_span").focus();
return false;
@ -37,10 +37,27 @@
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() {
if (system_message_length()) {
$("#system_message-form").submit();
if (system_message_length() && regexTitle($("#system_message_subject"))) {
$("#system_messages-form").submit();
}
}
</script>

View File

@ -1,3 +1,3 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
init_KindEditor_data('<%= @user_activity_id%>',"","85%");
init_activity_KindEditor_data('<%= @user_activity_id%>',"","85%");

View File

@ -1,3 +1,3 @@
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_issue', :locals => {:activity => @issue,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
init_KindEditor_data(<%= @user_activity_id%>,"","85%");
init_activity_KindEditor_data(<%= @user_activity_id%>,"","85%");

View File

@ -1,8 +1,8 @@
<h3><%=h @issue.tracker %> #<%= @issue.id %></h3>
<p>由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %></p>
<div class="text-diff">
<%= simple_format_without_paragraph @diff.to_html %>
<div class="text-diff" style="word-break:break-all; word-wrap:break-word;">
<%= @diff.to_html.gsub("&lt;","<").gsub("&gt;",">").gsub("&quot;","\"").gsub("&amp;gt;", ">").gsub("&amp;lt;", "<").gsub("&amp;quot;", "\"").html_safe %>
</div>
<p><%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %></p>

View File

@ -36,21 +36,6 @@
<%#= render :partial => 'layouts/new_header'%>
<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="LSide" class="fl">
<div class="project_info">
@ -113,9 +98,9 @@
</div>
<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>
<% if User.current.allowed_to?(:manage_members, @project) %>
<li><%= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li>
<% end %>
<!--<%# if User.current.allowed_to?(:manage_members, @project) %>-->
<!--<li><%#= link_to l(:label_invite_trustie_user), :controller=>"projects", :action=>"invite_members", :id => @project %></li>-->
<!--<%# end %>-->
</ul>
<% end %><!--end-->
<!--menu 左侧工具栏 -->

View File

@ -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>

View File

@ -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>
<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>
<p>点击“同意加入”按钮,即可快速加入项目!</p> <br/>
<p>点击“同意加入”按钮,即可快速加入项目,查看项目相关信息</p> <br/>
<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;') %>
</label>

View File

@ -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;">
<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><%= @subject %> </p>
@ -9,13 +7,9 @@
<p> <%= link_to @project_url, @project_url%></p>
<p>您的账号为:<%= @email %></p>
<p>密码为: <%= @password %></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>
</div>

View File

@ -3,4 +3,4 @@
<%elsif @course%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:first_user_activity =>@first_user_activity,:page => @page}) %>");
<%end%>
init_KindEditor_data(<%= @user_activity_id%>,"","85%");
init_activity_KindEditor_data(<%= @user_activity_id%>,"","85%");

View File

@ -1,3 +1,9 @@
<style type="text/css">
span{
word-break:break-all;
word-wrap:break-word;
}
</style>
<%
btn_tips = l(:label_news_new)
label_tips = l(:label_news)

View File

@ -31,9 +31,9 @@
$("#valid_email").text("<%= l(:label_email_format_error)%>");
return false;
}
else if(email.split('@')[0].length >= 20)
else if(email.length > 25)
{
$("#valid_email").text("邮箱名过长,最长为20个字符");
$("#valid_email").text("邮箱名过长,最长为25个字符");
return false;
}
else
@ -85,7 +85,39 @@
<%= l(:label_send_email)%>
</a>
<% 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? %>
<div>
<% unless @inviters_count.nil? %>

View File

@ -57,7 +57,7 @@
</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">
<%= score.nil? ? "--" : format("%.1f",score)%>
<% unless score.nil?%>

View File

@ -87,13 +87,13 @@
<div class="dis" id="tbc_01">
<div class="codeList">
<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>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%>
<form 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);"/>
<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);"/>
<a class="homepageSearchIcon" onclick="SearchByName_1('<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)"></a>
</form>
</div>
<% end%>
<div class="cl"></div>
</div>

View File

@ -98,7 +98,7 @@
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>

View File

@ -69,7 +69,7 @@
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>

View File

@ -114,7 +114,7 @@
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" ><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%>

View File

@ -83,7 +83,7 @@
<% end %>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer">
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>

View File

@ -1,4 +1,4 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
<style type="text/css">
/*回复框*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
@ -36,7 +36,7 @@
}
$(function() {
init_KindEditor_data(<%= user_activity.id%>,"","85%");
init_activity_KindEditor_data(<%= user_activity.id%>,"","85%");
});
</script>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>

View File

@ -29,7 +29,7 @@
<% end %>
<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">确&nbsp;&nbsp;定</a>
<div class="cl"></div>
</div>

View File

@ -1,38 +1,38 @@
<div class="homepageRightBanner">
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></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_message_path(User.current, :type => 'system_messages'), :class => "resourcesGrey" %></li>
</ul>
</li>
</ul>
</div>
<div class="NewsBannerName"><%= title_for_message(params[:type]) %></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>
<div class="resources mt10" id="users_setting">
<div>
<% if @message_alls.count >0 %>
<% if @message_alls.count >0 || @user_system_messages.count >0 %>
<% if params[:type].nil? || params[:type] == "unviewed" %>
<div class="newsReadSetting">
有&nbsp;<span class="c_red"><%= unviewed_message(@user) %></span>&nbsp;条未读
@ -42,33 +42,38 @@
</div>
<% end %>
<%# 系统消息 %>
<% if params[:type] != 'system_messages' %>
<% @user_system_messages.each do |usm| %>
<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 usm.content.html_safe, user_message_path(User.current, :type => "system_messages"),
:class => "newsRed",
:onmouseover => "message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));"
%>
</li>
<div style="display:none;" class="message_title_red">
<%= usm.content.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% if params[:type] != 'system_messages' %>
<% @user_system_messages.each do |usm| %>
<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>
<span style="color: red;float: left">【系统消息】</span><li class="homepageSystenMessageContent fl" id="content_<%= usm.id %>">
<li class="homepageSystenMessageContent fl">
<%= link_to usm.subject.nil? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
:id => "content_link_#{usm.id}",
:onmouseover =>"message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));"
%>
</li>
<div style="display:none;" class="message_title_red system_message_style">
<% unless usm.subject.nil? %>
<p><strong>标题:</strong><%= usm.subject %></p>
<% end %>
<% if usm.description.nil? && usm.content.nil? %>
<% else %>
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<%# 课程消息 %>
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
@ -80,7 +85,11 @@
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
: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">
<%= ma.course_message.title.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -93,18 +102,24 @@
: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">
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.comments.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status != 1 %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status != 1 %>
<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.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">
<%= ma.course_message.name %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -112,16 +127,27 @@
<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 %>
<% 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"}", :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>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.name %>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
<% else %>
<% 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"}", :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>
<% 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>
</ul>
<% end %>
@ -132,7 +158,11 @@
<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),
: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>
</ul>
<% end %>
@ -151,7 +181,7 @@
: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" >
<div style="display: none" class="message_title_red system_message_style" >
<%= ma.course_message.content.html_safe %>
</div>
<% end %>
@ -165,19 +195,57 @@
<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">
<% 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 %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<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"}",:title => "#{ma.course_message.notes}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% if ma.course_message.jour_type == 'Course' %>
<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.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 %>
<!--项目消息-->
@ -192,8 +260,13 @@
<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.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>
<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 %>
@ -207,8 +280,13 @@
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派了问题给你:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.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>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.forge_message.subject %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -225,8 +303,14 @@
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= 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"}",
:title => "#{get_issue_des_update(ma.forge_message).html_safe}" %></a>
: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.journalized.subject %></p>
<div class="fl"><strong>更新内容:</strong></div>
<div class="ml36"><%= get_issue_des_update(ma.forge_message).html_safe %></div>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -237,18 +321,22 @@
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
<% if ma.forge_message.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%=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,
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
<%= 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,
:topic_id => ma.forge_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">
<%= ma.forge_message.subject.html_safe %>
</div>
<% else %>
<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,
: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"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title">
<%= 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,
:topic_id => ma.forge_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">
<%= ma.forge_message.content.html_safe %>
</div>
<% end %>
@ -265,8 +353,15 @@
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :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>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.forge_message.title.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -278,8 +373,12 @@
<li class="homepageNewsContent fl">
<%= link_to "#{ma.forge_message.comments.html_safe}",
{: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>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.forge_message.comments.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
@ -298,16 +397,24 @@
<% if ma.memo.parent_id.nil? %>
<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"}",
:title => "#{ma.memo.subject}" %></a>
: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.memo.subject %></p>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
</div>
<% else %>
<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"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title">
<%= ma.memo.content.html_safe %>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
@ -330,7 +437,7 @@
:onmouseover =>"message_titile_show($(this),event)",
: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.journals_for_message.notes.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
@ -338,30 +445,6 @@
</ul>
<% 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 %>
<ul class="wlist" style=" border:none; padding-top: 15px;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
@ -377,15 +460,32 @@
</div>
<script>
function message_titile_show(obj,e)
{
obj.parent().next("div").show();
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
}
function message_titile_hide(obj)
{
obj.parent().next("div").hide();
}
function message_titile_show(obj,e)
{
obj.parent().next("div").show();
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
}
function message_titile_hide(obj)
{
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>

View File

@ -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"> Trustie平台 发布了系统消息:</span>
<span style="color:#0781b4; max-width:470px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;vertical-align: top;"><%= 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>

View File

@ -224,9 +224,9 @@ development:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: mail.trustie.net
address: smtp.163.com
port: 25
domain: mail.trustie.net
domain: smtp.163.com
authentication: :login
user_name: "mail@trustie.net"
password: "loong2010"
user_name: "huang.jingquan@163.com"
password: "xinhu1ji2qu366"

View File

@ -24,3 +24,5 @@ zh:
mail_course_title_userin: "在课程"
mail_course_homework_active: "中发布了作业"
mail_attention: "请您关注!"
mail_homework_endtime: "作业截止时间快到了!"
mail_homework: "作业:"

View File

@ -347,7 +347,7 @@ zh:
#
# 邀请
#
label_invite_new_user: "发送邮件邀请用户"
label_invite_new_user: "邀请用户加入项目"
label_invite_join: 邀请加入
label_invite_email_tips: 输入好友的邮箱地址Trustie会自动为该好友注册平台账号
notice_registed_error: 您输入的邮箱地址为空或者该邮箱已被注册!

View File

@ -52,6 +52,8 @@ zh:
notice_not_authorized_archived_project: 要访问的项目已经归档。
notice_not_authorized_message: 您访问的消息不存在!
notice_email_sent: "邮件已发送至 %{value}"
notice_email_login_used: 无法自动为该邮箱注册新用户,该邮箱地址已经有人作为登录名使用!
notice_email_invited: 已经向该邮箱发送过邀请,正在等待对方的回复,三小时后您可以再次发送邀请!
notice_email_error: "发送邮件时发生错误 (%{value})"
notice_feeds_access_key_reseted: 您的RSS存取键已被重置。
notice_api_access_key_reseted: 您的API访问键已被重置。

View File

@ -390,6 +390,7 @@ RedmineApp::Application.routes.draw do
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_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"
@ -446,7 +447,7 @@ RedmineApp::Application.routes.draw do
get 'feedback', :action => 'feedback', :as => 'project_feedback'
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 'dts_repos', :aciton => 'dts_repos'
get 'send_mail_to_member', :action => 'send_mail_to_member'

View File

@ -0,0 +1,5 @@
class AddDescriptionToSystemMessage < ActiveRecord::Migration
def change
add_column :system_messages, :description, :text
end
end

View File

@ -0,0 +1,5 @@
class AddMailToInviteList < ActiveRecord::Migration
def change
add_column :invite_lists, :mail, :string
end
end

View File

@ -0,0 +1,5 @@
class AddSubjectToSystemMessage < ActiveRecord::Migration
def change
add_column :system_messages, :subject, :string
end
end

View File

@ -0,0 +1,8 @@
class NormalHomeworkType < ActiveRecord::Migration
def up
HomeworkCommon.where("homework_type = 0").update_all(:homework_type => 1)
end
def down
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150917071652) do
ActiveRecord::Schema.define(:version => 20150917081214) do
create_table "activities", :force => true do |t|
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"
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|
t.integer "project_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", ["project_id"], :name => "documents_project_id"
create_table "dts", :force => true do |t|
t.string "IPLineCode"
t.string "Description"
t.string "Num"
t.string "Variable"
t.string "TraceInfo"
t.string "Method"
create_table "dts", :primary_key => "Num", :force => true do |t|
t.string "Defect", :limit => 50
t.string "Category", :limit => 50
t.string "File"
t.string "IPLine"
t.string "Review"
t.string "Category"
t.string "Defect"
t.string "PreConditions"
t.string "StartLine"
t.string "Method"
t.string "Module", :limit => 20
t.string "Variable", :limit => 50
t.integer "StartLine"
t.integer "IPLine"
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.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "id", :null => false
end
create_table "enabled_modules", :force => true do |t|
@ -609,11 +619,12 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
t.text "description"
t.date "publish_time"
t.date "end_time"
t.integer "homework_type", :default => 1
t.integer "homework_type", :default => 1
t.string "late_penalty"
t.integer "course_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "teacher_priority", :default => 1
end
create_table "homework_detail_manuals", :force => true do |t|
@ -675,6 +686,7 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "mail"
end
create_table "issue_categories", :force => true do |t|
@ -906,7 +918,6 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false
t.integer "course_id"
t.datetime "updated_on"
end
add_index "news", ["author_id"], :name => "index_news_on_author_id"
@ -1352,8 +1363,10 @@ ActiveRecord::Schema.define(:version => 20150917071652) do
create_table "system_messages", :force => true do |t|
t.integer "user_id"
t.string "content"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.text "description"
t.string "subject"
end
create_table "taggings", :force => true do |t|

View File

@ -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
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)
# 发送邮件通知
Mailer.homework_endtime__added(homework_common, s.student_id).deliver
end
end
end

View File

@ -0,0 +1,144 @@
/**
* Created by Alan on 2015/9/18.
*/
function init_editor(params){
// var minHeight; //最小高度
var id = arguments[1] ? arguments[1] : undefined;
var paramsHeight = params.height; //设定的高度
var paramsWidth = params.width == undefined ? "100%" : params.width;
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"95%",
height:"30px",// == undefined ? "30px":paramsHeight+"px",
minHeight:"30px",// == undefined ? "30px":paramsHeight+"px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
var edit = this.edit;
var body = edit.doc.body;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight) + (paramsHeight == undefined ? 30:paramsHeight), paramsHeight));
},
afterCreate:function(){
params.submit_btn.css("display","none");
var toolbar = $("div[class='ke-toolbar']",params.div_form);
toolbar.css('width',24);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
params.toolbar_container.style.display = 'none';
//init
var edit = this.edit;
var body = edit.doc.body;
edit.iframe[0].scroll = 'no';
body.style.overflowY = 'hidden';
//reset height
var edit = this.edit;
var body = edit.doc.body;
paramsHeight = paramsHeight == undefined ? params.kindutil.removeUnit(this.height) : paramsHeight;
edit.iframe.height(paramsHeight);
this.resize(null, Math.max((params.kindutil.IE ? body.scrollHeight : body.offsetHeight)+ (paramsHeight == undefined ? 30:paramsHeight) , paramsHeight));
},
afterFocus:function(){
$('#reply_image_' + id).removeClass('imageFuzzy');
//edit.iframe.width(paramsWidth);
this.resize(paramsWidth, null);
params.submit_btn.css('display','inline-block');
},
afterBlur:function(){
$('#reply_image_' + id).addClass('imageFuzzy');
this.resize("95%", null);
params.submit_btn.css("display","none");
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
//第二个参数是高度,可以传,可以不传
function init_activity_KindEditor_data(id){
var height = arguments[1] ? arguments[1] : undefined;
var width = arguments[2] ? arguments[2] : undefined;
KindEditor.ready(function (K) {
$("div[nhname='new_message_" + id + "']").each(function () {
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form", params.div_form);
if (params.form == undefined || params.form.length == 0) {
return;
}
params.textarea = $("textarea[nhname='new_message_textarea_" + id + "']", params.div_form);
params.contentmsg = $("p[nhname='contentmsg_" + id + "']", params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container_" + id + "']", params.div_form);
params.cancel_btn = $("#new_message_cancel_btn_" + id);
params.submit_btn = $("#new_message_submit_btn_" + id);
params.height = height;
params.width = width;
if (params.textarea.data('init') == undefined) {
params.editor = init_editor(params, id);
init_form(params);
params.cancel_btn.click(function () {
nh_reset_form(params);
});
params.submit_btn.click(function () {
params.form.submit();
});
params.textarea.data('init', 1);
$(this).show();
}
});
});
}

View File

@ -17,137 +17,137 @@
focusColor: "#333"
//blurColor: "#999
};
var settings = $.extend({}, defaults, options || {});
//页面装载CSS样式
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"));
}
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 settings = $.extend({}, defaults, options || {});
// //页面装载CSS样式
// 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"));
// }
// 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;
//创建邮件内部列表内容
$.createHtml = function(str, arr, cur){
var mailHtml = "";
if($.isArray(arr)){
$.each(arr, function(i, n){
if(i === cur){
mailHtml += '<div class="mailHover '+cf+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
}else{
mailHtml += '<div class="mailHover '+cl+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
}
});
}
return mailHtml;
};
// $.createHtml = function(str, arr, cur){
// var mailHtml = "";
// if($.isArray(arr)){
// $.each(arr, function(i, n){
// if(i === cur){
// mailHtml += '<div class="mailHover '+cf+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
// }else{
// mailHtml += '<div class="mailHover '+cl+'" id="mailList_'+i+'"><span class="'+cm+'">'+str+'</span>@'+arr[i]+'</div>';
// }
// });
// }
// return mailHtml;
// };
//一些全局变量
var index = -1, s;
$(this).each(function(){
var that = $(this), i = $(".justForJs").size();
if(i > 0){ //只绑定一个文本框
return;
}
var w = that.outerWidth(), h = that.outerHeight(); //获取当前对象(即文本框)的宽高
//样式的初始化
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>');
var x = $("#mailListBox_" + i), liveValue; //列表框对象
that.focus(function(){
//父标签的层级
$(this).css("color", fc).parent().css("z-index", z);
//提示文字的显示与隐藏
if(hint && text){
var focus_v = $.trim($(this).val());
if(focus_v === text){
$(this).val("");
}
}
//键盘事件
$(this).keyup(function(e){
s = v = $.trim($(this).val());
if(/@/.test(v)){
s = v.replace(/@.*/, "");
}
if(v.length > 0){
//如果按键是上下键
if(e.keyCode === 38){
//向上
if(index <= 0){
index = newArr.length;
}
index--;
}else if(e.keyCode === 40){
//向下
if(index >= newArr.length - 1){
index = -1;
}
index++;
}else if(e.keyCode === 13){
//回车
if(index > -1 && index < newArr.length){
//如果当前有激活列表
$(this).val($("#mailList_"+index).text());
}
}else{
if(/@/.test(v)){
index = -1;
//获得@后面的值
//s = v.replace(/@.*/, "");
//创建新匹配数组
var site = v.replace(/.*@/, "");
newArr = $.map(mailArr, function(n){
var reg = new RegExp(site);
if(reg.test(n)){
return n;
}
});
}else{
newArr = mailArr;
}
}
x.html($.createHtml(s, newArr, index)).css("left", 0);
if(e.keyCode === 13){
//回车
if(index > -1 && index < newArr.length){
//如果当前有激活列表
x.css("left", "-6000px");
}
}
}else{
x.css("left", "-6000px");
}
}).blur(function(){
if(hint && text){
var blur_v = $.trim($(this).val());
if(blur_v === ""){
$(this).val(text);
}
}
$(this).css("color", bc).unbind("keyup").parent().css("z-index",0);
x.css("left", "-6000px");
}).keydown(function(event){
if(event.keyCode == 13){
return false;
}
});
//鼠标经过列表项事件
//鼠标经过
$(".mailHover").on("mouseover", function(){
index = Number($(this).attr("id").split("_")[1]);
liveValue = $("#mailList_"+index).text();
x.children("." + cf).removeClass(cf).addClass(cl);
$(this).addClass(cf).removeClass(cl);
});
$(".mailHover").on("click", function(){
$("#mail").val($(this).html());
});
});
x.bind("mousedown", function(){
that.val(liveValue);
});
});
// $(this).each(function(){
// var that = $(this), i = $(".justForJs").size();
// if(i > 0){ //只绑定一个文本框
// return;
// }
// var w = that.outerWidth(), h = that.outerHeight(); //获取当前对象(即文本框)的宽高
// //样式的初始化
// 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>');
// var x = $("#mailListBox_" + i), liveValue; //列表框对象
// that.focus(function(){
// //父标签的层级
// $(this).css("color", fc).parent().css("z-index", z);
// //提示文字的显示与隐藏
// if(hint && text){
// var focus_v = $.trim($(this).val());
// if(focus_v === text){
// $(this).val("");
// }
// }
// //键盘事件
// $(this).keyup(function(e){
// s = v = $.trim($(this).val());
// if(/@/.test(v)){
// s = v.replace(/@.*/, "");
// }
// if(v.length > 0){
// //如果按键是上下键
// if(e.keyCode === 38){
// //向上
// if(index <= 0){
// index = newArr.length;
// }
// index--;
// }else if(e.keyCode === 40){
// //向下
// if(index >= newArr.length - 1){
// index = -1;
// }
// index++;
// }else if(e.keyCode === 13){
// //回车
// if(index > -1 && index < newArr.length){
// //如果当前有激活列表
// $(this).val($("#mailList_"+index).text());
// }
// }else{
// if(/@/.test(v)){
// index = -1;
// //获得@后面的值
// //s = v.replace(/@.*/, "");
// //创建新匹配数组
// var site = v.replace(/.*@/, "");
// newArr = $.map(mailArr, function(n){
// var reg = new RegExp(site);
// if(reg.test(n)){
// return n;
// }
// });
// }else{
// newArr = mailArr;
// }
// }
// x.html($.createHtml(s, newArr, index)).css("left", 0);
// if(e.keyCode === 13){
// //回车
// if(index > -1 && index < newArr.length){
// //如果当前有激活列表
// x.css("left", "-6000px");
// }
// }
// }else{
// x.css("left", "-6000px");
// }
// }).blur(function(){
// if(hint && text){
// var blur_v = $.trim($(this).val());
// if(blur_v === ""){
// $(this).val(text);
// }
// }
// $(this).css("color", bc).unbind("keyup").parent().css("z-index",0);
// x.css("left", "-6000px");
//
// }).keydown(function(event){
// if(event.keyCode == 13){
// return false;
// }
// });
// //鼠标经过列表项事件
// //鼠标经过
// $(".mailHover").on("mouseover", function(){
// index = Number($(this).attr("id").split("_")[1]);
// liveValue = $("#mailList_"+index).text();
// x.children("." + cf).removeClass(cf).addClass(cl);
// $(this).addClass(cf).removeClass(cl);
// });
// $(".mailHover").on("click", function(){
// $("#mail").val($(this).html());
// });
//
//
// });
//
// x.bind("mousedown", function(){
// that.val(liveValue);
// });
// });
};
})(jQuery);

View File

@ -9,6 +9,10 @@ h4, .wiki h3 {font-size: 13px;}
h4 {border-bottom: 1px dotted #bbb;}
li{list-style-type:none;}
/*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*/
.contest_count{
width: 20%;
@ -2810,4 +2814,4 @@ img.school_avatar {
}
.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;}

View File

@ -68,6 +68,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.ml10{ margin-left:10px;}
.ml15{ margin-left:15px;}
.ml20{ margin-left:20px;}
.ml36{ margin-left:36px; }
.ml40{ margin-left:40px;}
.ml45{ margin-left:45px;}
.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;}
.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;}
.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;}
.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;}
@ -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;}
.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; }
.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; }
.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:hover {color:#269ac9;}
.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;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:5px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:5px; font-weight:bold;}
@ -581,7 +583,7 @@ a.postReplyCancel {color:#888888; display:block;}
a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyInputContainer2 {width:595px; margin:0px auto;}
.homepagePostReplyInput2 {width:588px; height:45px; max-width:588px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:0px auto 10px auto;}
.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:680px; margin:0px auto; margin-top:15px; min-height:60px;}
.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:680px; margin:0px auto; margin-top:18px; min-height:48px;}
.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;}
.homepagePostSetting ul li:hover ul {display:block;}
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;}
@ -989,8 +991,8 @@ img.ui-datepicker-trigger {
text-overflow: ellipsis;
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_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{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 #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;}
.ispublic-label{display: none !important;}
@ -1120,7 +1122,8 @@ a:hover.tijiao{ background:#0f99a9;}
#cboxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
#cboxNext{position:absolute; bottom:0px; left:63px; 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*/
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;}

View File

@ -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:hover.btn_free{ background:#d63502;}
.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_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}

View File

@ -150,6 +150,7 @@ a:hover.c_orange{color: #d33503;}
a.c_lorange{color:#ff9900;}
a:hover.c_lorange{color:#fff;}
a.c_blue{ color:#15bccf;}
a.c_eblue{color: #3784D3}
a.c_setting_blue{color: #0781B4}
a.c_dblue{ color:#09658c;}
a:hover.c_dblue{ color:#15bccf;}

View File

@ -1,5 +1,5 @@
FactoryGirl.define do
factory :system_message do
factory :system_messages do
id 1
user_id 1
content "MyString"