Merge branch 'cxt_course' into develop
Conflicts: app/views/users/_reply_to.html.erb
This commit is contained in:
commit
c6be37020f
|
@ -1224,7 +1224,7 @@ class CoursesController < ApplicationController
|
|||
def member_to_xls homeworks, course, members,groups
|
||||
xls_report = StringIO.new
|
||||
book = Spreadsheet::Workbook.new
|
||||
sheet1 = book.create_worksheet :name => "student"
|
||||
sheet1 = book.create_worksheet :name => "总成绩"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
#sheet1.row(0).default_format = blue
|
||||
#sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_class),l(:excel_f_score),l(:excel_commit_time)])
|
||||
|
@ -1268,6 +1268,121 @@ class CoursesController < ApplicationController
|
|||
count_row += 1
|
||||
end
|
||||
|
||||
homeworks.each_with_index do |home, i|
|
||||
sheet = book.create_worksheet :name => "第#{i+1}次作业"
|
||||
sheet[0,0] = "课程编号"
|
||||
sheet[0,1] = course.id
|
||||
sheet[1,0] = "课程学期"
|
||||
sheet[1,1] = course.time.to_s+"年"+course.term
|
||||
sheet[2,0] = "课程名称"
|
||||
sheet[2,1] = course.name
|
||||
sheet[3,0] = "教师团队"
|
||||
sheet[3,1] = (searchTeacherAndAssistant course).map{|member| member.user.show_name}.join('、')
|
||||
sheet[4,0] = "主讲教师"
|
||||
sheet[4,1] = course.teacher.show_name
|
||||
sheet[4,0] = "作业批次"
|
||||
sheet[4,1] = "第#{i+1}次作业"
|
||||
sheet[4,0] = "作业名称"
|
||||
sheet[4,1] = home.name
|
||||
if home.homework_type == 1 #普通作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0]= j + 1
|
||||
sheet[count_row,1] = stu.user.show_name
|
||||
sheet[count_row,2] = stu.user.login
|
||||
sheet[count_row,3] = stu.user.user_extensions.student_id
|
||||
sheet[count_row,4] = stu.name
|
||||
sheet[count_row,5] = strip_html stu.description
|
||||
sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2)
|
||||
sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
|
||||
if home.anonymous_comment ==0
|
||||
sheet[count_row,8] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
|
||||
sheet[count_row,9] = stu.absence_penalty
|
||||
sheet[count_row,10] = stu.late_penalty
|
||||
sheet[count_row,11] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
||||
sheet[count_row,12] = format_time(stu.created_at)
|
||||
else
|
||||
sheet[count_row,8] = stu.late_penalty
|
||||
sheet[count_row,9] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
||||
sheet[count_row,10] = format_time(stu.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
elsif home.homework_type == 2 #编程作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0]= j + 1
|
||||
sheet[count_row,1] = stu.user.show_name
|
||||
sheet[count_row,2] = stu.user.login
|
||||
sheet[count_row,3] = stu.user.user_extensions.student_id
|
||||
sheet[count_row,4] = stu.name
|
||||
sheet[count_row,5] = stu.description
|
||||
sheet[count_row,6] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2)
|
||||
sheet[count_row,7] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
|
||||
sheet[count_row,8] = stu.system_score.nil? ? l(:label_without_score) : stu.system_score.round(2)
|
||||
if home.anonymous_comment ==0
|
||||
sheet[count_row,9] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
|
||||
sheet[count_row,10] = stu.absence_penalty
|
||||
sheet[count_row,11] = stu.late_penalty
|
||||
sheet[count_row,12] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
||||
sheet[count_row,13] = format_time(stu.created_at)
|
||||
else
|
||||
sheet[count_row,9] = stu.late_penalty
|
||||
sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
||||
sheet[count_row,11] = format_time(stu.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
elsif home.homework_type == 3 #分组作业
|
||||
if home.anonymous_comment ==0
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet.row(5).concat([l(:excel_rank),l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 6
|
||||
items = home.student_works.order("work_score desc")
|
||||
items.each_with_index do |stu, j|
|
||||
sheet[count_row,0] = j + 1
|
||||
sheet[count_row,1] = get_group_member_names stu
|
||||
sheet[count_row,2] = stu.name
|
||||
sheet[count_row,3] = (stu.project_id == 0 || stu.project_id.nil?) ? l(:excel_no_project) : stu.project.name
|
||||
sheet[count_row,4] = strip_html stu.description
|
||||
sheet[count_row,5] = stu.teacher_score.nil? ? l(:label_without_score) : stu.teacher_score.round(2)
|
||||
sheet[count_row,6] = stu.teaching_asistant_score.nil? ? l(:label_without_score) : stu.teaching_asistant_score.round(2)
|
||||
if home.anonymous_comment ==0
|
||||
sheet[count_row,7] = stu.student_score.nil? ? l(:label_without_score) : stu.student_score.round(2)
|
||||
sheet[count_row,8] = stu.absence_penalty
|
||||
sheet[count_row,9] = stu.late_penalty
|
||||
sheet[count_row,10] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
||||
sheet[count_row,11] = format_time(stu.created_at)
|
||||
else
|
||||
sheet[count_row,7] = stu.late_penalty
|
||||
sheet[count_row,8] = stu.work_score.nil? ? l(:label_without_score) : stu.work_score.round(2)
|
||||
sheet[count_row,9] = format_time(stu.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
=begin
|
||||
group0 = CourseGroup.new();
|
||||
group0.id = 0;
|
||||
|
|
|
@ -1209,13 +1209,18 @@ class StudentWorkController < ApplicationController
|
|||
sheet1 = book.create_worksheet :name => "homework"
|
||||
blue = Spreadsheet::Format.new :color => :blue, :weight => :bold, :size => 10
|
||||
sheet1.row(0).default_format = blue
|
||||
if @homework.homework_type == 1 #匿评作业
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)])
|
||||
if @homework.homework_type == 1 #普通作业
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,1] = homework.user.show_name
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
|
@ -1223,18 +1228,31 @@ class StudentWorkController < ApplicationController
|
|||
sheet1[count_row,6] = strip_html homework.description
|
||||
sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
|
||||
sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
||||
sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,11] = format_time(homework.created_at)
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1[count_row,9] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,10] = homework.absence_penalty
|
||||
sheet1[count_row,11] = homework.late_penalty
|
||||
sheet1[count_row,12] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,13] = format_time(homework.created_at)
|
||||
else
|
||||
sheet1[count_row,9] = homework.late_penalty
|
||||
sheet1[count_row,10] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,11] = format_time(homework.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
elsif @homework.homework_type == 2 #编程作业
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_f_score),l(:excel_commit_time)])
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet1.row(0).concat([l(:excel_user_id),l(:excel_user_name),l(:excel_nickname),l(:excel_student_id),l(:excel_mail),l(:excel_homework_name),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score), l(:excel_s_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0]=homework.user.id
|
||||
sheet1[count_row,1] = homework.user.lastname.to_s + homework.user.firstname.to_s
|
||||
sheet1[count_row,1] = homework.user.show_name
|
||||
sheet1[count_row,2] = homework.user.login
|
||||
sheet1[count_row,3] = homework.user.user_extensions.student_id
|
||||
sheet1[count_row,4] = homework.user.mail
|
||||
|
@ -1243,11 +1261,48 @@ class StudentWorkController < ApplicationController
|
|||
sheet1[count_row,7] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
|
||||
sheet1[count_row,8] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
||||
sheet1[count_row,9] = homework.system_score.nil? ? l(:label_without_score) : homework.system_score.round(2)
|
||||
sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,12] = format_time(homework.created_at)
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1[count_row,10] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,11] = homework.absence_penalty
|
||||
sheet1[count_row,12] = homework.late_penalty
|
||||
sheet1[count_row,13] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,14] = format_time(homework.created_at)
|
||||
else
|
||||
sheet1[count_row,10] = homework.late_penalty
|
||||
sheet1[count_row,11] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,12] = format_time(homework.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
elsif @homework.homework_type == 3 #分组作业
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_n_score),l(:excel_a_penalty),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
else
|
||||
sheet1.row(0).concat([l(:excel_group_member),l(:excel_homework_name),l(:excel_homework_project),l(:excel_homework_des),
|
||||
l(:excel_t_score),l(:excel_ta_score),l(:excel_l_penalty),l(:excel_f_score),l(:excel_commit_time)])
|
||||
end
|
||||
count_row = 1
|
||||
items.each do |homework|
|
||||
sheet1[count_row,0] = get_group_member_names homework
|
||||
sheet1[count_row,1] = homework.name
|
||||
sheet1[count_row,2] = (homework.project_id == 0 || homework.project_id.nil?) ? l(:excel_no_project) : homework.project.name
|
||||
sheet1[count_row,3] = strip_html homework.description
|
||||
sheet1[count_row,4] = homework.teacher_score.nil? ? l(:label_without_score) : homework.teacher_score.round(2)
|
||||
sheet1[count_row,5] = homework.teaching_asistant_score.nil? ? l(:label_without_score) : homework.teaching_asistant_score.round(2)
|
||||
if @homework.anonymous_comment ==0
|
||||
sheet1[count_row,6] = homework.student_score.nil? ? l(:label_without_score) : homework.student_score.round(2)
|
||||
sheet1[count_row,7] = homework.absence_penalty
|
||||
sheet1[count_row,8] = homework.late_penalty
|
||||
sheet1[count_row,9] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,10] = format_time(homework.created_at)
|
||||
else
|
||||
sheet1[count_row,6] = homework.late_penalty
|
||||
sheet1[count_row,7] = homework.respond_to?("score") ? homework.score.nil? ? l(:label_without_score) : homework.score.round(2) : l(:label_without_score)
|
||||
sheet1[count_row,8] = format_time(homework.created_at)
|
||||
end
|
||||
count_row += 1
|
||||
end
|
||||
end
|
||||
book.write xls_report
|
||||
xls_report.string
|
||||
|
|
|
@ -87,7 +87,10 @@ class UsersController < ApplicationController
|
|||
|
||||
#展开所有回复
|
||||
def show_all_replies
|
||||
@comment = JournalsForMessage.find params[:comment].to_i
|
||||
case params[:type]
|
||||
when 'JournalsForMessage'
|
||||
@comment = JournalsForMessage.find params[:comment].to_i
|
||||
end
|
||||
end
|
||||
|
||||
#二级回复
|
||||
|
@ -95,6 +98,7 @@ class UsersController < ApplicationController
|
|||
case params[:type]
|
||||
when 'HomeworkCommon'
|
||||
@reply = JournalsForMessage.find params[:reply_id]
|
||||
@type = 'HomeworkCommon'
|
||||
if params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
else
|
||||
|
@ -102,6 +106,11 @@ class UsersController < ApplicationController
|
|||
end
|
||||
@is_in_course = params[:is_in_course].to_i
|
||||
@course_activity = params[:course_activity].to_i
|
||||
when 'JournalsForMessage'
|
||||
@reply = JournalsForMessage.find params[:reply_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@activity_id = params[:activity_id]
|
||||
@type = 'JournalsForMessage'
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
@ -3261,7 +3270,11 @@ class UsersController < ApplicationController
|
|||
@journals = obj.comments.reorder("created_on desc")
|
||||
when 'JournalsForMessage'
|
||||
obj = JournalsForMessage.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.children.reorder("created_on desc")
|
||||
journals = []
|
||||
@journals = get_all_children(journals, obj)
|
||||
@type = 'JournalsForMessage'
|
||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||
@allow_delete = params[:allow_delete]
|
||||
when 'Issue'
|
||||
obj = Issue.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.journals.reorder("created_on desc")
|
||||
|
|
|
@ -54,15 +54,16 @@ class WordsController < ApplicationController
|
|||
:reply_id => reply_user_id,
|
||||
:notes => content,
|
||||
:is_readed => false}
|
||||
@jfm = add_reply_adapter options
|
||||
@activity = params[:activity_id].nil? ? JournalsForMessage.find(parent_id) : JournalsForMessage.find(params[:activity_id].to_i)
|
||||
@jfm = add_reply_adapter(@activity, options)
|
||||
@save_succ = true if @jfm.errors.empty?
|
||||
if @save_succ
|
||||
update_course_activity('JournalsForMessage',parent_id)
|
||||
update_user_activity('JournalsForMessage',parent_id)
|
||||
update_forge_activity('JournalsForMessage',parent_id)
|
||||
update_org_activity('JournalsForMessage',parent_id)
|
||||
update_principal_activity('JournalsForMessage',parent_id)
|
||||
(JournalsForMessage.find parent_id).update_attribute(:updated_on,Time.now)
|
||||
update_course_activity('JournalsForMessage',@activity.id)
|
||||
update_user_activity('JournalsForMessage',@activity.id)
|
||||
update_forge_activity('JournalsForMessage',@activity.id)
|
||||
update_org_activity('JournalsForMessage',@activity.id)
|
||||
update_principal_activity('JournalsForMessage',@activity.id)
|
||||
@activity.update_attribute(:updated_on,Time.now)
|
||||
end
|
||||
respond_to do |format|
|
||||
# format.html {
|
||||
|
@ -76,8 +77,6 @@ class WordsController < ApplicationController
|
|||
format.js {
|
||||
#@reply_type = params[:reply_type]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@activity = JournalsForMessage.find(parent_id)
|
||||
@is_activity = params[:is_activity] if params[:is_activity]
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -92,13 +91,14 @@ class WordsController < ApplicationController
|
|||
elsif @journal_destroyed.jour_type == "Course"
|
||||
@course = Course.find @journal_destroyed.jour_id
|
||||
@jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count
|
||||
@user_activity_id = params[:user_activity_id] if params[:user_activity_id]
|
||||
@activity = JournalsForMessage.where("id = #{params[:activity_id].to_i}").first if params[:activity_id]
|
||||
elsif @journal_destroyed.jour_type == "Principal"
|
||||
@user = User.find(@journal_destroyed.jour_id)
|
||||
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
|
||||
@is_user = true
|
||||
@user_activity_id = params[:user_activity_id] if params[:user_activity_id]
|
||||
@is_activity = params[:is_activity].to_i if params[:is_activity]
|
||||
@activity = @journal_destroyed.parent if @journal_destroyed.parent
|
||||
@activity = JournalsForMessage.where("id = #{params[:activity_id].to_i}").first if params[:activity_id]
|
||||
unless @activity
|
||||
redirect_to feedback_path(@user)
|
||||
return
|
||||
|
@ -374,28 +374,44 @@ class WordsController < ApplicationController
|
|||
obj
|
||||
end
|
||||
|
||||
def add_reply_adapter options
|
||||
def add_reply_adapter obj, options
|
||||
#modify by nwb
|
||||
#添加对课程留言的支持
|
||||
#留言回复应该不关系其所属的Class,而关心的是其所属的父留言
|
||||
obj = obj_distinguish_url_origin || User.find_by_id(2)
|
||||
if obj.kind_of? User
|
||||
obj.add_jour(nil, nil, nil, options)
|
||||
elsif obj.kind_of? Project
|
||||
Project.add_new_jour(nil, nil, obj.id, options)
|
||||
elsif obj.kind_of? Course
|
||||
Course.add_new_jour(nil, nil, obj.id, options)
|
||||
elsif obj.kind_of? Bid
|
||||
obj.add_jour(nil, nil, nil, options)
|
||||
elsif obj.kind_of? Contest
|
||||
obj.add_jour(nil, nil, obj.id, options) #new added
|
||||
elsif obj.kind_of? Softapplication
|
||||
obj.add_jour(nil, nil, obj.id, options) #new added
|
||||
elsif obj.kind_of? HomeworkAttach
|
||||
obj.add_jour(nil, nil, obj.id, options) #new added
|
||||
else
|
||||
raise "create reply obj unknow type.#{obj.class}"
|
||||
case obj.jour_type
|
||||
when 'Principal'
|
||||
obj.jour.add_jour(nil, nil, nil, options)
|
||||
when 'Project'
|
||||
Project.add_new_jour(nil, nil, obj.jour_id, options)
|
||||
when 'Course'
|
||||
Course.add_new_jour(nil, nil, obj.jour_id, options)
|
||||
when 'Bid'
|
||||
obj.jour.add_jour(nil, nil, nil, options)
|
||||
when 'Contest'
|
||||
obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
||||
when 'Softapplication'
|
||||
obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
||||
when 'HomeworkAttach'
|
||||
obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
||||
end
|
||||
# obj = obj_distinguish_url_origin || User.find_by_id(2)
|
||||
# if obj.kind_of? User
|
||||
# obj.add_jour(nil, nil, nil, options)
|
||||
# elsif obj.kind_of? Project
|
||||
# Project.add_new_jour(nil, nil, obj.id, options)
|
||||
# elsif obj.kind_of? Course
|
||||
# Course.add_new_jour(nil, nil, obj.id, options)
|
||||
# elsif obj.kind_of? Bid
|
||||
# obj.add_jour(nil, nil, nil, options)
|
||||
# elsif obj.kind_of? Contest
|
||||
# obj.add_jour(nil, nil, obj.id, options) #new added
|
||||
# elsif obj.kind_of? Softapplication
|
||||
# obj.add_jour(nil, nil, obj.id, options) #new added
|
||||
# elsif obj.kind_of? HomeworkAttach
|
||||
# obj.add_jour(nil, nil, obj.id, options) #new added
|
||||
# else
|
||||
# raise "create reply obj unknow type.#{obj.class}"
|
||||
# end
|
||||
end
|
||||
#######end of message
|
||||
end
|
||||
|
|
|
@ -3127,6 +3127,26 @@ def get_reply_parents parents_rely, comment
|
|||
parents_rely
|
||||
end
|
||||
|
||||
#获取回复的所有父节点(不包括根节点)
|
||||
def get_reply_parents_no_root parents_rely, comment
|
||||
if !comment.parent.nil? && !comment.parent.parent.nil?
|
||||
parents_rely << comment.parent
|
||||
get_reply_parents_no_root parents_rely, comment.parent
|
||||
end
|
||||
parents_rely
|
||||
end
|
||||
|
||||
#获取留言的所有子节点
|
||||
def get_all_children result, jour
|
||||
if jour.kind_of? JournalsForMessage
|
||||
jour.children.each do |jour_child|
|
||||
result << jour_child
|
||||
get_all_children result, jour_child
|
||||
end
|
||||
end
|
||||
result.sort! { |a,b| b.created_on <=> a.created_on }
|
||||
end
|
||||
|
||||
#将有置顶属性的提到数组前面
|
||||
def sort_by_sticky topics
|
||||
tmpTopics = []
|
||||
|
@ -3283,3 +3303,20 @@ def get_hw_index(hw,is_teacher)
|
|||
index = hw_ids.index(hw.id)
|
||||
return index
|
||||
end
|
||||
|
||||
def get_group_member_names work
|
||||
result = ""
|
||||
unless work.nil?
|
||||
work.student_work_projects.each do |member|
|
||||
user = User.where(:id => member.user_id).first
|
||||
unless user.nil?
|
||||
if result != ""
|
||||
result += "、#{user.show_name}"
|
||||
else
|
||||
result += user.show_name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
result
|
||||
end
|
||||
|
|
|
@ -87,11 +87,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<% if @article.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @article.try(:author), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @article.try(:author).try(:realname), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to @article.author.show_name, user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
|
@ -126,11 +122,6 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<!-- <div class="homepagePostReplyBannerMore">
|
||||
<%# if @reply_count > 2%>
|
||||
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @topic.id%>" onclick="expand_reply('#reply_div_<%#= @topic.id %>','#reply_btn_<%#= @topic.id%>')" data-count="<%#= @reply_count %>" data-init="0" >点击展开更多回复</a>
|
||||
<%# end %>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @article.id %>">
|
||||
<%@article.children.reorder('created_on desc').each_with_index do |reply,i| %>
|
||||
|
@ -146,11 +137,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= link_to reply.author.show_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
|
|
|
@ -6,4 +6,5 @@ $('#ajax-modal').siblings().remove();
|
|||
$('#ajax-modal').before(' <a href="javascript:void(0);" onclick="hideModal()" class="resourceClose" style="margin-left: 285px"></a>');
|
||||
$('#ajax-modal').parent().css("top","30%").css("left","50%");
|
||||
$('#ajax-modal').parent().addClass("courseOutlinePopup");
|
||||
$('#ajax-modal').parent().removeClass("copyCoursePopup");
|
||||
$('#ajax-modal').css("padding-left","16px")//.css("padding-bottom","16px");
|
||||
|
|
|
@ -75,11 +75,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<% if @article.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @article.try(:author), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @article.try(:author).try(:realname), user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to @article.author.show_name, user_path(@article.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
|
@ -109,11 +105,6 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<!-- <div class="homepagePostReplyBannerMore">
|
||||
<%# if @reply_count > 2%>
|
||||
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @topic.id%>" onclick="expand_reply('#reply_div_<%#= @topic.id %>','#reply_btn_<%#= @topic.id%>')" data-count="<%#= @reply_count %>" data-init="0" >点击展开更多回复</a>
|
||||
<%# end %>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @article.id %>">
|
||||
<%@article.children.reorder('created_on desc').each_with_index do |reply,i| %>
|
||||
|
@ -129,11 +120,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= link_to reply.author.show_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
<%= javascript_include_tag 'resizeable_table'%>
|
||||
|
||||
<table class="hwork-table-wrap">
|
||||
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
|
||||
<th class="hworkList340 width530" colspan="6">
|
||||
<span class="c_dark f14 fb fl mr5">序号</span>
|
||||
<span class="c_dark f14 fb fl mr55"> </span>
|
||||
<span class="c_dark f14 fb fl mr60">姓名</span>
|
||||
<span class="c_dark f14 fb fl mr60">学号</span>
|
||||
<span class="c_dark f14 fb fl">班级</span>
|
||||
</th>
|
||||
<tr class="b_grey hworkH30">
|
||||
<th class="hworkList30 pl5 pr5"><span class="c_dark f14 fb">序号</span></th>
|
||||
<th class="hworkList50"> </th>
|
||||
<th class="hworkList60"><span class="c_dark f14 fb">姓名</span></th>
|
||||
<th class="hworkList80"><span class="c_dark f14 fb">学号</span></th>
|
||||
<th class="hworkList80"><span class="c_dark f14 fb">班级</span></th>
|
||||
<th width="230"> </th>
|
||||
<th class="hworkList130">
|
||||
<%= link_to "时间",'',:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<%= link_to "时间",'',:class => "c_dark f14 fb" ,:remote => true%>
|
||||
</th>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "成绩",'',:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%= link_to "成绩",'',:class => "c_dark f14 fb",:remote => true%>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<% @exercise_users_list.each_with_index do |exercise, index|%>
|
||||
<tr class="hworkListRow" id="student_work_<%= exercise.id%>">
|
||||
<td class="pl5 pr5" style="width:28px; text-align:center;"><%=index + 1 %></td>
|
||||
<td class="pl5 pr5" style="text-align:center;"><%=index + 1 %></td>
|
||||
<td class="hworkPortrait pr10 float-none">
|
||||
<%= link_to(image_tag(url_to_avatar(exercise.user),:width =>"40",:height => "40",:style => "display:block;", :class => "mt15"),user_activities_path(exercise.user)) %>
|
||||
</td>
|
||||
|
@ -30,7 +31,7 @@
|
|||
<td class="hworkStID student_work_<%= exercise.id%> float-none" title="班级" id="student_class_<%= exercise.id%>" style="cursor:pointer;">
|
||||
--
|
||||
</td>
|
||||
<td width="200"> </td>
|
||||
<td width="230"> </td>
|
||||
<td class="hworkList130 c_grey">
|
||||
<% if exercise.created_at%>
|
||||
<%= Time.parse(format_time(exercise.created_at)).strftime("%m-%d %H:%M")%>
|
||||
|
|
|
@ -45,11 +45,15 @@
|
|||
<li>
|
||||
<a href="javascript:void(0);" class="menu_arrow" style="font-size:16px; color:#4b4b4b; font-weight: normal; padding-left: 0px;">作业</a>
|
||||
<ul style="max-height:240px; overflow-y:auto; overflow-x:hidden;">
|
||||
<% @homework_commons.each_with_index do |homework_common,index |%>
|
||||
<li class="pr10">
|
||||
<%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% if @homework_commons.empty? %>
|
||||
<li class="pr10" style="font-weight: normal; color: #888888; width: 120px; padding-left: 15px; padding-bottom: 5px;">目前尚未发布作业</li>
|
||||
<% else %>
|
||||
<% @homework_commons.each_with_index do |homework_common,index |%>
|
||||
<li class="pr10">
|
||||
<%= link_to "作业#{@homework_commons.count - index}:#{homework_common.name}",student_work_index_path(:homework => homework_common.id),:target=>"_blank"%>
|
||||
</li>
|
||||
<% end%>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -81,11 +81,6 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<!--<div class="homepagePostReplyBannerMore">-->
|
||||
<!--<%# if @reply_count > 2%>-->
|
||||
<!--<a# href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @memo.id%>" onclick="expand_reply('#reply_div_<%#= @memo.id %>','#reply_btn_<%#= @memo.id%>')" data-count="<%= @reply_count %>" data-init="0" >点击展开更多回复</a>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @memo.id %>">
|
||||
<% @replies.each_with_index do |reply,i| %>
|
||||
|
|
|
@ -71,11 +71,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="postDetailCreater">
|
||||
<% if @topic.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to @topic.author.show_name, user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
|
@ -114,11 +110,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= link_to reply.author.show_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
|
|
|
@ -103,11 +103,7 @@
|
|||
<div class="cl"></div>
|
||||
|
||||
<div class="postDetailCreater">
|
||||
<% if @topic.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to @topic.author.show_name, user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
|
||||
</div>
|
||||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
|
@ -127,11 +123,6 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<!-- <div class="homepagePostReplyBannerMore">
|
||||
<%# if @reply_count > 2%>
|
||||
<a href="javascript:void(0);" class="replyGrey" id="reply_btn_<%#= @topic.id%>" onclick="expand_reply('#reply_div_<%#= @topic.id %>','#reply_btn_<%#= @topic.id%>')" data-count="<%#= @reply_count %>" data-init="0" >点击展开更多回复</a>
|
||||
<%# end %>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="" id="reply_div_<%= @topic.id %>">
|
||||
<% @replies.each_with_index do |reply,i| %>
|
||||
|
@ -147,11 +138,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= link_to reply.author.show_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<%= link_to activity.author.show_name, user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.board.org_subfield.name.to_s+" | 帖子栏目讨论区",organization_path(activity.board.org_subfield.organization, :org_subfield_id => activity.board.org_subfield.id), :class => "newsBlue ml15 mr5"%>
|
||||
</div>
|
||||
|
@ -80,17 +76,7 @@
|
|||
<% count=activity.children.count%>
|
||||
<% end %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.author.show_name, user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.org_subfield.name.to_s+" | 帖子栏目通知", organization_path(activity.org_subfield.organization, :org_subfield_id => activity.org_subfield.id), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
|
||||
|
@ -60,22 +57,7 @@
|
|||
</div>
|
||||
<% count=activity.comments.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%= user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
|
|
|
@ -71,21 +71,8 @@
|
|||
<% count = document.children.count() %>
|
||||
|
||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=document.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<% if count > 3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%= document.id %>" onclick="expand_reply('#reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>',<%= document.id %>,'OrgDocumentComment',<%= document.id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => document, :user_activity_id => document.id} %>
|
||||
|
||||
<div class="homepagePostReplyContainer" id="reply_div_<%= document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>">
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments_for_doc}%>
|
||||
</div>
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
|
||||
|
@ -40,22 +37,7 @@
|
|||
</div>
|
||||
<% count=activity.comments.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<!--
|
||||
<table class="hwork-table-wrap" id="homework_table" onmouseenter="<%#= @homework.homework_type == 3 ? '' : 'resizeable_table(2,4,1,1)' %>">
|
||||
-->
|
||||
|
||||
<table class="hwork-table-wrap" id="homework_table">
|
||||
<table class="hwork-table-wrap" id="homework_table" onmouseenter="<%= @homework.homework_type == 3 ? '' : 'resizeable_table(2,4,1,1)' %>">
|
||||
<tr class="b_grey hworkH30">
|
||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
||||
<th class="hworkList50"> </th>
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<!--
|
||||
<table class="hwork-table-wrap" id="homework_table" onmouseenter="<%#= @homework.homework_type == 3 ? '' : 'resizeable_table(2,4,11,11)' %>">
|
||||
-->
|
||||
|
||||
<table class="hwork-table-wrap" id="homework_table">
|
||||
<table class="hwork-table-wrap" id="homework_table" onmouseenter="<%= @homework.homework_type == 3 ? '' : 'resizeable_table(2,4,11,11)' %>">
|
||||
<tr class="b_grey hworkH30">
|
||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
||||
<th class="hworkList50"> </th>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<li class="fl" >
|
||||
<span class="tit_fb">上交时间:</span>
|
||||
<%=format_time work.created_at %>
|
||||
<a href="javascript:void(0);" class="linkBlue mt5 mb5" style="margin-left:165px; width: 24px;" onclick="$('#about_hwork_<%= work.id%>').html('');">收起</a>
|
||||
</li>
|
||||
|
||||
<% if work.user == User.current && Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d") %>
|
||||
|
|
|
@ -118,12 +118,14 @@
|
|||
remote: true, class: "hworkExport resourcesGrey", :id => "download_homework_attachments" %>
|
||||
<% end%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||
</li>
|
||||
<% if @homework.anonymous_comment == 0 %>
|
||||
<li>
|
||||
<%= link_to("导出缺评情况", absence_penalty_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||
</li>
|
||||
<% end %>
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="hworkSetting resourcesGrey" onclick="set_score_rule();">评分设置</a>
|
||||
</li>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
$("#homework_student_work_list").html("<%= escape_javascript(render :partial => 'student_work/student_work_list') %>");
|
||||
$("#export_student_work").replaceWith("<%= escape_javascript( link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :group => @group, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => 'export_student_work') %>");
|
||||
/*
|
||||
$("th").each(function(){$(this).css("width",$(this).width()-1);});*/
|
||||
$("th").each(function(){$(this).css("width",$(this).width()-1);});
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
||||
<%= format_activity_day(comment.created_time) %> <%= format_time(comment.created_time, false) %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
|
|
|
@ -1,20 +1,9 @@
|
|||
<!--<span id="reply_praise_count_<%#=comment.id %>" class="orig_index">
|
||||
<%# if comment.user == User.current %>
|
||||
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%#= get_praise_num(comment) > 0 ? "(#{get_praise_num(comment)})" : "" %></span></span>
|
||||
<%# else %>
|
||||
<%#=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
<%# end %>
|
||||
</span>-->
|
||||
<div class="orig_user fl">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="orig_right fl">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "content-username" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "content-username" %>
|
||||
<% end %>
|
||||
<span class="orig_area"><%= time_from_now(comment.created_on) %></span>
|
||||
<div class="orig_content "><%= comment.notes.html_safe %></div>
|
||||
<%= link_to comment.user.show_name, user_path(comment.user_id), :class => "content-username" %>
|
||||
<span class="orig_area"><%= time_from_now(comment.created_on) %></span>
|
||||
<div class="orig_content "><%= comment.notes.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
|
@ -7,11 +7,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.user.show_name, user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden fl m_w505"> <!--+"(作业名称)"-->
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO
|
||||
<%= link_to activity.user.show_name, user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<% course=Course.find(activity.jour_id) %>
|
||||
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
|
@ -41,29 +38,18 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% count = fetch_user_leaveWord_reply(activity).count %>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %>
|
||||
<%# count = fetch_user_leaveWord_reply(activity).count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'JournalsForMessage',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/journal_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :allow_delete => allow_delete} %>
|
||||
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
<%= render :partial => 'users/journal_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :allow_delete => allow_delete, :activity_id =>activity.id}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id, :host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+" | 课程问答区", course_boards_path(activity.course,:host=> Setting.host_course), :class => "newsBlue ml15 mr5"%>
|
||||
</div>
|
||||
|
@ -89,22 +85,7 @@
|
|||
<% count=activity.children.count%>
|
||||
<% end %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count > 3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% activity= activity.parent ? activity.parent : activity%>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.course.name.to_s+" | 课程通知", course_news_index_path(activity.course), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
|
||||
|
@ -67,22 +64,7 @@
|
|||
</div>
|
||||
<% count=activity.comments.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
|
|
|
@ -12,11 +12,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= link_to comment.user.show_name, user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
</div>
|
||||
<% unless comment.m_parent_id.nil? %>
|
||||
|
@ -37,7 +33,7 @@
|
|||
<div class="orig_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
|
@ -45,7 +41,8 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth t_txt" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<%= comment.notes.html_safe %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||
<div>
|
||||
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment} %>
|
||||
</div>
|
|
@ -0,0 +1,85 @@
|
|||
<ul>
|
||||
<% comments.each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
</div>
|
||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents_no_root parents_rely, comment %>
|
||||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% if length <= 3 %>
|
||||
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
||||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div>
|
||||
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment, :type => comment.class),:remote=>true %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<% if comment.class == Journal %>
|
||||
<% if comment.details.any? %>
|
||||
<% details_to_strings(comment.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= comment.notes.html_safe %></P>
|
||||
<% else %>
|
||||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if allow_delete %>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -0,0 +1,18 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
<span>回复</span>
|
||||
<span class="reply_iconup" > ︿</span>
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>,<%=allow_delete %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -1,21 +1,6 @@
|
|||
<% count = activity.journals.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<% if count > 3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
|
|
|
@ -6,11 +6,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
|
||||
|
@ -88,18 +84,7 @@
|
|||
<% count=activity.children.count%>
|
||||
<% end %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(名称)"-->
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(名称)"-->
|
||||
<%= link_to activity.project.name.to_s+" | 新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word hidden fl m_w600"> <!--+"(通知标题)"-->
|
||||
|
@ -64,23 +61,8 @@
|
|||
</div>
|
||||
<% count=activity.comments.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
<span>回复</span>
|
||||
<span class="reply_iconup" > ︿</span>
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'<%=activity.class %>',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
|
@ -3,22 +3,36 @@
|
|||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="orig_textarea mb10 fl">
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="is_in_course" value=<%=@is_in_course %>>
|
||||
<input type="hidden" name="user_activity_id" value=<%=@user_activity_id %>>
|
||||
<input type="hidden" name="course_activity" value=<%=@course_activity %>>
|
||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
<% if @type == 'HomeworkCommon' %>
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="is_in_course" value=<%=@is_in_course %>>
|
||||
<input type="hidden" name="user_activity_id" value=<%=@user_activity_id %>>
|
||||
<input type="hidden" name="course_activity" value=<%=@course_activity %>>
|
||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
<% elsif @type == 'JournalsForMessage' %>
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => reply.id}, :method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => reply.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => reply.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => reply.id %>
|
||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>@user_activity_id %>
|
||||
<%= hidden_field_tag 'activity_id',params[:activity_id],:value =>@activity_id %>
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="user_notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged_reply" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% end %> <div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -86,7 +86,7 @@
|
|||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'JournalsForMessage' %>
|
||||
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
|
||||
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>1} %>
|
||||
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% when 'Blog'%>
|
||||
|
|
|
@ -6,11 +6,8 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if @ctivity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO <!--+"(课程名称)"-->
|
||||
<%= link_to activity.author.name.to_s+" | 博客", user_blogs_path(:user_id=>activity.author_id), :class => "newsBlue ml15" %>
|
||||
</div>
|
||||
<div class="homepagePostTitle break_word"> <!--+"(通知标题)"-->
|
||||
|
@ -46,22 +43,7 @@
|
|||
</div>
|
||||
<% count=activity.children.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'BlogComment',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id,:is_activity=>is_activity},
|
||||
{:controller => 'words', :action => 'destroy', :object_id => activity, :user_id => activity.user,:user_activity_id => user_activity_id, :activity_id => activity.id},
|
||||
:confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "postOptionLink", :title => l(:button_delete)) %>
|
||||
</li>
|
||||
|
@ -62,29 +62,17 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% count=fetch_user_leaveWord_reply(activity).count %>
|
||||
<% all_comments = []%>
|
||||
<% count=get_all_children(all_comments, activity).count %>
|
||||
<% allow_delete = (activity.user == User.current || User.current.admin?) %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
<span id="praise_count_<%=user_activity_id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'JournalsForMessage',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= render :partial => 'users/journal_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :allow_delete => allow_delete} %>
|
||||
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% all_comments = []%>
|
||||
<% comments = get_all_children(all_comments, activity)[0..2] %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
<%= render :partial => 'users/journal_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :allow_delete => allow_delete, :activity_id =>activity.id}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
@ -99,7 +87,6 @@
|
|||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
sd_create_editor_from_data(<%= jour.id%>, null, "100%", "<%=jour.class.to_s%>");
|
||||
});
|
||||
</script>
|
||||
<%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id,:is_activity=>0} %>
|
||||
<%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id} %>
|
||||
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
|
||||
<% end %>
|
||||
<%end%>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<% if params[:type] == 'HomeworkCommon' %>
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/homework_replies', :locals => {:comments => @journals, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id}) %>');
|
||||
<% elsif params[:type] == 'JournalsForMessage' %>
|
||||
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/journal_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>');
|
||||
<% else %>
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals}) %>');
|
||||
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>');
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
<% unless @comment.parent.nil? %>
|
||||
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>");
|
||||
<% if params[:type] == 'JournalsForMessage' && (@comment.jour_type == 'Principal' || @comment.jour_type == 'Course') %>
|
||||
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>");
|
||||
<% else %>
|
||||
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>");
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,8 +1,8 @@
|
|||
<% if @save_succ %>
|
||||
<% if @user_activity_id %>
|
||||
<% if @is_activity %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
|
||||
<% else %>
|
||||
<% if @activity.jour_type == 'Principal' %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% elsif @activity.jour_type == 'Course' %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% end %>
|
||||
//init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity");
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
<% elsif (['Principal','Project','Course', 'Bid', 'Contest', 'Softapplication','HomeworkCommon'].include? @journal_destroyed.jour_type)%>
|
||||
<% if @is_user%>
|
||||
<% if @activity %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id,:is_activity=>@is_activity}) %>");
|
||||
//init_activity_KindEditor_data('<%#= @user_activity_id%>', "", "87%", "UserActivity");
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
||||
sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity");
|
||||
<% else %>
|
||||
$("#user_activity_<%= @user_activity_id%>").hide();
|
||||
|
@ -20,7 +19,12 @@
|
|||
<% if @bid && @jours_count %>
|
||||
$('#jours_count').html("<%= @jours_count %>");
|
||||
<% elsif @course && @jours_count%>
|
||||
$('#course_jour_count').html("(<%= @jours_count %>)");
|
||||
<% if @user_activity_id %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_journalsformessage', :locals => {:activity => @activity,:user_activity_id =>@user_activity_id}) %>");
|
||||
sd_create_editor_from_data('<%= @user_activity_id%>', "", "100%", "UserActivity");
|
||||
<% else %>
|
||||
$('#course_jour_count').html("(<%= @jours_count %>)");
|
||||
<% end %>
|
||||
<% elsif @user && @jours_count%>
|
||||
$('#jour_count').html("<%= @jours_count %>");
|
||||
<% elsif @homework%>
|
||||
|
|
|
@ -1864,12 +1864,18 @@ zh:
|
|||
excel_nickname: 登录名
|
||||
excel_student_id: 学号
|
||||
excel_mail: 电子邮箱
|
||||
excel_rank: 排名
|
||||
excel_homework_name: 作品名
|
||||
excel_homework_des: 作品描述
|
||||
excel_homework_project: 关联项目
|
||||
excel_no_project: 无关联项目
|
||||
excel_group_member: 组员
|
||||
excel_t_score: 教师评分
|
||||
excel_ta_score: 教辅评分
|
||||
excel_n_score: 匿名评分
|
||||
excel_s_score: 系统评分
|
||||
excel_a_penalty: 缺评扣分
|
||||
excel_l_penalty: 迟交扣分
|
||||
excel_f_score: 成绩
|
||||
excel_commit_time: 提交时间
|
||||
excel_homework_score: 作业积分
|
||||
|
|
|
@ -1290,7 +1290,7 @@ function clear_data(k,mdu){
|
|||
}
|
||||
}
|
||||
|
||||
function expand_reply(container, btnid, id, type, div_id) {
|
||||
function expand_reply(container, btnid, id, type, div_id, allow_delete) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
|
@ -1300,7 +1300,8 @@ function expand_reply(container, btnid, id, type, div_id) {
|
|||
{
|
||||
type: type,
|
||||
id: id,
|
||||
div_id: div_id
|
||||
div_id: div_id,
|
||||
allow_delete: allow_delete
|
||||
},
|
||||
function(data) {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Created by ttang on 2016/5/24.
|
||||
*/
|
||||
/*$(document).ready(function(){
|
||||
$(document).ready(function(){
|
||||
$("th").each(function(){
|
||||
$(this).css("width",$(this).width()-1);
|
||||
});
|
||||
|
@ -38,7 +38,7 @@
|
|||
if (mousedown == true){
|
||||
var width = (tdWidth + (evt.screenX - screenXStart)) - p1 + "px";//计算后的新的宽度
|
||||
var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - p2 + "px";
|
||||
if (parseInt(width)<0 || parseInt(width2)<0 || tdWidth > totalWidth || tdWidth2 > totalWidth){
|
||||
if (parseInt(width)<5 || parseInt(width2)<5 || tdWidth > totalWidth || tdWidth2 > totalWidth){
|
||||
tartgetTd = null;
|
||||
resizeable = false;
|
||||
mousedown = false;
|
||||
|
@ -80,5 +80,4 @@
|
|||
element.addEventListener?element.addEventListener(type,listener,useCapture):element.attachEvent("on" + type,listener);
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
});
|
|
@ -109,7 +109,7 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
|
|||
|
||||
/*20160520作品列表table*/
|
||||
.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;}
|
||||
.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border-bottom:1px solid #e1e1e1;}
|
||||
.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border:1px solid #e1e1e1; text-align:center;}
|
||||
|
||||
/*作业信息*/
|
||||
.mt-2 {margin-top:-2px;}
|
||||
|
@ -1426,4 +1426,4 @@ a.pages-big{ width:50px;}
|
|||
.H60 {height:60px !important;}
|
||||
.W420 {width:420px;}
|
||||
.W300 {width:300px !important;}
|
||||
.W600{ width:600px;}
|
||||
.W600{ width:600px;}
|
||||
|
|
|
@ -1166,3 +1166,5 @@ a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px;
|
|||
|
||||
/*未登录回复提示*/
|
||||
.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
|
||||
|
||||
.reply_iconup{ position:absolute; top:21px; left:13px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
|
Loading…
Reference in New Issue