Merge branch 'develop' into dev_newproject
This commit is contained in:
commit
6ebaa1c90a
4
Gemfile
4
Gemfile
|
@ -50,10 +50,10 @@ gem 'elasticsearch-model'
|
||||||
gem 'elasticsearch-rails'
|
gem 'elasticsearch-rails'
|
||||||
|
|
||||||
#rails 3.2.22.2 bug
|
#rails 3.2.22.2 bug
|
||||||
# gem "test-unit", "~>3.0"
|
gem "test-unit", "~>3.0"
|
||||||
|
|
||||||
### profile
|
### profile
|
||||||
# gem 'oneapm_rpm'
|
gem 'oneapm_rpm'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'grape-swagger'
|
gem 'grape-swagger'
|
||||||
|
|
|
@ -175,8 +175,10 @@ class AdminController < ApplicationController
|
||||||
def courses
|
def courses
|
||||||
@name = params[:name].to_s.strip.downcase
|
@name = params[:name].to_s.strip.downcase
|
||||||
if @name && @name != ""
|
if @name && @name != ""
|
||||||
@courses = Course.select{ |course| course.teacher && ((course.teacher.show_name).include?(@name) || course.name.include?(@name))}
|
all_user_ids = Course.all.map{|course| course.tea_id}
|
||||||
@courses = @courses.sort{|x, y| y.created_at <=> x.created_at}
|
user_str_ids = search_user_by_name all_user_ids, @name
|
||||||
|
user_ids = user_str_ids.empty? ? "(-1)" : "(" + user_str_ids.join(",") + ")"
|
||||||
|
@courses = Course.where("tea_id in #{user_ids} or name like '%#{@name}%'").reorder("created_at desc")
|
||||||
else
|
else
|
||||||
@courses = Course.order('created_at desc')
|
@courses = Course.order('created_at desc')
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
|
|
||||||
include StudentWorkHelper
|
include StudentWorkHelper
|
||||||
before_filter :find_course, :only => [:index,:new,:create]
|
before_filter :find_course, :only => [:index,:new,:create]
|
||||||
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
|
before_filter :find_homework, :only => [:edit,:update,:alert_anonymous_comment,:start_anonymous_comment,:stop_anonymous_comment,:destroy,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works,:set_score_open,:alert_score_open_modal]
|
||||||
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
|
before_filter :teacher_of_course, :only => [:new, :create, :edit, :update, :destroy, :start_anonymous_comment, :stop_anonymous_comment, :alert_anonymous_comment,:start_evaluation_set,:set_evaluation_attr,:score_rule_set,:alert_forbidden_anonymous_comment,:alert_open_student_works,:open_student_works]
|
||||||
before_filter :member_of_course, :only => [:index]
|
before_filter :member_of_course, :only => [:index]
|
||||||
|
|
||||||
|
@ -198,6 +198,23 @@ class HomeworkCommonController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 成绩公开范围弹框
|
||||||
|
def alert_score_open_modal
|
||||||
|
if params[:user_activity_id]
|
||||||
|
@user_activity_id = params[:user_activity_id]
|
||||||
|
else
|
||||||
|
@user_activity_id = -1
|
||||||
|
end
|
||||||
|
@hw_status = params[:hw_status].to_i
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_score_open
|
||||||
|
@homework.update_attribute('score_open', params[:score_open].to_i)
|
||||||
|
@user_activity_id = params[:user_activity_id].to_i
|
||||||
|
@hw_status = params[:hw_status].to_i
|
||||||
|
@is_teacher = User.current.admin? || User.current.allowed_to?(:as_teacher, @course)
|
||||||
|
end
|
||||||
|
|
||||||
#开启匿评
|
#开启匿评
|
||||||
#statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限
|
#statue 1:启动成功,2:启动失败,作业总数大于等于2份时才能启动匿评,3:已开启匿评,请务重复开启,4:没有开启匿评的权限
|
||||||
def start_anonymous_comment
|
def start_anonymous_comment
|
||||||
|
@ -257,26 +274,25 @@ class HomeworkCommonController < ApplicationController
|
||||||
def stop_anonymous_comment
|
def stop_anonymous_comment
|
||||||
@homework_detail_manual.update_column('comment_status', 3)
|
@homework_detail_manual.update_column('comment_status', 3)
|
||||||
@homework_detail_manual.update_column('evaluation_end', Date.today)
|
@homework_detail_manual.update_column('evaluation_end', Date.today)
|
||||||
#计算缺评扣分
|
# 计算缺评扣分
|
||||||
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||||
if @homework.homework_type != 3
|
|
||||||
@homework.student_works.has_committed.each do |student_work|
|
# 参与匿评的缺评计算
|
||||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
@homework.student_works.where("work_status != 0").each do |student_work|
|
||||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
||||||
student_work.save
|
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
||||||
end
|
student_work.save
|
||||||
else
|
end
|
||||||
@homework.student_works.has_committed.each do |student_work|
|
|
||||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
# 未参与匿评的缺评计算
|
||||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
if @homework_detail_manual.no_anon_penalty == 0
|
||||||
student_work.save
|
all_dis_eva = StudentWorksEvaluationDistribution.where("student_work_id IN #{work_ids}")
|
||||||
pros = student_work.student_work_projects.where("is_leader = 0")
|
has_sw_count = all_dis_eva.select("distinct user_id").count
|
||||||
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
|
anon_count = all_dis_eva.count / has_sw_count
|
||||||
student_works = @homework.student_works.where("user_id in #{user_ids}")
|
@homework.student_works.where("work_status != 0").each do |student_work|
|
||||||
student_works.each do |st_work|
|
if student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count == 0
|
||||||
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
student_work.absence_penalty = @homework_detail_manual.absence_penalty * anon_count
|
||||||
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
|
student_work.save
|
||||||
st_work.save
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,17 +14,17 @@ class MemosController < ApplicationController
|
||||||
# layout 'base_memos'
|
# layout 'base_memos'
|
||||||
|
|
||||||
def quote
|
def quote
|
||||||
@subject = @memo.subject
|
# @subject = @memo.subject
|
||||||
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
|
# @subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
|
||||||
|
#
|
||||||
@content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> "
|
# @content = "#{ll(Setting.default_language, :text_user_wrote, @memo.author)} <br/> "
|
||||||
@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
# @content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n") + "</blockquote>\n\n<br/>"
|
||||||
@content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
# @content = "<blockquote style='word-break: break-all;word-wrap: break-word;'>" << @content
|
||||||
#@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> "
|
# #@content = "> #{ll(Setting.default_language, :text_user_wrote, @memo.author)}\n> "
|
||||||
#@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
# #@content << @memo.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
|
||||||
#@content_html = textilizable(@content)
|
# #@content_html = textilizable(@content)
|
||||||
@temp = Memo.new
|
# @temp = Memo.new
|
||||||
@temp.content = @content
|
# @temp.content = @content
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
@ -47,6 +47,8 @@ class MemosController < ApplicationController
|
||||||
@quote = params[:quote]
|
@quote = params[:quote]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#unless params[:quote].nil?
|
#unless params[:quote].nil?
|
||||||
# @quote = params[:quote][:quote]
|
# @quote = params[:quote][:quote]
|
||||||
#end
|
#end
|
||||||
|
@ -55,6 +57,10 @@ class MemosController < ApplicationController
|
||||||
@memo.forum_id = params[:forum_id]
|
@memo.forum_id = params[:forum_id]
|
||||||
@memo.author_id = User.current.id
|
@memo.author_id = User.current.id
|
||||||
|
|
||||||
|
if params[:memo][:parent_id]
|
||||||
|
@memo.root_id = (Memo.find params[:memo][:parent_id]).root_id.nil? ? params[:memo][:parent_id].to_i : (Memo.find params[:memo][:parent_id]).root_id
|
||||||
|
end
|
||||||
|
|
||||||
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
|
@memo.save_attachments(params[:attachments] || (params[:memo] && params[:memo][:uploads]))
|
||||||
@memo.content = @quote + @memo.content
|
@memo.content = @quote + @memo.content
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
@ -111,32 +117,37 @@ class MemosController < ApplicationController
|
||||||
@memo = @memo.root # 取出楼主,防止输入帖子id让回复作为主贴显示
|
@memo = @memo.root # 取出楼主,防止输入帖子id让回复作为主贴显示
|
||||||
@memo.update_column(:viewed_count, (@memo.viewed_count.to_i + 1))
|
@memo.update_column(:viewed_count, (@memo.viewed_count.to_i + 1))
|
||||||
|
|
||||||
page = params[:page]
|
# page = params[:page]
|
||||||
if params[:r] && page.nil?
|
# if params[:r] && page.nil?
|
||||||
offset = @memo.children.where("#{Memo.table_name}.id < ?", params[:r].to_i).count
|
# offset = @memo.children.where("#{Memo.table_name}.id < ?", params[:r].to_i).count
|
||||||
page = 1 + offset / pre_count
|
# page = 1 + offset / pre_count
|
||||||
else
|
# else
|
||||||
|
# end
|
||||||
|
|
||||||
end
|
# @reply_count = @memo.children.count
|
||||||
@reply_count = @memo.children.count
|
# @reply_pages = Paginator.new @reply_count, pre_count, page
|
||||||
@reply_pages = Paginator.new @reply_count, pre_count, page
|
# @replies = @memo.children.
|
||||||
@replies = @memo.children.
|
# includes(:author, :attachments).
|
||||||
includes(:author, :attachments).
|
# reorder("#{Memo.table_name}.created_at DESC").
|
||||||
reorder("#{Memo.table_name}.created_at DESC").
|
# limit(@reply_pages.per_page).
|
||||||
limit(@reply_pages.per_page).
|
# offset(@reply_pages.offset).
|
||||||
offset(@reply_pages.offset).
|
# all
|
||||||
all
|
|
||||||
|
@replies = Memo.where("root_id = #{@memo.id}").reorder("created_at desc")
|
||||||
|
@reply_count = @replies.count
|
||||||
|
@replies = get_no_children_comments_all @replies
|
||||||
|
@limit_count = @replies.count
|
||||||
|
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||||
|
@limit = 10
|
||||||
|
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||||
|
|
||||||
@memo_new = Memo.new
|
@memo_new = Memo.new
|
||||||
|
|
||||||
@my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count
|
@my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count
|
||||||
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count
|
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count
|
||||||
# @memo = Memo.find_by_id(params[:id])
|
|
||||||
# @forum = Forum.find(params[:forum_id])
|
|
||||||
# @replies = @memo.replies
|
|
||||||
# @mome_new = Memo.new
|
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
format.html {render :layout=> 'base_forums'}#:layout=> 'base_forums',
|
format.html {render :layout=> 'base_forums'}#:layout=> 'base_forums',
|
||||||
format.json { render json: @memo }
|
format.json { render json: @memo }
|
||||||
format.xml { render xml: @memo }
|
format.xml { render xml: @memo }
|
||||||
|
|
|
@ -270,6 +270,7 @@ class PollController < ApplicationController
|
||||||
|
|
||||||
#发布问卷
|
#发布问卷
|
||||||
def publish_poll
|
def publish_poll
|
||||||
|
@index = params[:index]
|
||||||
@poll.polls_status = 2
|
@poll.polls_status = 2
|
||||||
@poll.published_at = Time.now
|
@poll.published_at = Time.now
|
||||||
@poll.show_result = params[:show_result].to_i if params[:show_result]
|
@poll.show_result = params[:show_result].to_i if params[:show_result]
|
||||||
|
@ -508,6 +509,7 @@ class PollController < ApplicationController
|
||||||
|
|
||||||
#重新发布问卷
|
#重新发布问卷
|
||||||
def republish_poll
|
def republish_poll
|
||||||
|
@index = params[:index]
|
||||||
@poll.poll_questions.each do |poll_question|
|
@poll.poll_questions.each do |poll_question|
|
||||||
poll_question.poll_votes.destroy_all
|
poll_question.poll_votes.destroy_all
|
||||||
end
|
end
|
||||||
|
@ -530,6 +532,7 @@ class PollController < ApplicationController
|
||||||
|
|
||||||
#关闭问卷
|
#关闭问卷
|
||||||
def close_poll
|
def close_poll
|
||||||
|
@index = params[:index]
|
||||||
@poll.polls_status = 3
|
@poll.polls_status = 3
|
||||||
@poll.closed_at = Time.now
|
@poll.closed_at = Time.now
|
||||||
if @poll.save
|
if @poll.save
|
||||||
|
|
|
@ -543,12 +543,12 @@ class ProjectsController < ApplicationController
|
||||||
@users -= watched.watcher_users if @watched
|
@users -= watched.watcher_users if @watched
|
||||||
end
|
end
|
||||||
@watchers = @project.watcher_users
|
@watchers = @project.watcher_users
|
||||||
@limit = 20
|
@limit = 32
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@watchers_count = @watchers.count
|
@watchers_count = @watchers.count
|
||||||
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
|
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
|
||||||
@offset ||= @watcher_pages.offset
|
@offset ||= @watcher_pages.offset
|
||||||
@watchers = paginateHelper @watchers, 20
|
@watchers = paginateHelper @watchers, @limit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -611,14 +611,14 @@ class ProjectsController < ApplicationController
|
||||||
@applied_members = appied_project_members(@project, @members)
|
@applied_members = appied_project_members(@project, @members)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@members = paginateHelper @members
|
@members = paginateHelper @members, 32
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def member_forked
|
def member_forked
|
||||||
@forked_projects = Project.where(:forked_from_project_id => @project.id)
|
@forked_projects = Project.where(:forked_from_project_id => @project.id)
|
||||||
|
|
||||||
@limit = 20
|
@limit = 32
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@forked_count = @forked_projects.count
|
@forked_count = @forked_projects.count
|
||||||
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1
|
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1
|
||||||
|
|
|
@ -38,12 +38,12 @@ class PullRequestsController < ApplicationController
|
||||||
@requests_merged_count = merge_requests.select{|request| request.state == "merged"}.count
|
@requests_merged_count = merge_requests.select{|request| request.state == "merged"}.count
|
||||||
@requests_closed_count = merge_requests.select{|request| request.state == "closed"}.count
|
@requests_closed_count = merge_requests.select{|request| request.state == "closed"}.count
|
||||||
|
|
||||||
@limit = 10
|
@limit = 20
|
||||||
@is_remote = true
|
@is_remote = true
|
||||||
@count = type_count(type, @requests_opened_count, @requests_merged_count, @requests_closed_count)
|
@count = type_count(type, @requests_opened_count, @requests_merged_count, @requests_closed_count)
|
||||||
@pages = Paginator.new @count, @limit, params['page'] || 1
|
@pages = Paginator.new @count, @limit, params['page'] || 1
|
||||||
@offset ||= @pages.offset
|
@offset ||= @pages.offset
|
||||||
@requests = paginateHelper @requests, 10
|
@requests = paginateHelper @requests, 20
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.js
|
format.js
|
||||||
|
@ -101,16 +101,16 @@ class PullRequestsController < ApplicationController
|
||||||
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
|
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch, :target_project_id => target_project_id)
|
||||||
@fork_project_name = Project.find(params[:target_project_id]).try(:name)
|
@fork_project_name = Project.find(params[:target_project_id]).try(:name)
|
||||||
@fork_pr_message = true if @fork_project_name
|
@fork_pr_message = true if @fork_project_name
|
||||||
# 发送消息
|
# 向管理员发送消息
|
||||||
#send_message(User.current.id, target_project_id, title)
|
send_message_to_manager(params[:target_project_id].to_i, request.id, 1)
|
||||||
# 创建Trustie数据
|
PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => target_project_id, :title => title)
|
||||||
#PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => target_project_id)
|
|
||||||
else
|
else
|
||||||
|
@project_member = Member.where(:project_id => @project.id)
|
||||||
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)
|
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)
|
||||||
# 发送消息
|
# 发送消息
|
||||||
#send_message(User.current.id, @project.id, title)
|
send_message_to_manager(@project.id, request.id, 1)
|
||||||
# 创建Trustie数据
|
# 创建Trustie数据
|
||||||
#PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => @project.id)
|
PullRequest.create(:pull_request_id => request.id, :user_id => User.current.id, :status => 1, :project_id => @project.id, :title => title)
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js{redirect_to project_pull_request_path(request.id, :project_id => @project.id)}
|
format.js{redirect_to project_pull_request_path(request.id, :project_id => @project.id)}
|
||||||
end
|
end
|
||||||
|
@ -189,7 +189,9 @@ class PullRequestsController < ApplicationController
|
||||||
def accept_pull_request
|
def accept_pull_request
|
||||||
begin
|
begin
|
||||||
status = @g.accept_merge_rquest(@project.gpid, params[:id], User.current.gid)
|
status = @g.accept_merge_rquest(@project.gpid, params[:id], User.current.gid)
|
||||||
PullRequest.create(:pull_request_id => status.id, :user_id => User.current.id, :gpid => status.project_id)
|
# 接受后,给用户发消息
|
||||||
|
send_message_to_author(@project.id, status.author.try(:username), params[:id], 2)
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js{redirect_to project_pull_request_path(status.id, :project_id => @project.id)}
|
format.js{redirect_to project_pull_request_path(status.id, :project_id => @project.id)}
|
||||||
end
|
end
|
||||||
|
@ -214,7 +216,13 @@ class PullRequestsController < ApplicationController
|
||||||
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
||||||
def update_pull_request
|
def update_pull_request
|
||||||
begin
|
begin
|
||||||
@g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
|
request = @g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
|
||||||
|
user = User.find_by_login(request.author.try(:username))
|
||||||
|
status = params[:state] == "close" ? 4 : 3
|
||||||
|
send_message_to_manager(@project.id, params[:id], status)
|
||||||
|
if is_project_manager?(User.current.id, @project.id)
|
||||||
|
send_message_to_author(@project.id, user.login, request.id, status)
|
||||||
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
|
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
|
||||||
end
|
end
|
||||||
|
@ -320,8 +328,31 @@ class PullRequestsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_message user_id, project_id, title
|
def send_message_to_manager project_id, pull_request_id, status
|
||||||
self.forge_acts << ForgeMessage.new(:user_id => user_id, :project_id => project_id, :title => title)
|
project = Project.find(project_id)
|
||||||
|
project.members.each do |member|
|
||||||
|
if is_project_manager?(member.user_id, project_id) && User.current.id != member.user_id
|
||||||
|
add_message(member.user_id, project_id, pull_request_id, status)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def send_message_to_author(project_id, user_login, request_id, status)
|
||||||
|
user = get_user_by_login_and(user_login)
|
||||||
|
if user.id != User.current.id
|
||||||
|
add_message(user.id, project_id, request_id, status)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def add_message(user_id, project_id, pull_request_id, status)
|
||||||
|
ForgeMessage.create(:user_id => user_id,
|
||||||
|
:project_id => project_id,
|
||||||
|
:forge_message_id => pull_request_id,
|
||||||
|
:forge_message_type => "PullRequest",
|
||||||
|
:viewed => true,
|
||||||
|
:status => status,
|
||||||
|
:operate_user_id => User.current.id,
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def authorize_logged
|
def authorize_logged
|
||||||
|
|
|
@ -430,29 +430,21 @@ update
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 注:由于考虑到性能所以commits api每次返回20条记录
|
||||||
def changes
|
def changes
|
||||||
# 顶部导航
|
# 顶部导航
|
||||||
@project_menu_type = 5
|
@project_menu_type = 5
|
||||||
|
|
||||||
@entry = @repository.entry(@path, @rev)
|
@entry = @repository.entry(@path, @rev)
|
||||||
(show_error_not_found; return) unless @entry
|
(show_error_not_found; return) unless @entry
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
limit = 20
|
limit = 10
|
||||||
#每次页面的换回值从1开始,但是gitlab的页面查询是从0开始,所以先改变page的类型减一在改回来
|
# 每次页面的换回值从1开始,但是gitlab的页面查询是从0开始,所以先改变page的类型减一在改回来
|
||||||
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s, ref_name:@rev)
|
@commits = g.commits(@project.gpid, page:(params[:page].to_i - 1).to_s, ref_name:@rev)
|
||||||
|
@commits_count = params[:commit_count].nil? ? @g.user_static(@project.gpid, :rev => @rev).count : params[:commit_count].to_i
|
||||||
|
@commits_pages = Paginator.new @commits_count, limit, params[:page]
|
||||||
|
# @offset ||= @commits_pages.offset
|
||||||
|
# @commits = paginateHelper @commits, limit
|
||||||
|
|
||||||
#add by hx
|
|
||||||
#rep_count = commit_count(@project)
|
|
||||||
|
|
||||||
#页面传递必须要str类型,但是Paginator的初始化必须要num类型,需要类型转化
|
|
||||||
@commits_count = params[:commit_count].to_i
|
|
||||||
@commits_pages = Redmine::Pagination::Paginator.new @commits_count,limit,params[:page]
|
|
||||||
|
|
||||||
@commit = g.commit(@project.gpid,@rev)
|
|
||||||
# @changesets = g.get ("/projects/#{@project.gpid}/repository/commits?#{@rev}")
|
|
||||||
#@changesets = @repository.latest_changesets(@path, @rev, Setting.repository_log_display_limit.to_i)
|
|
||||||
@properties = @repository.properties(@path, @rev)
|
|
||||||
@changeset = @repository.find_changeset_by_name(@rev)
|
|
||||||
render :layout => 'base_projects'
|
render :layout => 'base_projects'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -691,7 +691,11 @@ class StudentWorkController < ApplicationController
|
||||||
def show
|
def show
|
||||||
@score = student_work_score @work,User.current
|
@score = student_work_score @work,User.current
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||||
@student_work_scores = student_work_score_record(@work)
|
if @homework.homework_detail_manual.comment_status == 2 && !@is_teacher && @work.user != User.current
|
||||||
|
@student_work_scores = @work.student_works_scores.where("user_id = #{User.current.id} and reviewer_role = 3").order("updated_at desc")
|
||||||
|
else
|
||||||
|
@student_work_scores = student_work_score_record(@work)
|
||||||
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -867,6 +871,7 @@ class StudentWorkController < ApplicationController
|
||||||
@score = StudentWorksScore.find params[:score_id]
|
@score = StudentWorksScore.find params[:score_id]
|
||||||
@is_last = params[:is_last] == "true"
|
@is_last = params[:is_last] == "true"
|
||||||
@jour = @score.journals_for_messages.new(:user_id => User.current.id,:notes =>params[:message], :reply_id => 0)
|
@jour = @score.journals_for_messages.new(:user_id => User.current.id,:notes =>params[:message], :reply_id => 0)
|
||||||
|
@show_real_name = User.current.allowed_to?(:as_teacher, @score.student_work.homework_common.course) || User.current.admin? || @score.reviewer_role != 3 || @jour.user == User.current
|
||||||
if @jour.save
|
if @jour.save
|
||||||
@status = 1
|
@status = 1
|
||||||
else
|
else
|
||||||
|
@ -982,33 +987,38 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:absence_penalty] && homework_detail_manual.absence_penalty.to_s != params[:absence_penalty].to_s
|
no_anon_penalty = params[:no_anon_penalty] ? 1 : 0
|
||||||
homework_detail_manual.absence_penalty = params[:absence_penalty]
|
if no_anon_penalty != homework_detail_manual.no_anon_penalty
|
||||||
|
homework_detail_manual.no_anon_penalty = no_anon_penalty
|
||||||
if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
|
if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
|
||||||
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||||
if @homework.homework_type != 3
|
all_dis_eva = StudentWorksEvaluationDistribution.where("student_work_id IN #{work_ids}")
|
||||||
@homework.student_works.has_committed.each do |student_work|
|
has_sw_count = all_dis_eva.select("distinct user_id").count
|
||||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
anon_count = all_dis_eva.count / has_sw_count
|
||||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
|
@homework.student_works.where("work_status != 0").each do |student_work|
|
||||||
student_work.save
|
if student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count == 0
|
||||||
end
|
if no_anon_penalty == 0
|
||||||
else
|
student_work.absence_penalty = homework_detail_manual.absence_penalty * anon_count
|
||||||
@homework.student_works.has_committed.each do |student_work|
|
else
|
||||||
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
student_work.absence_penalty = 0
|
||||||
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
|
|
||||||
student_work.save
|
|
||||||
pros = student_work.student_work_projects.where("is_leader = 0")
|
|
||||||
user_ids = pros.empty? ? "(-1)" : "(" + pros.map{|stu|stu.user_id}.join(",") + ")"
|
|
||||||
student_works = @homework.student_works.where("user_id in #{user_ids}")
|
|
||||||
student_works.each do |st_work|
|
|
||||||
absence_penalty_count = st_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - st_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
|
||||||
st_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
|
|
||||||
st_work.save
|
|
||||||
end
|
end
|
||||||
|
student_work.save
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
homework_detail_manual.save if homework_detail_manual
|
||||||
|
end
|
||||||
|
|
||||||
|
if (params[:absence_penalty] && homework_detail_manual.absence_penalty.to_s != params[:absence_penalty].to_s)
|
||||||
|
homework_detail_manual.absence_penalty = params[:absence_penalty]
|
||||||
|
if homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
|
||||||
|
work_ids = "(" + @homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||||
|
@homework.student_works.where("work_status != 0").each do |student_work|
|
||||||
|
absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids} and reviewer_role = 3").count
|
||||||
|
student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * homework_detail_manual.absence_penalty : 0
|
||||||
|
student_work.save
|
||||||
|
end
|
||||||
|
end
|
||||||
homework_detail_manual.save if homework_detail_manual
|
homework_detail_manual.save if homework_detail_manual
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -164,6 +164,8 @@ class UsersController < ApplicationController
|
||||||
@comment = Comment.find params[:comment].to_i
|
@comment = Comment.find params[:comment].to_i
|
||||||
when 'Journal','is_project_issue'
|
when 'Journal','is_project_issue'
|
||||||
@comment = Journal.find params[:comment].to_i
|
@comment = Journal.find params[:comment].to_i
|
||||||
|
when 'Memo'
|
||||||
|
@comment = Memo.find params[:comment].to_i
|
||||||
end
|
end
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@parent_id = params[:parent_id] if params[:parent_id]
|
@parent_id = params[:parent_id] if params[:parent_id]
|
||||||
|
@ -308,6 +310,15 @@ class UsersController < ApplicationController
|
||||||
@root.update_column('updated_at', Time.now)
|
@root.update_column('updated_at', Time.now)
|
||||||
@count = @root.journals_for_messages.count
|
@count = @root.journals_for_messages.count
|
||||||
@comments = @root.journals_for_messages.reorder("created_on desc").limit(3)
|
@comments = @root.journals_for_messages.reorder("created_on desc").limit(3)
|
||||||
|
when 'Memo'
|
||||||
|
@root = reply.root
|
||||||
|
comment = Memo.new
|
||||||
|
comment.author = User.current
|
||||||
|
comment.forum = reply.forum
|
||||||
|
comment.content = params[:reply_message]
|
||||||
|
comment.subject = "#{@root.subject}"
|
||||||
|
comment.root_id = reply.root_id
|
||||||
|
reply.children << comment
|
||||||
end
|
end
|
||||||
update_course_activity(@root.class.to_s,@root.id)
|
update_course_activity(@root.class.to_s,@root.id)
|
||||||
update_user_activity(@root.class.to_s,@root.id)
|
update_user_activity(@root.class.to_s,@root.id)
|
||||||
|
|
|
@ -2855,18 +2855,18 @@ module ApplicationHelper
|
||||||
#获取匿评相关连接代码
|
#获取匿评相关连接代码
|
||||||
def homework_anonymous_comment (homework, hw_status, user_activity_id = -1)
|
def homework_anonymous_comment (homework, hw_status, user_activity_id = -1)
|
||||||
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
link = link_to "启动匿评","javascript:void(0)", :class => "wpostOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||||
elsif homework.student_works.has_committed.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
elsif homework.student_works.has_committed.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
||||||
case homework.homework_detail_manual.comment_status
|
case homework.homework_detail_manual.comment_status
|
||||||
when 1
|
when 1
|
||||||
link = link_to '启动匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink'
|
link = link_to '启动匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'wpostOptionLink'
|
||||||
when 2
|
when 2
|
||||||
link = link_to '关闭匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'postOptionLink'
|
link = link_to '关闭匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?hw_status=" + hw_status.to_s + "&user_activity_id=" + user_activity_id.to_s, id: "#{homework.id}_stop_anonymous_comment", remote: true,:class => 'wpostOptionLink'
|
||||||
when 3
|
when 3
|
||||||
# link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
|
# link = link_to "匿评结束","javascript:void(0)", :class => "postOptionLink", :title => "匿评结束"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "学生提交作业数大于等于2时才可以启动匿评"
|
link = link_to "启动匿评","javascript:void(0)", :class => "wpostOptionLink", :title => "学生提交作业数大于等于2时才可以启动匿评"
|
||||||
end
|
end
|
||||||
link
|
link
|
||||||
end
|
end
|
||||||
|
@ -3422,6 +3422,8 @@ def get_reply_by_type type, reply_id
|
||||||
reply = Journal.find reply_id
|
reply = Journal.find reply_id
|
||||||
when 'Syllabus'
|
when 'Syllabus'
|
||||||
reply = JournalsForMessage.find reply_id
|
reply = JournalsForMessage.find reply_id
|
||||||
|
when 'Memo'
|
||||||
|
reply = Memo.find reply_id
|
||||||
end
|
end
|
||||||
reply
|
reply
|
||||||
end
|
end
|
||||||
|
|
|
@ -90,6 +90,20 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# 获取pullrequest消息状态
|
||||||
|
def pull_request_message_status ma
|
||||||
|
case ma.status
|
||||||
|
when 1
|
||||||
|
"创建了PullRequest:"
|
||||||
|
when 2
|
||||||
|
"接受了PullRequest:"
|
||||||
|
when 3
|
||||||
|
"重新打开了PullRequest:"
|
||||||
|
when 4
|
||||||
|
"关闭了PullRequest:"
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
# 判断当前用户能否对消息进行操作
|
# 判断当前用户能否对消息进行操作
|
||||||
def allow_to_show applied_message
|
def allow_to_show applied_message
|
||||||
(User.current.id == applied_message.user_id && applied_message.status == 1) ? true : false
|
(User.current.id == applied_message.user_id && applied_message.status == 1) ? true : false
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class ForgeMessage < ActiveRecord::Base
|
class ForgeMessage < ActiveRecord::Base
|
||||||
# status在不同的类中,作用不同
|
# status在不同的类中,作用不同
|
||||||
# Isseu: satus nil:发布了缺陷;:1:缺陷计划完成日志到了提醒
|
# Isseu: satus nil:发布了缺陷;:1:缺陷计划完成日志到了提醒
|
||||||
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status
|
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status, :operate_user_id
|
||||||
|
|
||||||
belongs_to :forge_message ,:polymorphic => true
|
belongs_to :forge_message ,:polymorphic => true
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#手动评分作业表
|
#手动评分作业表
|
||||||
#comment_status: 1:未开启匿评,2:开启匿评,3:匿评结束
|
#comment_status: 1:未开启匿评,2:开启匿评,3:匿评结束
|
||||||
class HomeworkDetailManual < ActiveRecord::Base
|
class HomeworkDetailManual < ActiveRecord::Base
|
||||||
attr_accessible :ta_proportion, :comment_status, :evaluation_start, :evaluation_end, :evaluation_num, :absence_penalty, :homework_common_id
|
attr_accessible :ta_proportion, :comment_status, :evaluation_start, :evaluation_end, :evaluation_num, :absence_penalty, :homework_common_id, :no_anon_penalty
|
||||||
|
|
||||||
belongs_to :homework_common
|
belongs_to :homework_common
|
||||||
end
|
end
|
||||||
|
|
|
@ -79,7 +79,8 @@ class Memo < ActiveRecord::Base
|
||||||
"lock",
|
"lock",
|
||||||
"sticky",
|
"sticky",
|
||||||
"parent_id",
|
"parent_id",
|
||||||
"replies_count"
|
"replies_count",
|
||||||
|
"root_id"
|
||||||
|
|
||||||
after_create :add_author_as_watcher, :reset_counters!, :send_message,:create_memo_ealasticsearch_index
|
after_create :add_author_as_watcher, :reset_counters!, :send_message,:create_memo_ealasticsearch_index
|
||||||
after_update :update_memo_ealasticsearch_index
|
after_update :update_memo_ealasticsearch_index
|
||||||
|
@ -126,6 +127,18 @@ class Memo < ActiveRecord::Base
|
||||||
Mailer.run.forum_message_added(self) if Setting.notified_events.include?('forum_message_added')
|
Mailer.run.forum_message_added(self) if Setting.notified_events.include?('forum_message_added')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def creator_user
|
||||||
|
self.author
|
||||||
|
end
|
||||||
|
|
||||||
|
def created_time
|
||||||
|
self.created_on
|
||||||
|
end
|
||||||
|
|
||||||
|
def content_detail
|
||||||
|
self.content
|
||||||
|
end
|
||||||
|
|
||||||
# 公共贴吧消息记录
|
# 公共贴吧消息记录
|
||||||
# 原则:贴吧创始人;发帖人,wanglingchun(特殊用户)
|
# 原则:贴吧创始人;发帖人,wanglingchun(特殊用户)
|
||||||
def send_message
|
def send_message
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
class ProfessionalLevel < ActiveRecord::Base
|
||||||
|
attr_accessible :level
|
||||||
|
end
|
|
@ -1,6 +1,6 @@
|
||||||
class PullRequest < ActiveRecord::Base
|
class PullRequest < ActiveRecord::Base
|
||||||
# status 1:创建 2:接受 3:重新打开 4:关闭
|
# status 1:创建 2:接受 3:重新打开 4:关闭
|
||||||
attr_accessible :gpid, :pull_request_id, :user_id, :status
|
attr_accessible :gpid, :pull_request_id, :user_id, :project_id, :title
|
||||||
validates_uniqueness_of :pull_request_id
|
validates_uniqueness_of :pull_request_id
|
||||||
|
|
||||||
has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy
|
has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<% unless contributor_course_scor(course.id).count == 0 %>
|
<% count = contributor_course_scor(course.id).select{|ccs| ccs.con_score != 0 && !ccs.con_score.nil?}.count %>
|
||||||
|
<% unless count == 0 %>
|
||||||
<div>
|
<div>
|
||||||
<ul class="rankList">
|
<ul class="rankList">
|
||||||
<h3 style="font-size: 14px; font-weight: normal;">
|
<h3 style="font-size: 14px; font-weight: normal;">
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
<div class="ping_disfoot f14">
|
<div class="ping_disfoot f14">
|
||||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||||
|
|
||||||
<span id="reply_praise_count_<%=journal.id %>">
|
<span class="reply_praise_count_<%=journal.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if reply_allow %>
|
<% if reply_allow %>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
hideModal();
|
hideModal();
|
||||||
$("#member_li_<%=params[:member_id] %>").html("");
|
var all_indexes = $("#member_li_<%=params[:member_id] %>").nextAll().find("td:first-child");
|
||||||
|
for(var i = 0; i < all_indexes.length; i++){
|
||||||
|
$(all_indexes[i]).html(parseInt($(all_indexes[i]).html()) - 1);
|
||||||
|
}
|
||||||
|
$("#member_li_<%=params[:member_id] %>").remove();
|
||||||
$("#st_groups").html("<%=escape_javascript(render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups}) %>");
|
$("#st_groups").html("<%=escape_javascript(render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups}) %>");
|
||||||
$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>");
|
$("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>");
|
||||||
$("#student_number").html("<%= studentCount(@course) %>");
|
$("#student_number").html("<%= studentCount(@course) %>");
|
||||||
|
|
|
@ -1,20 +1,8 @@
|
||||||
<div class="sy_class_r sy_class_nobg fr ml10">
|
<div class="sy_class_r sy_class_nobg fr ml10">
|
||||||
<div class="sy_class_r_head mb10">
|
<div class="sy_class_r_head mb10">
|
||||||
<h3>学生列表(<%=@group.name %>)</h3>
|
<h3 class="fl">学生列表(<%=@group.name %>)</h3>
|
||||||
<div class="hw_more_box">
|
<%= link_to "导出成绩", export_course_member_excel_course_path(@course,:group_id => @group.id ,:format => 'xls'), :class => 'link-blue fr mt5'%>
|
||||||
<ul>
|
<div class="cl"></div>
|
||||||
<li class="hw_more_icons">
|
|
||||||
<ul class="hw_more_txt">
|
|
||||||
<li><%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:group_id => @group.id ,:format => 'xls'), :class => 'hw_more_li'%></li>
|
|
||||||
<% if @canShowCode %>
|
|
||||||
<li>
|
|
||||||
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab => 'member'}, :class => 'hw_more_li' %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sy_class_fenban clear">
|
<div class="sy_class_fenban clear">
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||||
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab => 'member'}, :class => 'link-blue ml10 fr mt5' %>
|
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab => 'member'}, :class => 'link-blue ml10 fr mt5' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'), :class => 'link-blue fr mt5'%>
|
<%= link_to "导出成绩", export_course_member_excel_course_path(@course,:format => 'xls'), :class => 'link-blue fr mt5'%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<%= render :partial => 'course_student', :locals => {:members => @members} %>
|
<%= render :partial => 'course_student', :locals => {:members => @members} %>
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<span class="c_grey fl mr15">测试时长:<%= exercise.time.nil? || exercise.time == -1 ? '不限' : exercise.time.to_s + "分钟" %></span>
|
<span class="c_grey fl mr15">测试时长:<%= exercise.time.nil? || exercise.time == -1 ? '不限' : exercise.time.to_s + "分钟" %></span>
|
||||||
<span class="c_grey fl mr15">截止时间:<%= exercise.end_time.nil? ? '未设置' : format_time(exercise.end_time) %></span>
|
<span class="c_grey fl mr15">截止时间:<%= exercise.end_time.nil? ? '未设置' : format_time(exercise.end_time) %></span>
|
||||||
<span class="c_grey fl mr15">发布时间:<%= exercise.publish_time.nil? ? '未设置' : format_time(exercise.publish_time) %></span>
|
<span class="c_grey fl mr15">发布时间:<%= exercise.publish_time.nil? ? '未设置' : format_time(exercise.publish_time) %></span>
|
||||||
<% if @is_teacher && exercise.exercise_status > 1 %>
|
<% if exercise.exercise_status > 1 %>
|
||||||
<span class="c_grey fl mr15">已提交:<span class="c_blue"><%= exercise.exercise_users.where("commit_status = 1").count %></span></span>
|
<span class="c_grey fl mr15">已提交:<span class="c_blue"><%= exercise.exercise_users.where("commit_status = 1").count %></span></span>
|
||||||
<span class="c_grey fl mr15">未提交:<span class="c_blue"><%= exercise.course.student.count - exercise.exercise_users.where("commit_status = 1").count %></span></span>
|
<span class="c_grey fl mr15">未提交:<span class="c_blue"><%= exercise.course.student.count - exercise.exercise_users.where("commit_status = 1").count %></span></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -94,6 +94,7 @@
|
||||||
<%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%>
|
<%= render :partial => "files/tag_yun_project", :locals => {:tag_list => @tag_list,:project => @project, :tag_name => @tag_name}%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
<% if @tip_all_attachments > 0 %>
|
||||||
<div class="re_con_top">
|
<div class="re_con_top">
|
||||||
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
|
<p class="f_l fontBlue f_b f_14" id="tip_attachment_count">
|
||||||
<%= render :partial => "files/tip_attachment_count" %>
|
<%= render :partial => "files/tip_attachment_count" %>
|
||||||
|
@ -124,5 +125,8 @@
|
||||||
<div id="course_list">
|
<div id="course_list">
|
||||||
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
|
<%= render :partial => 'project_list',:locals => {project: @project, all_attachments: @all_attachments, sort:@sort, order:@order, project_attachments:@obj_attachments} %>
|
||||||
</div>
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "projects/no_data" %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<%# html_title(l(:label_attachment_plural)) -%>
|
<%# html_title(l(:label_attachment_plural)) -%>
|
|
@ -18,7 +18,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="postDetailReply fr">
|
<div class="postDetailReply fr">
|
||||||
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
|
<a href="<%= forum_memo_path(topic.forum, topic)%>" class="postReplyIcon mr5" target="_blank"></a>
|
||||||
<%= link_to (topic.replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
|
<% replies_count = Memo.where("root_id = #{topic.id}").count %>
|
||||||
|
<%= link_to (replies_count), forum_memo_path(topic.forum, topic),:target =>'_blank',:class=>'linkGrey2' %>
|
||||||
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
|
<a href="javascript:void(0);" class="linkGrey2 disablePostLikeIcon ml10" style="cursor: default" title="点赞人数" > <%= get_praise_num(topic)%></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
<div id="muban_popup_box" style="width:400px;">
|
||||||
|
<div class="muban_popup_top">
|
||||||
|
<h3 class="fl">成绩公开范围</h3>
|
||||||
|
<a href="javascript:void(0);" class="muban_icons_close fr"></a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<%= form_for('new_form',:url =>{:controller => 'homework_common',:action => 'set_score_open',:id => @homework.id,:user_activity_id => @user_activity_id, :hw_status => @hw_status},
|
||||||
|
:method => "post", :remote => true) do |f|%>
|
||||||
|
<div class="muban_popup_con clear">
|
||||||
|
<div class="clear mt15 ml20">
|
||||||
|
<ul class="pro_newsetting_con fl">
|
||||||
|
<li class="mb10 clear">
|
||||||
|
<ul class="fl">
|
||||||
|
<li class="clear">
|
||||||
|
<label class="fl ml5">请选择作品成绩的公开范围</label>
|
||||||
|
</li>
|
||||||
|
<li class="clear ml20">
|
||||||
|
<input type="radio" class="fl" id="open_to_all" <%= @homework.score_open == 1 ? "checked" : "" %> value="1" name="score_open"/>
|
||||||
|
<label for="open_to_all" class="fl ml5 fontGrey2">成绩对所有学生可见</label>
|
||||||
|
</li>
|
||||||
|
<li class="clear ml20">
|
||||||
|
<input type="radio" class="fl" id="open_to_me" <%= @homework.score_open == 0 ? "checked" : "" %> value="0" name="score_open"/>
|
||||||
|
<label for="open_to_me" class="fl ml5 fontGrey2">成绩仅对自己可见</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="fl ml20">
|
||||||
|
<div class="popup_tip_box fontGrey2">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>老师和助教始终能看到所有成绩</p>
|
||||||
|
</div>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<a href="javascript:void(0);" class="fr sy_btn_blue mr20" onclick="$(this).parent().parent().parent().submit();">确定</a>
|
||||||
|
<a href="javascript:void(0);" class="fr sy_btn_grey mr5" onclick="hideModal();">取消</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
|
@ -17,6 +17,10 @@
|
||||||
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="0-50" class="fl issues_calendar_input" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
|
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="0-50" class="fl issues_calendar_input" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="mb10 clear">
|
<li class="mb10 clear">
|
||||||
|
<input type="checkbox" class="fl ml100" name="no_anon_penalty" <%=homework.homework_detail_manual.no_anon_penalty == 1 ? 'checked' : '' %> value="<%=homework.homework_detail_manual.no_anon_penalty%>"/>
|
||||||
|
<label class="pop_box_label fl ml10" style="text-align: left">不参加匿评扣分</label>
|
||||||
|
</li>
|
||||||
|
<li class="mb10 clear mt30">
|
||||||
<label class="pop_box_label fl">最终得分 : </label>
|
<label class="pop_box_label fl">最终得分 : </label>
|
||||||
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
||||||
</li>
|
</li>
|
||||||
|
@ -38,7 +42,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl mt5 ml20" >
|
<ul class="fl ml20">
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
@ -49,6 +53,11 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
<p >请输入数值0-50</p>
|
<p >请输入数值0-50</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>匿评开启后提交的作品,未能参加<br/>匿评,按照全部缺评扣分</p>
|
||||||
|
</div>
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<label for="other_score" class="fl ml5">助教评分</label>
|
<label for="other_score" class="fl ml5">助教评分</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl mt5 ml20" >
|
<ul class="fl ml20" >
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="0-50" class="fl w180" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
|
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="0-50" class="fl w180" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
|
||||||
</li>
|
</li>
|
||||||
<li class="mb10 clear">
|
<li class="mb10 clear">
|
||||||
|
<input type="checkbox" class="fl ml100" name="no_anon_penalty" <%=homework.homework_detail_manual.no_anon_penalty == 1 ? 'checked' : '' %> value="<%=homework.homework_detail_manual.no_anon_penalty%>"/>
|
||||||
|
<label class="pop_box_label fl ml10" style="text-align: left">不参加匿评扣分</label>
|
||||||
|
</li>
|
||||||
|
<li class="mb10 clear mt30">
|
||||||
<label class="pop_box_label fl">最终得分 : </label>
|
<label class="pop_box_label fl">最终得分 : </label>
|
||||||
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
<input type="radio" class="fl" value="1" id="teacher_score" name="teacher_priority"/><label for="teacher_score" class=" fl ml5">教师评分</label>
|
||||||
</li>
|
</li>
|
||||||
|
@ -42,7 +46,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl ml20 mt5">
|
<ul class="fl ml20">
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
@ -53,6 +57,11 @@
|
||||||
<span></span>
|
<span></span>
|
||||||
<p id="absence_penalty_notice" class="">请输入数值0-50</p>
|
<p id="absence_penalty_notice" class="">请输入数值0-50</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p>匿评开启后提交的作品,未能参加<br/>匿评,按照全部缺评扣分</p>
|
||||||
|
</div>
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="fl ml20 mt5">
|
<ul class="fl ml20">
|
||||||
<div class="popup_tip_box fontGrey2 mb10">
|
<div class="popup_tip_box fontGrey2 mb10">
|
||||||
<em></em>
|
<em></em>
|
||||||
<span></span>
|
<span></span>
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/alert_score_open_modal') %>";
|
||||||
|
pop_box_new(htmlvalue, 400, 200);
|
|
@ -0,0 +1,11 @@
|
||||||
|
hideModal();
|
||||||
|
<% if @hw_status != 5 %>
|
||||||
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:hw_status=>@hw_status}) %>");
|
||||||
|
<% if @user_activity_id != @homework.id %>
|
||||||
|
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", "UserActivity");
|
||||||
|
<% else %>
|
||||||
|
sd_create_editor_from_data(<%= @homework.id%>,"","100%", "<%=@homework.class.to_s%>");
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
$("#homework_post_brief").html("<%= escape_javascript(render :partial => 'student_work/homework_post_brief', :locals => {:homework => @homework, :is_teacher => @is_teacher}) %>");
|
||||||
|
<% end %>
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= comment.id %>">
|
<span class="reply_praise_count_<%= comment.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
<div>
|
<div>
|
||||||
<ul class="new_roadmap_nav fl" >
|
<ul class="new_roadmap_nav fl" style="margin-left: 0px">
|
||||||
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
||||||
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
|
<%= link_to "所有<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@issues_filter.count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -214,6 +214,9 @@
|
||||||
</div><!--issues_statistics end-->
|
</div><!--issues_statistics end-->
|
||||||
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr " >新建</a>
|
<a href="<%= new_project_issue_path(@project)%>" class="sy_btn_green fr " >新建</a>
|
||||||
</div>
|
</div>
|
||||||
|
<% if @issues.empty? %>
|
||||||
|
<%= render :partial => "projects/no_data" %>
|
||||||
|
<% else %>
|
||||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||||
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
<%= form_tag({:controller => 'issues', :action => 'index', :project_id => @project},:remote=>'xls', :method => :get,:id=>"issue_query_form", :class => 'query_form') do %>
|
||||||
<%= hidden_field_tag 'set_filter', '1' %>
|
<%= hidden_field_tag 'set_filter', '1' %>
|
||||||
|
@ -236,7 +239,6 @@
|
||||||
<%= calendar_for('issue_create_date_start_show')%>
|
<%= calendar_for('issue_create_date_start_show')%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="issues_con_list" style="position: relative;">
|
<div class="issues_con_list" style="position: relative;">
|
||||||
<ul id="issues_list_nav" >
|
<ul id="issues_list_nav" >
|
||||||
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();" class="issues_nav_hover">
|
<li id="issues_list_nav_1" onclick="HoverLi(1);all_reset_form();" class="issues_nav_hover">
|
||||||
|
@ -309,9 +311,7 @@
|
||||||
</div><!--issues_filter end-->
|
</div><!--issues_filter end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @issues.empty? %>
|
|
||||||
<p class="nodata mt10"><%= l(:label_no_data) %></p>
|
|
||||||
<% else %>
|
|
||||||
<div id="issue_list">
|
<div id="issue_list">
|
||||||
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
<%= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% elsif ma.class == OrgMessage %>
|
<% elsif ma.class == OrgMessage %>
|
||||||
<% if ma.message_type == 'ApplySubdomain' && ma.organization %>
|
<% if ma.message_type == 'ApplySubdomain' && ma.organization %>
|
||||||
<li><a href="<%=agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ) %>" target="_blank" title="<%=ma.organization.name %> 申请子域名:<%= (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准"%>"><span class="shadowbox_news_user"><%=ma.organization.name %> </span>申请子域名:<%= (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准"%></a></li>
|
<li><a href="<%=organization_path(ma.organization_id) %>" target="_blank" title="<%=ma.organization.name %> 申请子域名:<%= ma.content%>"><span class="shadowbox_news_user"><%=ma.organization.name %> </span>申请子域名:<%= ma.content%></a></li>
|
||||||
<% elsif ma.message_type == 'AgreeApplySubdomain' %>
|
<% elsif ma.message_type == 'AgreeApplySubdomain' %>
|
||||||
<li><a href="javascript:void(0)" target="_blank" title="系统提示 管理员同意了您的子域名申请:<%= ma.content%>"><span class="shadowbox_news_user">系统提示 </span>管理员同意了您的子域名申请:<%= ma.content%></a></li>
|
<li><a href="javascript:void(0)" target="_blank" title="系统提示 管理员同意了您的子域名申请:<%= ma.content%>"><span class="shadowbox_news_user">系统提示 </span>管理员同意了您的子域名申请:<%= ma.content%></a></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -7,13 +7,10 @@
|
||||||
<meta name="keywords" content="issue,bug,tracker" />
|
<meta name="keywords" content="issue,bug,tracker" />
|
||||||
<%= csrf_meta_tag %>
|
<%= csrf_meta_tag %>
|
||||||
<%= favicon %>
|
<%= favicon %>
|
||||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', 'nyan', :media => 'all' %>
|
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','application','prettify', :media => 'all' %>
|
||||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||||
<%= javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'application', 'jquery.colorbox-min') %>
|
<%= javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'application', 'jquery.colorbox-min') %>
|
||||||
|
|
||||||
<%= import_ke(enable_at: false, prettify: true, init_activity: false) %>
|
|
||||||
|
|
||||||
|
|
||||||
<%= heads_for_theme %>
|
<%= heads_for_theme %>
|
||||||
|
|
||||||
<%= call_hook :view_layouts_base_html_head %>
|
<%= call_hook :view_layouts_base_html_head %>
|
||||||
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
<% @replies.each do |reply| %>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
|
||||||
|
var postContent = $(this).html();
|
||||||
|
postContent = postContent.replace(/ /g," ");
|
||||||
|
postContent= postContent.replace(/ {2}/g," ");
|
||||||
|
postContent=postContent.replace(/ /g," ");
|
||||||
|
postContent=postContent.replace(/ /g," ");
|
||||||
|
postContent = postContent.replace(/<script>*/g, "<script>");
|
||||||
|
postContent = postContent.replace(/<html>*/g, "<html>");
|
||||||
|
$(this).html(postContent);
|
||||||
|
});
|
||||||
|
autoUrl('activity_description_<%= reply.id %>');
|
||||||
|
description_show_hide(<%= reply.id %>);
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".homepagePostReplyDes").mouseover(function(){
|
||||||
|
$(this).find("a[id*='delete_memo_reply']").show();
|
||||||
|
}).mouseout(function(){
|
||||||
|
$(this).find("a[id*='delete_memo_reply']").hide();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="homepagePostReplyContainer" >
|
||||||
|
<div class="homepagePostReplyPortrait">
|
||||||
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||||
|
<div class="homepagePostReplyPublisher">
|
||||||
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Memo', :user_activity_id => @memo.id}%>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostReplyContent break_word" style="margin-bottom:15px;" id="activity_description_<%= reply.id %>">
|
||||||
|
<p><%= reply.content.gsub(/script/, "script ").html_safe %></p>
|
||||||
|
</div>
|
||||||
|
<div class="orig_reply mb10 mt-10">
|
||||||
|
<div class="reply">
|
||||||
|
<span class="reply-right">
|
||||||
|
<span class="reply_praise_count_<%= reply.id %>">
|
||||||
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||||
|
</span>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:action => 'quote', :id => reply},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_delete),
|
||||||
|
forum_memo_path(@memo.forum, reply),
|
||||||
|
:method => :delete,
|
||||||
|
:id => "delete_reply_#{reply.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
|
:title => l(:button_delete)
|
||||||
|
) if @memo.author.id == User.current.id || User.current.admin? %>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="reply_message_<%= reply.id%>"></p>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
|
<div id="more_memo_replies">
|
||||||
|
<div class="detail_cont_hide clearfix">
|
||||||
|
<span class="orig_icon" >↓ </span>
|
||||||
|
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||||
|
<%= link_to '点击展开更多回复', forum_memo_path(@memo.forum_id, @memo, :page => @page),:remote=>true %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
|
||||||
|
<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="ReplyToMessageInputContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= reply.id%>'>
|
||||||
|
<%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%>
|
||||||
|
<%= f.hidden_field :subject, :required => true, value: reply.subject %>
|
||||||
|
<%= f.hidden_field :forum_id, :required => true, value: reply.forum_id %>
|
||||||
|
<%= f.hidden_field :parent_id, :required => true, value: reply.id %>
|
||||||
|
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
||||||
|
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="memo[content]"></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%>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
sd_create_editor_from_data(<%= reply.id%>,null,"100%", "<%=reply.class.to_s%>");
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -1,5 +1,5 @@
|
||||||
//ckeditor.setData("<%= raw escape_javascript(@content) %>");
|
if($("#reply_message_<%= @memo.id%>").length > 0) {
|
||||||
$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
|
$("#reply_message_<%= @memo.id%>").replaceWith("<%= escape_javascript(render :partial => 'memos/reply_message', :locals => {:reply => @memo}) %>");
|
||||||
$('#quote').val("<%= raw escape_javascript(@content) %>");
|
}else if($("#reply_to_message_<%= @memo.id%>").length >0) {
|
||||||
showAndScrollTo("new_memo", "cke_editor01");
|
$("#reply_to_message_<%= @memo.id%>").replaceWith("<p id='reply_message_<%= @memo.id%>'></p>");
|
||||||
$("img").removeAttr("align");
|
}
|
|
@ -4,22 +4,6 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function expand_reply(container,btnid){
|
|
||||||
var target = $(container).children();
|
|
||||||
var btn = $(btnid);
|
|
||||||
if(btn.data('init')=='0'){
|
|
||||||
btn.data('init',1);
|
|
||||||
btn.html('收起回复');
|
|
||||||
target.show();
|
|
||||||
}else{
|
|
||||||
btn.data('init',0);
|
|
||||||
btn.html('展开更多');
|
|
||||||
target.hide();
|
|
||||||
target.eq(0).show();
|
|
||||||
target.eq(1).show();
|
|
||||||
target.eq(2).show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$(function() {
|
$(function() {
|
||||||
sd_create_editor_from_data(<%= @memo.id%>,null,"100%", "<%=@memo.class.to_s%>");
|
sd_create_editor_from_data(<%= @memo.id%>,null,"100%", "<%=@memo.class.to_s%>");
|
||||||
});
|
});
|
||||||
|
@ -82,46 +66,8 @@
|
||||||
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
<div class="homepagePostReplyBannerCount">回复(<%=@reply_count %>)</div>
|
||||||
<div class="homepagePostReplyBannerTime"></div>
|
<div class="homepagePostReplyBannerTime"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="" id="reply_div_<%= @memo.id %>">
|
<div class="" id="reply_div_<%= @memo.id %>">
|
||||||
<% @replies.each_with_index do |reply,i| %>
|
<%= render :partial => 'memos/memo_all_replies' %>
|
||||||
<div class="homepagePostReplyContainer" >
|
|
||||||
<div class="homepagePostReplyPortrait">
|
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
|
||||||
</div>
|
|
||||||
<div class="homepagePostReplyDes">
|
|
||||||
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.show_name%></a><%= format_date(reply.created_at) %></div>
|
|
||||||
<div class="homepagePostReplyContent break_word" style="margin-bottom:25px;" id="activity_description_<%= reply.id %>"><p><%= reply.content.gsub(/script/, "script ").html_safe %></p>
|
|
||||||
<% if @memo.author.id == User.current.id || User.current.admin? %>
|
|
||||||
<%= link_to "删除", forum_memo_path(@memo.forum, reply), :class => "fr undis", :method => "delete", :confirm => l(:text_are_you_sure), :id => "delete_memo_reply_#{reply.id}" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<script type="text/javascript">
|
|
||||||
$(function(){
|
|
||||||
$("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
|
|
||||||
var postContent = $(this).html();
|
|
||||||
postContent = postContent.replace(/ /g," ");
|
|
||||||
postContent= postContent.replace(/ {2}/g," ");
|
|
||||||
postContent=postContent.replace(/ /g," ");
|
|
||||||
postContent=postContent.replace(/ /g," ");
|
|
||||||
postContent = postContent.gsub(/<script>*/, "<script>");
|
|
||||||
postContent = postContent.gsub(/<html>*/, "<html>");
|
|
||||||
$(this).html(postContent);
|
|
||||||
});
|
|
||||||
autoUrl('activity_description_<%= reply.id %>');
|
|
||||||
description_show_hide(<%= reply.id %>);
|
|
||||||
});
|
|
||||||
|
|
||||||
$(".homepagePostReplyDes").mouseover(function(){
|
|
||||||
$(this).find("a[id*='delete_memo_reply']").show();
|
|
||||||
}).mouseout(function(){
|
|
||||||
$(this).find("a[id*='delete_memo_reply']").hide();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
$("#more_memo_replies").replaceWith("<%= escape_javascript(render :partial => 'memos/memo_all_replies')%>");
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= reply.id %>">
|
<span class="reply_praise_count_<%= reply.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= reply.id %>">
|
<span class="reply_praise_count_<%= reply.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= reply.id %>">
|
<span class="reply_praise_count_<%= reply.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -356,7 +356,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= format_time(reply.created_on) %>
|
<%= format_time(reply.created_on) %>
|
||||||
<span id="reply_praise_count_<%=reply.id %>">
|
<span class="reply_praise_count_<%=reply.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= format_time(comment.created_on) %>
|
<%= format_time(comment.created_on) %>
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
<%= link_to reply.try(:user).try(:realname), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to reply.try(:user).try(:realname), user_url_in_org(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= format_time(reply.created_on) %>
|
<%= format_time(reply.created_on) %>
|
||||||
<span id="reply_praise_count_<%=reply.id %>">
|
<span class="reply_praise_count_<%=reply.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -91,7 +91,7 @@
|
||||||
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= format_time(reply.created_on) %>
|
<%= format_time(reply.created_on) %>
|
||||||
<span id="reply_praise_count_<%=reply.id %>">
|
<span class="reply_praise_count_<%=reply.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,68 +1,93 @@
|
||||||
<% has_commit = has_commit_poll?(poll.id ,User.current)%>
|
<% has_commit = has_commit_poll?(poll.id ,User.current)%>
|
||||||
<% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%>
|
<% poll_name = poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%>
|
||||||
<% if @is_teacher%>
|
<% if @is_teacher%>
|
||||||
<li title="<%= poll.polls_name %>">
|
<div>
|
||||||
<div style="width: 310px;float: left;">
|
<div title="<%= poll_name %>">
|
||||||
<% if has_commit %>
|
<div style="width: 600px;float: left;">
|
||||||
<%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue"%>
|
<% if has_commit %>
|
||||||
<% else %>
|
<%= link_to (index.to_i+1).to_s+". "+poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue mw550", :title => "#{poll_name}" %>
|
||||||
<%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue" %>
|
<% else %>
|
||||||
<% end %>
|
<%= link_to (index.to_i+1).to_s+". "+poll_name, poll_path(poll.id), :class => "polls_title polls_title_w fl c_dblue mw550", :title => "#{poll_name}" %>
|
||||||
|
<% end %>
|
||||||
|
<% if poll.polls_status == 1 %>
|
||||||
|
<span class="exercise_status_nop fl mt3"></span>
|
||||||
|
<% elsif poll.polls_status == 2 %>
|
||||||
|
<span class="exercise_status_pub fl mt3"></span>
|
||||||
|
<% else %>
|
||||||
|
<span class="exercise_status_end fl mt3"></span>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="exercise_opr_<%=poll.id %>" class="none fr">
|
||||||
|
<a href="javascript:void(0)" onClick="delete_exercise(<%=poll.id %>);" title="删除试卷" class="ex_icon_de mt0"></a>
|
||||||
|
<% if poll.polls_status == 1 %>
|
||||||
|
<%= link_to '', edit_poll_path(poll.id), :title => "编辑试卷", :class => "ex_icon_edit mt0"%>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<% if poll.polls_status == 1%>
|
<div class="mt10">
|
||||||
<li class="pollsbtn fl ml10 pollsbtn_grey">统计结果</li>
|
<span class="c_grey fl mr15">创建时间:<%= format_time(poll.created_at) %></span>
|
||||||
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
<% if poll.polls_status > 1 %>
|
||||||
<li><%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fl ml10"%></li>
|
<span class="c_grey fl mr15">发布时间:<%= poll.published_at.nil? ? '未设置' : format_time(poll.published_at) %></span>
|
||||||
<% end%>
|
<% end %>
|
||||||
|
<% if poll.polls_status > 1 %>
|
||||||
|
<span class="c_grey fl mr15">答题:<span class="c_blue" title="已答学生数/未答学生数"><%= poll.poll_users.count %> / <%=@course.student.count %></span></span>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<% if poll.polls_status == 1 %>
|
<% if poll.polls_status == 1 %>
|
||||||
<li><a href="javascript:" class="pollsbtn btn_pu fl ml5" onclick="poll_submit(<%= poll.id%>,<%= poll.polls_name.length %>);">发布问卷</a></li>
|
<div><a href="javascript:" class="pollsbtn btn_pu fr ml10" onclick="poll_submit(<%= poll.id%>,<%= poll.polls_name.length %>,<%= index%>);">发布问卷</a></div>
|
||||||
<% elsif poll.polls_status == 2%>
|
<% elsif poll.polls_status == 2%>
|
||||||
<li><a href="javascript:" class="pollsbtn btn_de fl ml5" onclick="republish_poll(<%= poll.id%>);">取消发布</a></li>
|
<div><a href="javascript:" class="pollsbtn btn_de fr ml10" onclick="republish_poll(<%= poll.id%>, <%=index %>);">取消发布</a></div>
|
||||||
<% else%>
|
<% else%>
|
||||||
<li class="pollsbtn fl ml10 pollsbtn_grey" style="margin-left: 5px;" >发布问卷</li>
|
<div class="pollsbtn fr ml10 pollsbtn_grey ml10">发布问卷</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
<%= link_to(l(:button_delete), poll,:method => :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml5 mr10") %>
|
<% if poll.polls_status == 1%>
|
||||||
|
<div class="pollsbtn fr ml10 pollsbtn_grey">统计结果</div>
|
||||||
|
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
||||||
|
<div><%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fr ml10"%></div>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
<% if poll.polls_status == 1 %>
|
<% if poll.polls_status == 2 %>
|
||||||
<li><%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml5"%></li>
|
<li><a class="pollsbtn fr ml10" onclick="close_poll(<%= poll.id%>, <%=index %>);" href="javascript:">关闭</a></li>
|
||||||
<% else%>
|
<% else %>
|
||||||
<li class="polls_de_grey fr ml5" title="未发布的问卷才能进行编辑">编辑</li>
|
<li class="pollsbtn fr ml10 pollsbtn_grey" title="发布的问卷才能进行关闭">关闭</li>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
<% if poll.polls_status == 2 %>
|
<% if poll.polls_status == 1%>
|
||||||
<li><a class="polls_de fr ml5" onclick="close_poll(<%= poll.id%>);" href="javascript:">关闭</a></li>
|
<li class="pollsbtn fr ml10 pollsbtn_grey">导出</li>
|
||||||
<% else %>
|
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
||||||
<li class="polls_de_grey fr ml5" title="发布的问卷才能进行关闭">关闭</li>
|
<li><%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "pollsbtn fr ml10"%></li>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
<div class="clear"></div>
|
||||||
<% if poll.polls_status == 1%>
|
</div>
|
||||||
<li class="polls_de_grey fr ml5">导出</li>
|
|
||||||
<% elsif poll.polls_status == 2 || poll.polls_status == 3 %>
|
|
||||||
<li><%= link_to "导出", export_poll_poll_path(poll.id,:format => "xls"), :class => "polls_de fr ml5"%></li>
|
|
||||||
|
|
||||||
<% end%>
|
|
||||||
|
|
||||||
|
|
||||||
<li class="polls_date fr"><%= format_date poll.created_at.to_date%></li>
|
|
||||||
<% else%>
|
<% else%>
|
||||||
<% if poll.polls_status == 2%>
|
<% if poll.polls_status == 2%>
|
||||||
<% if has_commit%>
|
<div>
|
||||||
<li><%= link_to poll_name, poll_result_poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue" %></li>
|
<% if has_commit%>
|
||||||
<li class="pollsbtn_tip fl ml5">已答</li>
|
<%= link_to (index.to_i+1).to_s+". "+poll_name, poll_result_poll_path(poll.id), :title => "#{poll_name}", :class => "polls_title polls_title_st fl c_dblue mw550"%>
|
||||||
<%else%>
|
<span class="exercise_status_com fl ml5"></span>
|
||||||
<%= link_to poll_name, poll_path(poll.id), :class => "polls_title polls_title_st fl c_dblue"%>
|
<%else%>
|
||||||
<%end%>
|
<%= link_to (index.to_i+1).to_s+". "+poll_name, poll_path(poll.id), :title => "#{poll_name}", :class => "polls_title polls_title_st fl c_dblue mw550"%>
|
||||||
|
<span class="exercise_status_nocom fl ml5"></span>
|
||||||
|
<%end%>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<div class="mt10">
|
||||||
|
<span class="c_grey fl mr15">发布时间:<%= format_time(poll.published_at) %></span>
|
||||||
|
<span class="c_grey fl mr15">答题:<span class="c_blue" title="已答学生数/未答学生数"><%= poll.poll_users.count %> / <%=@course.student.count %></span></span>
|
||||||
|
|
||||||
|
<% if poll.show_result == 1 %>
|
||||||
|
<% if has_commit%>
|
||||||
|
<li><%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fr"%></li>
|
||||||
|
<%else%>
|
||||||
|
<li class="pollsbtn fr pollsbtn_grey" title="请先提交问卷再查看统计结果">统计结果</li>
|
||||||
|
<%end%>
|
||||||
|
<% end %>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
<% end%>
|
<% end%>
|
||||||
<li class="polls_date fr mr10"><%= format_date poll.created_at.to_date%></li>
|
|
||||||
<% if poll.show_result == 1 %>
|
|
||||||
<% if has_commit%>
|
|
||||||
<li><%= link_to l(:label_statistical_results), statistics_result_poll_path(poll.id), :class => "pollsbtn fr mr10"%></li>
|
|
||||||
<%else%>
|
|
||||||
<li class="pollsbtn fr mr10 pollsbtn_grey" title="请先提交问卷再查看统计结果">统计结果</li>
|
|
||||||
<%end%>
|
|
||||||
<% end %>
|
|
||||||
<% end%>
|
<% end%>
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="polls_head">
|
<div class="polls_head" style="width:730px;">
|
||||||
<h2>所有问卷
|
<h2>所有问卷
|
||||||
<span>(<%= @obj_count%>)</span>
|
<span>(<%= @obj_count%>)</span>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<% polls.each do |poll|%>
|
<% polls.each_with_index do |poll, i|%>
|
||||||
<ul id="polls_<%= poll.id %>" class="polls_list_ul">
|
<ul id="polls_<%= poll.id %>" class="exercise_list_div" onmouseover="$('#exercise_opr_<%=poll.id %>').show();" onmouseout="$('#exercise_opr_<%=poll.id %>').hide();">
|
||||||
<%= render :partial => 'poll', :locals => {:poll => poll} %>
|
<%= render :partial => 'poll', :locals => {:poll => poll, :index => i} %>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll, :index => @index}) %>");
|
||||||
alert("关闭成功");
|
alert("关闭成功");
|
|
@ -1 +1,2 @@
|
||||||
|
hideModal();
|
||||||
$("#polls").html("<%= escape_javascript(render :partial => 'poll_list') %>");
|
$("#polls").html("<%= escape_javascript(render :partial => 'poll_list') %>");
|
|
@ -1,13 +1,13 @@
|
||||||
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function republish_poll(poll_id)
|
function republish_poll(poll_id, index)
|
||||||
{
|
{
|
||||||
$('#ajax-modal').html("<div id='popbox02'>" +
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
||||||
"<div class='upload_con'>" +
|
"<div class='upload_con'>" +
|
||||||
"<div class='upload_box'>" +
|
"<div class='upload_box'>" +
|
||||||
"<p class='polls_box_p'>取消发布后问卷统计结果将会被清空<br />是否确定取消发布该问卷?</p>" +
|
"<p class='polls_box_p'>取消发布后问卷统计结果将会被清空<br />是否确定取消发布该问卷?</p>" +
|
||||||
"<div class='polls_btn_box'>" +
|
"<div class='polls_btn_box'>" +
|
||||||
"<a href='/poll/"+ poll_id +"/republish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
"<a href='/poll/"+ poll_id +"/republish_poll?index=" + index +"' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
||||||
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"<div class='cl'></div>" +
|
"<div class='cl'></div>" +
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
function clickCanel(){hideModal("#popbox02");}
|
function clickCanel(){hideModal("#popbox02");}
|
||||||
|
|
||||||
function poll_submit(poll_id,poll_name)
|
function poll_submit(poll_id,poll_name,index)
|
||||||
{
|
{
|
||||||
if(poll_name == 0)
|
if(poll_name == 0)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
"<div class='upload_box'>" +
|
"<div class='upload_box'>" +
|
||||||
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
||||||
"<div class='polls_btn_box'>" +
|
"<div class='polls_btn_box'>" +
|
||||||
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
"<a href='/poll/"+ poll_id +"/publish_poll?index=" + index + "' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
||||||
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"<div class='cl'></div>" +
|
"<div class='cl'></div>" +
|
||||||
|
@ -57,14 +57,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function close_poll(poll_id)
|
function close_poll(poll_id, index)
|
||||||
{
|
{
|
||||||
$('#ajax-modal').html("<div id='popbox02'>" +
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
||||||
"<div class='upload_con'>" +
|
"<div class='upload_con'>" +
|
||||||
"<div class='upload_box'>" +
|
"<div class='upload_box'>" +
|
||||||
"<p class='polls_box_p'>问卷关闭后学生将不能继续提交问卷,<br />是否确定关闭该问卷?</p>" +
|
"<p class='polls_box_p'>问卷关闭后学生将不能继续提交问卷,<br />是否确定关闭该问卷?</p>" +
|
||||||
"<div class='polls_btn_box'>" +
|
"<div class='polls_btn_box'>" +
|
||||||
"<a href='/poll/"+ poll_id +"/close_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
"<a href='/poll/"+ poll_id +"/close_poll?index=" + index +"' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
||||||
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
||||||
"</div>" +
|
"</div>" +
|
||||||
"<div class='cl'></div>" +
|
"<div class='cl'></div>" +
|
||||||
|
@ -81,13 +81,20 @@
|
||||||
$('#ajax-modal').parent().addClass("popbox_polls");
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function delete_exercise(id){
|
||||||
|
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
|
||||||
|
'<div class="clear mt15"><p class="text_c f14">您是否确定删除</p><div class="cl"></div><a href="/poll/'+ id +'" class="fr sy_btn_blue mr90 mt10" data-method="delete" data-remote="true">确定</a>'+
|
||||||
|
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取消</a></div></div>';
|
||||||
|
pop_box_new(htmlvalue, 300, 140);
|
||||||
|
}
|
||||||
|
|
||||||
function closeModal()
|
function closeModal()
|
||||||
{
|
{
|
||||||
hideModal($("#popbox_upload"));
|
hideModal($("#popbox_upload"));
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="courseRSide fl">
|
<div class="courseRSide fl">
|
||||||
<div class="polls_content02" id="polls">
|
<div id="polls">
|
||||||
<%= render :partial => 'poll_list'%>
|
<%= render :partial => 'poll_list'%>
|
||||||
</div><!--问卷内容end-->
|
</div><!--问卷内容end-->
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll, :index => @index}) %>");
|
||||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
|
||||||
showModal('ajax-modal', '250px');
|
showModal('ajax-modal', '250px');
|
||||||
//$('#ajax-modal').css('height','111px');
|
//$('#ajax-modal').css('height','111px');
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
|
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll, :index => @index}) %>");
|
||||||
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
|
||||||
showModal('ajax-modal', '250px');
|
showModal('ajax-modal', '250px');
|
||||||
//$('#ajax-modal').css('height','80px');
|
//$('#ajax-modal').css('height','80px');
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<% if @type.to_s == 'activity' %>
|
<% if @type.to_s == 'activity' %>
|
||||||
$('#praise_count_<%=@user_activity_id %>').html('<%= j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"activity"})%>');
|
$('#praise_count_<%=@user_activity_id %>').html('<%= j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"activity"})%>');
|
||||||
<% else @type.to_s == 'reply' %>
|
<% else @type.to_s == 'reply' %>
|
||||||
$('#reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
|
$('.reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#praise_tread').html('<%= j(
|
$('#praise_tread').html('<%= j(
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<% if @obj_type == 'Memo'%>
|
<% if @activity %>
|
||||||
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
|
||||||
render :partial => "/memos/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
|
||||||
)%>');
|
|
||||||
<% elsif @activity %>
|
|
||||||
<% if @type.to_s == 'activity' %>
|
<% if @type.to_s == 'activity' %>
|
||||||
$('#praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"activity"})%>');
|
$('#praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"activity"})%>');
|
||||||
<% else @type.to_s == 'reply' %>
|
<% else @type.to_s == 'reply' %>
|
||||||
$('#reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
|
$('.reply_praise_count_<%=@user_activity_id %>').html('<%=j(render :partial=> "praise_tread/praise", :locals => {:activity=>@obj, :user_activity_id=>@user_activity_id,:type=>"reply"})%>');
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% elsif @obj_type == 'Memo'%>
|
||||||
|
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
||||||
|
render :partial => "/memos/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
||||||
|
)%>');
|
||||||
<% else %>
|
<% else %>
|
||||||
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
$('#praise_tread_<%= @obj.id %>').html('<%= j(
|
||||||
render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
render :partial => "/praise_tread/praise_tread",:locals => {:obj => @obj,:user_id => User.current.id,:horizontal => @horizontal}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="orig_user fl">
|
<div class="orig_user fl">
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_right fl">
|
<div class="orig_right fl" style="width: 93%;" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||||
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
|
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
|
||||||
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||||
<div class="orig_content ">
|
<div class="orig_content ">
|
||||||
|
@ -16,10 +16,10 @@
|
||||||
<%= comment.content_detail.html_safe %>
|
<%= comment.content_detail.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_reply mt-10">
|
<div class="orig_reply mt-10 pr" style="height: 18px;">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<div class="reply-right none" style="position: absolute; right: 0px;">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
:title => l(:button_reply)) %>
|
:title => l(:button_reply)) %>
|
||||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="ping_disfoot f14">
|
<div class="ping_disfoot f14">
|
||||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||||
<span id="reply_praise_count_<%=journal.id %>">
|
<span class="reply_praise_count_<%=journal.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if journal.user == User.current|| User.current.admin? %>
|
<% if journal.user == User.current|| User.current.admin? %>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="pro_new_info mb10">
|
<div class="pro_new_info">
|
||||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||||
<p class="sy_tab_con_p ">没有数据可供显示!</p>
|
<p class="sy_tab_con_p ">没有数据可供显示!</p>
|
||||||
</div>
|
</div>
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="orig_user fl">
|
<div class="orig_user fl">
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user.id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_right fl">
|
<div class="orig_right fl" style="width: 93%;" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||||
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
|
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user.id), :class => "content-username" %>
|
||||||
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||||
<div class="orig_content ">
|
<div class="orig_content ">
|
||||||
|
@ -16,13 +16,13 @@
|
||||||
<%= comment.content_detail.html_safe %>
|
<%= comment.content_detail.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_reply mt-10">
|
<div class="orig_reply mt-10 pr" style="height: 18px;">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<div class="reply-right none" style="position: absolute; right: 0px;">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => 'Issue', :user_activity_id => user_activity_id, :parent_id => parent_id, :is_project => true},
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => 'Issue', :user_activity_id => user_activity_id, :parent_id => parent_id, :is_project => true},
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
:title => l(:button_reply)) %>
|
:title => l(:button_reply)) %>
|
||||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= comment.id %>">
|
<span class="reply_praise_count_<%= comment.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= comment.id %>">
|
<span class="reply_praise_count_<%= comment.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<% if @forked_count > 0 %>
|
||||||
<div class="pro_new_info mb10">
|
<div class="pro_new_info mb10">
|
||||||
<h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
<h2 class="clear">成员<span class="fr pro_new_font mr15" >本页面展示Fork了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
||||||
<ul class="clear pro_new_users_box">
|
<ul class="clear pro_new_users_box">
|
||||||
|
@ -24,4 +25,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="mb10">
|
||||||
|
<%= render :partial => "projects/no_data" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<% if @watchers.count > 0 %>
|
||||||
<div class="pro_new_info mb10">
|
<div class="pro_new_info mb10">
|
||||||
<h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
<h2 class="clear">成员<span class="fr pro_new_font mr15" > 本页面展示关注了 <%= link_to @project.owner.try(:show_name), user_path(@project.owner) %>/<%= link_to @project.name, project_path(@project) %> 的用户</span></h2>
|
||||||
<ul class="clear pro_new_users_box">
|
<ul class="clear pro_new_users_box">
|
||||||
|
@ -24,6 +25,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<div class="mb10">
|
||||||
|
<%= render :partial => "projects/no_data" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,8 @@
|
||||||
<p class=" fl c_grey pro_new_grey">
|
<p class=" fl c_grey pro_new_grey">
|
||||||
1.长度必须在1到254个字符之间<br/>
|
1.长度必须在1到254个字符之间<br/>
|
||||||
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
||||||
3.一旦保存,标识无法修改
|
3.一旦保存,标识无法修改<br>
|
||||||
|
4.版本库名不能是纯数字
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -16,6 +16,15 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<div style="text-align:center;">
|
||||||
|
<div class="pages" style="width:auto; display:inline-block;">
|
||||||
|
<ul id="homework_pository_ref_pages">
|
||||||
|
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,17 @@
|
||||||
<div class="c_grey clear mt5">
|
<div class="c_grey clear mt5">
|
||||||
<p class="fl">由 <%= link_to get_user_by_login_and(request.author.try(:username)).try(:show_name), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前</p>
|
<p class="fl">由 <%= link_to get_user_by_login_and(request.author.try(:username)).try(:show_name), user_path(get_user_by_login_and(request.author.try(:username))), :class => "linkBlue2" %> 创建于<%= time_tag(request.created_at) %>前</p>
|
||||||
<span class="fl ml10"><%= time_tag(request.updated_at) %>前更新</span>
|
<span class="fl ml10"><%= time_tag(request.updated_at) %>前更新</span>
|
||||||
<p class="fr"><%= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %></p>
|
<p class="fr"><%#= find_gitlab_project(request.source_project_id)+"/"+request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%#= find_gitlab_project(request.target_project_id)+"/"+request.target_branch %></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<div style="text-align:center;">
|
||||||
|
<div class="pages" style="width:auto; display:inline-block;">
|
||||||
|
<ul id="homework_pository_ref_pages">
|
||||||
|
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => true, :flag => true, :is_new => true%>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
|
@ -21,7 +21,10 @@
|
||||||
<div class="c_grey clear mt5">
|
<div class="c_grey clear mt5">
|
||||||
<p class="fl">由 <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "linkBlue2" %>于 <%= format_time(@request.created_at) %> 创建</p>
|
<p class="fl">由 <%= link_to @request.author.try(:username), user_path(get_user_by_login_and(@request.author.try(:username))), :class => "linkBlue2" %>于 <%= format_time(@request.created_at) %> 创建</p>
|
||||||
<span class="fl ml10">最近更新:<%= format_time(@request.updated_at) %></span>
|
<span class="fl ml10">最近更新:<%= format_time(@request.updated_at) %></span>
|
||||||
<p class="fr"><%= @request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= @request.target_branch %></p>
|
<p class="fr">
|
||||||
|
<%= find_gitlab_project(@request.source_project_id)+"/"+@request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= find_gitlab_project(@request.target_project_id)+"/"+@request.target_branch %>
|
||||||
|
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,16 +28,6 @@
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
<div id="pull_requests_list">
|
<div id="pull_requests_list">
|
||||||
<%= render "pull_requests/pull_requests_list" %>
|
<%= render "pull_requests/pull_requests_list" %>
|
||||||
|
|
||||||
<div style="text-align:center;">
|
|
||||||
<div class="pages" style="width:auto; display:inline-block;">
|
|
||||||
<ul id="homework_pository_ref_pages">
|
|
||||||
<%= pagination_links_full @pages, @count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
|
||||||
</ul>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
@ -62,6 +52,8 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
<div class="mb10">
|
||||||
<%= render :partial => "projects/no_data" %>
|
<%= render :partial => "projects/no_data" %>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,7 @@
|
||||||
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>
|
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if params[:action] == "commit_diff" %>
|
||||||
|
<div class="fr">Commit<a class="ml5" style="color: #3498db"><%= changeset.id %></a></div>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
|
@ -1,48 +1,21 @@
|
||||||
<%= form_tag(
|
<% @commits.chunk { |c| format_date(c.created_at).to_date }.each do |day, commits| %>
|
||||||
{:controller => 'repositories', :action => 'diff', :id => project,
|
<div class="pullreques_pullbox">
|
||||||
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
|
<div class="pullreques_pull_top clear">
|
||||||
:method => :get
|
<p class="fl c_grey ml15"><%= day %></p>
|
||||||
) do %>
|
<p class="fr c_green mr15"><%= commits.count %>个提交</p>
|
||||||
<table class="list changesets">
|
</div>
|
||||||
<!--<thead><tr>-->
|
<ul class="pullreques_pull_list">
|
||||||
<!--<th>#</th>-->
|
<% commits.each do |commit| %>
|
||||||
<!--<th></th>-->
|
<li class="clear">
|
||||||
<!--<th></th>-->
|
<span class="fl c_grey ml15 "><%= time_tag(commit.created_at) %>前</span>
|
||||||
<!--<th><%= l(:label_date) %></th>-->
|
<%= link_to get_user_by_mail(commit.author_email).show_name, user_path(get_user_by_mail(commit.author_email)), :target => "_blank", :class => "pullreques_pull_name fl ml10" %>
|
||||||
<!--<th><%= l(:field_author) %></th>-->
|
<p class="pullreques_pull_txt ml10 fl"><%= commit.title %></p>
|
||||||
<!--<th><%= l(:field_comments) %></th>-->
|
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "fr mr15 c_grey" %>
|
||||||
<!--</tr></thead>-->
|
</li>
|
||||||
<tbody>
|
<% end %>
|
||||||
|
</ul>
|
||||||
<% show_diff = revisions.size > 1 %>
|
</div>
|
||||||
<% line_num = 1 %>
|
|
||||||
<% revisions.each do |changeset| %>
|
|
||||||
<div class="col-md-10 col-sm-12">
|
|
||||||
<ul class="bordered-list">
|
|
||||||
<li class="commit js-toggle-container">
|
|
||||||
<%= render :partial => 'commit_details', :locals => {:changeset => changeset} %>
|
|
||||||
<div style="padding-left:30px;" class="commit-row-title">
|
|
||||||
<strong class="str-truncated">
|
|
||||||
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
|
|
||||||
</strong>
|
|
||||||
<div class="pull-right" title="修订号">
|
|
||||||
<%= link_to truncate(changeset.short_id.to_s, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => project.id, :changeset => changeset.id} %>
|
|
||||||
</div>
|
|
||||||
<div class="notes_count">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p style="padding-top: 10px;">
|
|
||||||
<%#= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
|
|
||||||
</p>
|
|
||||||
<ul class="wlist">
|
|
||||||
<%= pagination_links_full commits_pages, commits_count, :per_page_links => false, :remote => false, :flag => true %>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,38 @@
|
||||||
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
<div class="new_roadmap_conbox mb10" >
|
||||||
<div class="wrap-big">
|
<div class=" clear">
|
||||||
<div class="project_r_h">
|
<ul class="reply-container-branch fl" >
|
||||||
<%= render :partial => "top" %>
|
<%= render :partial => 'navigation' %>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<% @commits.chunk { |c| format_date(c.created_at).to_date }.each do |day, commits| %>
|
||||||
|
<div class="pullreques_pullbox">
|
||||||
|
<div class="pullreques_pull_top clear">
|
||||||
|
<p class="fl c_grey ml15"><%= day %></p>
|
||||||
|
<p class="fr c_green mr15"><%= commits.count %>个提交</p>
|
||||||
|
</div>
|
||||||
|
<ul class="pullreques_pull_list">
|
||||||
|
<% commits.each do |commit| %>
|
||||||
|
<li class="clear">
|
||||||
|
<span class="fl c_grey ml15 "><%= time_tag(commit.created_at) %>前</span>
|
||||||
|
<%= link_to get_user_by_mail(commit.author_email).show_name, user_path(get_user_by_mail(commit.author_email)), :target => "_blank", :class => "pullreques_pull_name fl ml10" %>
|
||||||
|
<p class="pullreques_pull_txt ml10 fl"><%= commit.title %></p>
|
||||||
|
<%= link_to truncate(commit.short_id, :length => 20), {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit.id}, :target => "_blank", :class => "fr mr15 c_grey" %>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="repository_con " style="line-height:1.9;">
|
<div style="text-align:center;">
|
||||||
<%= render :partial => 'navigation' %>
|
<div class="pages" style="width:auto; display:inline-block;">
|
||||||
<div class="cl"></div>
|
<ul id="homework_pository_ref_pages">
|
||||||
</div>
|
<%= pagination_links_full @commits_pages, @commits_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||||
|
</ul>
|
||||||
<%= render :partial => 'link_to_functions' %>
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
<%= render_properties(@properties) %>
|
|
||||||
|
|
||||||
<div class="mt10">
|
|
||||||
<%= render(:partial => 'revisions', :locals => {:project => @project, :path => @path , :revisions => @commits, :entry => @entry , :commits_pages => @commits_pages , :commits_count => @commits_count}) unless @commits.empty? %>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<% content_for :header_tags do %>
|
<%= call_hook(:view_repositories_show_contextual, { :repository => @repository, :project => @project }) %>
|
||||||
<%= stylesheet_link_tag "scm" %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% html_title(l(:label_change_plural)) -%>
|
<% html_title(l(:label_change_plural)) -%>
|
||||||
</div>
|
</div>
|
|
@ -1,16 +1,27 @@
|
||||||
<div class="container-big">
|
<div class="container-big">
|
||||||
<div class="project_r_h">
|
<div class="new_roadmap_conbox mb10" >
|
||||||
<%= render :partial => "top" %>
|
<div class="new_roadmap_info_top clear ">
|
||||||
|
<%= link_to "<span class='new_roadmap_icons_back mr5'></span>返回提交历史".html_safe, {:action => 'changes', :path => to_path_param(@path), :id => @project, :repository_id => @repository.identifier_param, :rev => @rev, :page => 1}, :class => "fl linkBlue2 mt3" %>
|
||||||
|
<!--<a href="javascript:void(0);" class="fl linkBlue2 mt3" ><span class="new_roadmap_icons_back mr5"></span>返回提交历史</a>-->
|
||||||
|
</div>
|
||||||
|
<div class="clear new_roadmap_listbox_commit">
|
||||||
|
<div class="c_grey02 mb10">
|
||||||
|
<p><%= @commit_details.message %></p>
|
||||||
|
</div>
|
||||||
|
<!--<div class=" clear mb10">-->
|
||||||
|
<!--<p class="fb">关联Issue:</p>-->
|
||||||
|
<!--<a href="javascript:void(0);" class="btn-small fl mr10">#123</a>-->
|
||||||
|
<!--<a href="javascript:void(0);" class="btn-small fl mr10">#123</a>-->
|
||||||
|
<!--<a href="javascript:void(0);" class="btn-small fl mr10">#123</a>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<li class="commit js-toggle-container">
|
||||||
|
<%= render :partial => 'commit_details', :locals => {:changeset => @commit_details} %>
|
||||||
|
</li>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="showing-changes-info fontGrey2"> Commit <a href="javascript:void(0);" class="linkGrey3">
|
|
||||||
<%= @commit_details.id %></a><br />
|
|
||||||
<li class="commit js-toggle-container">
|
|
||||||
<%= render :partial => 'commit_details', :locals => {:changeset => @commit_details} %>
|
|
||||||
</li>
|
|
||||||
</div>
|
|
||||||
<div class="showing-changes-project f14"><%= @commit_details.message %></div>
|
|
||||||
<% @commit_diff.each do |commit_diff| %>
|
<% @commit_diff.each do |commit_diff| %>
|
||||||
<div class="showing-changes-row fontGrey2">
|
<div class="showing-changes-row-commit fontGrey2">
|
||||||
<a href="javascript:void(0);" class="linkGrey3" id="changed-files">
|
<a href="javascript:void(0);" class="linkGrey3" id="changed-files">
|
||||||
<img src="/images/vlicon/file.png" width="18" height="20" style="vertical-align:middle;" class="mr5" /><%= commit_diff.new_path %>
|
<img src="/images/vlicon/file.png" width="18" height="20" style="vertical-align:middle;" class="mr5" /><%= commit_diff.new_path %>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -27,17 +27,17 @@
|
||||||
<!--quality_analysis-->
|
<!--quality_analysis-->
|
||||||
<% unless @entries.nil? %>
|
<% unless @entries.nil? %>
|
||||||
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
<a href="<%= @zip_path %>" class="btn_zipdown fr" onclick="">ZIP下载</a>
|
||||||
<% if User.current.member_of?(@project) && @project.is_public? %>
|
<%# if User.current.member_of?(@project) && @project.is_public? %>
|
||||||
<% if quality_analysis(User.current.try(:login), @repository.id).nil? %>
|
<%# if quality_analysis(User.current.try(:login), @repository.id).nil? %>
|
||||||
<%= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
|
<%#= link_to "质量分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "1"), :remote => true, :class => "btn_zipdown fr" %>
|
||||||
<% else %>
|
<%# else %>
|
||||||
<%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
|
<%#= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fr" %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% end %>
|
|
||||||
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
|
||||||
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%# unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
||||||
|
<%#= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fr" %>
|
||||||
|
<%# end %>
|
||||||
|
|
||||||
<div class="fl mt5 ml15">
|
<div class="fl mt5 ml15">
|
||||||
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
|
<%=link_to "代码统计", stats_repository_project_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :creator => @creator, :default_branch => @g_default_branch ), :class => "fl vl_zip" %>
|
||||||
|
|
|
@ -30,7 +30,8 @@
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
<% @stundet_works.each_with_index do |student_work, i|%>
|
<% @stundet_works.each_with_index do |student_work, i|%>
|
||||||
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i}%>
|
<% score_open = @homework.score_open == 1 || student_work.user == User.current %>
|
||||||
|
<%= render :partial => "evaluation_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open}%>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="12">
|
<td colspan="12">
|
||||||
<div id="about_hwork_<%= student_work.id%>" class="about_hwork">
|
<div id="about_hwork_<%= student_work.id%>" class="about_hwork">
|
||||||
|
|
|
@ -21,20 +21,42 @@
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="flex-container fl" style="width:340px;">
|
<div class="flex-container fl" style="width:340px;">
|
||||||
<div class="flex-cell student_work_<%= st.id%>"><span class="<%= score_color st.teacher_score%>"><%= st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%></span></div>
|
<div class="flex-cell student_work_<%= st.id%>">
|
||||||
<div class="flex-cell student_work_<%= st.id%>"><span class="<%= score_color st.teaching_asistant_score%>"><%= st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%></span></div>
|
<span class="<%= score_color (!score_open || st.teacher_score.nil? ? nil : st.teacher_score) %>">
|
||||||
|
<%= !score_open || st.teacher_score.nil? ? "--" : format("%.1f",st.teacher_score)%>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="flex-cell student_work_<%= st.id%>">
|
||||||
|
<span class="<%= score_color (!score_open || st.teaching_asistant_score.nil? ? nil : st.teaching_asistant_score) %>">
|
||||||
|
<%= !score_open || st.teaching_asistant_score.nil? ? "--" : format("%.1f",st.teaching_asistant_score)%>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<% if @homework.anonymous_comment == 0 %>
|
||||||
<div class="flex-cell student_work_<%= st.id%>">
|
<div class="flex-cell student_work_<%= st.id%>">
|
||||||
<div class="<%= score_color st.student_score%> student_score_info pr">
|
<div class="<%= score_color (!score_open || st.student_score.nil? ? nil : st.student_score)%> student_score_info pr">
|
||||||
<% if st.student_score.nil? %>
|
<% if !score_open || st.student_score.nil? %>
|
||||||
<span title="该作品未被匿评">未参与</span>
|
<% pro = @homework.student_work_projects.where("user_id = #{st.user_id}").first
|
||||||
|
if pro.nil? || pro.student_work_id == "" || pro.student_work_id.nil?
|
||||||
|
work = st
|
||||||
|
else
|
||||||
|
work = StudentWork.find pro.student_work_id
|
||||||
|
end %>
|
||||||
|
<% if !score_open %>
|
||||||
|
<span title="">--</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status < 2 %>
|
||||||
|
<span title="尚未开启匿评">未参与</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status == 2 && work.student_works_evaluation_distributions.count != 0 %>
|
||||||
|
<span title="匿评期间,尚未获得他人匿评">待匿评</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status == 3 && work.student_works_evaluation_distributions.count != 0 %>
|
||||||
|
<span title="匿评已截止,未获得他人匿评">未评分</span>
|
||||||
|
<% else %>
|
||||||
|
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= format("%.1f", st.student_score) %>
|
<%= format("%.1f", st.student_score) %>
|
||||||
<% end %>
|
<span class="linkBlue">
|
||||||
<% unless st.student_score.nil? %>
|
(<%= anon_count %>)
|
||||||
<span class="linkBlue">
|
</span>
|
||||||
(<%= anon_count %>)
|
|
||||||
</span>
|
|
||||||
<div class="g_infoNi none">
|
<div class="g_infoNi none">
|
||||||
现共有
|
现共有
|
||||||
<span class="c_red"> <%= anon_count %> </span>
|
<span class="c_red"> <%= anon_count %> </span>
|
||||||
|
@ -47,9 +69,9 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="flex-cell">
|
<div class="flex-cell">
|
||||||
<% score = st.work_score %>
|
<% score = st.work_score %>
|
||||||
<div class="<%= score_color score%> student_final_scor_info pr" style="display: inline">
|
<div class="<%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr" style="display: inline">
|
||||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||||
<% unless score.nil?%>
|
<% unless !score_open || score.nil?%>
|
||||||
<div class="score-tip none tl" style="line-height: 18px; top:-32px; right:-273px;">
|
<div class="score-tip none tl" style="line-height: 18px; top:-32px; right:-273px;">
|
||||||
<em></em>
|
<em></em>
|
||||||
<font></font>
|
<font></font>
|
||||||
|
|
|
@ -75,7 +75,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<%# end %>
|
<%# end %>
|
||||||
<% @stundet_works.each_with_index do |student_work, i| %>
|
<% @stundet_works.each_with_index do |student_work, i| %>
|
||||||
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i} %>
|
<% score_open = @is_teacher || @homework.score_open == 1 || student_work.user == User.current %>
|
||||||
|
<%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i, :score_open => score_open} %>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="12">
|
<td colspan="12">
|
||||||
<div id="about_hwork_<%= student_work.id %>" class="about_hwork">
|
<div id="about_hwork_<%= student_work.id %>" class="about_hwork">
|
||||||
|
|
|
@ -52,28 +52,40 @@
|
||||||
<%=get_status student_work.work_status %>
|
<%=get_status student_work.work_status %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td class="hworkList70 <%= score_color student_work.teacher_score%>">
|
<td class="hworkList70 <%= score_color (!score_open || student_work.teacher_score.nil? ? nil : student_work.teacher_score)%>">
|
||||||
<%= student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
<%= !score_open || student_work.teacher_score.nil? ? "--" : format("%.1f",student_work.teacher_score)%>
|
||||||
</td>
|
</td>
|
||||||
<td class="hworkList70 <%= score_color student_work.teaching_asistant_score%>">
|
<td class="hworkList70 <%= score_color (!score_open || student_work.teaching_asistant_score.nil? ? nil : student_work.teaching_asistant_score)%>">
|
||||||
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
<%= !score_open || student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<% if @homework.homework_type == 2%>
|
<% if @homework.homework_type == 2%>
|
||||||
<!-- 系统评分 -->
|
<!-- 系统评分 -->
|
||||||
<td class="hworkList70 <%= score_color student_work.system_score%>">
|
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
|
||||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||||
</td>
|
</td>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
<% if @homework.anonymous_comment == 0%>
|
<% if @homework.anonymous_comment == 0%>
|
||||||
<td class="hworkList70 <%= score_color student_work.student_score%> student_score_info pr">
|
<td class="hworkList70 <%= score_color (!score_open || student_work.student_score.nil? ? nil : student_work.student_score)%> student_score_info pr">
|
||||||
<% if student_work.student_score.nil? %>
|
<% if !score_open || student_work.student_score.nil? %>
|
||||||
<span title="该作品未被匿评">未参与</span>
|
<% if !score_open %>
|
||||||
|
<span title="">--</span>
|
||||||
|
<% elsif student_work.work_status != 0 %>
|
||||||
|
<% if @homework.homework_detail_manual.comment_status < 2 %>
|
||||||
|
<span title="尚未开启匿评">未参与</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status >= 2 && student_work.student_works_evaluation_distributions.count == 0 %>
|
||||||
|
<span title="匿评开启后提交的作品,不参加匿评">迟交</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status == 2 && student_work.student_works_evaluation_distributions.count != 0 %>
|
||||||
|
<span title="匿评期间,尚未获得他人匿评">待匿评</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status == 3 && student_work.student_works_evaluation_distributions.count != 0 %>
|
||||||
|
<span title="匿评已截止,未获得他人匿评">未评分</span>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<span title="">--</span>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%=format("%.1f",student_work.student_score) %>
|
<%=format("%.1f",student_work.student_score) %>
|
||||||
<% end %>
|
|
||||||
<% unless student_work.student_score.nil?%>
|
|
||||||
<span class="linkBlue">
|
<span class="linkBlue">
|
||||||
(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
|
(<%= student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count%>)
|
||||||
</span>
|
</span>
|
||||||
|
@ -85,7 +97,7 @@
|
||||||
名学生进行了匿评,平均分为
|
名学生进行了匿评,平均分为
|
||||||
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
<span class="c_red"> <%= format("%.1f",student_work.student_score)%> </span>分。
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<% end %>
|
<% end %>
|
||||||
<!-- 成绩 -->
|
<!-- 成绩 -->
|
||||||
|
@ -94,9 +106,9 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
<% score = student_work.respond_to?("score") ? student_work.score : (student_work.final_score || 0) - student_work.absence_penalty - student_work.late_penalty%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<td class="hworkList70 <%= score_color score%> student_final_scor_info pr">
|
<td class="hworkList70 <%= score_color (!score_open || score.nil? ? nil : score)%> student_final_scor_info pr">
|
||||||
<%= score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
<%= !score_open || score.nil? ? "--" : format("%.1f",score<0 ? 0 : score)%>
|
||||||
<% unless score.nil?%>
|
<% unless !score_open || score.nil?%>
|
||||||
<div class="score-tip none tl" style="line-height: 18px;">
|
<div class="score-tip none tl" style="line-height: 18px;">
|
||||||
<em></em>
|
<em></em>
|
||||||
<font></font>
|
<font></font>
|
||||||
|
|
|
@ -80,8 +80,8 @@
|
||||||
<!-- 成绩 -->
|
<!-- 成绩 -->
|
||||||
<% if @homework.homework_type == 2%>
|
<% if @homework.homework_type == 2%>
|
||||||
<!-- 系统评分 -->
|
<!-- 系统评分 -->
|
||||||
<td class="hworkList70 <%= score_color student_work.system_score%>">
|
<td class="hworkList70 <%= score_color (!score_open || student_work.system_score.nil? ? nil : student_work.system_score)%>">
|
||||||
<%= student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
<%= !score_open || student_work.system_score.nil? ? "--" : format("%.1f",student_work.system_score)%>
|
||||||
</td>
|
</td>
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
<% student_work_groups = @homework.student_works.where("user_id in #{user_ids}").order("created_at asc") %>
|
<% student_work_groups = @homework.student_works.where("user_id in #{user_ids}").order("created_at asc") %>
|
||||||
<% anon_count = student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
<% anon_count = student_work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
||||||
<% student_work_groups.each_with_index do |st, j| %>
|
<% student_work_groups.each_with_index do |st, j| %>
|
||||||
|
<% score_open = @is_teacher || @homework.score_open == 1 || st.user == User.current %>
|
||||||
<div class="syllabus_class_box" id="student_work_<%= st.id%>" style="background-color:#fff;">
|
<div class="syllabus_class_box" id="student_work_<%= st.id%>" style="background-color:#fff;">
|
||||||
<%= render :partial => 'evaluation_un_group_member_work', :locals => {:st => st, :anon_count => anon_count} %>
|
<%= render :partial => 'evaluation_un_group_member_work', :locals => {:st => st, :anon_count => anon_count, :score_open => score_open} %>
|
||||||
</div>
|
</div>
|
||||||
<div id="about_hwork_<%= st.id %>" class="about_hwork"></div>
|
<div id="about_hwork_<%= st.id %>" class="about_hwork"></div>
|
||||||
<% end %>
|
<% end %>
|
|
@ -2,7 +2,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(jour.user), :width => "32", :height => "32"), user_path(jour.user),:class => "st_img fl" %>
|
<%= link_to image_tag(url_to_avatar(jour.user), :width => "32", :height => "32"), user_path(jour.user),:class => "st_img fl" %>
|
||||||
<div class="ping_back_tit">
|
<div class="ping_back_tit">
|
||||||
<a href="javascript:void(0);" class="c_blue fl" >
|
<a href="javascript:void(0);" class="c_blue fl" >
|
||||||
<%= link_to jour.user.show_name, user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %>
|
<%= link_to show_real_name ? jour.user.show_name : "匿名", user_path(jour.user), :title => jour.user.show_name, :class => "c_blue fl" %>
|
||||||
</a>
|
</a>
|
||||||
<% if jour.user==User.current || User.current.admin? %>
|
<% if jour.user==User.current || User.current.admin? %>
|
||||||
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
|
<%= link_to(l(:label_bid_respond_delete), destroy_score_reply_student_work_index_path(:jour_id => jour.id),
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<p class="list-info fr grayTxt">
|
<p class="list-info fr grayTxt">
|
||||||
<%= link_to project.members.count, allow_visit ? member_project_path(project) : 'javascript:void(0)', :class => "c_blue" %><span class="mr5">成员 |</span>
|
<%= link_to project.members.count, allow_visit ? member_project_path(project) : 'javascript:void(0)', :class => "c_blue" %><span class="mr5">成员 |</span>
|
||||||
<%= link_to project.project_score.issue_num, allow_visit ? project_issues_path(project) : 'javascript:void(0)', :class => "c_blue" %><span class="mr5">问题 |</span>
|
<%= link_to project.project_score.issue_num, allow_visit ? project_issues_path(project) : 'javascript:void(0)', :class => "c_blue" %><span class="mr5">问题 |</span>
|
||||||
<%= link_to project.project_score.attach_num, allow_visit ? file_project_path(project) : 'javascript:void(0)', :class => "c_blue" %><span>资源</span>
|
<%= link_to project.project_score.changeset_num, visible_repository?(project) ? ({:controller => 'repositories', :action => 'show', :id => project, :repository_id => gitlab_repository(project).try(:identifier)}) : 'javascript:void(0)', :class => "c_blue" %><span>提交</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<ul class="ping_box_ul <%= is_last ? '' : 'ping_line'%> fl">
|
<ul class="ping_box_ul <%= is_last ? '' : 'ping_line'%> fl">
|
||||||
<% show_real_name = @is_teacher || score.user == User.current || score.user.allowed_to?(:as_teacher,@course) || score.reviewer_role != 3 %>
|
<% show_real_name = @is_teacher || score.user == User.current || score.reviewer_role != 3 %>
|
||||||
<%= link_to image_tag(url_to_avatar(show_real_name ? score.user : ""), :width => "34", :height => "34"), show_real_name ? user_path(score.user) : "javascript:void(0)",:class => "ping_pic fl" %>
|
<%= link_to image_tag(url_to_avatar(show_real_name ? score.user : ""), :width => "34", :height => "34"), show_real_name ? user_path(score.user) : "javascript:void(0)",:class => "ping_pic fl" %>
|
||||||
|
<% show_real_score = @homework.score_open == 1 || @is_teacher || score.student_work.user == User.current %>
|
||||||
<div class="pingBoxTit">
|
<div class="pingBoxTit">
|
||||||
<%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "linkBlue fl" %>
|
<%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "linkBlue fl" %>
|
||||||
<span class="ml5 fl">
|
<span class="ml5 fl">
|
||||||
|
@ -9,7 +10,7 @@
|
||||||
<% unless score.score.nil? %>
|
<% unless score.score.nil? %>
|
||||||
<span class="ml20 fl">评分:</span>
|
<span class="ml20 fl">评分:</span>
|
||||||
<a href="javascript:void(0);" class="c_orange fl" >
|
<a href="javascript:void(0);" class="c_orange fl" >
|
||||||
<%= score.score%>分
|
<%= show_real_score ? score.score : "**" %>分
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<a href="javascript:void(0);" class="fr linkBlue mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
<a href="javascript:void(0);" class="fr linkBlue mr5" onclick="$('#add_score_reply_<%= score.id%>').slideToggle();">回复</a>
|
||||||
|
@ -33,7 +34,8 @@
|
||||||
|
|
||||||
<div id="replay_histroy_<%= score.id%>">
|
<div id="replay_histroy_<%= score.id%>">
|
||||||
<% score.journals_for_messages.order("created_on desc").each do |jour|%>
|
<% score.journals_for_messages.order("created_on desc").each do |jour|%>
|
||||||
<%= render :partial => 'jour_replay',:locals => {:jour => jour}%>
|
<% show_real_name = @is_teacher || score.reviewer_role != 3 %>
|
||||||
|
<%= render :partial => 'jour_replay',:locals => {:jour => jour, :show_real_name => show_real_name || jour.user == User.current}%>
|
||||||
<% end%>
|
<% end%>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -7,6 +7,7 @@ $('#score_<%= @work.id%>').peSlider({range: 'min'});
|
||||||
<%# else %>
|
<%# else %>
|
||||||
//$("#work_score_<%#= @score.id%>").html("<%#= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @new_score,:is_last => @is_last}) %>");
|
//$("#work_score_<%#= @score.id%>").html("<%#= escape_javascript(render :partial => 'student_work_score', :locals => {:score => @new_score,:is_last => @is_last}) %>");
|
||||||
<%# end%>
|
<%# end%>
|
||||||
|
<% score_open = @is_teacher || @homework.score_open == 1 || @work.user == User.current %>
|
||||||
|
|
||||||
$("#score_list_<%= @work.id%>").html("<%=escape_javascript(render :partial => 'student_work_score_records', :locals => {:student_work_scores => @student_work_scores, :is_member_work => is_member_work}) %>");
|
$("#score_list_<%= @work.id%>").html("<%=escape_javascript(render :partial => 'student_work_score_records', :locals => {:student_work_scores => @student_work_scores, :is_member_work => is_member_work}) %>");
|
||||||
var num = $("#work_num_<%= @work.id%>").html();
|
var num = $("#work_num_<%= @work.id%>").html();
|
||||||
|
@ -19,14 +20,14 @@ $("#score_list_<%= @work.id%>").removeAttr("style");
|
||||||
$("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
|
$("#group_member_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'group_member_work', :locals => {:student_work => @work}) %>");
|
||||||
<% else %>
|
<% else %>
|
||||||
<% anon_count = @work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
<% anon_count = @work.student_works_scores.where(:reviewer_role => 3).group_by(&:user_id).count %>
|
||||||
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count}) %>");
|
$("#student_work_<%= @work.id%>").html("<%= escape_javascript(render :partial => 'evaluation_un_group_member_work', :locals => {:st => @work, :anon_count => anon_count, :score_open => score_open}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
$("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1}) %>");
|
$("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_un_work',:locals => {:student_work => @work, :index => 1, :score_open => score_open}) %>");
|
||||||
$("#work_num_<%= @work.id%>").html(num);
|
$("#work_num_<%= @work.id%>").html(num);
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
$("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1}) %>");
|
$("tr[id='student_work_<%= @work.id%>']").replaceWith("<%= escape_javascript(render :partial => 'evaluation_work',:locals => {:student_work => @work, :index => 1, :score_open => score_open}) %>");
|
||||||
$("#work_num_<%= @work.id%>").html(num);
|
$("#work_num_<%= @work.id%>").html(num);
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score,:is_last => @is_last}) %>");
|
$("#add_score_reply_<%= @score.id%>").html("<%= escape_javascript(render :partial => 'add_score_reply', :locals => {:score => @score,:is_last => @is_last}) %>");
|
||||||
<% if @status && @status == 1%>
|
<% if @status && @status == 1%>
|
||||||
$("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour}) %>");
|
$("#replay_histroy_<%= @score.id%>").prepend("<%= escape_javascript(render :partial => 'jour_replay', :locals => {:jour => @jour, :show_real_name => @show_real_name}) %>");
|
||||||
$("#add_score_reply_<%= @score.id%>").hide();
|
$("#add_score_reply_<%= @score.id%>").hide();
|
||||||
<% else%>
|
<% else%>
|
||||||
alert("回复内容不能为空");
|
alert("回复内容不能为空");
|
||||||
|
|
|
@ -51,37 +51,37 @@
|
||||||
// });
|
// });
|
||||||
<%# end%>
|
<%# end%>
|
||||||
|
|
||||||
function set_score_rule_submit() {
|
// function set_score_rule_submit() {
|
||||||
if($("#late_penalty_num").val() == ""){
|
// if($("#late_penalty_num").val() == ""){
|
||||||
$("#late_penalty_num").val("0");
|
// $("#late_penalty_num").val("0");
|
||||||
}
|
// }
|
||||||
if($("#absence_penalty_num").val() == ""){
|
// if($("#absence_penalty_num").val() == ""){
|
||||||
$("#absence_penalty_num").val("0");
|
// $("#absence_penalty_num").val("0");
|
||||||
}
|
// }
|
||||||
$('#muban_popup_box').find('form').submit();
|
// $('#muban_popup_box').find('form').submit();
|
||||||
hideModal();
|
// hideModal();
|
||||||
}
|
// }
|
||||||
|
|
||||||
//设置评分规则
|
// //设置评分规则
|
||||||
function set_score_rule(){
|
// function set_score_rule(){
|
||||||
<% if @homework.homework_type == 2 %>
|
<!--<%# if @homework.homework_type == 2 %>-->
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<!--<%# if @homework.anonymous_comment == 0 %>-->
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
// var htmlvalue = "<%#= escape_javascript(render :partial => 'homework_common/set_score_rule_pro',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
||||||
pop_box_new(htmlvalue, 570, 355);
|
// pop_box_new(htmlvalue, 570, 355);
|
||||||
<% else %>
|
<!--<%# else %>-->
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
// var htmlvalue = "<%#= escape_javascript(render :partial => 'homework_common/set_score_rule_pro_anon',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
||||||
pop_box_new(htmlvalue, 500, 285);
|
// pop_box_new(htmlvalue, 500, 285);
|
||||||
<% end %>
|
<!--<%# end %>-->
|
||||||
<% else %>
|
<!--<%# else %>-->
|
||||||
<% if @homework.anonymous_comment == 0 %>
|
<!--<%# if @homework.anonymous_comment == 0 %>-->
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
// var htmlvalue = "<%#= escape_javascript(render :partial => 'homework_common/set_score_rule_non_pro',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
||||||
pop_box_new(htmlvalue, 500, 325);
|
// pop_box_new(htmlvalue, 500, 325);
|
||||||
<% else %>
|
<!--<%# else %>-->
|
||||||
var htmlvalue = "<%= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
// var htmlvalue = "<%#= escape_javascript(render :partial => 'homework_common/set_score_rule_none_pro_anon',:locals => {:homework => @homework, :student_path => true, :user_activity_id => -1,:hw_status => 5}) %>";
|
||||||
pop_box_new(htmlvalue, 500, 225);
|
// pop_box_new(htmlvalue, 500, 225);
|
||||||
<% end %>
|
<!--<%# end %>-->
|
||||||
<% end %>
|
<!--<%# end %>-->
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="homepageRight mt0 ml10">
|
<div class="homepageRight mt0 ml10">
|
||||||
|
@ -118,10 +118,10 @@
|
||||||
<!--div class="hworkInfor"><a href="javascript:void(0);" class="linkBlue">作业信息</a></div-->
|
<!--div class="hworkInfor"><a href="javascript:void(0);" class="linkBlue">作业信息</a></div-->
|
||||||
<% if @is_teacher%>
|
<% if @is_teacher%>
|
||||||
<div class="fr mt5">
|
<div class="fr mt5">
|
||||||
<ul class="resourcesSelect">
|
<ul class="">
|
||||||
<li class="resourcesSelected">
|
<li class="pr export_icon_li">
|
||||||
<a href="javascript:void(0);" class="resourcesIcon"></a>
|
<a href="javascript:void(0);" class="export_icon linkBlue2">导出</a>
|
||||||
<ul class="hworkMenu">
|
<ul class="hworkMenu" style="top: 30px; left: -100px;">
|
||||||
<li>
|
<li>
|
||||||
<%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :group => @group, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => "export_student_work"%>
|
<%= link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :name => @name, :group => @group, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => "export_student_work"%>
|
||||||
</li>
|
</li>
|
||||||
|
@ -141,9 +141,6 @@
|
||||||
<%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
<%= link_to("导出匿评情况", evaluation_list_student_work_index_path(:homework => @homework.id, :format => 'xls'),:class=>'hworkExport resourcesGrey')%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);" class="hworkSetting resourcesGrey" onclick="set_score_rule();">评分设置</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="orig_user fl">
|
<div class="orig_user fl">
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => "33", :height => "33"), user_path(comment.creator_user), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_right fl">
|
<div class="orig_right fl" onmouseout="$(this).find('.reply-right').hide();" onmouseover="$(this).find('.reply-right').show();">
|
||||||
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user), :class => "content-username" %>
|
<%= link_to comment.creator_user.show_name, user_path(comment.creator_user), :class => "content-username" %>
|
||||||
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
<span class="orig_area"><%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %></span>
|
||||||
<div class="orig_content">
|
<div class="orig_content">
|
||||||
|
@ -16,16 +16,16 @@
|
||||||
<%= comment.content_detail.html_safe %>
|
<%= comment.content_detail.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_reply mt-10">
|
<div class="orig_reply mt-10 pr" style="height: 18px;">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<div class="reply-right none" style="position: absolute; right: 0px;">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if type == 'Message' %>
|
<% if type == 'Message' %>
|
||||||
<% topic = comment.root %>
|
<% topic = comment.root %>
|
||||||
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id},
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id},
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id},
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id},
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -88,19 +88,19 @@
|
||||||
<div class="homepagePostSetting">
|
<div class="homepagePostSetting">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="homepagePostSettingIcon">
|
<li class="homepagePostSettingIcon">
|
||||||
<ul class="homepagePostSettiongText">
|
<ul class="whomepagePostSettiongText">
|
||||||
<li>
|
<li>
|
||||||
<%= link_to l(:button_edit),edit_homework_common_path(activity, :hw_status => hw_status), :class => "postOptionLink"%>
|
<%= link_to l(:button_edit),edit_homework_common_path(activity, :hw_status => hw_status), :class => "wpostOptionLink"%>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity, :hw_status => hw_status),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity, :hw_status => hw_status),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "wpostOptionLink") %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true) %>
|
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true) %>
|
||||||
</li>
|
</li>
|
||||||
<% if activity.anonymous_comment == 0 %>
|
<% if activity.anonymous_comment == 0 %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status < 2%>
|
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true) if activity.homework_detail_manual.comment_status < 2%>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= homework_anonymous_comment activity,hw_status,user_activity_id %>
|
<%= homework_anonymous_comment activity,hw_status,user_activity_id %>
|
||||||
|
@ -108,19 +108,22 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id),:class => "postOptionLink",
|
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id),:class => "wpostOptionLink",
|
||||||
:title => "匿评是同学之间的双盲互评过程:每个同学将评阅系统分配给他/她的若干个作品", :remote => true)%>
|
:title => "匿评是同学之间的双盲互评过程:每个同学将评阅系统分配给他/她的若干个作品", :remote => true)%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if (activity.anonymous_comment == 1 && activity.is_open == 0) || (activity.anonymous_comment == 0 && comment_status == 3 && activity.is_open == 0) %>
|
<% if (activity.anonymous_comment == 1 && activity.is_open == 0) || (activity.anonymous_comment == 0 && comment_status == 3 && activity.is_open == 0) %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to("公开作品", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true)%>
|
<%= link_to("公开作品", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true)%>
|
||||||
</li>
|
</li>
|
||||||
<% elsif activity.is_open == 1 %>
|
<% elsif activity.is_open == 1 %>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to("取消公开", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "postOptionLink", :remote => true)%>
|
<%= link_to("取消公开", alert_open_student_works_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true)%>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<li>
|
||||||
|
<%= link_to("成绩公开范围", alert_score_open_modal_homework_common_path(activity,:user_activity_id => user_activity_id, :hw_status => hw_status),:class => "wpostOptionLink", :remote => true) %>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
|
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div></a></li>
|
||||||
<li class="homepageNewsPubType fl">
|
<li class="homepageNewsPubType fl">
|
||||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的课程成员申请:</span>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">您有了新的班级成员申请:</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
<li class="<%=(ma.status == 0 || ma.status.nil?) ? 'homepageHomeworkContent2' : 'homepageHomeworkContent' %> fl">
|
||||||
<a href="javascript:void(0);" class="newsGrey">
|
<a href="javascript:void(0);" class="newsGrey">
|
||||||
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "教辅"}" %>
|
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
|
||||||
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
<%= link_to content, user_path(User.find(ma.course_message_id), :course_id => ma.course_id),
|
||||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
||||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
</li>
|
</li>
|
||||||
<div style="display: none" class="message_title_red system_message_style">
|
<div style="display: none" class="message_title_red system_message_style">
|
||||||
<p>
|
<p>
|
||||||
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的课程成员申请,信息如下:
|
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
|
||||||
</p>
|
</p>
|
||||||
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
|
<p>真实姓名:<%= User.find(ma.course_message_id).realname %></p>
|
||||||
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
<p>申请课程:<%= Course.find(ma.course_id).name%></p>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%=comment.id %>">
|
<span class="reply_praise_count_<%=comment.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if type == 'Message' %>
|
<% if type == 'Message' %>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class=" fl ml5">
|
<div class=" fl ml5">
|
||||||
<div class="issues_list_titlebox clear">
|
<div class="issues_list_titlebox clear">
|
||||||
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
<a href="<%= issue_path(activity) %>" class="issues_list_title fl" style="width: 320px" target="_blank" title="<%= activity.subject.to_s %>"><%= activity.subject.to_s %></a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="issues_list_small">
|
<div class="issues_list_small">
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
<div class="orig_reply mb10 mt-10">
|
<div class="orig_reply mb10 mt-10">
|
||||||
<div class="reply">
|
<div class="reply">
|
||||||
<span class="reply-right">
|
<span class="reply-right">
|
||||||
<span id="reply_praise_count_<%= comment.id %>">
|
<span class="reply_praise_count_<%= comment.id %>">
|
||||||
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => comment, :user_activity_id => comment.id, :type => "reply"} %>
|
||||||
</span>
|
</span>
|
||||||
<% if type == 'HomeworkCommon' %>
|
<% if type == 'HomeworkCommon' %>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue