diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index a7f1589a6..b30715a1f 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -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 diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index fa2ce04cf..35d6f2b85 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -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 diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a58906c67..6da45c10b 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -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' # 判断是否课程 diff --git a/app/controllers/system_messages_controller.rb b/app/controllers/system_messages_controller.rb index 42291a407..684378e8a 100644 --- a/app/controllers/system_messages_controller.rb +++ b/app/controllers/system_messages_controller.rb @@ -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) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index cb6555768..b6ac28258 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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 diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index c25035fdb..7b4b9d2e4 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -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'}, diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb index 834b8dd61..e1cf3464e 100644 --- a/app/helpers/student_work_helper.rb +++ b/app/helpers/student_work_helper.rb @@ -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 diff --git a/app/models/homework_detail_programing.rb b/app/models/homework_detail_programing.rb index e5938d091..f6286a45e 100644 --- a/app/models/homework_detail_programing.rb +++ b/app/models/homework_detail_programing.rb @@ -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 diff --git a/app/models/invite_list.rb b/app/models/invite_list.rb index 4868fc3d7..66efc8609 100644 --- a/app/models/invite_list.rb +++ b/app/models/invite_list.rb @@ -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 diff --git a/app/models/journals_for_message.rb b/app/models/journals_for_message.rb index c44b1aeee..81ada2f80 100644 --- a/app/models/journals_for_message.rb +++ b/app/models/journals_for_message.rb @@ -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 # 用户留言消息通知 diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 4fe2478d2..c9ab6e58e 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -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 diff --git a/app/models/member.rb b/app/models/member.rb index 292dd2034..655c79895 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -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) diff --git a/app/models/project.rb b/app/models/project.rb index 0618dd145..0cd6af35b 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -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 diff --git a/app/models/student_work.rb b/app/models/student_work.rb index a6d641c0c..cd4d81a32 100644 --- a/app/models/student_work.rb +++ b/app/models/student_work.rb @@ -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 diff --git a/app/models/system_message.rb b/app/models/system_message.rb index 92a989cb3..2a810e8b8 100644 --- a/app/models/system_message.rb +++ b/app/models/system_message.rb @@ -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 diff --git a/app/models/user.rb b/app/models/user.rb index 63811cd58..48b269e6e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -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 diff --git a/app/views/admin/messages.html.erb b/app/views/admin/messages.html.erb index 1d9f0cc10..f87741dd9 100644 --- a/app/views/admin/messages.html.erb +++ b/app/views/admin/messages.html.erb @@ -3,11 +3,17 @@ <%=l(:label_system_message)%>
- <%= form_for(@admin_messages, :html => {:id =>'system_message-form'}) do |f| %> -
- <%= f.kindeditor :content,:width=>'87%',:editor_id=>'system_message_editor' %> + <%= form_for(@admin_messages, :html => {:id =>'system_messages-form'}) do |f| %> +
  • + + +

    +
  • +
  • + + <%= f.kindeditor :description,:width=>'87.5%',:editor_id=>'system_message_editor' %>

    -
  • +

    @@ -19,14 +25,8 @@ diff --git a/app/views/comments/create.js.erb b/app/views/comments/create.js.erb index b8494b02a..51cb4458e 100644 --- a/app/views/comments/create.js.erb +++ b/app/views/comments/create.js.erb @@ -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%"); diff --git a/app/views/issues/add_journal.js.erb b/app/views/issues/add_journal.js.erb index d2ce36b68..edc722dbc 100644 --- a/app/views/issues/add_journal.js.erb +++ b/app/views/issues/add_journal.js.erb @@ -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%"); \ No newline at end of file +init_activity_KindEditor_data(<%= @user_activity_id%>,"","85%"); \ No newline at end of file diff --git a/app/views/journals/diff.html.erb b/app/views/journals/diff.html.erb index 190459b71..b842d87d0 100644 --- a/app/views/journals/diff.html.erb +++ b/app/views/journals/diff.html.erb @@ -1,8 +1,8 @@

    <%=h @issue.tracker %> #<%= @issue.id %>

    由<%= @journal.user %> 更新于 <%= format_time @journal.created_on %>

    -
    - <%= simple_format_without_paragraph @diff.to_html %> +
    + <%= @diff.to_html.gsub("<","<").gsub(">",">").gsub(""","\"").gsub("&gt;", ">").gsub("&lt;", "<").gsub("&quot;", "\"").html_safe %>

    <%= link_to l(:button_back), issue_path(@issue), :onclick => 'history.back(); return false;' %>

    diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 2bcb7f9ef..b7b88c186 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -36,21 +36,6 @@ <%#= render :partial => 'layouts/new_header'%>
    - -
    -
    -

    - - <%= l(:label_projects_community) %> - -

    - -
    -
    -
    @@ -113,9 +98,9 @@
    <% end %> diff --git a/app/views/mailer/homework_endtime__added.html.erb b/app/views/mailer/homework_endtime__added.html.erb new file mode 100644 index 000000000..e639ab51a --- /dev/null +++ b/app/views/mailer/homework_endtime__added.html.erb @@ -0,0 +1,11 @@ +
    +
      +
    • <%= l(:mail_issue_content)%> + +

      <%=link_to @author, user_url(@author) %> 发布的作业:<%=link_to @homework_endtime_name, @homework_endtime_url%> 截止时间快到了!

      +

      如果您还未交作业,请赶紧提交作业!

      +
      +
    • +
    +
    +
    \ No newline at end of file diff --git a/app/views/mailer/homework_endtime__added.text.erb b/app/views/mailer/homework_endtime__added.text.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/mailer/request_member_to_project.html.erb b/app/views/mailer/request_member_to_project.html.erb index 7c0d25dbb..c2da231a3 100644 --- a/app/views/mailer/request_member_to_project.html.erb +++ b/app/views/mailer/request_member_to_project.html.erb @@ -4,9 +4,9 @@
  • <%= l(:mail_issue_content)%> -

    <%= @invitor_name %> 邀请您加入项目:<%= @project_name %>

    +

    <%= @invitor_name %> 邀请您加入项目:<%=link_to @project_name, project_url(@project) %>

    -

    点击“同意加入”按钮,即可快速加入项目!


    +

    点击“同意加入”按钮,即可快速加入项目,查看项目相关信息!


    diff --git a/app/views/mailer/send_invite_in_project.html.erb b/app/views/mailer/send_invite_in_project.html.erb index ec559732f..54435e9ef 100644 --- a/app/views/mailer/send_invite_in_project.html.erb +++ b/app/views/mailer/send_invite_in_project.html.erb @@ -1,7 +1,5 @@ -
      -
    • <%= l(:mail_issue_content)%>

      <%= @subject %>

      @@ -9,13 +7,9 @@

      <%= link_to @project_url, @project_url%>

      您的账号为:<%= @email %>

      密码为: <%= @password %>

      - +

      为了您的账号安全,请勿将邮件信息告知他人!

    • -
    -
    -
    - - +
  • \ No newline at end of file diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb index 44b4fca12..3d4878cf7 100644 --- a/app/views/messages/reply.js.erb +++ b/app/views/messages/reply.js.erb @@ -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%"); \ No newline at end of file +init_activity_KindEditor_data(<%= @user_activity_id%>,"","85%"); \ No newline at end of file diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 04fdb6dac..0cd26382b 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -1,3 +1,9 @@ + <% btn_tips = l(:label_news_new) label_tips = l(:label_news) diff --git a/app/views/projects/invite_members_by_mail.html.erb b/app/views/projects/invite_members_by_mail.html.erb index 8c951a485..44c571422 100644 --- a/app/views/projects/invite_members_by_mail.html.erb +++ b/app/views/projects/invite_members_by_mail.html.erb @@ -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)%> <% end %> + <%# 邀请用户的状态 %> + <% unless @inviter_lists.blank? %> +
    +
    +
    项目成员邀请状态列表
    +
    +
    + <% @inviter_lists.each do |inviter_list| %> + + + <% if inviter_list.user != nil %> + + + + + + + <% end %> + +
    + <% if inviter_list.user.active? %> + <%=link_to inviter_list.user.name, user_path(inviter_list.user), :class => "c_eblue" %> + <% else %> + <%= inviter_list.user.name %> + <% end %> + <%= status_for_ivitied(inviter_list, @project) %>
    + <% end %> +
    +
    + <% end %> + + <% unless @inviter_lists.blank? %>
    <% unless @inviters_count.nil? %> diff --git a/app/views/student_work/_evaluation_un_work.html.erb b/app/views/student_work/_evaluation_un_work.html.erb index caaaa2775..d3bac240d 100644 --- a/app/views/student_work/_evaluation_un_work.html.erb +++ b/app/views/student_work/_evaluation_un_work.html.erb @@ -57,7 +57,7 @@ - <% 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%>
  • <%= score.nil? ? "--" : format("%.1f",score)%> <% unless score.nil?%> diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb index db704a7de..5398b7084 100644 --- a/app/views/student_work/index.html.erb +++ b/app/views/student_work/index.html.erb @@ -87,13 +87,13 @@
    - <%= link_to "所有作品[共#{@homework.student_works.count}份]".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%> + <%= link_to "所有作品[共#{@stundet_works.count}份]".html_safe,student_work_index_path(:homework => @homework.id),:class => "fl f14"%> <%if @is_teacher || @homework.homework_detail_manual.comment_status == 3%> -
    - +
    + - +
    <% end%>
    diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb index f0c03b904..a58c10f8c 100644 --- a/app/views/users/_course_message.html.erb +++ b/app/views/users/_course_message.html.erb @@ -98,7 +98,7 @@ <% end %>
    -
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    <%= 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|%> diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb index fcd9a4768..90680cf82 100644 --- a/app/views/users/_course_news.html.erb +++ b/app/views/users/_course_news.html.erb @@ -69,7 +69,7 @@ <% end %>
    -
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    <%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb index 3a4efb1a5..07f7c452b 100644 --- a/app/views/users/_project_issue.html.erb +++ b/app/views/users/_project_issue.html.erb @@ -114,7 +114,7 @@ <% end %>
    -
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    <%= form_for('new_form',:url => add_journal_issue_path(activity.id),:method => "post", :remote => true) do |f|%> diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb index 182af54a0..d734ad982 100644 --- a/app/views/users/_project_message.html.erb +++ b/app/views/users/_project_message.html.erb @@ -83,7 +83,7 @@ <% end %>
    -
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    +
    <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %>
    <%= 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|%> diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb index d0d60266d..ba9e970b6 100644 --- a/app/views/users/_user_activities.html.erb +++ b/app/views/users/_user_activities.html.erb @@ -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" %> ').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){ +// $('').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 += '
    '+str+'@'+arr[i]+'
    '; - }else{ - mailHtml += '
    '+str+'@'+arr[i]+'
    '; - } - }); - } - return mailHtml; - }; +// $.createHtml = function(str, arr, cur){ +// var mailHtml = ""; +// if($.isArray(arr)){ +// $.each(arr, function(i, n){ +// if(i === cur){ +// mailHtml += '
    '+str+'@'+arr[i]+'
    '; +// }else{ +// mailHtml += '
    '+str+'@'+arr[i]+'
    '; +// } +// }); +// } +// 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('') - .before('
    '); - 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('') +// .before('
    '); +// 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); \ No newline at end of file diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index ac983479a..a08c7760b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -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;} \ No newline at end of file +a.btn_message_free{ background:#15BCCF; display:block; text-align:center; color:#fff; padding:3px 0; width:60px; margin-bottom:10px;margin-left: 58px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index c15fbbccd..eaff43533 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -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;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index a4eaa7f0a..bee965a90 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -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;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index dc5ab607f..4f44a8b60 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -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;} diff --git a/spec/factories/system_messages.rb b/spec/factories/system_messages.rb index 7bcc27422..a95505cfd 100644 --- a/spec/factories/system_messages.rb +++ b/spec/factories/system_messages.rb @@ -1,5 +1,5 @@ FactoryGirl.define do - factory :system_message do + factory :system_messages do id 1 user_id 1 content "MyString"