Merge remote-tracking branch 'origin/szzh' into guange_dev
This commit is contained in:
commit
971755c74a
|
@ -0,0 +1,54 @@
|
||||||
|
class ActivityNotifysController < ApplicationController
|
||||||
|
# layout 'base_projects'#by young
|
||||||
|
# default_search_scope :messages
|
||||||
|
before_filter :find_project_by_project_id#, :find_board_if_available
|
||||||
|
# before_filter :authorize, :except => [:new, :show, :create, :index]
|
||||||
|
# accept_rss_auth :index, :show
|
||||||
|
|
||||||
|
helper :activities
|
||||||
|
def index
|
||||||
|
query = nil
|
||||||
|
if @course
|
||||||
|
query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=?',@course.id,'Course',User.current.id);
|
||||||
|
else
|
||||||
|
@events_by_day = []
|
||||||
|
end
|
||||||
|
|
||||||
|
if( query != nil )
|
||||||
|
logger.info('xxoo')
|
||||||
|
limit = 10;
|
||||||
|
@obj_count = query.count();
|
||||||
|
@obj_pages = Paginator.new @obj_count,limit,params['page']
|
||||||
|
list = query.order('id desc').limit(limit).offset(@obj_pages.offset).all();
|
||||||
|
events=[];
|
||||||
|
for item in list
|
||||||
|
event = item.activity;
|
||||||
|
event.set_notify_id(item.id)
|
||||||
|
event.set_notify_is_read(item.is_read)
|
||||||
|
events << event
|
||||||
|
end
|
||||||
|
@events_by_day = events.group_by {|event| User.current.time_to_date(event.event_datetime)}
|
||||||
|
@controller_name = 'ActivityNotifys'
|
||||||
|
logger.info('aavv')
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.html {render :template => 'courses/show', :layout => 'base_courses'}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def chang_read_flag
|
||||||
|
if @course
|
||||||
|
if(params[:an_id] != nil )
|
||||||
|
query = ActivityNotify.where('id=? and notify_to=?',params[:an_id],User.current.id)
|
||||||
|
else
|
||||||
|
query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=? and is_read=0',@course.id,'Course',User.current.id)
|
||||||
|
end
|
||||||
|
@result = query.update_all('is_read=1');
|
||||||
|
else
|
||||||
|
@result = false;
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.html{render :layout => nil}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -211,9 +211,19 @@ class AttachmentsController < ApplicationController
|
||||||
if !@attachment.container.nil? &&
|
if !@attachment.container.nil? &&
|
||||||
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
|
(@attachment.container.is_a?(Course) || ((@attachment.container.has_attribute?(:course) || @attachment.container.has_attribute?(:course_id) ) &&
|
||||||
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
|
@attachment.container.course ) || ((@attachment.container.has_attribute?(:board) || @attachment.container.has_attribute?(:board_id)) &&
|
||||||
@attachment.container.board && @attachment.container.board.course ) )
|
@attachment.container.board && @attachment.container.board.course ) || @attachment.container.is_a?(StudentWorksScore) || @attachment.container.is_a?(HomeworkCommon) ||
|
||||||
|
@attachment.container.is_a?(StudentWork))
|
||||||
if @attachment.container.is_a?(News)
|
if @attachment.container.is_a?(News)
|
||||||
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
format.html { redirect_to_referer_or news_path(@attachment.container) }
|
||||||
|
elsif @attachment.container.is_a?(StudentWorksScore)
|
||||||
|
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
||||||
|
format.js
|
||||||
|
elsif @attachment.container.is_a?(HomeworkCommon)
|
||||||
|
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
||||||
|
format.js
|
||||||
|
elsif @attachment.container.is_a?(StudentWork)
|
||||||
|
@is_destroy = true #根据ID删除页面对应的数据,js刷新页面
|
||||||
|
format.js
|
||||||
elsif @attachment.container.is_a?(Message)
|
elsif @attachment.container.is_a?(Message)
|
||||||
format.html { redirect_to_referer_or new_board_message_path(@attachment.container) }
|
format.html { redirect_to_referer_or new_board_message_path(@attachment.container) }
|
||||||
elsif @course.nil?
|
elsif @course.nil?
|
||||||
|
@ -451,7 +461,7 @@ private
|
||||||
@attachment.container.board.course)
|
@attachment.container.board.course)
|
||||||
@course = @attachment.container.board.course
|
@course = @attachment.container.board.course
|
||||||
else
|
else
|
||||||
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWorks'
|
unless @attachment.container_type == 'Bid' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork'
|
||||||
@project = @attachment.project
|
@project = @attachment.project
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -88,14 +88,40 @@ class BoardsController < ApplicationController
|
||||||
preload(:author, {:last_reply => :author}).
|
preload(:author, {:last_reply => :author}).
|
||||||
all
|
all
|
||||||
elsif @course
|
elsif @course
|
||||||
board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
#
|
||||||
includes(:last_reply).
|
# board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
||||||
# limit(@topic_pages.per_page).
|
# includes(:last_reply).
|
||||||
# offset(@topic_pages.offset).
|
# # limit(@topic_pages.per_page).
|
||||||
|
# # offset(@topic_pages.offset).
|
||||||
preload(:author, {:last_reply => :author}).
|
#
|
||||||
all : []
|
# preload(:author, {:last_reply => :author}).
|
||||||
@topics = paginateHelper board_topics,10
|
# all : []
|
||||||
|
# @topics = paginateHelper board_topics,10
|
||||||
|
if( @board )
|
||||||
|
limit = 10;
|
||||||
|
pageno = params[:page];
|
||||||
|
if(pageno == nil || pageno=='')
|
||||||
|
dw_topic = nil;
|
||||||
|
if( params[:parent_id]!=nil && params[:parent_id]!='' )
|
||||||
|
dw_topic = @board.topics.where(id:params[:parent_id]).first();
|
||||||
|
end
|
||||||
|
if( dw_topic != nil )
|
||||||
|
dw_count = @board.topics.where('(sticky>?) or (sticky=? and created_on>?)',dw_topic.sticky,dw_topic.sticky,dw_topic.created_on).count();
|
||||||
|
dw_count = dw_count+1;
|
||||||
|
pageno = dw_count%10==0 ? (dw_count/limit) : (dw_count/limit+1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if(pageno == nil || pageno=='')
|
||||||
|
pageno=1;
|
||||||
|
end
|
||||||
|
@topic_count = @board.topics.count();
|
||||||
|
@topic_pages = Paginator.new @topic_count, limit, pageno
|
||||||
|
@topics = @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
||||||
|
limit(limit).offset(@topic_pages.offset).includes(:last_reply).
|
||||||
|
preload(:author, {:last_reply => :author}).all();
|
||||||
|
else
|
||||||
|
@topics = [];
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@message = Message.new(:board => @board)
|
@message = Message.new(:board => @board)
|
||||||
|
@ -103,6 +129,7 @@ class BoardsController < ApplicationController
|
||||||
if @project
|
if @project
|
||||||
render :action => 'show', :layout => 'base_projects'
|
render :action => 'show', :layout => 'base_projects'
|
||||||
elsif @course
|
elsif @course
|
||||||
|
@params=params
|
||||||
render :action => 'show', :layout => 'base_courses'
|
render :action => 'show', :layout => 'base_courses'
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
|
@ -334,9 +334,8 @@ class HomeworkAttachController < ApplicationController
|
||||||
@homework.name = name
|
@homework.name = name
|
||||||
@homework.description = description
|
@homework.description = description
|
||||||
@homework.project_id = params[:project_id] || 0
|
@homework.project_id = params[:project_id] || 0
|
||||||
if params[:attachments]
|
@homework.save_attachments(params[:attachments])
|
||||||
@homework.save_attachments(params[:attachments])
|
render_attachment_warning_if_needed(@homework)
|
||||||
end
|
|
||||||
if @homework.save
|
if @homework.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to course_for_bid_url @homework.bid }
|
format.html { redirect_to course_for_bid_url @homework.bid }
|
||||||
|
|
|
@ -5,7 +5,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
homeworks = @course.homework_commons
|
homeworks = @course.homework_commons.order("created_at desc")
|
||||||
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
|
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
|
||||||
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
|
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
|
||||||
@homeworks = paginateHelper homeworks,20
|
@homeworks = paginateHelper homeworks,20
|
||||||
|
@ -17,14 +17,14 @@ class HomeworkCommonController < ApplicationController
|
||||||
def new
|
def new
|
||||||
@homework = HomeworkCommon.new
|
@homework = HomeworkCommon.new
|
||||||
@homework.safe_attributes = params[:homework_common]
|
@homework.safe_attributes = params[:homework_common]
|
||||||
@homework.late_penalty = 2
|
@homework.late_penalty = 0
|
||||||
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
@homework.end_time = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||||
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
@homework.publish_time = Time.now.strftime('%Y-%m-%d')
|
||||||
|
|
||||||
#匿评作业相关属性
|
#匿评作业相关属性
|
||||||
@homework_detail_manual = HomeworkDetailManual.new
|
@homework_detail_manual = HomeworkDetailManual.new
|
||||||
@homework_detail_manual.ta_proportion = 0.6
|
@homework_detail_manual.ta_proportion = 0.6
|
||||||
@homework_detail_manual.absence_penalty = 2
|
@homework_detail_manual.absence_penalty = 0
|
||||||
@homework_detail_manual.evaluation_num = 3
|
@homework_detail_manual.evaluation_num = 3
|
||||||
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
@homework_detail_manual.evaluation_start = Time.now.strftime('%Y-%m-%d')
|
||||||
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
@homework_detail_manual.evaluation_end = (Time.now + 3600 * 24).strftime('%Y-%m-%d')
|
||||||
|
@ -101,6 +101,9 @@ class HomeworkCommonController < ApplicationController
|
||||||
@homework_detail_manual.evaluation_num = params[:evaluation_num]
|
@homework_detail_manual.evaluation_num = params[:evaluation_num]
|
||||||
@homework_detail_manual.absence_penalty = params[:absence_penalty]
|
@homework_detail_manual.absence_penalty = params[:absence_penalty]
|
||||||
|
|
||||||
|
@homework.save_attachments(params[:attachments])
|
||||||
|
render_attachment_warning_if_needed(@homework)
|
||||||
|
|
||||||
if @homework.save && @homework_detail_manual.save
|
if @homework.save && @homework_detail_manual.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html {
|
||||||
|
@ -197,7 +200,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
#是不是课程的老师
|
#是不是课程的老师
|
||||||
def teacher_of_course
|
def teacher_of_course
|
||||||
render_403 unless User.current.allowed_to?(:as_teacher,@course)
|
render_403 unless User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_assigned_homeworks(student_works, n, index)
|
def get_assigned_homeworks(student_works, n, index)
|
||||||
|
|
|
@ -31,6 +31,8 @@ class MessagesController < ApplicationController
|
||||||
include AttachmentsHelper
|
include AttachmentsHelper
|
||||||
helper :project_score
|
helper :project_score
|
||||||
|
|
||||||
|
include CoursesHelper
|
||||||
|
|
||||||
REPLIES_PER_PAGE = 25 unless const_defined?(:REPLIES_PER_PAGE)
|
REPLIES_PER_PAGE = 25 unless const_defined?(:REPLIES_PER_PAGE)
|
||||||
|
|
||||||
# Show a topic and its replies
|
# Show a topic and its replies
|
||||||
|
@ -91,6 +93,29 @@ class MessagesController < ApplicationController
|
||||||
ids = params[:asset_id].split(',')
|
ids = params[:asset_id].split(',')
|
||||||
update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE
|
update_kindeditor_assets_owner ids,@message.id,OwnerTypeHelper::MESSAGE
|
||||||
end
|
end
|
||||||
|
# 与我相关动态的记录add start
|
||||||
|
if(@board.course_id>0) #项目的先不管
|
||||||
|
teachers = searchTeacherAndAssistant(@board.course);
|
||||||
|
for teacher in teachers
|
||||||
|
if(teacher.user_id != User.current.id)
|
||||||
|
notify = ActivityNotify.new()
|
||||||
|
if(@board.course_id>0)
|
||||||
|
notify.activity_container_id = @board.course_id
|
||||||
|
notify.activity_container_type = 'Course'
|
||||||
|
else
|
||||||
|
notify.activity_container_id = @board.project_id
|
||||||
|
notify.activity_container_type = 'Project'
|
||||||
|
end
|
||||||
|
notify.activity_id = @message.id
|
||||||
|
notify.activity_type = 'Message'
|
||||||
|
notify.notify_to = teacher.user_id
|
||||||
|
notify.is_read = 0
|
||||||
|
notify.save()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# 与我相关动态的记录add end
|
||||||
|
|
||||||
call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
|
call_hook(:controller_messages_new_after_save, { :params => params, :message => @message})
|
||||||
render_attachment_warning_if_needed(@message)
|
render_attachment_warning_if_needed(@message)
|
||||||
if params[:is_board]
|
if params[:is_board]
|
||||||
|
@ -151,6 +176,35 @@ class MessagesController < ApplicationController
|
||||||
ids = params[:asset_id].split(',')
|
ids = params[:asset_id].split(',')
|
||||||
update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE
|
update_kindeditor_assets_owner ids,@reply.id,OwnerTypeHelper::MESSAGE
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 与我相关动态的记录add start
|
||||||
|
if(@board.course_id>0) #项目的先不管
|
||||||
|
notifyto_arr = {}
|
||||||
|
notifyto_arr[@topic.author_id] = @topic.author_id
|
||||||
|
if( params[:parent_topic] != nil && params[:parent_topic] != '')
|
||||||
|
parent_topic = Message.find(params[:parent_topic])
|
||||||
|
notifyto_arr[parent_topic.author_id] = parent_topic.author_id
|
||||||
|
end
|
||||||
|
notifyto_arr.each do |k,user_id|
|
||||||
|
if(user_id != User.current.id)
|
||||||
|
notify = ActivityNotify.new()
|
||||||
|
if(@board.course_id>0)
|
||||||
|
notify.activity_container_id = @board.course_id
|
||||||
|
notify.activity_container_type = 'Course'
|
||||||
|
else
|
||||||
|
notify.activity_container_id = @board.project_id
|
||||||
|
notify.activity_container_type = 'Project'
|
||||||
|
end
|
||||||
|
notify.activity_id = @reply.id
|
||||||
|
notify.activity_type = 'Message'
|
||||||
|
notify.notify_to = user_id
|
||||||
|
notify.is_read = 0
|
||||||
|
notify.save()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
# 与我相关动态的记录add end
|
||||||
|
|
||||||
call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
|
call_hook(:controller_messages_reply_after_save, { :params => params, :message => @reply})
|
||||||
attachments = Attachment.attach_files(@reply, params[:attachments])
|
attachments = Attachment.attach_files(@reply, params[:attachments])
|
||||||
render_attachment_warning_if_needed(@reply)
|
render_attachment_warning_if_needed(@reply)
|
||||||
|
|
|
@ -364,6 +364,7 @@ class ProjectsController < ApplicationController
|
||||||
#发送邮件邀请新用户
|
#发送邮件邀请新用户
|
||||||
def invite_members_by_mail
|
def invite_members_by_mail
|
||||||
if User.current.member_of?(@project) || User.current.admin?
|
if User.current.member_of?(@project) || User.current.admin?
|
||||||
|
@inviter_lists = InviteList.where(project_id:@project.id).all
|
||||||
@is_zhuce = false
|
@is_zhuce = false
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
|
|
|
@ -253,13 +253,13 @@ class StudentWorkController < ApplicationController
|
||||||
#是不是当前课程的成员
|
#是不是当前课程的成员
|
||||||
#当前课程成员才可以看到作品列表
|
#当前课程成员才可以看到作品列表
|
||||||
def member_of_course
|
def member_of_course
|
||||||
render_403 unless User.current.member_of_course? @course
|
render_403 unless User.current.member_of_course? @course || User.current.admin?
|
||||||
end
|
end
|
||||||
|
|
||||||
#判断是不是当前作品的提交者
|
#判断是不是当前作品的提交者
|
||||||
#提交者 && (非匿评作业 || 未开启匿评) 可以编辑作品
|
#提交者 && (非匿评作业 || 未开启匿评) 可以编辑作品
|
||||||
def author_of_work
|
def author_of_work
|
||||||
render_403 unless User.current.id == @work.user_id && (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1 )
|
render_403 unless (User.current.id == @work.user_id || User.current.admin?) && (@homework.homework_type != 1 || @homework.homework_detail_manual.comment_status == 1 )
|
||||||
end
|
end
|
||||||
|
|
||||||
#根据条件过滤作业结果
|
#根据条件过滤作业结果
|
||||||
|
|
|
@ -3,7 +3,7 @@ module HomeworkCommonHelper
|
||||||
#迟交扣分下拉框
|
#迟交扣分下拉框
|
||||||
def late_penalty_option
|
def late_penalty_option
|
||||||
type = []
|
type = []
|
||||||
for i in (1..5)
|
for i in (0..5)
|
||||||
option = []
|
option = []
|
||||||
option << i
|
option << i
|
||||||
option << i
|
option << i
|
||||||
|
@ -29,7 +29,7 @@ module HomeworkCommonHelper
|
||||||
#缺评扣分
|
#缺评扣分
|
||||||
def absence_penalty_option
|
def absence_penalty_option
|
||||||
type = []
|
type = []
|
||||||
i = 1
|
i = 0
|
||||||
while i <= 5
|
while i <= 5
|
||||||
option = []
|
option = []
|
||||||
option << i
|
option << i
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
class ActivityNotify < ActiveRecord::Base
|
||||||
|
belongs_to :activity, polymorphic: true
|
||||||
|
end
|
|
@ -1,5 +1,13 @@
|
||||||
class InviteList < ActiveRecord::Base
|
class InviteList < ActiveRecord::Base
|
||||||
attr_accessible :project_id, :user_id
|
attr_accessible :project_id, :user_id
|
||||||
# belongs_to :user
|
belongs_to :user
|
||||||
# belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
|
# 用户拒绝邀请后,删除记录
|
||||||
|
def self.delete_inviter(userid, projectid)
|
||||||
|
@inviters = AppliedProject.where("user_id = ? and project_id = ?", userid, projectid)
|
||||||
|
@inviters.each do |inviter|
|
||||||
|
inviter.destroy
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -58,6 +58,7 @@ class Mailer < ActionMailer::Base
|
||||||
us = UsersService.new
|
us = UsersService.new
|
||||||
# 自动激活用户
|
# 自动激活用户
|
||||||
user = us.register_auto(login, @email, @password)
|
user = us.register_auto(login, @email, @password)
|
||||||
|
InviteList.create(:user_id => user.id, :project_id => project.id)
|
||||||
User.current = user unless User.current.nil?
|
User.current = user unless User.current.nil?
|
||||||
@user = user
|
@user = user
|
||||||
|
|
||||||
|
@ -73,6 +74,10 @@ class Mailer < ActionMailer::Base
|
||||||
@project_name = "#{project.name}"
|
@project_name = "#{project.name}"
|
||||||
@user = user
|
@user = user
|
||||||
@project = project
|
@project = project
|
||||||
|
inviter_lists = InviteList.where(project_id:@project.id, user_id:@user.id).all
|
||||||
|
if inviter_lists.blank?
|
||||||
|
InviteList.create(:user_id => user.id, :project_id => project.id)
|
||||||
|
end
|
||||||
@token = Token.get_token_from_user(user, 'autologin')
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
@project_url = url_for(:controller => 'projects', :action => 'member', :id => project.id, :user_id => user.id, :mail => true, :token => @token.value)
|
@project_url = url_for(:controller => 'projects', :action => 'member', :id => project.id, :user_id => user.id, :mail => true, :token => @token.value)
|
||||||
mail :to => email, :subject => @subject
|
mail :to => email, :subject => @subject
|
||||||
|
@ -83,13 +88,10 @@ class Mailer < ActionMailer::Base
|
||||||
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
# 发送内容: 项目【缺陷,讨论区,新闻】,课程【通知,留言,新闻】, 贴吧, 个人留言
|
||||||
def send_for_user_activities(user, date_to, days)
|
def send_for_user_activities(user, date_to, days)
|
||||||
date_from = date_to - days.days
|
date_from = date_to - days.days
|
||||||
|
|
||||||
subject = "[ #{user.show_name}#{l(:label_day_mail)}]"
|
subject = "[ #{user.show_name}#{l(:label_day_mail)}]"
|
||||||
@subject = " #{user.show_name}#{l(:label_day_mail)}"
|
@subject = " #{user.show_name}#{l(:label_day_mail)}"
|
||||||
|
|
||||||
date_from = "#{date_from} 17:59:59"
|
date_from = "#{date_from} 17:59:59"
|
||||||
date_to = "#{date_to} 17:59:59"
|
date_to = "#{date_to} 17:59:59"
|
||||||
|
|
||||||
# 生成token用于直接点击登录
|
# 生成token用于直接点击登录
|
||||||
@user = user
|
@user = user
|
||||||
@token = Token.get_token_from_user(user, 'autologin')
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
|
@ -100,19 +102,15 @@ class Mailer < ActionMailer::Base
|
||||||
project_ids = projects.map{|project| project.id}.join(",")
|
project_ids = projects.map{|project| project.id}.join(",")
|
||||||
course_ids = courses.map {|course| course.id}.join(",")
|
course_ids = courses.map {|course| course.id}.join(",")
|
||||||
|
|
||||||
# 查询user的缺陷,包括发布的,跟踪的以及被指派的缺陷
|
# 查询user的缺陷,项目中成员都能收到
|
||||||
sql = "select DISTINCT i.* from issues i, watchers w
|
sql = "select * from members m, issues i where i.project_id = m.project_id and m.user_id='#{user.id}'
|
||||||
where (i.assigned_to_id = #{user.id} or i.author_id = #{user.id}
|
and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
|
||||||
or (w.watchable_type = 'Issue' and w.watchable_id = i.id and w.user_id = #{user.id}))
|
|
||||||
and (i.created_on between '#{date_from}' and '#{date_to}') order by i.created_on desc"
|
|
||||||
@issues = Issue.find_by_sql(sql)
|
@issues = Issue.find_by_sql(sql)
|
||||||
|
|
||||||
# @bids 查询课程作业,包括老师发布的作业,以及user提交作业
|
# @bids 查询课程作业,包括老师发布的作业,以及user提交作业
|
||||||
# @attachments查询课程课件更新
|
# @attachments查询课程课件更新
|
||||||
@attachments ||= []
|
@attachments ||= []
|
||||||
|
|
||||||
@bids ||= [] # 老师发布的作业
|
@bids ||= [] # 老师发布的作业
|
||||||
|
|
||||||
unless courses.first.nil?
|
unless courses.first.nil?
|
||||||
count = courses.count
|
count = courses.count
|
||||||
count = count - 1
|
count = count - 1
|
||||||
|
@ -127,7 +125,9 @@ class Mailer < ActionMailer::Base
|
||||||
@homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between '#{date_from}' and '#{date_to}')").order("created_at desc")
|
@homeworks = HomeworkAttach.where("user_id=#{user.id} and (created_at between '#{date_from}' and '#{date_to}')").order("created_at desc")
|
||||||
|
|
||||||
# 查询user在课程。项目中发布的讨论帖子
|
# 查询user在课程。项目中发布的讨论帖子
|
||||||
messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
messages = Message.find_by_sql("select me.* from messages me, boards b, members m where
|
||||||
|
b.id = me.board_id and b.project_id = m.project_id and m.user_id = '#{user.id}' and (me.created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||||
|
# messages = Message.find_by_sql("select DISTINCT * from messages where author_id = #{user.id} and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||||
@course_messages ||= []
|
@course_messages ||= []
|
||||||
@project_messages ||= []
|
@project_messages ||= []
|
||||||
unless messages.first.nil?
|
unless messages.first.nil?
|
||||||
|
@ -139,6 +139,7 @@ class Mailer < ActionMailer::Base
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# 查询user在课程中发布的通知,项目中发的新闻
|
# 查询user在课程中发布的通知,项目中发的新闻
|
||||||
@course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n
|
@course_news = (course_ids && !course_ids.empty?) ? News.find_by_sql("select DISTINCT n.* from news n
|
||||||
where n.course_id in (#{course_ids})
|
where n.course_id in (#{course_ids})
|
||||||
|
@ -151,18 +152,13 @@ class Mailer < ActionMailer::Base
|
||||||
jour_type='Course' and user_id = #{user.id}
|
jour_type='Course' and user_id = #{user.id}
|
||||||
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
and (created_on between '#{date_from}' and '#{date_to}') order by created_on desc")
|
||||||
@user_journal_messages = user.journals_for_messages.where("m_parent_id IS NULL and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
@user_journal_messages = user.journals_for_messages.where("m_parent_id IS NULL and (created_on between '#{date_from}' and '#{date_to}')").order('created_on DESC')
|
||||||
|
|
||||||
|
|
||||||
# 查询user新建贴吧或发布帖子
|
# 查询user新建贴吧或发布帖子
|
||||||
@forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc")
|
@forums = Forum.find_by_sql("select DISTINCT * from forums where creator_id = #{user.id} and (created_at between '#{date_from}' and '#{date_to}') order by created_at desc")
|
||||||
@memos = Memo.find_by_sql("select DISTINCT m.* from memos m, forums f where (m.author_id = #{user.id} or (m.forum_id = f.id and f.creator_id = #{user.id}))
|
@memos = Memo.find_by_sql("select DISTINCT m.* from memos m, forums f where (m.author_id = #{user.id} or (m.forum_id = f.id and f.creator_id = #{user.id}))
|
||||||
and (m.created_at between '#{date_from}' and '#{date_to}') order by m.created_at desc")
|
and (m.created_at between '#{date_from}' and '#{date_to}') order by m.created_at desc")
|
||||||
|
|
||||||
|
|
||||||
has_content = [@issues,@homeworks,@course_messages,@project_messages,@course_news,@project_news,
|
has_content = [@issues,@homeworks,@course_messages,@project_messages,@course_news,@project_news,
|
||||||
@course_journal_messages,@user_journal_messages,@forums,@memos,@attachments,@bids].any? {|o|
|
@course_journal_messages,@user_journal_messages,@forums,@memos,@attachments,@bids].any? {|o| !o.empty?}
|
||||||
!o.empty?
|
|
||||||
}
|
|
||||||
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
|
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
|
||||||
#有内容才发,没有不发
|
#有内容才发,没有不发
|
||||||
mail :to => user.mail,:subject => subject if has_content
|
mail :to => user.mail,:subject => subject if has_content
|
||||||
|
@ -277,11 +273,11 @@ class Mailer < ActionMailer::Base
|
||||||
@token = Token.get_token_from_user(user, 'autologin')
|
@token = Token.get_token_from_user(user, 'autologin')
|
||||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :token => @token.value)
|
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :token => @token.value)
|
||||||
|
|
||||||
# edit
|
# edit
|
||||||
@issue_author_url = url_for(user_activities_url(@author,:token => @token.value))
|
@issue_author_url = url_for(user_activities_url(@author,:token => @token.value))
|
||||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
||||||
|
|
||||||
@user_url = url_for(my_account_url(user,:token => @token.value))
|
@user_url = url_for(my_account_url(user,:token => @token.value))
|
||||||
|
|
||||||
|
|
||||||
subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
subject = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] (#{issue.status.name}) #{issue.subject}"
|
||||||
|
@ -289,11 +285,11 @@ class Mailer < ActionMailer::Base
|
||||||
:subject => subject,
|
:subject => subject,
|
||||||
:filter => true
|
:filter => true
|
||||||
end
|
end
|
||||||
# issue.attachments.each do |attach|
|
# issue.attachments.each do |attach|
|
||||||
# attachments["#{attach.filename}"] = File.read("#{attach.disk_filename}")
|
# attachments["#{attach.filename}"] = File.read("#{attach.disk_filename}")
|
||||||
# end
|
# end
|
||||||
# cc = issue.watcher_recipients - recipients
|
# cc = issue.watcher_recipients - recipients
|
||||||
#mail.attachments['test'] = File.read("#{RAILS.root}/files/2015/01/150114094010_libegl.dll")
|
#mail.attachments['test'] = File.read("#{RAILS.root}/files/2015/01/150114094010_libegl.dll")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -324,13 +320,13 @@ class Mailer < ActionMailer::Base
|
||||||
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
@project_url = url_for(:controller => 'projects', :action => 'show', :id => issue.project_id, :token => @token.value)
|
||||||
@user_url = url_for(my_account_url(user,:token => @token.value))
|
@user_url = url_for(my_account_url(user,:token => @token.value))
|
||||||
|
|
||||||
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}", :token => @token.value)
|
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue.id, :anchor => "change-#{journal.id}", :token => @token.value)
|
||||||
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue_id}] "
|
||||||
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
||||||
s << issue.subject
|
s << issue.subject
|
||||||
@issue = issue
|
@issue = issue
|
||||||
@journal = journal
|
@journal = journal
|
||||||
# @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
|
# @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:subject => s,
|
:subject => s,
|
||||||
:filter => true
|
:filter => true
|
||||||
|
@ -360,10 +356,10 @@ class Mailer < ActionMailer::Base
|
||||||
@issues = issues
|
@issues = issues
|
||||||
@days = days
|
@days = days
|
||||||
@issues_url = url_for(:controller => 'issues', :action => 'index',
|
@issues_url = url_for(:controller => 'issues', :action => 'index',
|
||||||
:set_filter => 1, :assigned_to_id => user.id,
|
:set_filter => 1, :assigned_to_id => user.id,
|
||||||
:sort => 'due_date:asc')
|
:sort => 'due_date:asc')
|
||||||
mail :to => user.mail,
|
mail :to => user.mail,
|
||||||
:subject => l(:mail_subject_reminder, :count => issues.size, :days => days)
|
:subject => l(:mail_subject_reminder, :count => issues.size, :days => days)
|
||||||
end
|
end
|
||||||
|
|
||||||
#缺陷到期邮件通知
|
#缺陷到期邮件通知
|
||||||
|
@ -494,8 +490,8 @@ class Mailer < ActionMailer::Base
|
||||||
@news = news
|
@news = news
|
||||||
@news_url = url_for(:controller => 'news', :action => 'show', :id => news)
|
@news_url = url_for(:controller => 'news', :action => 'show', :id => news)
|
||||||
mail :to => news.recipients,
|
mail :to => news.recipients,
|
||||||
:subject => "[#{news.project.name}] #{l(:label_news)}: #{news.title}",
|
:subject => "[#{news.project.name}] #{l(:label_news)}: #{news.title}",
|
||||||
:filter => true
|
:filter => true
|
||||||
elsif news.course
|
elsif news.course
|
||||||
redmine_headers 'Course' => news.course.id
|
redmine_headers 'Course' => news.course.id
|
||||||
@author = news.author
|
@author = news.author
|
||||||
|
@ -526,9 +522,9 @@ class Mailer < ActionMailer::Base
|
||||||
@comment = comment
|
@comment = comment
|
||||||
@news_url = url_for(:controller => 'news', :action => 'show', :id => news)
|
@news_url = url_for(:controller => 'news', :action => 'show', :id => news)
|
||||||
mail :to => news.recipients,
|
mail :to => news.recipients,
|
||||||
:cc => news.watcher_recipients,
|
:cc => news.watcher_recipients,
|
||||||
:subject => "Re: [#{news.project.name}] #{l(:label_news)}: #{news.title}",
|
:subject => "Re: [#{news.project.name}] #{l(:label_news)}: #{news.title}",
|
||||||
:filter => true
|
:filter => true
|
||||||
elsif news.course
|
elsif news.course
|
||||||
redmine_headers 'Course' => news.course.id
|
redmine_headers 'Course' => news.course.id
|
||||||
@author = comment.author
|
@author = comment.author
|
||||||
|
@ -563,9 +559,9 @@ class Mailer < ActionMailer::Base
|
||||||
@message = message
|
@message = message
|
||||||
@message_url = url_for(message.event_url)
|
@message_url = url_for(message.event_url)
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:cc => cc,
|
:cc => cc,
|
||||||
:subject => "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}",
|
:subject => "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}",
|
||||||
:filter => true
|
:filter => true
|
||||||
elsif message.course
|
elsif message.course
|
||||||
redmine_headers 'Course' => message.course.id,
|
redmine_headers 'Course' => message.course.id,
|
||||||
'Topic-Id' => (message.parent_id || message.id)
|
'Topic-Id' => (message.parent_id || message.id)
|
||||||
|
@ -598,12 +594,12 @@ class Mailer < ActionMailer::Base
|
||||||
cc = wiki_content.page.wiki.watcher_recipients - recipients
|
cc = wiki_content.page.wiki.watcher_recipients - recipients
|
||||||
@wiki_content = wiki_content
|
@wiki_content = wiki_content
|
||||||
@wiki_content_url = url_for(:controller => 'wiki', :action => 'show',
|
@wiki_content_url = url_for(:controller => 'wiki', :action => 'show',
|
||||||
:project_id => wiki_content.project,
|
:project_id => wiki_content.project,
|
||||||
:id => wiki_content.page.title)
|
:id => wiki_content.page.title)
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:cc => cc,
|
:cc => cc,
|
||||||
:subject => "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :id => wiki_content.page.pretty_title)}",
|
:subject => "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :id => wiki_content.page.pretty_title)}",
|
||||||
:filter => true
|
:filter => true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds a Mail::Message object used to email the recipients of a project of the specified wiki content was updated.
|
# Builds a Mail::Message object used to email the recipients of a project of the specified wiki content was updated.
|
||||||
|
@ -620,15 +616,15 @@ class Mailer < ActionMailer::Base
|
||||||
cc = wiki_content.page.wiki.watcher_recipients + wiki_content.page.watcher_recipients - recipients
|
cc = wiki_content.page.wiki.watcher_recipients + wiki_content.page.watcher_recipients - recipients
|
||||||
@wiki_content = wiki_content
|
@wiki_content = wiki_content
|
||||||
@wiki_content_url = url_for(:controller => 'wiki', :action => 'show',
|
@wiki_content_url = url_for(:controller => 'wiki', :action => 'show',
|
||||||
:project_id => wiki_content.project,
|
:project_id => wiki_content.project,
|
||||||
:id => wiki_content.page.title)
|
:id => wiki_content.page.title)
|
||||||
@wiki_diff_url = url_for(:controller => 'wiki', :action => 'diff',
|
@wiki_diff_url = url_for(:controller => 'wiki', :action => 'diff',
|
||||||
:project_id => wiki_content.project, :id => wiki_content.page.title,
|
:project_id => wiki_content.project, :id => wiki_content.page.title,
|
||||||
:version => wiki_content.version)
|
:version => wiki_content.version)
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:cc => cc,
|
:cc => cc,
|
||||||
:subject => "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_updated, :id => wiki_content.page.pretty_title)}",
|
:subject => "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_updated, :id => wiki_content.page.pretty_title)}",
|
||||||
:filter => true
|
:filter => true
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds a Mail::Message object used to email the specified user their account information.
|
# Builds a Mail::Message object used to email the specified user their account information.
|
||||||
|
@ -642,7 +638,7 @@ class Mailer < ActionMailer::Base
|
||||||
@password = password
|
@password = password
|
||||||
@login_url = url_for(:controller => 'account', :action => 'login')
|
@login_url = url_for(:controller => 'account', :action => 'login')
|
||||||
mail :to => user.mail,
|
mail :to => user.mail,
|
||||||
:subject => l(:mail_subject_register, Setting.app_title)
|
:subject => l(:mail_subject_register, Setting.app_title)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds a Mail::Message object used to email all active administrators of an account activation request.
|
# Builds a Mail::Message object used to email all active administrators of an account activation request.
|
||||||
|
@ -655,10 +651,10 @@ class Mailer < ActionMailer::Base
|
||||||
recipients = User.active.where(:admin => true).all.collect { |u| u.mail }.compact
|
recipients = User.active.where(:admin => true).all.collect { |u| u.mail }.compact
|
||||||
@user = user
|
@user = user
|
||||||
@url = url_for(:controller => 'users', :action => 'index',
|
@url = url_for(:controller => 'users', :action => 'index',
|
||||||
:status => User::STATUS_REGISTERED,
|
:status => User::STATUS_REGISTERED,
|
||||||
:sort_key => 'created_on', :sort_order => 'desc')
|
:sort_key => 'created_on', :sort_order => 'desc')
|
||||||
mail :to => recipients,
|
mail :to => recipients,
|
||||||
:subject => l(:mail_subject_account_activation_request, Setting.app_title)
|
:subject => l(:mail_subject_account_activation_request, Setting.app_title)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Builds a Mail::Message object used to email the specified user that their account was activated by an administrator.
|
# Builds a Mail::Message object used to email the specified user that their account was activated by an administrator.
|
||||||
|
@ -671,7 +667,7 @@ class Mailer < ActionMailer::Base
|
||||||
@user = user
|
@user = user
|
||||||
@login_url = url_for(:controller => 'account', :action => 'login')
|
@login_url = url_for(:controller => 'account', :action => 'login')
|
||||||
mail :to => user.mail,
|
mail :to => user.mail,
|
||||||
:subject => l(:mail_subject_register, Setting.app_title)
|
:subject => l(:mail_subject_register, Setting.app_title)
|
||||||
end
|
end
|
||||||
|
|
||||||
def lost_password(token)
|
def lost_password(token)
|
||||||
|
@ -679,7 +675,7 @@ class Mailer < ActionMailer::Base
|
||||||
@token = token
|
@token = token
|
||||||
@url = url_for(:controller => 'account', :action => 'lost_password', :token => token.value)
|
@url = url_for(:controller => 'account', :action => 'lost_password', :token => token.value)
|
||||||
mail :to => token.user.mail,
|
mail :to => token.user.mail,
|
||||||
:subject => l(:mail_subject_lost_password, Setting.app_title)
|
:subject => l(:mail_subject_lost_password, Setting.app_title)
|
||||||
end
|
end
|
||||||
|
|
||||||
def register(token)
|
def register(token)
|
||||||
|
@ -687,14 +683,14 @@ class Mailer < ActionMailer::Base
|
||||||
@token = token
|
@token = token
|
||||||
@url = url_for(:controller => 'account', :action => 'activate', :token => token.value)
|
@url = url_for(:controller => 'account', :action => 'activate', :token => token.value)
|
||||||
mail :to => token.user.mail,
|
mail :to => token.user.mail,
|
||||||
:subject => l(:mail_subject_register, Setting.app_title)
|
:subject => l(:mail_subject_register, Setting.app_title)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_email(user)
|
def test_email(user)
|
||||||
set_language_if_valid(user.language)
|
set_language_if_valid(user.language)
|
||||||
@url = url_for(:controller => 'welcome')
|
@url = url_for(:controller => 'welcome')
|
||||||
mail :to => user.mail,
|
mail :to => user.mail,
|
||||||
:subject => 'forge test'
|
:subject => 'forge test'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Overrides default deliver! method to prevent from sending an email
|
# Overrides default deliver! method to prevent from sending an email
|
||||||
|
@ -702,8 +698,8 @@ class Mailer < ActionMailer::Base
|
||||||
def deliver!(mail = @mail)
|
def deliver!(mail = @mail)
|
||||||
set_language_if_valid @initial_language
|
set_language_if_valid @initial_language
|
||||||
return false if (recipients.nil? || recipients.empty?) &&
|
return false if (recipients.nil? || recipients.empty?) &&
|
||||||
(cc.nil? || cc.empty?) &&
|
(cc.nil? || cc.empty?) &&
|
||||||
(bcc.nil? || bcc.empty?)
|
(bcc.nil? || bcc.empty?)
|
||||||
|
|
||||||
|
|
||||||
# Log errors when raise_delivery_errors is set to false, Rails does not
|
# Log errors when raise_delivery_errors is set to false, Rails does not
|
||||||
|
@ -735,8 +731,8 @@ class Mailer < ActionMailer::Base
|
||||||
user_ids = options[:users]
|
user_ids = options[:users]
|
||||||
|
|
||||||
scope = Issue.open.where("#{Issue.table_name}.assigned_to_id IS NOT NULL" +
|
scope = Issue.open.where("#{Issue.table_name}.assigned_to_id IS NOT NULL" +
|
||||||
" AND #{Project.table_name}.status = #{Project::STATUS_ACTIVE}" +
|
" AND #{Project.table_name}.status = #{Project::STATUS_ACTIVE}" +
|
||||||
" AND #{Issue.table_name}.due_date <= ?", days.day.from_now.to_date
|
" AND #{Issue.table_name}.due_date <= ?", days.day.from_now.to_date
|
||||||
)
|
)
|
||||||
scope = scope.where(:assigned_to_id => user_ids) if user_ids.present?
|
scope = scope.where(:assigned_to_id => user_ids) if user_ids.present?
|
||||||
scope = scope.where(:project_id => project.id) if project
|
scope = scope.where(:project_id => project.id) if project
|
||||||
|
@ -800,12 +796,12 @@ class Mailer < ActionMailer::Base
|
||||||
|
|
||||||
def mail(headers={})
|
def mail(headers={})
|
||||||
headers.merge! 'X-Mailer' => 'Redmine',
|
headers.merge! 'X-Mailer' => 'Redmine',
|
||||||
'X-Redmine-Host' => Setting.host_name,
|
'X-Redmine-Host' => Setting.host_name,
|
||||||
'X-Redmine-Site' => Setting.app_title,
|
'X-Redmine-Site' => Setting.app_title,
|
||||||
'X-Auto-Response-Suppress' => 'OOF',
|
'X-Auto-Response-Suppress' => 'OOF',
|
||||||
'Auto-Submitted' => 'auto-generated',
|
'Auto-Submitted' => 'auto-generated',
|
||||||
'From' => Setting.mail_from,
|
'From' => Setting.mail_from,
|
||||||
'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>"
|
'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>"
|
||||||
|
|
||||||
# Removes the author from the recipients and cc
|
# Removes the author from the recipients and cc
|
||||||
# if he doesn't want to receive notifications about what he does
|
# if he doesn't want to receive notifications about what he does
|
||||||
|
|
|
@ -34,6 +34,8 @@ class Message < ActiveRecord::Base
|
||||||
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
has_many :forge_acts, :class_name => 'ForgeActivity',:as =>:forge_act ,:dependent => :destroy
|
||||||
# end
|
# end
|
||||||
|
|
||||||
|
has_many :ActivityNotifies,:as => :activity, :dependent => :destroy
|
||||||
|
|
||||||
acts_as_searchable :columns => ['subject', 'content'],
|
acts_as_searchable :columns => ['subject', 'content'],
|
||||||
:include => {:board => :project},
|
:include => {:board => :project},
|
||||||
:project_key => "#{Board.table_name}.project_id",
|
:project_key => "#{Board.table_name}.project_id",
|
||||||
|
@ -148,6 +150,19 @@ class Message < ActiveRecord::Base
|
||||||
usr && usr.logged? && (usr.allowed_to?(:delete_messages, project) || (self.author == usr && usr.allowed_to?(:delete_own_messages, project)))
|
usr && usr.logged? && (usr.allowed_to?(:delete_messages, project) || (self.author == usr && usr.allowed_to?(:delete_own_messages, project)))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_notify_id(notify_id)
|
||||||
|
@notify_id= notify_id
|
||||||
|
end
|
||||||
|
def get_notify_id()
|
||||||
|
return @notify_id
|
||||||
|
end
|
||||||
|
def set_notify_is_read(notify_is_read)
|
||||||
|
@notify_is_read = notify_is_read
|
||||||
|
end
|
||||||
|
def get_notify_is_read()
|
||||||
|
return @notify_is_read
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def add_author_as_watcher
|
def add_author_as_watcher
|
||||||
|
@ -218,4 +233,5 @@ class Message < ActiveRecord::Base
|
||||||
def delete_kindeditor_assets
|
def delete_kindeditor_assets
|
||||||
delete_kindeditor_assets_from_disk self.id,OwnerTypeHelper::MESSAGE
|
delete_kindeditor_assets_from_disk self.id,OwnerTypeHelper::MESSAGE
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -67,7 +67,7 @@ class Project < ActiveRecord::Base
|
||||||
has_many :student, :through => :students_for_courses, :source => :user
|
has_many :student, :through => :students_for_courses, :source => :user
|
||||||
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
has_one :course_extra, :class_name => 'Course', :foreign_key => :extra,:primary_key => :identifier, :dependent => :destroy
|
||||||
has_many :applied_projects
|
has_many :applied_projects
|
||||||
# has_many :invite_lists
|
has_many :invite_lists
|
||||||
|
|
||||||
# end
|
# end
|
||||||
#ADDED BY NIE
|
#ADDED BY NIE
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<%= @result == false ? 'false' : 'true' %>
|
|
@ -1,26 +1,30 @@
|
||||||
var attachment_html_obj = $('#attachments_<%= j params[:attachment_id] %>');
|
<% if @is_destroy%>
|
||||||
//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 start
|
$("#attachment_<%= @attachment.id%>").remove();
|
||||||
var containerid=$('.remove-upload',attachment_html_obj).data('containerid');
|
<%else%>
|
||||||
if(containerid==undefined){
|
var attachment_html_obj = $('#attachments_<%= j params[:attachment_id] %>');
|
||||||
$('#attachments_<%= j params[:attachment_id] %>').remove();
|
//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 start
|
||||||
var count=$('#attachments_fields>span').length;
|
var containerid=$('.remove-upload',attachment_html_obj).data('containerid');
|
||||||
if(count<=0){
|
if(containerid==undefined){
|
||||||
$("#upload_file_count").text('<%= l(:label_no_file_uploaded)%>');
|
$('#attachments_<%= j params[:attachment_id] %>').remove();
|
||||||
$(".remove_all").remove();
|
var count=$('#attachments_fields>span').length;
|
||||||
|
if(count<=0){
|
||||||
|
$("#upload_file_count").text('<%= l(:label_no_file_uploaded)%>');
|
||||||
|
$(".remove_all").remove();
|
||||||
|
}else{
|
||||||
|
$("#upload_file_count").html("<span id=\"count\">"+count+"</span>"+"个文件"+"已上传");
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$("#upload_file_count").html("<span id=\"count\">"+count+"</span>"+"个文件"+"已上传");
|
$('#attachments_<%= j params[:attachment_id] %>').remove();
|
||||||
|
var count=$('#attachments_fields'+containerid+'>span').length;
|
||||||
|
if(count<=0){
|
||||||
|
$('#upload_file_count'+containerid).text('<%= l(:label_no_file_uploaded)%>');
|
||||||
|
var remove_all_html_obj = $(".remove_all").filter(function(index){
|
||||||
|
return $(this).data('containerid')==containerid;
|
||||||
|
});
|
||||||
|
remove_all_html_obj.remove();
|
||||||
|
}else{
|
||||||
|
$('#upload_file_count'+containerid).html("<span id=\"count\">"+count+"</span>"+"个文件"+"已上传");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}else{
|
//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 end
|
||||||
$('#attachments_<%= j params[:attachment_id] %>').remove();
|
<% end%>
|
||||||
var count=$('#attachments_fields'+containerid+'>span').length;
|
|
||||||
if(count<=0){
|
|
||||||
$('#upload_file_count'+containerid).text('<%= l(:label_no_file_uploaded)%>');
|
|
||||||
var remove_all_html_obj = $(".remove_all").filter(function(index){
|
|
||||||
return $(this).data('containerid')==containerid;
|
|
||||||
});
|
|
||||||
remove_all_html_obj.remove();
|
|
||||||
}else{
|
|
||||||
$('#upload_file_count'+containerid).html("<span id=\"count\">"+count+"</span>"+"个文件"+"已上传");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//modify by yutao 2015-5-14 当1个页面存在多个上传控件时此块代码存在bug 故改之 end
|
|
|
@ -109,6 +109,7 @@
|
||||||
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
|
:html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
|
||||||
|
|
||||||
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
<%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
|
||||||
|
<input name="parent_topic" type="hidden" value=""/>
|
||||||
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
|
||||||
<div style="padding-top:5px;" class="fr">
|
<div style="padding-top:5px;" class="fr">
|
||||||
<a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
|
<a href="javascript:void(0)" nhname="cancelbtn" class="grey_btn fr ml10" style=""><%= l(:button_cancel)%></a>
|
||||||
|
@ -127,7 +128,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<% replies_all.each do |message| %>
|
<% replies_all.each do |message| %>
|
||||||
<% replies_all_i=replies_all_i+1 %>
|
<% replies_all_i=replies_all_i+1 %>
|
||||||
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>">
|
<li nhname="reply_rec" style="display:<%= replies_all_i>2?'none':'' %>" id="topic<%=message.id%>">
|
||||||
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
<%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
|
||||||
<div class="Msg_txt">
|
<div class="Msg_txt">
|
||||||
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
<%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
|
||||||
|
@ -151,6 +152,7 @@
|
||||||
:nhname =>'showbtn_child_reply',
|
:nhname =>'showbtn_child_reply',
|
||||||
:class => ' c_dblue fr',
|
:class => ' c_dblue fr',
|
||||||
:style => 'margin-right: 10px;',
|
:style => 'margin-right: 10px;',
|
||||||
|
'data-topic-id' =>message.id,
|
||||||
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
:title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -172,7 +174,8 @@
|
||||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
<ul class="wlist">
|
<ul class="wlist">
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
|
<%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %>
|
||||||
</ul>
|
</ul>
|
||||||
<%# other_formats_links do |f| %>
|
<%# other_formats_links do |f| %>
|
||||||
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||||
|
@ -255,6 +258,18 @@
|
||||||
}
|
}
|
||||||
nh_init_board(params);
|
nh_init_board(params);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<% if( @params[:topic_id]!=nil && @params[:topic_id]!='' && @params[:page]==nil ) %>
|
||||||
|
var nh_dw_html = $("#topic<%=@params[:topic_id]%>");
|
||||||
|
if(nh_dw_html!=undefined && nh_dw_html.length!=0){
|
||||||
|
if(nh_dw_html.is(':hidden')){
|
||||||
|
$("a[nhname='reply_ex_btn']",nh_dw_html.parent('ul').parent('div').parent('div')).click();
|
||||||
|
}
|
||||||
|
$("#nhjump").attr('href','#'+nh_dw_html.attr('id'));
|
||||||
|
$("#nhjump")[0].click();
|
||||||
|
|
||||||
|
}
|
||||||
|
<% end %>
|
||||||
<% if(!@flag.nil? && @flag=='true') %>
|
<% if(!@flag.nil? && @flag=='true') %>
|
||||||
if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click();
|
if($("#new_topic_btn")!=undefined)$("#new_topic_btn").click();
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<style>
|
<style type="text/css">
|
||||||
.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
||||||
.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
||||||
.ke-toolbar-icon-url{background-image:url( '/images/public_icon.png' )}
|
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
||||||
.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
||||||
.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||||
.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||||
.ke-toolbar .ke-outline{border:none;}
|
div.ke-toolbar .ke-outline{border:none;}
|
||||||
.break_word {width:100%;}
|
.break_word {width:100%;}
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -13,7 +13,9 @@
|
||||||
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
|
var menuids=["TopUserNav"] //Enter id(s) of SuckerTree UL menus, separated by commas
|
||||||
function buildsubmenus(){
|
function buildsubmenus(){
|
||||||
for (var i=0; i<menuids.length; i++){
|
for (var i=0; i<menuids.length; i++){
|
||||||
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
|
var div = document.getElementById(menuids[i]);
|
||||||
|
if(div == undefined)continue;
|
||||||
|
var ultags=div.getElementsByTagName("ul")
|
||||||
for (var t=0; t<ultags.length; t++){
|
for (var t=0; t<ultags.length; t++){
|
||||||
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
|
ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
|
||||||
ultags[t].parentNode.onmouseover=function(){
|
ultags[t].parentNode.onmouseover=function(){
|
||||||
|
@ -201,6 +203,8 @@ function nh_init_board(params){
|
||||||
params.cancelbtn.click();
|
params.cancelbtn.click();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
var parent_topic_id = $(this).data('topic-id');
|
||||||
|
if(parent_topic_id!=undefined)$("input[name='parent_topic']",params.form).val(parent_topic_id);
|
||||||
var ref_str = params.get_ref_str_call($(this));
|
var ref_str = params.get_ref_str_call($(this));
|
||||||
params.quote_show.html(ref_str);
|
params.quote_show.html(ref_str);
|
||||||
params.quote_input.html(ref_str);
|
params.quote_input.html(ref_str);
|
||||||
|
|
|
@ -1,24 +1,5 @@
|
||||||
<style>
|
<style>
|
||||||
table,tr,td{border:0; cellspacing:0; cellpadding:0;}
|
|
||||||
ul,li{ list-style-type:none}
|
|
||||||
.cl{ clear:both; overflow:hidden; }
|
|
||||||
a{ text-decoration:none; text-align:center; }
|
|
||||||
a:hover{ text-decoration:underline;}
|
|
||||||
/**** 常用***/
|
|
||||||
.f_l{ float:left;}
|
|
||||||
.f_r{ float:right;}
|
|
||||||
.b_lblue{ background:#64bdd9;}
|
|
||||||
.b_dblue{ background:#55a1b9; cursor:pointer;}
|
|
||||||
.f_b{ font-weight: bold;}
|
|
||||||
.c_blue{ color:#64bdd9;}
|
|
||||||
.c_grey{ color:#999999;}
|
|
||||||
.c_grey02{ color:#666666;}
|
.c_grey02{ color:#666666;}
|
||||||
.f_14{ font-size:14px;}
|
|
||||||
.c_dblue{ color:#3e6d8e;}
|
|
||||||
.w90{width:90px;}
|
|
||||||
.ml10{margin-left:10px;}
|
|
||||||
.ml5{margin-left:5px;}
|
|
||||||
.b_grey{ background:#a3a3a3;}
|
|
||||||
.c_blue02{ color:#15bcce; font-weight: bold;}
|
.c_blue02{ color:#15bcce; font-weight: bold;}
|
||||||
.w280{ display:block; width:280px;float:left;}
|
.w280{ display:block; width:280px;float:left;}
|
||||||
.w70{ display:block;width:70px; text-align:center; float:left;}
|
.w70{ display:block;width:70px; text-align:center; float:left;}
|
||||||
|
@ -26,9 +7,6 @@
|
||||||
.c_blue03{ color:#0d90c4;}
|
.c_blue03{ color:#0d90c4;}
|
||||||
|
|
||||||
|
|
||||||
/***弹框***/
|
|
||||||
/*#popbox_tscore{width:480px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}*/
|
|
||||||
/*.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}*/
|
|
||||||
.tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;}
|
.tscore_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; text-align: center; padding-top:5px;}
|
||||||
.tscore_box{ width:350px; margin:15px auto;}
|
.tscore_box{ width:350px; margin:15px auto;}
|
||||||
.tscore_box li{ height:25px;}
|
.tscore_box li{ height:25px;}
|
||||||
|
@ -40,11 +18,16 @@
|
||||||
<ul class="tscore_box">
|
<ul class="tscore_box">
|
||||||
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
|
<li ><span class="c_blue02 w280">作业名称</span><span class="c_blue02 w70">得分</span></li>
|
||||||
<% @member_score.student_homework_score[0].each do |homework_score| %>
|
<% @member_score.student_homework_score[0].each do |homework_score| %>
|
||||||
|
<li>
|
||||||
<li><span class="c_grey02 w280"><%= homework_score.name %></span><span class="c_red w70"><%= format("%0.2f",homework_score[:score].nil? ? 0 : homework_score[:score]) %></span></li>
|
<span class="c_grey02 w280">
|
||||||
|
<%= homework_score.name %>
|
||||||
|
</span>
|
||||||
|
<span class="c_red w70">
|
||||||
|
<%= format("%0.2f",homework_score[:score].nil? ? 0 : homework_score[:score]) %>
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li><span class="c_blue03 w280">作业积分(总得分)</span><span class="c_red w70"><%= @member_score.student_homework_score[1] %></span></li>
|
<li><span class="c_blue03 w280">作业积分(总得分)</span><span class="c_red w70"><%= @member_score.student_homework_score[1] %></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,11 +1,22 @@
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2"><%= l(:label_activity)%></h2>
|
<% if @controller_name=='ActivityNotifys' %>
|
||||||
|
<a class="fl about_me" href="<%=course_path(@course)%>"><%= l(:label_activity)%></a>
|
||||||
|
<h2 class="fl project_h2">与我相关</h2>
|
||||||
|
<div class="fr mt10 mr5 c_grey02">
|
||||||
|
<label class="mr5" style="cursor:pointer;" data-href="<%= course_activity_notifys_path(@course) %>/chang_read_flag" nhname='nh_act_link_all'>全部标为已读</label>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<h2 class="fl project_h2"><%= l(:label_activity)%></h2>
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<a class="fl about_me" href="<%=course_activity_notifys_path(@course)%>">与我相关</a>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @events_by_day != nil && @events_by_day.size >0 %>
|
<% if @events_by_day != nil && @events_by_day.size >0 %>
|
||||||
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
||||||
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
<% sort_activity_events(@events_by_day[day]).each do |e, in_group| -%>
|
||||||
<div class="problem_main">
|
<div class="problem_main" nhname="container">
|
||||||
<a class="problem_pic fl">
|
<a class="problem_pic fl">
|
||||||
<%= image_tag(url_to_avatar(e.event_author), :width => "42", :height => "42") %>
|
<%= image_tag(url_to_avatar(e.event_author), :width => "42", :height => "42") %>
|
||||||
</a>
|
</a>
|
||||||
|
@ -14,8 +25,19 @@
|
||||||
<%= link_to_user_header("(#{e.event_author})", @canShowRealName,:class => 'problem_name c_orange fl') if @canShowRealName && e.respond_to?(:event_author) %>
|
<%= link_to_user_header("(#{e.event_author})", @canShowRealName,:class => 'problem_name c_orange fl') if @canShowRealName && e.respond_to?(:event_author) %>
|
||||||
<span class="fl"> </span>
|
<span class="fl"> </span>
|
||||||
<span class="fl"> <%= l(:label_new_activity) %>:</span>
|
<span class="fl"> <%= l(:label_new_activity) %>:</span>
|
||||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @course)} "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) :
|
<%
|
||||||
(e.event_type.eql?("bid") ? homework_course_path(@course) : (e.event_type.eql?("message") || e.event_type.eql?("reply") ? course_boards_path(@course,:topic_id => e.id) : e.event_url)),:class => "problem_tit c_dblue fl fb"%>
|
link = (e.event_type.eql?("attachment")&&e.container.kind_of?(Course)) ? course_files_path(e.container) :
|
||||||
|
(e.event_type.eql?("bid") ? homework_course_path(@course) :
|
||||||
|
(e.event_type.eql?("message") || e.event_type.eql?("reply") ?
|
||||||
|
course_boards_path(@course,:topic_id => e.id,:parent_id=>(e.parent_id ? e.parent_id : e.id)) : e.event_url))
|
||||||
|
%>
|
||||||
|
<%= link_to "#{eventToLanguageCourse(e.event_type, @course)} "<< format_activity_title(e.event_title), link,
|
||||||
|
:class => "problem_tit c_dblue fl fb",'data-type'=>e.event_type,
|
||||||
|
'data-notify-id'=>(e.respond_to?('get_notify_id') ? e.get_notify_id : ''),:nhname=>"nh_act_link",
|
||||||
|
'data-href'=>(course_activity_notifys_path(@course)+"/chang_read_flag?an_id="+(e.respond_to?('get_notify_id') ? e.get_notify_id : '').to_s)%>
|
||||||
|
<%if @controller_name=='ActivityNotifys' && !e.get_notify_is_read%>
|
||||||
|
<span nhname="nh_act_flag" class="ml10 fl"><img src="/images/new.png" width="35" height="15"/></span>
|
||||||
|
<%end%>
|
||||||
<br />
|
<br />
|
||||||
<p class="mt5 break_word"><%= e.event_description.html_safe %>
|
<p class="mt5 break_word"><%= e.event_description.html_safe %>
|
||||||
<br />
|
<br />
|
||||||
|
@ -28,7 +50,7 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% if @obj_pages.next_page.nil? %>
|
<% if @obj_pages.next_page.nil? && @controller_name!='ActivityNotifys' %>
|
||||||
<div class="problem_main">
|
<div class="problem_main">
|
||||||
<a class="problem_pic fl">
|
<a class="problem_pic fl">
|
||||||
<%= image_tag(url_to_avatar(@user), :width => "42", :height => "42") %>
|
<%= image_tag(url_to_avatar(@user), :width => "42", :height => "42") %>
|
||||||
|
@ -51,3 +73,35 @@
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("div[nhname='container']").each(function(){
|
||||||
|
var container = $(this);
|
||||||
|
var btn = $("a[nhname='nh_act_link']",container);
|
||||||
|
if(btn.data('notify-id')>0){
|
||||||
|
btn.attr('target','_blank');
|
||||||
|
btn.click(function(){
|
||||||
|
var flag = $("span[nhname='nh_act_flag']",container);
|
||||||
|
if(flag!=undefined){
|
||||||
|
var url = $(this).data('href');
|
||||||
|
$.ajax({url:url,dataType:'text',success:function(data){
|
||||||
|
if(data == 'true'){
|
||||||
|
flag.remove();
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
$("label[nhname='nh_act_link_all']").click(function(){
|
||||||
|
var url = $(this).data('href');
|
||||||
|
$.ajax({url:url,dataType:'text',success:function(data){
|
||||||
|
if(data == 'true'){
|
||||||
|
$("span[nhname='nh_act_flag']").remove();
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -6,8 +6,8 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'courses/show_me
|
||||||
showModal('ajax-modal', '400px');
|
showModal('ajax-modal', '400px');
|
||||||
//$('#ajax-modal').css('height','569px');
|
//$('#ajax-modal').css('height','569px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
|
$('#ajax-modal').before("<span>" +
|
||||||
"<a href='javascript:void(0)' onclick='hidden_homework_score_form();'><img src='/images/bid/close.png' width='26px' height='26px' style='margin-left: -30px;' /></a></span>");
|
"<a href='javascript:void(0)' onclick='hidden_homework_score_form();'><img src='/images/bid/close.png' width='26px' height='26px' style='margin-left: 375px;' /></a></span>");
|
||||||
//$('#ajax-modal').parent().removeClass();
|
//$('#ajax-modal').parent().removeClass();
|
||||||
$('#ajax-modal').parent().css("top","30%").css("left","40%").css("position","fixed");
|
$('#ajax-modal').parent().css("top","30%").css("left","40%").css("position","fixed");
|
||||||
$('#ajax-modal').parent().addClass("new-watcher");
|
$('#ajax-modal').parent().addClass("new-watcher");
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="">
|
<div class="mt5">
|
||||||
<p class="f_l mb5 c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
<p class="f_l mb5 c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||||
<%= link_to( l(:button_delete), attachment_path(file),
|
<%= link_to( l(:button_delete), attachment_path(file),
|
||||||
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
|
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<%= calendar_for('homework_end_time')%>
|
<%= calendar_for('homework_end_time')%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="fl ml100">
|
<li class="fl ml100" style="display: none;">
|
||||||
<label class="label02"> 发布日期: </label>
|
<label class="label02"> 发布日期: </label>
|
||||||
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.publish_time%>" >
|
<input type="text" name="homework_common[publish_time]" id="homework_publish_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.publish_time%>" >
|
||||||
<%= calendar_for('homework_publish_time')%>
|
<%= calendar_for('homework_publish_time')%>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<p class="fl ml20 f14 mb10 c_orange">基本规则设置(总分为100分)</p>
|
<p class="fl ml20 f14 mb10 c_orange">基本规则设置(总分为100分)</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<ul class="ml10">
|
<ul class="ml10">
|
||||||
<li>
|
<li style="display: none;">
|
||||||
<label class="label02">迟交扣分: </label>
|
<label class="label02">迟交扣分: </label>
|
||||||
<%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
|
<%= select_tag :late_penalty,options_for_select(late_penalty_option,homework.late_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||||
<span class="fl mt5"> 分</span>
|
<span class="fl mt5"> 分</span>
|
||||||
|
@ -78,13 +78,13 @@
|
||||||
<p class="fl ml20 f14 mb10 c_orange">学生互评设置</p>
|
<p class="fl ml20 f14 mb10 c_orange">学生互评设置</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<ul class="ml10">
|
<ul class="ml10">
|
||||||
<li >
|
<li style="display: none;">
|
||||||
<label class="label02">互评启动时间: </label>
|
<label class="label02">互评启动时间: </label>
|
||||||
<input type="text" name="evaluation_start" id="evaluation_start_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_start%>" >
|
<input type="text" name="evaluation_start" id="evaluation_start_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_start%>" >
|
||||||
<%= calendar_for('evaluation_start_time')%>
|
<%= calendar_for('evaluation_start_time')%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li style="display: none;">
|
||||||
<label class="label02">互评结束时间: </label>
|
<label class="label02">互评结束时间: </label>
|
||||||
<input type="text" name="evaluation_end" id="evaluation_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_end%>" >
|
<input type="text" name="evaluation_end" id="evaluation_end_time" class="hwork_input02 fl" readonly="readonly" value="<%= homework.homework_detail_manual.evaluation_end%>" >
|
||||||
<%= calendar_for('evaluation_end_time')%>
|
<%= calendar_for('evaluation_end_time')%>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li >
|
<li style="display: none;">
|
||||||
<label class="label02">缺评扣分: </label>
|
<label class="label02">缺评扣分: </label>
|
||||||
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
|
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
|
||||||
<span class="fl mt5"> 分</span>
|
<span class="fl mt5"> 分</span>
|
||||||
|
|
|
@ -18,15 +18,15 @@
|
||||||
<% if User.current.logged? -%>
|
<% if User.current.logged? -%>
|
||||||
|
|
||||||
<li id="current_user_li">
|
<li id="current_user_li">
|
||||||
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, :class => "uses_name"%>
|
<%= link_to "#{User.current.login}<span class='pic_triangle'></span>".html_safe, {:controller=> 'users', :action => 'show', id: User.current.id, host: Setting.host_user}, target:"_blank", :class => "uses_name"%>
|
||||||
<ul id="user_sub_menu" style="right: 0px;display: none;">
|
<ul id="user_sub_menu" style="right: 0px;display: none;">
|
||||||
<% unless User.current.projects.empty? %>
|
<% unless User.current.projects.empty? %>
|
||||||
<li id="my_projects_li">
|
<li id="my_projects_li">
|
||||||
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name}, :class => "parent" %>
|
<%= link_to l(:label_my_projects), {:controller => 'users', :action => 'user_projects', id: User.current.id, host: Setting.host_name},target:"_blank", :class => "parent" %>
|
||||||
<ul id="my_projects_ul">
|
<ul id="my_projects_ul" >
|
||||||
<% User.current.projects.each do |project| %>
|
<% User.current.projects.each do |project| %>
|
||||||
<li title="<%=project.name%>">
|
<li title="<%=project.name%>">
|
||||||
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name } %>
|
<%= link_to project.name, {:controller => 'projects', :action => 'show',id: project.id, host: Setting.host_name }, target:"_blank" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -37,11 +37,11 @@
|
||||||
<% user_course = get_user_course User.current%>
|
<% user_course = get_user_course User.current%>
|
||||||
<% unless user_course.empty? %>
|
<% unless user_course.empty? %>
|
||||||
<li id="my_courses_li">
|
<li id="my_courses_li">
|
||||||
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id}, :class => "parent" %>
|
<%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id},target:"_blank", :class => "parent" %>
|
||||||
<ul id="my_courses_ul">
|
<ul id="my_courses_ul">
|
||||||
<% user_course.each do |course| %>
|
<% user_course.each do |course| %>
|
||||||
<li title="<%=course.name%>">
|
<li title="<%=course.name%>">
|
||||||
<%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id} %>
|
<%= link_to course.name, {:controller => 'courses',:action => 'show',:id => course.id},target:"_blank" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<span class="c_blue" style="color:#1b55a7;">
|
<span class="c_blue" style="color:#1b55a7;">
|
||||||
|
<%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
|
||||||
<%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
|
</span><%= l(:mail_issue_title_userin)%>
|
||||||
|
|
||||||
</span><%= l(:mail_issue_title_userin)%>
|
|
||||||
<span class="c_blue" style="color:#1b55a7;">
|
<span class="c_blue" style="color:#1b55a7;">
|
||||||
<% if @news.project %>
|
<% if @news.project %>
|
||||||
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
<%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||||
<% elsif @news.course %>
|
<% elsif @news.course %>
|
||||||
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
<%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span><%= l(:mail_issue_title_active)%></p>
|
</span><%= l(:mail_issue_title_active)%>
|
||||||
|
</p>
|
||||||
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
|
||||||
<ul style="list-style-type:none; margin:0; padding:0;">
|
<ul style="list-style-type:none; margin:0; padding:0;">
|
||||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_subject)%></strong></span>
|
||||||
|
@ -25,7 +23,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
|
||||||
<span style="float: left; width: 526px">
|
<span style="float: left; width: 526px">
|
||||||
<%= @news.description %>
|
<%= @news.description.html_safe %>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
|
@ -1,341 +1,359 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
<%= @subject %>
|
<%= @subject %>
|
||||||
</h4>
|
</h4>
|
||||||
<% if @attachments.first || @course_news.first || @bids.first ||
|
<% if @attachments.first || @course_news.first || @bids.first ||
|
||||||
@homeworks.first || @course_journal_messages.first|| @course_messages.first %>
|
@homeworks.first || @course_journal_messages.first|| @course_messages.first %>
|
||||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
|
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_course_overview)%></h2>
|
||||||
<% unless @course_news.first.nil? %>
|
<% unless @course_news.first.nil? %>
|
||||||
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:label_course_news) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
<% @course_news.each do |course_new|%>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
|
||||||
<%= l(:label_course_news) %>
|
:class=> "wmail_column",
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_news.count %>)</span>
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
</h4>
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
|
||||||
<% @course_news.each do |course_new|%>
|
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
|
||||||
<li style="clear: both; list-style: none;">
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(course_new.course.name,length: 30,omission: '...'), course_url(course_new.course, :token => @token.value),
|
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
||||||
:class=> "wmail_column",
|
:class => 'wmail_info',
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_new.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= link_to course_new.author, user_activities_url(course_new.author,:token => @token.value), :class => "wmail_name",
|
<div class="cl"></div>
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
</ul><!--课程通知 end-->
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
|
||||||
|
|
||||||
<%= link_to truncate(course_new.title,length: 30,omission: '...'), news_url(course_new,:token => @token.value),
|
|
||||||
:class => 'wmail_info',
|
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
|
||||||
%>
|
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_new.created_on) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<!--课程作业-->
|
||||||
</ul><!--课程动态 end-->
|
<% if !@bids.first.nil? || !@homeworks.first.nil? %>
|
||||||
<% end %>
|
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
<% if !@bids.first.nil? || !@homeworks.first.nil? %>
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
|
||||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
<% unless @bids.first.nil?%>
|
||||||
|
<% @bids.each do |bid| %>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;"><%= l(:label_homework_overview) %><span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @bids.count %>)</span></h4>
|
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
|
||||||
<% unless @bids.first.nil?%>
|
:class=> "wmail_column",
|
||||||
<% @bids.each do |bid| %>
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
<li style="clear: both; list-style: none;">
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(bid.courses.first.name,length: 30,omission: '...'), course_url(bid.courses.first, :token => @token.value),
|
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
|
||||||
:class=> "wmail_column",
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
|
||||||
|
|
||||||
<%= link_to bid.author, user_activities_url(bid.author,:token => @token.value), :class => "wmail_name",
|
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
:class => 'wmail_info',
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_homework) %></span>
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% unless @homeworks.first.nil? %>
|
||||||
|
<% @homeworks.each do |homework| %>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
<%= link_to truncate(bid.name,length: 30,omission: '...'), course_for_bid_url(:id => bid.id,:token => @token.value),
|
<%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value),
|
||||||
:class => 'wmail_info',
|
:class=> "wmail_column",
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
%>
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(bid.created_on) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% unless @homeworks.first.nil? %>
|
|
||||||
<% @homeworks.each do |homework| %>
|
|
||||||
<li style="clear: both; list-style: none;">
|
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(homework.bid.courses.first.name,length: 30,omission: '...'), course_url(homework.bid.courses.first, :token => @token.value),
|
<%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name",
|
||||||
:class=> "wmail_column",
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_submit_homework) %></span>
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
|
||||||
|
|
||||||
<%= link_to homework.user, user_activities_url(homework.user,:token => @token.value), :class => "wmail_name",
|
<%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => homework.bid.id,:token => @token.value),
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
:class => 'wmail_info',
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_submit_homework) %></span>
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(homework.created_at) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= link_to truncate(homework.name,length: 30,omission: '...'), course_for_bid_url(:id => homework.bid.id,:token => @token.value),
|
<div class="cl"></div>
|
||||||
:class => 'wmail_info',
|
</ul><!--作业动态 end-->
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
|
||||||
%>
|
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(homework.created_at) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<!-- 课程留言 -->
|
||||||
</ul><!--作业动态 end-->
|
<% unless @course_journal_messages.first.nil? %>
|
||||||
<% end %>
|
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:view_course_journals_for_messages) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
|
||||||
<% unless @course_journal_messages.first.nil? %>
|
<% @course_journal_messages.each do |course_journal_message|%>
|
||||||
<ul class="wmail_ul" style="clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
|
||||||
<%= l(:view_course_journals_for_messages) %>
|
:class=> "wmail_column",
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
</h4>
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
|
||||||
<% @course_journal_messages.each do |course_journal_message|%>
|
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
|
||||||
<li style="clear: both; list-style: none;">
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_journals_for_messages) %></span>
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(course_journal_message.course.name,length: 30,omission: '...'), course_url(course_journal_message.course, :token => @token.value),
|
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
||||||
:class=> "wmail_column",
|
:class => 'wmail_info',
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_journal_message.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul><!--课程留言 end-->
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= link_to course_journal_message.user, user_activities_url(course_journal_message.user,:token => @token.value), :class => "wmail_name",
|
<!-- 课程讨论区 -->
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
<% unless @course_messages.first.nil? %>
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_journals_for_messages) %></span>
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:view_borad_course) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
<% @course_messages.each do |course_message|%>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
|
||||||
|
:class=> "wmail_column",
|
||||||
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
||||||
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||||
|
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
||||||
|
:class => 'wmail_info',
|
||||||
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_message.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul><!-- 课程讨论区end -->
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<%= link_to truncate(course_journal_message.notes,length: 30,omission: '...'), course_feedback_url(course_journal_message.course,:token => @token.value),
|
<!-- 课件 -->
|
||||||
:class => 'wmail_info',
|
<% unless @attachments.first.nil? %>
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
%>
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_journal_message.created_on) %></span>
|
<%= l(:label_course_attendingcontestwork_download) %>
|
||||||
</li>
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
|
||||||
<% end %>
|
</h4>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<% @attachments.each do |attachment|%>
|
||||||
</ul><!--课程留言 end-->
|
<li style="clear: both; list-style: none;">
|
||||||
<% end %>
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
<% unless @course_messages.first.nil? %>
|
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
:class=> "wmail_column",
|
||||||
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
|
||||||
<%= l(:view_borad_course) %>
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @course_journal_messages.count %>)</span>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_file_upload) %></span>
|
||||||
</h4>
|
|
||||||
|
|
||||||
<% @course_messages.each do |course_message|%>
|
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
|
||||||
<li style="clear: both; list-style: none;">
|
:class => 'wmail_info',
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(attachment.created_on) %></span>
|
||||||
<%= link_to truncate(course_message.course.name,length: 30,omission: '...'), course_url(course_message.course.id, :token => @token.value),
|
</li>
|
||||||
:class=> "wmail_column",
|
<% end %>
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
<div class="cl"></div>
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
</ul><!--课件下载 end-->
|
||||||
|
<% end %>
|
||||||
<%= link_to course_message.author, user_activities_url(course_message.author,:token => @token.value), :class => "wmail_name",
|
</div>
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
<% end %>
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
|
||||||
|
|
||||||
<%= link_to truncate(course_message.subject,length: 30,omission: '...'),board_message_url(course_message, :board_id => course_message.board_id,:token => @token.value),
|
|
||||||
:class => 'wmail_info',
|
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
|
||||||
%>
|
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(course_message.created_on) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
</ul><!--课程讨论 end-->
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% unless @attachments.first.nil? %>
|
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
|
||||||
<%= l(:label_course_attendingcontestwork_download) %>
|
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @attachments.count %>)</span>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<% @attachments.each do |attachment|%>
|
|
||||||
<li style="clear: both; list-style: none;">
|
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(attachment.course.name,length: 30,omission: '...'), course_url(attachment.course, :token => @token.value),
|
|
||||||
:class=> "wmail_column",
|
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
|
||||||
|
|
||||||
<%= link_to attachment.author, user_activities_url(attachment.author,:token => @token.value), :class => "wmail_name",
|
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_course_file_upload) %></span>
|
|
||||||
|
|
||||||
<%= link_to truncate(attachment.filename,length: 30,omission: '...'),course_files_url(attachment.course,:token => @token.value),
|
|
||||||
:class => 'wmail_info',
|
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
|
||||||
%>
|
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(attachment.created_on) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</ul><!--课件下载 end-->
|
|
||||||
<% end %>
|
|
||||||
</div><!--课程动态 end-->
|
|
||||||
<% end %>
|
|
||||||
<% if @issues.first || @project_messages.first %>
|
|
||||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
|
||||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_project_overview_new)%></h2>
|
|
||||||
<% unless @issues.first.nil? %>
|
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
|
||||||
<%= l(:label_issue_tracking) %>
|
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<% @issues.each do |issue|%>
|
|
||||||
<li style="clear: both; list-style: none;">
|
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
|
|
||||||
:class=> "wmail_column",
|
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
|
||||||
|
|
||||||
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
|
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_issue) %></span>
|
|
||||||
|
|
||||||
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
|
|
||||||
:class => 'wmail_info',
|
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
|
||||||
%>
|
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(issue.created_on) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
</ul><!--问题跟踪 end-->
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% unless @project_messages.first.nil? %>
|
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
|
||||||
<%= l(:project_moule_boards_show) %>
|
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_messages.count %>)</span>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<% @project_messages.each do |project_message|%>
|
|
||||||
<li style="clear: both; list-style: none;">
|
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
|
||||||
|
|
||||||
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
|
|
||||||
:class=> "wmail_column",
|
|
||||||
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
|
||||||
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
|
||||||
|
|
||||||
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
|
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
|
||||||
|
|
||||||
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
|
|
||||||
:class => 'wmail_info',
|
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
|
||||||
%>
|
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_message.created_on) %></span>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
</ul><!--项目论坛 end-->
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div><!--项目动态 end-->
|
<!--项目相关-->
|
||||||
<% end %>
|
<% if @issues.first || @project_messages.first %>
|
||||||
<% unless @user_journal_messages.first.nil? %>
|
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_project_overview_new)%></h2>
|
||||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h2>
|
<% unless @issues.first.nil? %>
|
||||||
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:label_issue_tracking) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @issues.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
<% @issues.each do |issue|%>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
<%= link_to truncate(issue.project.name,length: 30,omission: '...'), project_url(issue.project, :token => @token.value),
|
||||||
|
:class=> "wmail_column",
|
||||||
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
<%= link_to issue.author, user_activities_url(issue.author,:token => @token.value), :class => "wmail_name",
|
||||||
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_issue) %></span>
|
||||||
|
<%= link_to truncate(issue.subject,length: 30,omission: '...'),issue_url(issue, :token => @token.value),
|
||||||
|
:class => 'wmail_info',
|
||||||
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(issue.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
<div class="cl"></div>
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
</ul><!--问题跟踪 end-->
|
||||||
<%= l(:label_user_message) %>
|
<% end %>
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @user_journal_messages.count %>)</span>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<% @user_journal_messages.each do |user_journal_message|%>
|
<!-- 讨论区 -->
|
||||||
<li style="clear: both; list-style: none;">
|
<% unless @project_messages.first.nil? %>
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:project_moule_boards_show) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_messages.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
|
||||||
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
|
<% @project_messages.each do |project_message|%>
|
||||||
:class => "wmail_name",
|
<li style="clear: both; list-style: none;">
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_show_your_message) %></span>
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
|
<%= link_to truncate(project_message.project.name,length: 30,omission: '...'), project_url(project_message.project, :token => @token.value),
|
||||||
:class => 'wmail_info',
|
:class=> "wmail_column",
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
%>
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
|
||||||
|
<%= link_to project_message.author, user_activities_url(project_message.author,:token => @token.value), :class => "wmail_name",
|
||||||
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_send_course_messages) %></span>
|
||||||
|
|
||||||
|
<%= link_to truncate(project_message.subject,length: 30,omission: '...'),board_message_url(project_message, :board_id => project_message.board_id,:token => @token.value),
|
||||||
|
:class => 'wmail_info',
|
||||||
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_message.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul><!--项目论坛 end-->
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<!--项目新闻-->
|
||||||
|
<% unless @project_news.first.nil? %>
|
||||||
|
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:label_course_news) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @project_news.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
<% @project_news.each do |project_new|%>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">[</span>
|
||||||
|
|
||||||
|
<%= link_to truncate(project_new.project.name,length: 30,omission: '...'), project_url(project_new.project, :token => @token.value),
|
||||||
|
:class=> "wmail_column",
|
||||||
|
:style=> " font-weight: bold; display:block; float:left; color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
|
<span class="wmail_b" style="color:#1b55a7; font-weight:bold; float:left;">]</span>
|
||||||
|
<%= link_to project_new.author, user_activities_url(project_new.author,:token => @token.value), :class => "wmail_name",
|
||||||
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"%>
|
||||||
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_project_notice) %></span>
|
||||||
|
|
||||||
|
<%= link_to truncate(project_new.title,length: 30,omission: '...'), news_url(project_new,:token => @token.value),
|
||||||
|
:class => 'wmail_info',
|
||||||
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
|
%>
|
||||||
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(project_new.created_on) %></span>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</ul><!-- 项目新闻end -->
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<% end %><!-- 项目动态end -->
|
||||||
|
|
||||||
|
<!-- 用户留言 -->
|
||||||
|
<% unless @user_journal_messages.first.nil? %>
|
||||||
|
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||||
|
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:label_activities) %></h2>
|
||||||
|
|
||||||
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
|
<%= l(:label_user_message) %>
|
||||||
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @user_journal_messages.count %>)</span>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<% @user_journal_messages.each do |user_journal_message|%>
|
||||||
|
<li style="clear: both; list-style: none;">
|
||||||
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
|
||||||
|
<%= link_to user_journal_message.user, user_activities_url(user_journal_message.user,:token => @token.value),
|
||||||
|
:class => "wmail_name",
|
||||||
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_show_your_message) %></span>
|
||||||
|
|
||||||
|
<%= link_to truncate(user_journal_message.notes,length: 30,omission: '...'),feedback_url(@user,:token => @token.value),
|
||||||
|
:class => 'wmail_info',
|
||||||
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
|
%>
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(user_journal_message.created_on) %></span></li>
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(user_journal_message.created_on) %></span></li>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul><!--课程动态 end-->
|
</ul><!--用户留言 end-->
|
||||||
|
|
||||||
</div><!--个人动态 end-->
|
</div><!--个人动态 end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @forums.first || @memos.first %>
|
<% if @forums.first || @memos.first %>
|
||||||
<div class="wmail_main" style="padding:20px 10px 0px;">
|
<div class="wmail_main" style="padding:20px 10px 0px;">
|
||||||
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h2>
|
<h2 class="wmail_h2" style="color:#15bccf; "><%= l(:lable_bar_active) %></h2>
|
||||||
<% unless @forums.first.nil? %>
|
<% unless @forums.first.nil? %>
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
<h4 class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
|
||||||
<%= l(:label_user_forum) %>
|
<%= l(:label_user_forum) %>
|
||||||
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
|
<span class="wmail_num" style="color:#fe3f0c; margin-left:5px; font-weight:normal;">(<%= @forums.count %>)</span>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
<% @forums.each do |forum|%>
|
<% @forums.each do |forum|%>
|
||||||
<li style="clear: both; list-style: none;">
|
<li style="clear: both; list-style: none;">
|
||||||
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
<span class="wmail_dis" style="float:left; color:#000000; margin-right:5px;">▪</span>
|
||||||
|
|
||||||
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
|
<%= link_to forum.creator, user_activities_url(forum.creator,:token => @token.value),
|
||||||
:class => "wmail_name",
|
:class => "wmail_name",
|
||||||
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
:style => "color:#fe5722; float:left;display:block; margin-right:5px; margin-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;" %>
|
||||||
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_forum_new) %></span>
|
<span class="wmail_txt" style="float:left; margin-right:5px;color:#6e6e6e;"><%= l(:label_forum_new) %></span>
|
||||||
|
|
||||||
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
|
<%= link_to truncate(forum.name,length: 30,omission: '...'),forum_url(forum,:token => @token.value),
|
||||||
:class => 'wmail_info',
|
:class => 'wmail_info',
|
||||||
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
:style => "color:#5a5a5a; float:left; margin-right:5px; display:block;color:#1b55a7;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;"
|
||||||
%>
|
%>
|
||||||
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(forum.created_at) %></span></li>
|
<span class="wmail_date" style="color:#6e6e6e; float:right;display:block; margin-left:10px;"><%= format_time(forum.created_at) %></span></li>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul><!-- 新建贴吧 end-->
|
</ul><!-- 新建贴吧 end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
<% unless @memos.first.nil? %>
|
<% unless @memos.first.nil? %>
|
||||||
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:720px; margin-bottom:15px;">
|
||||||
|
@ -366,14 +384,14 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div><!--贴吧动态 end-->
|
</div><!--贴吧动态 end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
|
<div class="wmail_foot" style="margin-top:20px;color:#2775d2; margin-left:10px;">
|
||||||
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
<% [:label_user_mail_option_all, :label_user_mail_option_day, :label_user_mail_option_none].each do |mail_option| %>
|
||||||
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
<% if Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten][@user.mail_notification] == mail_option %>
|
||||||
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
<label style="margin-top:20px;color:gray; margin-left:10px;"><%= l(mail_option) %></label>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
<%= link_to l(mail_option), my_change_mail_notification_url(token: @token.value,mail_notification: Hash[*User::MAIL_NOTIFICATION_OPTIONS.flatten].invert[mail_option]), :style => "margin-top:20px;color:#2775d2; margin-left:10px;" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -45,39 +45,55 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (filter.test(email)&& !(email.value == null)) return true;
|
// if (filter.test(email)&& !(email.value == null)) return true;
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// document.getElementById('valid_email').innerHTML = "您所填写的电子邮件格式不正确";
|
// document.getElementById('valid_email').innerHTML = "您所填写的电子邮件格式不正确";
|
||||||
// document.getElementById('valid_email').style.color = "#FF0000";
|
// document.getElementById('valid_email').style.color = "#FF0000";
|
||||||
// return false;
|
// return false;
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
</script>
|
</script>
|
||||||
<div class="project_r_h">
|
<div class="project_r_h">
|
||||||
<h2 class="project_h2"><%= l(:label_invite_join)%></h2>
|
<h2 class="project_h2"><%= l(:label_invite_join)%></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="box_main">
|
<div class="box_main">
|
||||||
<p class="box_p">
|
<p class="box_p">
|
||||||
<%= l(:label_invite_email_tips)%>
|
<%= l(:label_invite_email_tips)%>
|
||||||
</p>
|
</p>
|
||||||
<div id="is_registed">
|
<div id="is_registed">
|
||||||
<%= render :partial => 'regested', locals: { :isregisted => false} %>
|
<%= render :partial => 'regested', locals: { :isregisted => false} %>
|
||||||
</div>
|
</div>
|
||||||
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
|
<%= form_tag('send_mail_to_member', :controller => 'projects',:action => 'send_mail_to_member', method: 'get') do %>
|
||||||
<span id="valid_email" style="color: #FF0000;"></span>
|
<span id="valid_email" style="color: #FF0000;"></span>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
|
<%= text_field_tag 'mail', '', :class => "fb_item fl", :placeholder => l(:label_input_email), :onkeyup => "this.value=this.value.replace(' ','')", :style => "ime-mode:disabled;", :onblur => "verifyAddress(this);" %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<a href="#" class="btn_free" onclick="senderEmail($(this));">
|
<a href="#" class="btn_free" onclick="senderEmail($(this));">
|
||||||
<%= l(:label_send_email)%>
|
<%= l(:label_send_email)%>
|
||||||
</a>
|
</a>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<%# 邀请用户的状态 %>
|
||||||
</div>
|
<% unless @inviter_lists.blank? %>
|
||||||
|
<div>
|
||||||
|
<span class="status_inviter">已邀请的用户</span><br/>
|
||||||
|
<% @inviter_lists.each do |inviter_list| %>
|
||||||
|
<%= inviter_list.user.name %><br/>
|
||||||
|
<% end %>
|
||||||
|
</br>
|
||||||
|
<span class="status_inviter">等待加入项目的用户</span><br/>
|
||||||
|
<% @inviter_lists.each do |inviter_list| %>
|
||||||
|
<% unless inviter_list.user.member_of?(@project) %>
|
||||||
|
<%= inviter_list.user.name %><br/>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
|
<%= render :partial => 'student_work/student_work_attachment_form', :locals => {:work => work,:score => score} %>
|
||||||
</div>
|
</div>
|
||||||
<%end%>
|
<%end%>
|
||||||
<a href="javascript:void(0);" class="blue_n_btn fr" onclick="$(this).parent().parent().submit();">提交</a>
|
<a href="javascript:void(0);" class="blue_n_btn fr evaluation_submit" onclick="$(this).parent().parent().submit();">提交</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end%>
|
<% end%>
|
|
@ -1,22 +1,22 @@
|
||||||
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
<!-- 匿评作品列表,显示某一个作品的信息 -->
|
||||||
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
||||||
<% is_my_work = student_work.user == User.current%>
|
<% is_my_work = student_work.user == User.current%>
|
||||||
<li style="min-height: 1px;width: 65px;">
|
<li class="hwork_num">
|
||||||
<% if is_my_work%>
|
<% if is_my_work%>
|
||||||
<%= link_to student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id,user_path(student_work.user),:class => "c_blue02 hwork_center"%>
|
<span>
|
||||||
<% else%>
|
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||||
<%= link_to "--", "javascript:void(0)",:class => "c_blue02 hwork_center"%>
|
</span>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class="hwork_name">
|
||||||
<% if is_my_work%>
|
<% if is_my_work%>
|
||||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:class => "c_blue02 hwork_name"%>
|
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name %>
|
||||||
<% else%>
|
<% else%>
|
||||||
<%= link_to "匿名","javascript:void(0)",:class => "c_blue02 hwork_name"%>
|
<%= link_to "匿名","javascript:void(0)"%>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li class=" hwork_tit_e" style="width: 440px">
|
<li class=" hwork_tit_e" style="width: 410px">
|
||||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true%>
|
<%= link_to student_work.name, student_work_path(student_work),:remote => true, :title => student_work.name, :class => "c_blue02"%>
|
||||||
</li>
|
</li>
|
||||||
<% my_score = student_work_score(student_work,User.current) %>
|
<% my_score = student_work_score(student_work,User.current) %>
|
||||||
<li class=" hwork_code <%= my_score.nil? ? 'c_grey' : 'c_red'%>">
|
<li class=" hwork_code <%= my_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<li class="w70 ">
|
<li class="hwork_num ">
|
||||||
<span href="javascript:void(0);" class="c_dark f14 fb fl ml15 ">学号</span>
|
<span class="f14 f_b c_dark fl ">学号</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="w70">
|
<li class="hwork_name f14 fb c_dark">
|
||||||
<span class="c_dark f14 fb fl ">学生姓名</span>
|
<span class="c_dark f14 fb fl ">学生姓名</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="hwork_tit_e">
|
<li class="hwork_tit_e">
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
<% end%>
|
<% end%>
|
||||||
<li >
|
<li >
|
||||||
<span class="tit_fb ">内容:</span>
|
<span class="tit_fb ">内容:</span>
|
||||||
<p class="show_hwork_p break_word">
|
<div class="show_hwork_p break_word">
|
||||||
<%= @work.description%>
|
<%= textilizable @work.description%>
|
||||||
</p>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<li >
|
<li >
|
||||||
|
@ -54,13 +54,13 @@
|
||||||
|
|
||||||
<% if @is_teacher || (@homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
|
<% if @is_teacher || (@homework.homework_type == 1 && @homework.homework_detail_manual.comment_status == 2 && @work.user != User.current )%>
|
||||||
<!-- 老师 || 匿评作业 && 开启匿评状态 && 不是当前用户自己的作品 -->
|
<!-- 老师 || 匿评作业 && 开启匿评状态 && 不是当前用户自己的作品 -->
|
||||||
<div id="add_student_score_<%= @work.id%>" class="mt10 ">
|
<div id="add_student_score_<%= @work.id%>" class="mt10 evaluation">
|
||||||
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
|
<%= render :partial => 'add_score',:locals => {:work => @work,:score => @score}%>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="ping_box" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
<div class="ping_box mt10" id="score_list_<%= @work.id%>" style="<%= @work.student_works_scores.empty? ? 'padding:0px;' : ''%>">
|
||||||
<%@work.student_works_scores.order("created_at desc").each do |score|%>
|
<%@work.student_works_scores.order("created_at desc").each do |score|%>
|
||||||
<div id="work_score_<%= score.id%>">
|
<div id="work_score_<%= score.id%>">
|
||||||
<%= render :partial => 'student_work_score',:locals => {:score => score}%>
|
<%= render :partial => 'student_work_score',:locals => {:score => score}%>
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
<!-- 作品列表,显示某一个作品的信息 -->
|
<!-- 作品列表,显示某一个作品的信息 -->
|
||||||
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
<ul class="hwork_ul <%= cycle("b_grey", "") %>" id="student_work_<%= student_work.id%>">
|
||||||
<li style="min-height: 1px;width: 65px;">
|
<li class="hwork_num">
|
||||||
<%= link_to student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id,user_path(student_work.user),:class => "c_blue02 hwork_center"%>
|
<span>
|
||||||
|
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||||
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li class=" hwork_name ">
|
||||||
<%= link_to student_work.user.show_name,user_path(student_work.user),:class => "c_blue02 hwork_name"%>
|
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name%>
|
||||||
</li>
|
</li>
|
||||||
<li class=" hwork_tit">
|
<li class=" hwork_tit">
|
||||||
<%= link_to student_work.name, student_work_path(student_work),:remote => true%>
|
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
|
||||||
</li>
|
</li>
|
||||||
<li class=" hwork_code <%= student_work.teacher_score.nil? ? 'c_grey' : 'c_red'%>">
|
<li class=" hwork_code <%= student_work.teacher_score.nil? ? 'c_grey' : 'c_red'%> mr18">
|
||||||
<%= student_work.teacher_score.nil? ? "--" : format("%.2f",student_work.teacher_score)%>
|
<%= student_work.teacher_score.nil? ? "--" : format("%.2f",student_work.teacher_score)%>
|
||||||
</li>
|
</li>
|
||||||
<li class=" hwork_code <%= student_work.teaching_asistant_score.nil? ? 'c_grey' : 'c_red'%>">
|
<li class=" hwork_code <%= student_work.teaching_asistant_score.nil? ? 'c_grey' : 'c_red'%> mr18">
|
||||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.2f",student_work.teaching_asistant_score)%>
|
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.2f",student_work.teaching_asistant_score)%>
|
||||||
</li>
|
</li>
|
||||||
<li class=" hwork_code02 <%= student_work.student_score.nil? ? 'c_grey' : 'c_red'%> student_score_info">
|
<li class=" hwork_code02 <%= student_work.student_score.nil? ? 'c_grey' : 'c_red'%> mr18 student_score_info" >
|
||||||
<%= student_work.student_score.nil? ? "--" : format("%.2f",student_work.student_score)%>
|
<%= student_work.student_score.nil? ? "--" : format("%.2f",student_work.student_score)%>
|
||||||
<% unless student_work.student_score.nil?%>
|
<% unless student_work.student_score.nil?%>
|
||||||
<span class="c_blue">
|
<span class="c_blue">
|
||||||
|
@ -29,7 +31,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li class=" hwork_code02 <%= student_work.final_score.nil? ? 'c_grey' : 'c_red'%>">
|
<li class=" hwork_code <%= student_work.final_score.nil? ? 'c_grey' : 'c_red'%>">
|
||||||
<%= student_work.final_score.nil? ? "--" : format("%.2f",student_work.final_score)%>
|
<%= student_work.final_score.nil? ? "--" : format("%.2f",student_work.final_score)%>
|
||||||
</li>
|
</li>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
<li class="w70 ">
|
<li class="hwork_num ">
|
||||||
<span href="javascript:void(0);" class="c_dark f14 fb fl ">学号</span>
|
<a href="javascript:void(0);" class=" f14 f_b c_dark fl" >学号</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="w70">
|
<li class=" hwork_name f14 fb c_dark">
|
||||||
<span class="c_dark f14 fb fl ">学生姓名</span>
|
学生姓名
|
||||||
</li>
|
</li>
|
||||||
<li class="hwork_tit">
|
<li class="hwork_tit">
|
||||||
<span class="c_dark f14 fb fl">作品名称</span>
|
<span class="c_dark f14 fb fl">作品名称</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="w70 mr5" >
|
<li class="mr5 w70">
|
||||||
<%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
<%= link_to "教师评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl hwork_code"%>
|
||||||
<% if @show_all && @order == "teacher_score"%>
|
<% if @show_all && @order == "teacher_score"%>
|
||||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li class="w70 mr5">
|
<li class="mr5 w70">
|
||||||
<%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
<%= link_to "教辅评分",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl hwork_code"%>
|
||||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li class="w60 mr5 ml10">
|
<li class="mr5 ml15 w40">
|
||||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||||
<% if @show_all && @order == "student_score"%>
|
<% if @show_all && @order == "student_score"%>
|
||||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||||
<% end%>
|
<% end%>
|
||||||
</li>
|
</li>
|
||||||
<li class="w40 ml10" id="final_sort">
|
<li class="ml30">
|
||||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "final_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "c_dark f14 fb fl"%>
|
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "final_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
|
||||||
<% if @show_all && @order == "final_score"%>
|
<% if @show_all && @order == "final_score"%>
|
||||||
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
<a href="javascript:void(0);" class="<%= @score == 'desc' ? 'st_up' : 'st_down'%>" ></a>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<% for attachment in attachments %>
|
<% attachments.each_with_index do |attachment,i| %>
|
||||||
<%= link_to_short_attachment attachment, :class => 'link_file', :download => true -%>
|
<div id="attachment_<%= attachment.id%>">
|
||||||
<span class="ml5">(<%= number_to_human_size attachment.filesize %>)</span>
|
<%= link_to_short_attachment attachment, :class => 'link_file', :download => true -%>
|
||||||
<div class="cl"></div>
|
<%= link_to(' '.html_safe, attachment_path(attachment, :format => 'js'), :method => 'delete', :remote => true, :title => '删除', :class => 'remove-upload', :confirm => l(:text_are_you_sure)) if attachment.id && User.current == attachment.author %>
|
||||||
|
<span class="ml5">(<%= number_to_human_size attachment.filesize %>)</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
</span>
|
</span>
|
||||||
<% if @show_all%>
|
<% if @show_all%>
|
||||||
<input type="text" value="<%= @name%>" placeholder="昵称、学号、姓名搜索" class="min_search ml10 fl" onkeypress="SearchByName($(this),'<%= student_work_index_path(:homework => @homework.id)%>',event);">
|
<input type="text" value="<%= @name%>" placeholder="昵称、学号、姓名搜索" class="min_search ml10 fl" onkeypress="SearchByName($(this),'<%= student_work_index_path(:homework => @homework.id)%>',event);">
|
||||||
|
<a class="student_work_search fl" onclick="SearchByName($(this).prev(),'<%= student_work_index_path(:homework => @homework.id)%>');" href="javascript:void(0)">搜索</a>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% if @is_teacher%>
|
<% if @is_teacher%>
|
||||||
<div class="fr">
|
<div class="fr">
|
||||||
|
|
|
@ -140,9 +140,7 @@
|
||||||
<%break if Time.new.strftime("%Y").to_i - year_now >= 2%>
|
<%break if Time.new.strftime("%Y").to_i - year_now >= 2%>
|
||||||
<% all_new_hot_course += find_all_new_hot_course(course_count-all_new_hot_course.count, @school_id, year_now, course_term)%>
|
<% all_new_hot_course += find_all_new_hot_course(course_count-all_new_hot_course.count, @school_id, year_now, course_term)%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% cache all_new_hot_course.max().created_at do %>
|
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -175,9 +173,7 @@
|
||||||
<%break if Time.new.strftime("%Y").to_i - year_now >= 2%>
|
<%break if Time.new.strftime("%Y").to_i - year_now >= 2%>
|
||||||
<% all_new_hot_course += find_all_new_hot_course(9-(all_new_hot_course.count + cur_school_course.count), @school_id, year_now, course_term)%>
|
<% all_new_hot_course += find_all_new_hot_course(9-(all_new_hot_course.count + cur_school_course.count), @school_id, year_now, course_term)%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% cache all_new_hot_course.max().created_at do %>
|
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
||||||
<%= render :partial => 'course_list', :locals => {:course_list => all_new_hot_course} %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="clear:both"></div>
|
<div style="clear:both"></div>
|
||||||
<% cache :expire_in => 2.hours do%>
|
|
||||||
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
|
<div id="J_Slide" class="d-p-index-box d-p-index-hot">
|
||||||
<h3 style="margin-left: 5px; color: #e8770d;"><strong> <%= l(:lable_hot_projects)%> </strong></h3>
|
<h3 style="margin-left: 5px; color: #e8770d;"><strong> <%= l(:lable_hot_projects)%> </strong></h3>
|
||||||
<span style="margin-top: -20px;float: right; display: block;"> <% if User.current.logged? %>
|
<span style="margin-top: -20px;float: right; display: block;"> <% if User.current.logged? %>
|
||||||
|
@ -113,7 +112,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
|
||||||
<div class="right" style="float: right; width: 48%; padding-top: 8px;">
|
<div class="right" style="float: right; width: 48%; padding-top: 8px;">
|
||||||
<ul class="welcome-message-list">
|
<ul class="welcome-message-list">
|
||||||
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
<div class="forum-topic" style="height: 25px; width: 98%; margin-left: 2px;">
|
||||||
|
|
|
@ -86,6 +86,7 @@ zh:
|
||||||
label_roadmap: 里程碑 #版本路线图
|
label_roadmap: 里程碑 #版本路线图
|
||||||
project_module_dts: DTS测试工具
|
project_module_dts: DTS测试工具
|
||||||
label_project_tool_response: 用户反馈
|
label_project_tool_response: 用户反馈
|
||||||
|
label_course_news: 项目新闻
|
||||||
|
|
||||||
label_project_overview: "项目简介"
|
label_project_overview: "项目简介"
|
||||||
label_expend_information: 展开更多信息
|
label_expend_information: 展开更多信息
|
||||||
|
|
|
@ -112,7 +112,7 @@ zh:
|
||||||
field_project: 项目
|
field_project: 项目
|
||||||
field_issue: 问题
|
field_issue: 问题
|
||||||
|
|
||||||
field_notes: 说明
|
field_notes: 内容
|
||||||
field_is_closed: 已关闭的问题
|
field_is_closed: 已关闭的问题
|
||||||
field_is_default: 默认值
|
field_is_default: 默认值
|
||||||
|
|
||||||
|
|
|
@ -710,6 +710,12 @@ RedmineApp::Application.routes.draw do
|
||||||
resources :news, :except => [:show, :edit, :update, :destroy]
|
resources :news, :except => [:show, :edit, :update, :destroy]
|
||||||
resources :boards
|
resources :boards
|
||||||
match '/homework', :to => 'courses#homework', :as => 'homework', :via => :get
|
match '/homework', :to => 'courses#homework', :as => 'homework', :via => :get
|
||||||
|
resources :activity_notifys do
|
||||||
|
collection do
|
||||||
|
match 'chang_read_flag', :via => :get
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end # end of resources :courses
|
end # end of resources :courses
|
||||||
match 'courses/:id/feedback', :to => 'courses#feedback', :via => :get, :as => 'course_feedback'
|
match 'courses/:id/feedback', :to => 'courses#feedback', :via => :get, :as => 'course_feedback'
|
||||||
match '/courses/search', :via => [:get, :post]
|
match '/courses/search', :via => [:get, :post]
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
class CreateActivityNotifies < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :activity_notifies do |t|
|
||||||
|
t.integer :activity_container_id
|
||||||
|
t.string :activity_container_type
|
||||||
|
t.integer :activity_id
|
||||||
|
t.string :activity_type
|
||||||
|
t.integer :notify_to
|
||||||
|
t.datetime :created_on
|
||||||
|
t.integer :is_read
|
||||||
|
|
||||||
|
end
|
||||||
|
add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to"
|
||||||
|
add_index "activity_notifies", ["created_on"], :name => "index_an_created_on"
|
||||||
|
add_index "activity_notifies", ["activity_container_id","activity_container_type"], :name => "index_an_activity_container_id"
|
||||||
|
end
|
||||||
|
end
|
16
db/schema.rb
16
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20150602055730) do
|
ActiveRecord::Schema.define(:version => 20150604153000) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -23,6 +23,20 @@ ActiveRecord::Schema.define(:version => 20150602055730) do
|
||||||
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
|
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
|
||||||
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
|
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
|
||||||
|
|
||||||
|
create_table "activity_notifies", :force => true do |t|
|
||||||
|
t.integer "activity_container_id"
|
||||||
|
t.string "activity_container_type"
|
||||||
|
t.integer "activity_id"
|
||||||
|
t.string "activity_type"
|
||||||
|
t.integer "notify_to"
|
||||||
|
t.datetime "created_on"
|
||||||
|
t.integer "is_read"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "activity_notifies", ["activity_container_id", "activity_container_type"], :name => "index_an_activity_container_id"
|
||||||
|
add_index "activity_notifies", ["created_on"], :name => "index_an_created_on"
|
||||||
|
add_index "activity_notifies", ["notify_to"], :name => "index_an_notify_to"
|
||||||
|
|
||||||
create_table "api_keys", :force => true do |t|
|
create_table "api_keys", :force => true do |t|
|
||||||
t.string "access_token"
|
t.string "access_token"
|
||||||
t.datetime "expires_at"
|
t.datetime "expires_at"
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 4.1 KiB |
|
@ -673,8 +673,7 @@ $.fn.peSlider = function(settings){
|
||||||
friendlyVal = input.val() + ' ' + thisUnits;
|
friendlyVal = input.val() + ' ' + thisUnits;
|
||||||
slider.find('a').attr({
|
slider.find('a').attr({
|
||||||
'aria-valuenow': ui.value,
|
'aria-valuenow': ui.value,
|
||||||
'aria-valuetext': friendlyVal,
|
'aria-valuetext': friendlyVal
|
||||||
'title': friendlyVal
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.find('a')
|
.find('a')
|
||||||
|
@ -684,7 +683,6 @@ $.fn.peSlider = function(settings){
|
||||||
'aria-valuemax': input.attr('max'),
|
'aria-valuemax': input.attr('max'),
|
||||||
'aria-valuenow': input.val(),
|
'aria-valuenow': input.val(),
|
||||||
'aria-valuetext': friendlyVal,
|
'aria-valuetext': friendlyVal,
|
||||||
'title': friendlyVal,
|
|
||||||
'aria-labelledby': thisLabel
|
'aria-labelledby': thisLabel
|
||||||
});
|
});
|
||||||
input
|
input
|
||||||
|
@ -795,6 +793,10 @@ function SearchByName(obj,url,event)
|
||||||
location.href = url + "&name=" + obj.val();
|
location.href = url + "&name=" + obj.val();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function SearchByName(obj,url)
|
||||||
|
{
|
||||||
|
location.href = url + "&name=" + obj.val();
|
||||||
|
}
|
||||||
|
|
||||||
$(function(){
|
$(function(){
|
||||||
$("#about_project label").eq(1).remove();
|
$("#about_project label").eq(1).remove();
|
||||||
|
|
|
@ -53,9 +53,9 @@ a:hover.problem_new_btn{ background:#ff7143; color:#fff;}
|
||||||
a.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3;}
|
a.problem_pic{ display:block; width:42px; height:42px; padding:3px; border:1px solid #e3e3e3;}
|
||||||
a:hover.problem_pic{border:1px solid #64bdd9;}
|
a:hover.problem_pic{border:1px solid #64bdd9;}
|
||||||
.problem_txt{ width:610px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;}
|
.problem_txt{ width:610px; margin-left:10px; color:#777777;word-break: break-all;word-wrap: break-word;}
|
||||||
a.problem_name{ color:#ff5722;}
|
a.problem_name{ color:#ff5722;max-width:60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
||||||
a:hover.problem_name{ color:#d33503;}
|
a:hover.problem_name{ color:#d33503;}
|
||||||
a.problem_tit{ color:#0781b4; max-width:430px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
a.problem_tit{ color:#0781b4; max-width:410px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||||
a:hover.problem_tit{ color:#09658c; }
|
a:hover.problem_tit{ color:#09658c; }
|
||||||
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
.problem_main{ border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
||||||
/****翻页***/
|
/****翻页***/
|
||||||
|
@ -502,9 +502,6 @@ blockquote {
|
||||||
}
|
}
|
||||||
a.member_search_edit {width: 43px;background: #15bccf;color: #fff;text-align: center;text-decoration: none;padding: 2px;}
|
a.member_search_edit {width: 43px;background: #15bccf;color: #fff;text-align: center;text-decoration: none;padding: 2px;}
|
||||||
.min_search_edit {width: 150px;height: 20px;border: 1px solid #d0d0d0 !important;color: #666;}
|
.min_search_edit {width: 150px;height: 20px;border: 1px solid #d0d0d0 !important;color: #666;}
|
||||||
|
|
||||||
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; color:#64bdd9; }
|
|
||||||
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
|
|
||||||
.r_txt_tit{max-width:450px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
|
.r_txt_tit{max-width:450px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;color:#15bccf; float:left; color:#09658c; font-size:14px;}
|
||||||
|
|
||||||
/*日历选择图*/
|
/*日历选择图*/
|
||||||
|
@ -633,14 +630,17 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
|
||||||
.w300{ width:300px;}
|
.w300{ width:300px;}
|
||||||
.w80{ width:80px;}
|
.w80{ width:80px;}
|
||||||
.t_c{ text-align:center;}
|
.t_c{ text-align:center;}
|
||||||
.hwork_tit{ width:240px; float:left; }
|
|
||||||
.hwork_tit a{ width:255px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
.hwork_tit{ width:210px; float:left; }
|
||||||
.hwork_tit_e{ width:440px; float:left; }
|
.hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||||
.hwork_tit_e a{ width:455px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
.hwork_code{ width:56px; text-align:center; }
|
||||||
.hwork_code{ width:60px; text-align:center; margin-right:15px;}
|
.hwork_code02{ width:60px; text-align:center; }
|
||||||
.hwork_code02{ width:60px; text-align:center; margin-right:10px;}
|
.hwork_tit_e{ width:420px; float:left; }
|
||||||
a.hwork_center{ display:block; width:60px; text-align:center; margin-right:5px;overflow: hidden; white-space: nowrap; text-overflow:ellipsis;}
|
.hwork_tit_e a{ width:405px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
|
||||||
a.hwork_name{ display:block;width:65px; text-align:center; margin-right:10px;overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
.hwork_num{ width:90px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||||
|
.mr18{ margin-right:18px;}
|
||||||
|
a.hwork_center{ display:block; width:60px; margin-right:5px;overflow: hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||||
|
.hwork_name{ display:block;width:80px; overflow: hidden;white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
|
||||||
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
|
.show_hwork{ border:2px solid #64bdd9; width:646px; padding:10px; color:#666666; padding-bottom:0px; }
|
||||||
.show_hwork ul li{ margin-bottom:5px;}
|
.show_hwork ul li{ margin-bottom:5px;}
|
||||||
.show_hwork_arrow{ position:relative; top:2px; left:25px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
|
.show_hwork_arrow{ position:relative; top:2px; left:25px;background:url(../images/course/arrow_up.jpg) 0 0 no-repeat; width:20px; height:11px;}
|
||||||
|
@ -659,7 +659,6 @@ a:hover.ping_pic{border:1px solid #64bdd9;}
|
||||||
a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;}
|
a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px; text-align:center; display:block;}
|
||||||
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
|
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
|
||||||
.fr{ float:right;}
|
.fr{ float:right;}
|
||||||
.min_search{ width:200px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 185px -193px no-repeat; cursor:pointer;}
|
|
||||||
.li_min_search{ float:right; margin-right:-10px;}
|
.li_min_search{ float:right; margin-right:-10px;}
|
||||||
.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;}
|
.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;}
|
||||||
/*返回顶部*/
|
/*返回顶部*/
|
||||||
|
@ -674,8 +673,14 @@ input#score{ width:40px;}
|
||||||
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;}
|
.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;top:0;height:100%;background:#64bdd9;left:0;}
|
||||||
|
|
||||||
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px;}
|
.filename { background: url(../images/pic_file.png) 0 -25px no-repeat;color: #3ca5c6;max-width: 150px;border: none; padding-left: 20px;margin-right: 10px;margin-bottom: 5px;}
|
||||||
|
.evaluation{position: relative;}
|
||||||
|
.evaluation_submit{position: absolute;right: 0px;bottom: 5px;}
|
||||||
|
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
|
||||||
|
|
||||||
|
/* 与我相关 */
|
||||||
|
.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;}
|
||||||
|
a.about_me{ width:80px;text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;}
|
||||||
|
a:hover.about_me{ color:#0781b4;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ a.icon_removem{ background:url(../images/img_floatbox.png) -22px -33px no-repea
|
||||||
a:hover.icon_removem{background:url(../images/img_floatbox.png) -22px -61px no-repeat;}
|
a:hover.icon_removem{background:url(../images/img_floatbox.png) -22px -61px no-repeat;}
|
||||||
a.btn_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;}
|
a.btn_free{ background:#ff5722; display:block; text-align:center; color:#fff; padding:3px 0; width:80px; margin-bottom:10px;}
|
||||||
a:hover.btn_free{ background:#d63502;}
|
a:hover.btn_free{ background:#d63502;}
|
||||||
|
.status_inviter{color: #3CA5C6;font-weight: bold; font-size: 14px }
|
||||||
/*成员邀请*/
|
/*成员邀请*/
|
||||||
.invi_search{ }
|
.invi_search{ }
|
||||||
.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}
|
.invi_search_input{ border:1px solid #15bccf; width:180px; height:24px; color:#9b9b9b; padding-left:5px; margin-bottom:10px;}
|
||||||
|
|
|
@ -18,7 +18,7 @@ table{ background:#fff;}
|
||||||
.no_line{ border-bottom:none;}
|
.no_line{ border-bottom:none;}
|
||||||
.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
|
||||||
.no_border{ border:none;}
|
.no_border{ border:none;}
|
||||||
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/new_project/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
|
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/new_project/public_icon.png) 135px -193px no-repeat;}
|
||||||
|
|
||||||
/* font & color */
|
/* font & color */
|
||||||
h2{ font-size:18px; color:#15bccf;}
|
h2{ font-size:18px; color:#15bccf;}
|
||||||
|
@ -59,6 +59,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.ml10{ margin-left:10px;}
|
.ml10{ margin-left:10px;}
|
||||||
.ml15{ margin-left:15px;}
|
.ml15{ margin-left:15px;}
|
||||||
.ml20{ margin-left:20px;}
|
.ml20{ margin-left:20px;}
|
||||||
|
.ml35{margin-left: 35px;}
|
||||||
.ml40{ margin-left:40px;}
|
.ml40{ margin-left:40px;}
|
||||||
.ml45{ margin-left:45px;}
|
.ml45{ margin-left:45px;}
|
||||||
.ml55{ margin-left:55px;}
|
.ml55{ margin-left:55px;}
|
||||||
|
@ -86,6 +87,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.mb20{ margin-bottom:20px;}
|
.mb20{ margin-bottom:20px;}
|
||||||
.pl15{ padding-left:15px;}
|
.pl15{ padding-left:15px;}
|
||||||
.w20{ width:20px;}
|
.w20{ width:20px;}
|
||||||
|
.w40{width: 40px;}
|
||||||
.w45{ width: 45px;}
|
.w45{ width: 45px;}
|
||||||
.w60{ width:60px;}
|
.w60{ width:60px;}
|
||||||
.w70{ width:70px;}
|
.w70{ width:70px;}
|
||||||
|
|
Loading…
Reference in New Issue