Merge branch 'dai_ao' into develop
This commit is contained in:
commit
6d5d93c24e
|
@ -39,3 +39,4 @@ public/javascripts/wechat/node_modules/
|
||||||
.access_token
|
.access_token
|
||||||
tmux*.log
|
tmux*.log
|
||||||
config/wechat.yml
|
config/wechat.yml
|
||||||
|
config/oneapm.yml
|
||||||
|
|
|
@ -40,9 +40,10 @@ class BlogCommentsController < ApplicationController
|
||||||
end
|
end
|
||||||
def show
|
def show
|
||||||
@article = BlogComment.find(params[:id])
|
@article = BlogComment.find(params[:id])
|
||||||
all_comments = []
|
@replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc")
|
||||||
@replies = get_all_children(all_comments, @article)
|
|
||||||
@reply_count = @replies.count
|
@reply_count = @replies.count
|
||||||
|
@replies = get_no_children_comments_all @replies
|
||||||
|
@limit_count = @replies.count
|
||||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||||
@limit = 10
|
@limit = 10
|
||||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||||
|
|
|
@ -26,7 +26,7 @@ class BlogsController < ApplicationController
|
||||||
@type = 2
|
@type = 2
|
||||||
|
|
||||||
@topics.each do |topic|
|
@topics.each do |topic|
|
||||||
topic[:infocount] = get_praise_num(topic) + (topic.parent ? topic.parent.children.count : topic.children.count)
|
topic[:infocount] = get_praise_num(topic) + BlogComment.where("root_id = #{topic.id}").count
|
||||||
if topic[:infocount] < 0
|
if topic[:infocount] < 0
|
||||||
topic[:infocount] = 0
|
topic[:infocount] = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -102,6 +102,7 @@ class IssuesController < ApplicationController
|
||||||
@issue_count = @query.issue_count
|
@issue_count = @query.issue_count
|
||||||
@test = params[:test]
|
@test = params[:test]
|
||||||
@project_sort = 'issues.updated_on desc'
|
@project_sort = 'issues.updated_on desc'
|
||||||
|
|
||||||
if params[:test] != "0"
|
if params[:test] != "0"
|
||||||
case @test
|
case @test
|
||||||
when "1"
|
when "1"
|
||||||
|
@ -284,11 +285,11 @@ class IssuesController < ApplicationController
|
||||||
|
|
||||||
# 用户编辑更改issue
|
# 用户编辑更改issue
|
||||||
def update
|
def update
|
||||||
# params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0
|
# params[:assigned_to_id] = nil if params[:assigned_to_id].to_i == 0
|
||||||
|
# params[:fixed_version_id] = nil if params[:fixed_version_id].to_i == 0
|
||||||
if params[:issue_detail]
|
if params[:issue_detail]
|
||||||
issue = Issue.find(params[:id])
|
issue = Issue.find(params[:id])
|
||||||
issue = update_user_issue_detail(issue, params)
|
issue = update_user_issue_detail(issue, params)
|
||||||
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
|
|
||||||
@saved = update_user_issue_detail(issue, params)
|
@saved = update_user_issue_detail(issue, params)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
|
@ -296,6 +297,7 @@ class IssuesController < ApplicationController
|
||||||
return unless update_issue_from_params
|
return unless update_issue_from_params
|
||||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||||
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
|
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
|
||||||
|
@issue.fixed_version_id = nil if @issue.fixed_version_id == 0
|
||||||
saved = false
|
saved = false
|
||||||
begin
|
begin
|
||||||
@saved = @issue.save_issue_with_child_records(params, @time_entry)
|
@saved = @issue.save_issue_with_child_records(params, @time_entry)
|
||||||
|
@ -630,7 +632,9 @@ class IssuesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# 搜索结果
|
# 搜索结果
|
||||||
@issues_filter = @query.issues(:order => @project_sort)
|
# SELECT assigned_to_id, count(*) as ac FROM `issues` where project_id = @project.id group by assigned_to_id order by ac desc;
|
||||||
|
@issues_filter = @query.issues.sort_by{ |i| Issue.where(:project_id => @project.id , :assigned_to_id => i.assigned_to_id).count }.reverse
|
||||||
|
# @issues_filter = @query.issues(:order => @project_sort)
|
||||||
|
|
||||||
# if params[:type] == 1 || params[:type].nil?
|
# if params[:type] == 1 || params[:type].nil?
|
||||||
# @results = @issues_filter
|
# @results = @issues_filter
|
||||||
|
@ -668,7 +672,7 @@ class IssuesController < ApplicationController
|
||||||
@alltotal[issue.tracker_id.to_i] = @alltotal[issue.tracker_id.to_i] + 1
|
@alltotal[issue.tracker_id.to_i] = @alltotal[issue.tracker_id.to_i] + 1
|
||||||
user_id = issue.assigned_to_id
|
user_id = issue.assigned_to_id
|
||||||
if issue.assigned_to_id.nil?
|
if issue.assigned_to_id.nil?
|
||||||
user_id = issue.author_id
|
user_id = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
if !@results[user_id].nil?
|
if !@results[user_id].nil?
|
||||||
|
@ -696,7 +700,7 @@ class IssuesController < ApplicationController
|
||||||
|
|
||||||
tmpuser = User.find(user_id)
|
tmpuser = User.find(user_id)
|
||||||
|
|
||||||
@results[user_id][:name] = tmpuser.nil? ? " " : tmpuser.show_name
|
@results[user_id][:name] = tmpuser.nil? ? "" : tmpuser.show_name
|
||||||
#所有的
|
#所有的
|
||||||
@results[user_id][0] = 1
|
@results[user_id][0] = 1
|
||||||
for i in 1..17 do
|
for i in 1..17 do
|
||||||
|
|
|
@ -50,6 +50,8 @@ class MessagesController < ApplicationController
|
||||||
all_comments = []
|
all_comments = []
|
||||||
@replies = Message.where("root_id = #{@topic.id}").reorder("created_on desc")
|
@replies = Message.where("root_id = #{@topic.id}").reorder("created_on desc")
|
||||||
@reply_count = @replies.count
|
@reply_count = @replies.count
|
||||||
|
@replies = get_no_children_comments_all @replies
|
||||||
|
@limit_count = @replies.count
|
||||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||||
@limit = 10
|
@limit = 10
|
||||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||||
|
@ -171,9 +173,6 @@ class MessagesController < ApplicationController
|
||||||
@reply.root_id = parent.root_id.nil? ? parent.id : parent.root_id
|
@reply.root_id = parent.root_id.nil? ? parent.id : parent.root_id
|
||||||
# @reply.reply_id = params[:id]
|
# @reply.reply_id = params[:id]
|
||||||
parent.children << @reply
|
parent.children << @reply
|
||||||
@user_activity_id = params[:user_activity_id] if params[:user_activity_id]
|
|
||||||
@is_course = params[:is_course] if params[:is_course]
|
|
||||||
@is_board = params[:is_board] if params[:is_board]
|
|
||||||
else
|
else
|
||||||
@quote = params[:quote][:quote]
|
@quote = params[:quote][:quote]
|
||||||
@reply = Message.new
|
@reply = Message.new
|
||||||
|
@ -207,8 +206,8 @@ class MessagesController < ApplicationController
|
||||||
end
|
end
|
||||||
if params[:user_activity_id]
|
if params[:user_activity_id]
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@is_course = params[:is_course]
|
@is_course = params[:is_course] if params[:is_course]
|
||||||
@is_board = params[:is_board]
|
@is_board = params[:is_board] if params[:is_board]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -282,8 +281,8 @@ class MessagesController < ApplicationController
|
||||||
@message.destroy
|
@message.destroy
|
||||||
@topic = Message.find(params[:activity_id].to_i)
|
@topic = Message.find(params[:activity_id].to_i)
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@is_course = params[:is_course]
|
@is_course = params[:is_course] if params[:is_course]
|
||||||
@is_board = params[:is_board]
|
@is_board = params[:is_board] if params[:is_board]
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
|
@ -172,6 +172,8 @@ class NewsController < ApplicationController
|
||||||
@news = result[:news]
|
@news = result[:news]
|
||||||
@comments = result[:comments]
|
@comments = result[:comments]
|
||||||
@comments_count = @comments.count
|
@comments_count = @comments.count
|
||||||
|
@comments = get_no_children_comments_all @comments
|
||||||
|
@limit_count = @comments.count
|
||||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||||
@limit = 10
|
@limit = 10
|
||||||
@comments = @comments[@page * @limit..@page * @limit + 9]
|
@comments = @comments[@page * @limit..@page * @limit + 9]
|
||||||
|
|
|
@ -41,8 +41,10 @@ class OrgDocumentCommentsController < ApplicationController
|
||||||
@org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first
|
@org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first
|
||||||
@subfield_content = @organization.org_subfields.order("priority")
|
@subfield_content = @organization.org_subfields.order("priority")
|
||||||
all_comments = []
|
all_comments = []
|
||||||
@replies = get_all_children(all_comments, @document)
|
@replies = OrgDocumentComment.where("root_id = #{@document.id}").reorder("created_at desc")
|
||||||
@reply_count = @replies.count
|
@reply_count = @replies.count
|
||||||
|
@replies = get_no_children_comments_all @replies
|
||||||
|
@limit_count = @replies.count
|
||||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||||
@limit = 10
|
@limit = 10
|
||||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# encoding: utf-8
|
||||||
# Redmine - project management software
|
# Redmine - project management software
|
||||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||||
#
|
#
|
||||||
|
@ -600,6 +601,13 @@ class ProjectsController < ApplicationController
|
||||||
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
|
||||||
|
@is_remote = true
|
||||||
|
@forked_count = @project.forked_count
|
||||||
|
@forked_pages = Paginator.new @forked_count, @limit, params['page'] || 1
|
||||||
|
@offset ||= @forked_pages.offset
|
||||||
|
@forked_projects = paginateHelper @forked_projects, @limit
|
||||||
|
|
||||||
# @forked_members = User.find_by_sql("SELECT u.* FROM `projects` p,`users` u where p.user_id = u.id and p.forked_from_project_id = #{@project.id} ;")
|
# @forked_members = User.find_by_sql("SELECT u.* FROM `projects` p,`users` u where p.user_id = u.id and p.forked_from_project_id = #{@project.id} ;")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -663,7 +671,13 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def statistics
|
def statistics
|
||||||
|
@watchers = @project.watcher_users
|
||||||
|
@limit = 20
|
||||||
|
@is_remote = true
|
||||||
|
@watchers_count = @watchers.count
|
||||||
|
@watcher_pages = Paginator.new @watchers_count, @limit, params['page'] || 1
|
||||||
|
@offset ||= @watcher_pages.offset
|
||||||
|
@watchers = paginateHelper @watchers, 20
|
||||||
end
|
end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
@ -808,13 +822,13 @@ class ProjectsController < ApplicationController
|
||||||
if @is_true
|
if @is_true
|
||||||
begin
|
begin
|
||||||
g = Gitlab.client
|
g = Gitlab.client
|
||||||
|
g.delete_project(@project.gpid)
|
||||||
@gitlab_repository.destroy
|
@gitlab_repository.destroy
|
||||||
@gitlab_repository = nil
|
@gitlab_repository = nil
|
||||||
@project.update_attribute(:gpid, nil)
|
|
||||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||||
@repository = Repository.factory(scm)
|
@repository = Repository.factory(scm)
|
||||||
@repository.is_default = @project.repository.nil?
|
@repository.is_default = @project.repository.nil?
|
||||||
g.delete_project(@project.gpid)
|
@project.update_attribute(:gpid, nil)
|
||||||
rescue Exception => e
|
rescue Exception => e
|
||||||
puts e
|
puts e
|
||||||
end
|
end
|
||||||
|
@ -987,5 +1001,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
return projects
|
return projects
|
||||||
end
|
end
|
||||||
|
|
||||||
#gcmend
|
#gcmend
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -92,10 +92,10 @@ class PullRequestsController < ApplicationController
|
||||||
if compare_pull_request(source_branch, target_project_id, target_branch)
|
if compare_pull_request(source_branch, target_project_id, target_branch)
|
||||||
# 如果传送了目标项目ID即向fork源项目发送请求
|
# 如果传送了目标项目ID即向fork源项目发送请求
|
||||||
# if params[:forked_project_id] && params[:source_project] == "forked_project_name"
|
# if params[:forked_project_id] && params[:source_project] == "forked_project_name"
|
||||||
if params[:target_project_id]
|
if params[:target_project_id].to_i != @project.id
|
||||||
target_project_id = params[:forked_project_id].to_i
|
target_project_id = params[:forked_project_id].to_i
|
||||||
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(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
|
||||||
else
|
else
|
||||||
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)
|
||||||
|
@ -109,7 +109,7 @@ class PullRequestsController < ApplicationController
|
||||||
format.js{redirect_to new_project_pull_request_path(:show_tip => tip)}
|
format.js{redirect_to new_project_pull_request_path(:show_tip => tip)}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue Exception => e
|
rescue Gitlab::Error::Conflict => e
|
||||||
@message = e.message
|
@message = e.message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -227,7 +227,7 @@ class PullRequestsController < ApplicationController
|
||||||
# Gets the comments on a merge request.
|
# Gets the comments on a merge request.
|
||||||
#
|
#
|
||||||
# @example
|
# @example
|
||||||
# Gitlab.merge_request_comments(5, 1)
|
# Gitlab.merge_request_comments(5, 1)
|
||||||
def pull_request_comments
|
def pull_request_comments
|
||||||
begin
|
begin
|
||||||
@comments = @g.merge_request_comments(@project.gpid, params[:id]).reverse
|
@comments = @g.merge_request_comments(@project.gpid, params[:id]).reverse
|
||||||
|
|
|
@ -92,7 +92,7 @@ class SyllabusesController < ApplicationController
|
||||||
def destroy
|
def destroy
|
||||||
if @syllabus && @syllabus.courses.not_deleted.empty?
|
if @syllabus && @syllabus.courses.not_deleted.empty?
|
||||||
@syllabus.destroy
|
@syllabus.destroy
|
||||||
redirect_to user_courselist_user_path(User.current.id)
|
redirect_to user_courselist_user_path(User.current)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,6 @@ class UsersController < ApplicationController
|
||||||
else
|
else
|
||||||
@user_activity_id = -1
|
@user_activity_id = -1
|
||||||
end
|
end
|
||||||
@hw_status = params[:hw_status].to_i
|
|
||||||
when 'JournalsForMessage'
|
when 'JournalsForMessage'
|
||||||
@reply = JournalsForMessage.find params[:reply_id]
|
@reply = JournalsForMessage.find params[:reply_id]
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
|
@ -181,15 +180,11 @@ class UsersController < ApplicationController
|
||||||
@reply = Message.find params[:reply_id]
|
@reply = Message.find params[:reply_id]
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@activity_id = params[:activity_id]
|
@activity_id = params[:activity_id]
|
||||||
@is_course = params[:is_course]
|
|
||||||
@is_board = params[:is_board]
|
|
||||||
@type = 'Message'
|
@type = 'Message'
|
||||||
when 'BlogComment'
|
when 'BlogComment'
|
||||||
@reply = BlogComment.find params[:reply_id]
|
@reply = BlogComment.find params[:reply_id]
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id]
|
||||||
@activity_id = params[:activity_id]
|
@activity_id = params[:activity_id]
|
||||||
@homepage = params[:homepage]
|
|
||||||
@user_id = params[:user_id]
|
|
||||||
@type = 'BlogComment'
|
@type = 'BlogComment'
|
||||||
when 'OrgDocumentComment'
|
when 'OrgDocumentComment'
|
||||||
@reply = OrgDocumentComment.find params[:reply_id]
|
@reply = OrgDocumentComment.find params[:reply_id]
|
||||||
|
@ -215,6 +210,96 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#叠层回复框中的回复
|
||||||
|
def reply_to_comment
|
||||||
|
@type = params[:type]
|
||||||
|
@reply = get_reply_by_type @type, params[:reply_id]
|
||||||
|
@user_activity_id = params[:user_activity_id]
|
||||||
|
@is_project = params[:is_project] if params[:is_project]
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
#多级回复
|
||||||
|
def reply_detail
|
||||||
|
@type = params[:type]
|
||||||
|
reply = get_reply_by_type @type, params[:reply_id]
|
||||||
|
@user_activity_id = params[:user_activity_id]
|
||||||
|
case params[:type]
|
||||||
|
when 'HomeworkCommon'
|
||||||
|
@root = HomeworkCommon.find reply.jour_id
|
||||||
|
options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => User.current.id,:m_parent_id => params[:reply_id].to_i,:m_reply_id => params[:reply_id].to_i, :root_id => reply.root_id}
|
||||||
|
comment = HomeworkCommon.add_homework_jour(User.current, params[:reply_message], reply.jour_id, reply.root_id, options)
|
||||||
|
@root.update_column('updated_at', Time.now)
|
||||||
|
@is_teacher = User.current.allowed_to?(:as_teacher, @root.course) || User.current.admin?
|
||||||
|
when 'JournalsForMessage'
|
||||||
|
options = {:user_id => User.current.id,
|
||||||
|
:status => true,
|
||||||
|
:m_parent_id => params[:reply_id],
|
||||||
|
:m_reply_id => params[:reply_id],
|
||||||
|
:reply_id => reply.user.id,
|
||||||
|
:notes => params[:reply_message],
|
||||||
|
:root_id => reply.root_id,
|
||||||
|
:is_readed => false}
|
||||||
|
@root = reply.root
|
||||||
|
comment = add_reply_adapter(@root, options)
|
||||||
|
@root.update_attribute(:updated_on,Time.now)
|
||||||
|
when 'Message'
|
||||||
|
@root = reply.root
|
||||||
|
comment = Message.new
|
||||||
|
comment.author = User.current
|
||||||
|
comment.board = reply.board
|
||||||
|
comment.content = params[:reply_message]
|
||||||
|
comment.subject = "RE: #{@root.subject}"
|
||||||
|
comment.reply_id = params[:reply_id]
|
||||||
|
comment.root_id = reply.root_id
|
||||||
|
reply.children << comment
|
||||||
|
@is_project = params[:is_project] if params[:is_project]
|
||||||
|
when 'BlogComment'
|
||||||
|
@root = reply.root
|
||||||
|
comment = BlogComment.new
|
||||||
|
comment.author = User.current
|
||||||
|
comment.blog = reply.blog
|
||||||
|
comment.title = "RE: #{@root.title}"
|
||||||
|
comment.content = params[:reply_message]
|
||||||
|
comment.reply_id = params[:reply_id]
|
||||||
|
comment.root_id = reply.root_id
|
||||||
|
reply.children << comment
|
||||||
|
when 'OrgDocumentComment'
|
||||||
|
@root = reply.root
|
||||||
|
comment = OrgDocumentComment.new(:creator_id => User.current.id, :reply_id => params[:reply_id])
|
||||||
|
comment.title = "RE:#{@root.title}"
|
||||||
|
comment.content = params[:reply_message]
|
||||||
|
comment.root_id = reply.root_id
|
||||||
|
reply.children << comment
|
||||||
|
when 'News'
|
||||||
|
@root = News.find reply.commented_id
|
||||||
|
comment = @root.comments.build(:author_id => User.current.id, :reply_id => params[:reply_id], :comments => params[:reply_message], :parent_id => reply.id)
|
||||||
|
comment.save
|
||||||
|
when 'Issue'
|
||||||
|
@root = reply.issue
|
||||||
|
comment = @root.journals.build(:user_id => User.current.id, :reply_id => params[:reply_id], :notes => params[:reply_message], :parent_id => reply.id)
|
||||||
|
comment.save
|
||||||
|
@is_project = params[:is_project] if params[:is_project]
|
||||||
|
when 'Syllabus'
|
||||||
|
@root = Syllabus.find reply.jour_id
|
||||||
|
options = {:notes => params[:reply_message], :reply_id => reply.user_id,:user_id => User.current.id,:m_parent_id => params[:reply_id].to_i,:m_reply_id => params[:reply_id].to_i, :root_id => reply.root_id}
|
||||||
|
comment = Syllabus.add_syllabus_jour(User.current, params[:reply_message], reply.jour_id, reply.root_id, options)
|
||||||
|
@root.update_column('updated_at', Time.now)
|
||||||
|
@count = @root.journals_for_messages.count
|
||||||
|
@comments = @root.journals_for_messages.reorder("created_on desc").limit(3)
|
||||||
|
end
|
||||||
|
update_course_activity(@root.class.to_s,@root.id)
|
||||||
|
update_user_activity(@root.class.to_s,@root.id)
|
||||||
|
update_forge_activity(@root.class.to_s,@root.id)
|
||||||
|
update_org_activity(@root.class.to_s,@root.id)
|
||||||
|
update_principal_activity(@root.class.to_s,@root.id)
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def refresh_changests
|
def refresh_changests
|
||||||
if !(@user.nil?) && !(@user.memberships.nil?)
|
if !(@user.nil?) && !(@user.memberships.nil?)
|
||||||
@user.memberships.each do |member|
|
@user.memberships.each do |member|
|
||||||
|
@ -1369,9 +1454,10 @@ class UsersController < ApplicationController
|
||||||
@jour = jours.limit(10).offset(@page * 10)
|
@jour = jours.limit(10).offset(@page * 10)
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
if User.current == @user
|
if User.current == @user
|
||||||
jours.update_all(:is_readed => true, :status => false)
|
@jour.update_all(:is_readed => true, :status => false)
|
||||||
jours.each do |journal|
|
@jour.each do |journal|
|
||||||
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
# fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||||
|
journal.delay.set_children_readed_delay
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@state = false
|
@state = false
|
||||||
|
@ -3397,7 +3483,11 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
@my_syllabuses = @user.syllabuses
|
@my_syllabuses = @user.syllabuses
|
||||||
|
|
||||||
my_syllabus_ids = @my_syllabuses.empty? ? "(-1)" : "(" + @my_syllabuses.map{|syllabus| syllabus.id}.join(',') + ")"
|
if @user == User.current
|
||||||
|
archive_ids = Course.where("tea_id = #{@user.id} and is_delete = 1").blank? ? "(-1)" : "(" + Course.where("tea_id = #{@user.id} and is_delete = 1").map{|course| course.syllabus_id}.join(",") + ")"
|
||||||
|
@archive_syllabuses = Syllabus.where("id in #{archive_ids}")
|
||||||
|
end
|
||||||
|
|
||||||
sy_courses = @user.courses.visible.not_deleted
|
sy_courses = @user.courses.visible.not_deleted
|
||||||
syllabus_ids = sy_courses.empty? ? '(-1)' : "(" + sy_courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
syllabus_ids = sy_courses.empty? ? '(-1)' : "(" + sy_courses.map{|course| !course.syllabus_id.nil? && course.syllabus_id}.join(",") + ")"
|
||||||
syllabus_members = SyllabusMember.where("user_id = #{@user.id}")
|
syllabus_members = SyllabusMember.where("user_id = #{@user.id}")
|
||||||
|
@ -3469,11 +3559,58 @@ class UsersController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#归档班级列表
|
||||||
|
def user_archive_courses
|
||||||
|
if User.current.logged?
|
||||||
|
@order, @c_sort, @type = params[:order] || 1, params[:sort] || 1, params[:type] || 1
|
||||||
|
|
||||||
|
#确定 sort_type
|
||||||
|
if @order.to_i == @type.to_i
|
||||||
|
@c_sort = @c_sort.to_i == 1 ? 2 : 1 #1升序 2降序
|
||||||
|
else
|
||||||
|
@c_sort = 2
|
||||||
|
end
|
||||||
|
|
||||||
|
@user = User.current
|
||||||
|
sort_name = "updated_at"
|
||||||
|
archive_ids = Course.where("tea_id = #{@user.id} and is_delete = 1").blank? ? "(-1)" : "(" + Course.where("tea_id = #{@user.id} and is_delete = 1").map{|course| course.syllabus_id}.join(",") + ")"
|
||||||
|
@archive_syllabuses = Syllabus.where("id in #{archive_ids}")
|
||||||
|
|
||||||
|
if @order.to_i == 1 #根据 班级更新时间排序
|
||||||
|
@archive_syllabuses = syllabus_course_list_sort @archive_syllabuses
|
||||||
|
@c_sort == 1 ? (@archive_syllabuses = @archive_syllabuses.sort{|x,y| x[:last_update] <=> y[:last_update] }) : (@archive_syllabuses = @archive_syllabuses.sort{|x,y| y[:last_update] <=> x[:last_update]})
|
||||||
|
@type = 1
|
||||||
|
elsif @order.to_i == 2 #根据 作业+资源数排序
|
||||||
|
@type = 2
|
||||||
|
@archive_syllabuses.each do |syllabus|
|
||||||
|
count = 0
|
||||||
|
courses = syllabus.courses.not_deleted
|
||||||
|
courses.each do |c|
|
||||||
|
count += (User.current.admin? || User.current.allowed_to?(:as_teacher,c)) ? (c.homework_commons.count + visable_attachemnts_incourse(c).count) : (c.homework_commons.where("publish_time <= '#{Date.today}'").count + visable_attachemnts_incourse(c).count)
|
||||||
|
end
|
||||||
|
syllabus[:infocount] = count
|
||||||
|
end
|
||||||
|
@c_sort == 1 ? (@archive_syllabuses = @archive_syllabuses.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@archive_syllabuses = @archive_syllabuses.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
||||||
|
@archive_syllabuses = sortby_time_countcommon_nosticky @archive_syllabuses,sort_name
|
||||||
|
else
|
||||||
|
@type = 1
|
||||||
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.js
|
||||||
|
format.html {render :layout => 'new_base_user'}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
#展开课程下的班级
|
#展开课程下的班级
|
||||||
def expand_courses
|
def expand_courses
|
||||||
@syllabus = Syllabus.where("id = #{params[:syllabus_id]}").first
|
@syllabus = Syllabus.where("id = #{params[:syllabus_id]}").first
|
||||||
unless @syllabus.nil?
|
unless @syllabus.nil?
|
||||||
@courses = @syllabus.courses.not_deleted.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc")
|
if params[:is_delete] && params[:is_delete] == '1'
|
||||||
|
@courses = @syllabus.courses.where("is_delete = 1").select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc")
|
||||||
|
else
|
||||||
|
@courses = @syllabus.courses.not_deleted.select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS updatetime").order("updatetime desc")
|
||||||
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
@ -3566,18 +3703,12 @@ class UsersController < ApplicationController
|
||||||
if params[:type].present?
|
if params[:type].present?
|
||||||
case params[:type]
|
case params[:type]
|
||||||
when 'OrgDocumentComment'
|
when 'OrgDocumentComment'
|
||||||
#obj = OrgDocumentComment.where('id = ?', params[:id].to_i).first
|
|
||||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
@type = 'OrgDocumentComment'
|
@type = 'OrgDocumentComment'
|
||||||
#comments = []
|
|
||||||
@journals = OrgDocumentComment.where("root_id = #{params[:id].to_i}").reorder("created_at desc")
|
@journals = OrgDocumentComment.where("root_id = #{params[:id].to_i}").reorder("created_at desc")
|
||||||
when 'Message','is_project_message'
|
when 'Message','is_project_message'
|
||||||
#obj = Message.where('id = ?', params[:id].to_i).first
|
|
||||||
@type = 'Message'
|
@type = 'Message'
|
||||||
@is_course = params[:is_course]
|
|
||||||
@is_board = params[:is_board]
|
|
||||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
#comments = []
|
|
||||||
@journals = Message.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
@journals = Message.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
||||||
when 'News'
|
when 'News'
|
||||||
obj = News.where('id = ?', params[:id].to_i).first
|
obj = News.where('id = ?', params[:id].to_i).first
|
||||||
|
@ -3590,8 +3721,6 @@ class UsersController < ApplicationController
|
||||||
@type = 'Syllabus'
|
@type = 'Syllabus'
|
||||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
when 'JournalsForMessage'
|
when 'JournalsForMessage'
|
||||||
#obj = JournalsForMessage.where('id = ?', params[:id].to_i).first
|
|
||||||
#journals = []
|
|
||||||
@journals = JournalsForMessage.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
@journals = JournalsForMessage.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
||||||
@type = 'JournalsForMessage'
|
@type = 'JournalsForMessage'
|
||||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
|
@ -3608,20 +3737,17 @@ class UsersController < ApplicationController
|
||||||
when 'BlogComment'
|
when 'BlogComment'
|
||||||
obj = BlogComment.where('id = ?', params[:id].to_i).first
|
obj = BlogComment.where('id = ?', params[:id].to_i).first
|
||||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||||
@homepage = params[:homepage].to_i
|
|
||||||
@type = 'BlogComment'
|
@type = 'BlogComment'
|
||||||
@user_id = obj.author_id
|
|
||||||
#comments = []
|
|
||||||
@journals = BlogComment.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
@journals = BlogComment.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
||||||
when 'HomeworkCommon'
|
when 'HomeworkCommon'
|
||||||
obj = HomeworkCommon.where('id = ?', params[:id].to_i).first
|
obj = HomeworkCommon.where('id = ?', params[:id].to_i).first
|
||||||
@type = 'HomeworkCommon'
|
@type = 'HomeworkCommon'
|
||||||
@journals = obj.journals_for_messages.reorder("created_on desc")
|
@journals = obj.journals_for_messages.reorder("created_on desc")
|
||||||
@hw_status = params[:hw_status].to_i if params[:hw_status]
|
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher,obj.course)
|
@is_teacher = User.current.allowed_to?(:as_teacher,obj.course)
|
||||||
@user_activity_id = params[:user_activity_id].to_i if params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id].to_i if params[:user_activity_id]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@journals = get_no_children_comments_all @journals
|
||||||
end
|
end
|
||||||
|
|
||||||
def homepage
|
def homepage
|
||||||
|
|
|
@ -125,7 +125,8 @@ class VersionsController < ApplicationController
|
||||||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||||
# @offset ||= @issue_pages.offset
|
# @offset ||= @issue_pages.offset
|
||||||
@issues = paginateHelper @version_issues, @limit
|
@issues = paginateHelper @version_issues, @limit
|
||||||
@version_issue_assigned_name = @version_issues.group_by(&:assigned_to_id)
|
@version_issue_assigned_name = @version_issues.sort_by{ |i| Issue.where(:project_id => @project.id ,
|
||||||
|
:assigned_to_id => i.assigned_to_id, :fixed_version_id => @version.id).count }.reverse.group_by(&:assigned_to_id)
|
||||||
format.html {
|
format.html {
|
||||||
# @issues = @version.fixed_issues.visible.
|
# @issues = @version.fixed_issues.visible.
|
||||||
# includes(:status, :tracker, :priority).
|
# includes(:status, :tracker, :priority).
|
||||||
|
|
|
@ -37,7 +37,9 @@ class WatchersController < ApplicationController
|
||||||
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
|
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
|
||||||
@action = 'fans'
|
@action = 'fans'
|
||||||
else
|
else
|
||||||
|
if params[:target_id]
|
||||||
|
@user = User.find(params[:target_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:object_type] == 'project'
|
if params[:object_type] == 'project'
|
||||||
|
@ -78,6 +80,9 @@ class WatchersController < ApplicationController
|
||||||
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
|
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
|
||||||
@action = 'fans'
|
@action = 'fans'
|
||||||
else
|
else
|
||||||
|
if params[:target_id]
|
||||||
|
@user = User.find(params[:target_id])
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if params[:object_type] == 'project'
|
if params[:object_type] == 'project'
|
||||||
@project = Project.find(params[:object_id])
|
@project = Project.find(params[:object_id])
|
||||||
|
|
|
@ -137,7 +137,7 @@ class WechatsController < ActionController::Base
|
||||||
on :fallback, respond: 'fallback message'
|
on :fallback, respond: 'fallback message'
|
||||||
|
|
||||||
on :click, with: 'FEEDBACK' do |request, key|
|
on :click, with: 'FEEDBACK' do |request, key|
|
||||||
request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:373967360,直接互动。\n\n如您有合作事宜洽谈,请联系:\n王林春 老师\n手机:13467631747\nQQ:494496321"
|
request.reply.text "如有问题反馈,请您:\n1、直接切换至输入框,发微信给我们。\n2、加入QQ群:373967360,直接互动。\n3、登录网站:www.trustie.net,给我们留言。\n\n如您有合作事宜洽谈,请联系:\n王林春 老师\n手机:13467631747\nQQ:494496321"
|
||||||
end
|
end
|
||||||
|
|
||||||
on :click, with: 'MY_NEWS' do |request, key|
|
on :click, with: 'MY_NEWS' do |request, key|
|
||||||
|
|
|
@ -116,7 +116,7 @@ class WordsController < ApplicationController
|
||||||
else
|
else
|
||||||
@user_activity_id = -1
|
@user_activity_id = -1
|
||||||
end
|
end
|
||||||
@hw_status = params[:hw_status].to_i
|
@hw_status = params[:hw_status].to_i if
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin?
|
@is_teacher = User.current.allowed_to?(:as_teacher, @homework.course) || User.current.admin?
|
||||||
elsif @journal_destroyed.jour_type == 'Syllabus'
|
elsif @journal_destroyed.jour_type == 'Syllabus'
|
||||||
@syllabus = Syllabus.find @journal_destroyed.jour_id
|
@syllabus = Syllabus.find @journal_destroyed.jour_id
|
||||||
|
@ -315,7 +315,7 @@ class WordsController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js{
|
format.js{
|
||||||
@user_activity_id = params[:user_activity_id].to_i
|
@user_activity_id = params[:user_activity_id].to_i
|
||||||
@hw_status = params[:hw_status].to_i
|
@hw_status = params[:hw_status].to_i if params[:hw_status]
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher, @homework_common.course) || User.current.admin?
|
@is_teacher = User.current.allowed_to?(:as_teacher, @homework_common.course) || User.current.admin?
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -349,7 +349,7 @@ class WordsController < ApplicationController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js{
|
format.js{
|
||||||
@user_activity_id = params[:user_activity_id].to_i
|
@user_activity_id = params[:user_activity_id].to_i
|
||||||
@hw_status = params[:hw_status].to_i
|
@hw_status = params[:hw_status].to_i if params[:hw_status]
|
||||||
@is_teacher = User.current.allowed_to?(:as_teacher, @homework_common.course) || User.current.admin?
|
@is_teacher = User.current.allowed_to?(:as_teacher, @homework_common.course) || User.current.admin?
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -454,45 +454,5 @@ class WordsController < ApplicationController
|
||||||
end
|
end
|
||||||
obj
|
obj
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_reply_adapter obj, options
|
|
||||||
#modify by nwb
|
|
||||||
#添加对课程留言的支持
|
|
||||||
#留言回复应该不关系其所属的Class,而关心的是其所属的父留言
|
|
||||||
case obj.jour_type
|
|
||||||
when 'Principal'
|
|
||||||
obj.jour.add_jour(nil, nil, nil, options)
|
|
||||||
when 'Project'
|
|
||||||
Project.add_new_jour(nil, nil, obj.jour_id, options)
|
|
||||||
when 'Course'
|
|
||||||
Course.add_new_jour(nil, nil, obj.jour_id, options)
|
|
||||||
when 'Bid'
|
|
||||||
obj.jour.add_jour(nil, nil, nil, options)
|
|
||||||
when 'Contest'
|
|
||||||
obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
|
||||||
when 'Softapplication'
|
|
||||||
obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
|
||||||
when 'HomeworkAttach'
|
|
||||||
obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
|
||||||
end
|
|
||||||
# obj = obj_distinguish_url_origin || User.find_by_id(2)
|
|
||||||
# if obj.kind_of? User
|
|
||||||
# obj.add_jour(nil, nil, nil, options)
|
|
||||||
# elsif obj.kind_of? Project
|
|
||||||
# Project.add_new_jour(nil, nil, obj.id, options)
|
|
||||||
# elsif obj.kind_of? Course
|
|
||||||
# Course.add_new_jour(nil, nil, obj.id, options)
|
|
||||||
# elsif obj.kind_of? Bid
|
|
||||||
# obj.add_jour(nil, nil, nil, options)
|
|
||||||
# elsif obj.kind_of? Contest
|
|
||||||
# obj.add_jour(nil, nil, obj.id, options) #new added
|
|
||||||
# elsif obj.kind_of? Softapplication
|
|
||||||
# obj.add_jour(nil, nil, obj.id, options) #new added
|
|
||||||
# elsif obj.kind_of? HomeworkAttach
|
|
||||||
# obj.add_jour(nil, nil, obj.id, options) #new added
|
|
||||||
# else
|
|
||||||
# raise "create reply obj unknow type.#{obj.class}"
|
|
||||||
# end
|
|
||||||
end
|
|
||||||
#######end of message
|
#######end of message
|
||||||
end
|
end
|
||||||
|
|
|
@ -3394,6 +3394,61 @@ def secdomain_with_protocol secdomain
|
||||||
return Setting.protocol + "://" + secdomain + ".trustie.net"
|
return Setting.protocol + "://" + secdomain + ".trustie.net"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#根据回复类型获取回复
|
||||||
|
def get_reply_by_type type, reply_id
|
||||||
|
reply = nil
|
||||||
|
case type
|
||||||
|
when 'HomeworkCommon'
|
||||||
|
reply = JournalsForMessage.find reply_id
|
||||||
|
when 'JournalsForMessage'
|
||||||
|
reply = JournalsForMessage.find reply_id
|
||||||
|
when 'Message'
|
||||||
|
reply = Message.find reply_id
|
||||||
|
when 'BlogComment'
|
||||||
|
reply = BlogComment.find reply_id
|
||||||
|
when 'OrgDocumentComment'
|
||||||
|
reply = OrgDocumentComment.find reply_id
|
||||||
|
when 'News'
|
||||||
|
reply = Comment.find reply_id
|
||||||
|
when 'Issue'
|
||||||
|
reply = Journal.find reply_id
|
||||||
|
when 'Syllabus'
|
||||||
|
reply = JournalsForMessage.find reply_id
|
||||||
|
end
|
||||||
|
reply
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取不包含子节点的回复(前三个)
|
||||||
|
def get_no_children_comments comments
|
||||||
|
result = {}
|
||||||
|
no_children_comments = []
|
||||||
|
count = 0
|
||||||
|
three_more = false
|
||||||
|
comments.each do |comment|
|
||||||
|
if comment.children.blank?
|
||||||
|
count = count + 1
|
||||||
|
if count > 3
|
||||||
|
three_more = true
|
||||||
|
end
|
||||||
|
break if count > 3
|
||||||
|
no_children_comments << comment
|
||||||
|
end
|
||||||
|
end
|
||||||
|
result[:three_more] = three_more
|
||||||
|
result[:no_children_comments] = no_children_comments
|
||||||
|
result
|
||||||
|
end
|
||||||
|
|
||||||
|
#获取不包含子节点的回复(所有)
|
||||||
|
def get_no_children_comments_all comments
|
||||||
|
no_children_comments = []
|
||||||
|
comments.each do |comment|
|
||||||
|
if comment.children.blank?
|
||||||
|
no_children_comments << comment
|
||||||
|
end
|
||||||
|
end
|
||||||
|
no_children_comments
|
||||||
|
end
|
||||||
|
|
||||||
#获取回复的所有父节点
|
#获取回复的所有父节点
|
||||||
def get_reply_parents parents_rely, comment
|
def get_reply_parents parents_rely, comment
|
||||||
|
@ -3746,3 +3801,43 @@ def homework_type_option
|
||||||
type
|
type
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def add_reply_adapter obj, options
|
||||||
|
#modify by nwb
|
||||||
|
#添加对课程留言的支持
|
||||||
|
#留言回复应该不关系其所属的Class,而关心的是其所属的父留言
|
||||||
|
case obj.jour_type
|
||||||
|
when 'Principal'
|
||||||
|
obj.jour.add_jour(nil, nil, nil, options)
|
||||||
|
when 'Project'
|
||||||
|
Project.add_new_jour(nil, nil, obj.jour_id, options)
|
||||||
|
when 'Course'
|
||||||
|
Course.add_new_jour(nil, nil, obj.jour_id, options)
|
||||||
|
#when 'Bid'
|
||||||
|
# obj.jour.add_jour(nil, nil, nil, options)
|
||||||
|
#when 'Contest'
|
||||||
|
# obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
||||||
|
#when 'Softapplication'
|
||||||
|
# obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
||||||
|
#when 'HomeworkAttach'
|
||||||
|
# obj.jour.add_jour(nil, nil, obj.jour_id, options)
|
||||||
|
end
|
||||||
|
# obj = obj_distinguish_url_origin || User.find_by_id(2)
|
||||||
|
# if obj.kind_of? User
|
||||||
|
# obj.add_jour(nil, nil, nil, options)
|
||||||
|
# elsif obj.kind_of? Project
|
||||||
|
# Project.add_new_jour(nil, nil, obj.id, options)
|
||||||
|
# elsif obj.kind_of? Course
|
||||||
|
# Course.add_new_jour(nil, nil, obj.id, options)
|
||||||
|
# elsif obj.kind_of? Bid
|
||||||
|
# obj.add_jour(nil, nil, nil, options)
|
||||||
|
# elsif obj.kind_of? Contest
|
||||||
|
# obj.add_jour(nil, nil, obj.id, options) #new added
|
||||||
|
# elsif obj.kind_of? Softapplication
|
||||||
|
# obj.add_jour(nil, nil, obj.id, options) #new added
|
||||||
|
# elsif obj.kind_of? HomeworkAttach
|
||||||
|
# obj.add_jour(nil, nil, obj.id, options) #new added
|
||||||
|
# else
|
||||||
|
# raise "create reply obj unknow type.#{obj.class}"
|
||||||
|
# end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
|
@ -267,6 +267,16 @@ module ProjectsHelper
|
||||||
project_name = versions.blank? ? "" : versions.first.project.name
|
project_name = versions.blank? ? "" : versions.first.project.name
|
||||||
grouped = Hash.new {|h,k| h[k] = []}
|
grouped = Hash.new {|h,k| h[k] = []}
|
||||||
grouped[project_name] << ["请选择里程碑", 0]
|
grouped[project_name] << ["请选择里程碑", 0]
|
||||||
|
|
||||||
|
=begin
|
||||||
|
unless selected.nil?
|
||||||
|
if (params[:action] == "show" ) && Version.find(selected.id).status == "closed"
|
||||||
|
version_name = Version.find(selected.id).name
|
||||||
|
grouped[project_name] << [version_name, selected.id]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
=end
|
||||||
|
|
||||||
versions.each do |version|
|
versions.each do |version|
|
||||||
grouped[version.project.name] << [version.name, version.id]
|
grouped[version.project.name] << [version.name, version.id]
|
||||||
end
|
end
|
||||||
|
|
|
@ -100,7 +100,7 @@ module UsersHelper
|
||||||
def applied_project_users applied_message
|
def applied_project_users applied_message
|
||||||
# case applied_message.status
|
# case applied_message.status
|
||||||
# when 3,2,1,5,4,7,6
|
# when 3,2,1,5,4,7,6
|
||||||
user = User.find(applied_message.applied_user_id)
|
user = User.find(applied_message.applied_user_id).show_name
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -854,7 +854,8 @@ class Issue < ActiveRecord::Base
|
||||||
return @assignable_versions if @assignable_versions
|
return @assignable_versions if @assignable_versions
|
||||||
|
|
||||||
# versions = project.shared_versions.open.all
|
# versions = project.shared_versions.open.all
|
||||||
versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc")
|
# versions = Version.where(:project_id => project.id, :status => "open").order("created_on desc")
|
||||||
|
versions = Version.where(:project_id => project.id).order("created_on desc")
|
||||||
if fixed_version
|
if fixed_version
|
||||||
if fixed_version_id_changed?
|
if fixed_version_id_changed?
|
||||||
# nothing to do
|
# nothing to do
|
||||||
|
|
|
@ -344,4 +344,9 @@ class JournalsForMessage < ActiveRecord::Base
|
||||||
def content_detail
|
def content_detail
|
||||||
self.notes
|
self.notes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def set_children_readed_delay
|
||||||
|
# fetch_user_leaveWord_reply(self).update_all(:is_readed => true, :status => false)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,6 +9,7 @@ class Organization < ActiveRecord::Base
|
||||||
has_many :org_subfields, :dependent => :destroy
|
has_many :org_subfields, :dependent => :destroy
|
||||||
has_many :users, :through => :org_members
|
has_many :users, :through => :org_members
|
||||||
has_many :files
|
has_many :files
|
||||||
|
has_many :org_messages, :class_name => 'OrgMessage', :dependent => :destroy
|
||||||
acts_as_attachable
|
acts_as_attachable
|
||||||
validates_uniqueness_of :name
|
validates_uniqueness_of :name
|
||||||
after_create :save_as_org_activity, :add_default_subfields
|
after_create :save_as_org_activity, :add_default_subfields
|
||||||
|
|
|
@ -30,9 +30,9 @@
|
||||||
<% for attachment in attachments %>
|
<% for attachment in attachments %>
|
||||||
<div style="float:left;">
|
<div style="float:left;">
|
||||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||||
<%if is_float%>
|
<% if is_float %>
|
||||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||||
<% end%>
|
<% end %>
|
||||||
<span title="<%= attachment.filename %>" id = "attachment_">
|
<span title="<%= attachment.filename %>" id = "attachment_">
|
||||||
<% if options[:length] %>
|
<% if options[:length] %>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
|
@ -42,15 +42,15 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if User.current.logged? %>
|
<% if User.current.logged? %>
|
||||||
<%= link_to_short_attachment attachment, :length=> 58,:class => 'hidden link_file_a fl newsBlue mw400', :download => true -%>
|
<%= link_to_short_attachment attachment, :length => 58,:class => 'hidden link_file_a fl newsBlue mw400 h15', :download => true -%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to(attachment.filename, signin_url_without_domain,:length=> 58, :class => "hidden link_file_a fl newsBlue mw400") %>
|
<%= link_to(attachment.filename, signin_url_without_domain,:length => 58, :class => "hidden link_file_a fl newsBlue mw400 h15") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
<%if is_float%>
|
<% if is_float %>
|
||||||
</div>
|
</div>
|
||||||
<% end%>
|
<% end %>
|
||||||
|
|
||||||
<% if attachment.is_text? %>
|
<% if attachment.is_text? %>
|
||||||
<%= link_to image_tag('magnifier.png'),
|
<%= link_to image_tag('magnifier.png'),
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment, :type => 'BlogComment', :user_activity_id => @article.id}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @reply_count > @page * @limit + 10 %>
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
<div id="more_blog_replies">
|
<div id="more_blog_replies">
|
||||||
<div class="detail_cont_hide clearfix">
|
<div class="detail_cont_hide clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<% if @in_user_homepage %>
|
<%# if @in_user_homepage %>
|
||||||
<% homepage = BlogComment.find(@user.blog.homepage_id) %>
|
<%# homepage = BlogComment.find(@user.blog.homepage_id) %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>");
|
//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>");
|
||||||
<% else%>
|
<%# else%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% end %>
|
<%# end %>
|
||||||
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
||||||
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity');
|
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity');
|
|
@ -1,11 +1,12 @@
|
||||||
<% if @in_user_homepage %>
|
<%# if @in_user_homepage %>
|
||||||
<% homepage = BlogComment.find(@user.blog.homepage_id) %>
|
<%# homepage = BlogComment.find(@user.blog.homepage_id) %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id}) %>");
|
//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => homepage, :user_activity_id => homepage.id}) %>");
|
||||||
<% elsif @in_user_center%>
|
<%# elsif @in_user_center%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
||||||
// init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
// init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
||||||
<% else%>
|
<%# else%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
||||||
//init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
//init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
||||||
<% end %>
|
<%# end %>
|
||||||
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/user_blog_post_reply', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
||||||
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity');
|
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity');
|
|
@ -109,9 +109,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc") %>
|
|
||||||
<% count= all_replies.count %>
|
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<div class="homepagePostReplyBanner">
|
<div class="homepagePostReplyBanner">
|
||||||
<div class="homepagePostReplyBannerCount">回复
|
<div class="homepagePostReplyBannerCount">回复
|
||||||
|
@ -124,7 +122,6 @@
|
||||||
<div class="homepagePostReplyBannerTime"></div>
|
<div class="homepagePostReplyBannerTime"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%# comments = all_replies %>
|
|
||||||
<% if @reply_count > 0 %>
|
<% if @reply_count > 0 %>
|
||||||
<div class="" id="reply_div_<%= @article.id %>">
|
<div class="" id="reply_div_<%= @article.id %>">
|
||||||
<%= render :partial => 'blog_comment_show_replies' %>
|
<%= render :partial => 'blog_comment_show_replies' %>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class = "cl"> </div>
|
<div class = "cl"> </div>
|
||||||
<div id="blog-list">
|
<div id="blog-list">
|
||||||
<div class="listbox mt10" >
|
<div class="listbox mt10" >
|
||||||
<h2 class="list-h2">博客列表</h2>
|
<p class="list-h2">博客列表</p>
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<span class="grayTxt ">排序:</span>
|
<span class="grayTxt ">排序:</span>
|
||||||
<%= link_to "时间", {:controller => 'blogs', :action => 'index', :id =>@user, :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
<%= link_to "时间", {:controller => 'blogs', :action => 'index', :id =>@user, :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
||||||
|
@ -21,9 +21,9 @@
|
||||||
<ul class="list-file">
|
<ul class="list-file">
|
||||||
<li><span class="item_list fl"></span>
|
<li><span class="item_list fl"></span>
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=> activity.author, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl" %>
|
<%= link_to activity.title.to_s.html_safe, user_blog_blog_comment_path(:user_id=> activity.author, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title-normal fl" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title fl"%>
|
<%= link_to activity.title.subject.to_s.html_safe, user_blog_blog_comment_path(:user_id=>activity.author, :blog_id=>activity.blog.id,:id=>activity), :class=> "list-title-normal fl"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%# if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %>
|
<%# if activity.blog.homepage_id and activity.id == activity.blog.homepage_id %>
|
||||||
<!--<span class="font_normal ml10 fr">[已设为首页]</span>-->
|
<!--<span class="font_normal ml10 fr">[已设为首页]</span>-->
|
||||||
|
@ -36,7 +36,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% count=BlogComment.where("root_id = #{activity.id}").count%> <li class="ml15">
|
<% count=BlogComment.where("root_id = #{activity.id}").count%>
|
||||||
|
<li class="ml15">
|
||||||
<span class="grayTxt">发布:<%= format_time(activity.created_on) %></span>
|
<span class="grayTxt">发布:<%= format_time(activity.created_on) %></span>
|
||||||
<span class="grayTxt">更新:<%= format_time(activity.updated_on) %></span>
|
<span class="grayTxt">更新:<%= format_time(activity.updated_on) %></span>
|
||||||
<p class="list-info fr grayTxt">
|
<p class="list-info fr grayTxt">
|
||||||
|
|
|
@ -45,16 +45,15 @@
|
||||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_repies = BlogComment.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
<% all_repies = BlogComment.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
||||||
<% count = all_repies.count %>
|
<% count = all_repies.count %>
|
||||||
|
<% no_children_comments = get_no_children_comments all_repies %>
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1} %>
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :homepage => 1, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
<% comments = all_repies[0..2] %>
|
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%>
|
<%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'BlogComment', :activity_id =>activity.id, :homepage => 1, :user_id => activity.author_id}%>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<% if @news.project_id && @news.project_id != -1 %>
|
<% if @news.project_id && @news.project_id != -1 %>
|
||||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% elsif @news.course_id %>
|
<% elsif @news.course_id %>
|
||||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/course_news_post_reply', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% elsif @news.org_subfield_id %>
|
<% elsif @news.org_subfield_id %>
|
||||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<% if @news.project_id && @news.project_id != -1 %>
|
<% if @news.project_id && @news.project_id != -1 %>
|
||||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'projects/project_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% elsif @news.course_id %>
|
<% elsif @news.course_id %>
|
||||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'users/course_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'users/course_news_post_reply', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% elsif @news.org_subfield_id %>
|
<% elsif @news.org_subfield_id %>
|
||||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -13,5 +13,11 @@ function click_OK(){
|
||||||
hideModal();
|
hideModal();
|
||||||
<% if params[:source] == "1" %>
|
<% if params[:source] == "1" %>
|
||||||
window.location.href = "<%=syllabus_courselist_syllabus_path(@syllabus, :list_type => params[:type].to_i) %>";
|
window.location.href = "<%=syllabus_courselist_syllabus_path(@syllabus, :list_type => params[:type].to_i) %>";
|
||||||
|
<% elsif params[:source] == "0" %>
|
||||||
|
<% if params[:type] == "0" %>
|
||||||
|
window.location.href = "<%=user_courselist_user_path(User.current) %>";
|
||||||
|
<% else %>
|
||||||
|
window.location.href = "<%=user_archive_courses_users_path() %>";
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
|
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
|
||||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||||
<%=link_to "成员管理", :controller => 'courses', :action => 'settings', :id => @course.id, :tab=>'member', :class => 'hw_more_li' %>
|
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab=>'member'}, :class => 'hw_more_li' %>
|
||||||
</span>
|
</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,21 +13,12 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<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><%= @subPage_title %></h3>
|
<h3 class="fl"><%= @subPage_title %></h3>
|
||||||
<div class="hw_more_box">
|
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
||||||
<ul>
|
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab => 'member'}, :class => 'link-blue ml10 fr mt5' %>
|
||||||
<li class="hw_more_icons">
|
<% end %>
|
||||||
<ul class="hw_more_txt">
|
<%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'), :class => 'link-blue fr mt5'%>
|
||||||
<li><%= link_to l(:label_export_excel), export_course_member_excel_course_path(@course,:format => 'xls'), :class => 'hw_more_li'%></li>
|
<div class="cl"></div>
|
||||||
<% if User.current.allowed_to?(:as_teacher,@course) %>
|
|
||||||
<li>
|
|
||||||
<%=link_to "成员管理", {:controller => 'courses', :action => 'settings', :id => @course.id, :tab => 'member'}, :class => 'hw_more_li' %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<%= render :partial => 'course_student', :locals => {:members => @members} %>
|
<%= render :partial => 'course_student', :locals => {:members => @members} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<% if params[:group_id] != "0" %>
|
<% if params[:group_id] != "0" %>
|
||||||
$("#member_li_<%=@member.id %>").html("");
|
var all_indexes = $("#member_li_<%=@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_<%=@member.id %>").remove();
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @group && @group != "-1" %>
|
<% if @group && @group != "-1" %>
|
||||||
//$("#member_content").html("<%#= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @results})%>");
|
//$("#member_content").html("<%#= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @results})%>");
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
<span>测验时长:<%= exercise.time %>分钟</span>
|
<span>测验时长:<%= exercise.time %>分钟</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<pre class="fontGrey2 font_cus" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:pre-wrap;white-space:-o-pre-wrap;word-break:normal;word-wrap: break-word;">
|
<pre class="fontGrey2 font_cus" style="white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:pre-wrap;white-space:-o-pre-wrap;word-break:normal;word-wrap: break-word;"><%= exercise.exercise_description.nil? ? "" :exercise.exercise_description.html_safe%></pre>
|
||||||
<%= exercise.exercise_description.nil? ? "" :exercise.exercise_description.html_safe%>
|
|
||||||
</pre>
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
|
@ -98,8 +98,8 @@
|
||||||
<li class=" clear" style="border:1px solid #c8c8c8;">
|
<li class=" clear" style="border:1px solid #c8c8c8;">
|
||||||
<% if @issue.safe_attribute? 'start_date' %>
|
<% if @issue.safe_attribute? 'start_date' %>
|
||||||
<%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
<%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||||
:required => @issue.required_attribute?('start_date'), :onchange=>"issue_start_date_change();",
|
:required => @issue.required_attribute?('start_date'), :onchange => "issue_start_date_change();",
|
||||||
:class=>"fl calendar_input", :style=>"width:170px;" %>
|
:class => "fl calendar_input", :style => "width:170px;" %>
|
||||||
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
@ -110,8 +110,8 @@
|
||||||
<label class="label02" ></label>
|
<label class="label02" ></label>
|
||||||
<% if @issue.safe_attribute? 'due_date' %>
|
<% if @issue.safe_attribute? 'due_date' %>
|
||||||
<%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
<%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||||
:required => @issue.required_attribute?('due_date'), :onchange=>"issue_end_date_change();",
|
:required => @issue.required_attribute?('due_date'), :onchange => "issue_end_date_change();",
|
||||||
:class=>"fl calendar_input",:style=>"width: 170px;", :placeholder=> "请选择结束日期" %>
|
:class => "fl calendar_input",:style => "width: 170px;", :placeholder => "请选择结束日期" %>
|
||||||
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
<li class=" clear">
|
<li class=" clear">
|
||||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||||
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
<%= f.text_field :estimated_hours, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||||
:required => @issue.required_attribute?('estimated_hours'), :placeholder=> "请填写预计工时" %>
|
:required => @issue.required_attribute?('estimated_hours'), :placeholder => "请填写预计工时" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</li>
|
</li>
|
||||||
<li class=" clear"><%= l(:field_estimated_hours) %></li>
|
<li class=" clear"><%= l(:field_estimated_hours) %></li>
|
||||||
|
@ -160,9 +160,5 @@
|
||||||
}
|
}
|
||||||
// 里程碑添加默认选项
|
// 里程碑添加默认选项
|
||||||
$("#issue_fixed_version_id option[value='']").remove();
|
$("#issue_fixed_version_id option[value='']").remove();
|
||||||
<%# if params[:action] == "new" %>
|
|
||||||
// $('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>");
|
|
||||||
<%# else %>
|
|
||||||
// $('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>");
|
|
||||||
<%# end %>
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'Issue', :user_activity_id => issue.id}%>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
<% if comment.details.any? %>
|
<% if comment.details.any? %>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
|
<%= link_to "打开<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@issue_open_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
|
||||||
</li>
|
</li>
|
||||||
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
||||||
<%= link_to "锁定<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
<%= link_to "关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@issue_close_count}</span>".html_safe, "", :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--issues_statistics end-->
|
</div><!--issues_statistics end-->
|
||||||
|
|
|
@ -11,9 +11,18 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="hidden dis p10" style="width:166px;">合计</td>
|
||||||
|
<td class="w130"><%= @alltotal[0] %></td>
|
||||||
|
<td class="w130"><%= @alltotal[2] %></td>
|
||||||
|
<td class="w130"><%= @alltotal[4] %></td>
|
||||||
|
<td class="w130"><%= @alltotal[1] %></td>
|
||||||
|
<td class="w130"><%= @alltotal[3] %></td>
|
||||||
|
<td class="w130"><%= @alltotal[5] %></td>
|
||||||
|
</tr>
|
||||||
<% @results.each do |k,v|%>
|
<% @results.each do |k,v|%>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
<td class="hidden dis p10" style="width:166px;"><%= v[:name] =="Anonymous" ? "未指派" : v[:name] %></td>
|
||||||
<td class="w130"><%= v[0] %></td>
|
<td class="w130"><%= v[0] %></td>
|
||||||
<td class="w130"><%= v[2] %></td>
|
<td class="w130"><%= v[2] %></td>
|
||||||
<td class="w130"><%= v[4] %></td>
|
<td class="w130"><%= v[4] %></td>
|
||||||
|
@ -22,14 +31,5 @@
|
||||||
<td class="w130"><%= v[5] %></td>
|
<td class="w130"><%= v[5] %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
|
||||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
|
||||||
<td class="w130"><%= @alltotal[0] %></td>
|
|
||||||
<td class="w130"><%= @alltotal[2] %></td>
|
|
||||||
<td class="w130"><%= @alltotal[4] %></td>
|
|
||||||
<td class="w130"><%= @alltotal[1] %></td>
|
|
||||||
<td class="w130"><%= @alltotal[3] %></td>
|
|
||||||
<td class="w130"><%= @alltotal[5] %></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
|
@ -11,10 +11,19 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="hidden dis p10" style="width:166px;">合计</td>
|
||||||
|
<td class="w130"><%= @closetotal[0] %></td>
|
||||||
|
<td class="w130"><%= @closetotal[2] %></td>
|
||||||
|
<td class="w130"><%= @closetotal[4] %></td>
|
||||||
|
<td class="w130"><%= @closetotal[1] %></td>
|
||||||
|
<td class="w130"><%= @closetotal[3] %></td>
|
||||||
|
<td class="w130"><%= @closetotal[5] %></td>
|
||||||
|
</tr>
|
||||||
<% @results.each do |k,v|%>
|
<% @results.each do |k,v|%>
|
||||||
<% if v[12] > 0 %>
|
<% if v[12] > 0 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
<td class="hidden dis p10" style="width:166px;"><%= v[:name] == "Anonymous" ? "未指派" : v[:name] %></td>
|
||||||
<td class="w130"><%= v[12] %></td>
|
<td class="w130"><%= v[12] %></td>
|
||||||
<td class="w130"><%= v[14] %></td>
|
<td class="w130"><%= v[14] %></td>
|
||||||
<td class="w130"><%= v[16] %></td>
|
<td class="w130"><%= v[16] %></td>
|
||||||
|
@ -24,14 +33,5 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
|
||||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
|
||||||
<td class="w130"><%= @closetotal[0] %></td>
|
|
||||||
<td class="w130"><%= @closetotal[2] %></td>
|
|
||||||
<td class="w130"><%= @closetotal[4] %></td>
|
|
||||||
<td class="w130"><%= @closetotal[1] %></td>
|
|
||||||
<td class="w130"><%= @closetotal[3] %></td>
|
|
||||||
<td class="w130"><%= @closetotal[5] %></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
|
@ -11,10 +11,19 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="hidden dis p10" style="width:166px;">合计</td>
|
||||||
|
<td class="w130"><%= @opentotal[0] %></td>
|
||||||
|
<td class="w130"><%= @opentotal[2] %></td>
|
||||||
|
<td class="w130"><%= @opentotal[4] %></td>
|
||||||
|
<td class="w130"><%= @opentotal[1] %></td>
|
||||||
|
<td class="w130"><%= @opentotal[3] %></td>
|
||||||
|
<td class="w130"><%= @opentotal[5] %></td>
|
||||||
|
</tr>
|
||||||
<% @results.each do |k,v|%>
|
<% @results.each do |k,v|%>
|
||||||
<% if v[6] > 0 %>
|
<% if v[6] > 0 %>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="hidden dis p10" style="width:166px;"><%= v[:name] %></td>
|
<td class="hidden dis p10" style="width:166px;"><%= v[:name] =="Anonymous" ? "未指派" : v[:name] %></td>
|
||||||
<td class="w130"><%= v[6] %></td>
|
<td class="w130"><%= v[6] %></td>
|
||||||
<td class="w130"><%= v[8] %></td>
|
<td class="w130"><%= v[8] %></td>
|
||||||
<td class="w130"><%= v[10] %></td>
|
<td class="w130"><%= v[10] %></td>
|
||||||
|
@ -24,14 +33,5 @@
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<tr>
|
|
||||||
<td class="hidden dis p10" style="width:166px;">Total</td>
|
|
||||||
<td class="w130"><%= @opentotal[0] %></td>
|
|
||||||
<td class="w130"><%= @opentotal[2] %></td>
|
|
||||||
<td class="w130"><%= @opentotal[4] %></td>
|
|
||||||
<td class="w130"><%= @opentotal[1] %></td>
|
|
||||||
<td class="w130"><%= @opentotal[3] %></td>
|
|
||||||
<td class="w130"><%= @opentotal[5] %></td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
|
@ -19,8 +19,8 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% unless @project.forked_from_project_id.nil? %>
|
<% unless @project.forked_from_project_id.nil? %>
|
||||||
<div class="fl pro_new_name ml15 clear mt5">
|
<div class="fl pro_new_name ml15 clear mt5">
|
||||||
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl" %>
|
<span class="vl_fork fl mr5 mt2">forked from</span> <%=link_to "#{get_fork_from_project(@project.forked_from_project_id).owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(get_fork_from_project(@project.forked_from_project_id).owner), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
||||||
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl" %>
|
<%=link_to get_fork_from_project(@project.forked_from_project_id).name, project_path(get_fork_from_project(@project.forked_from_project_id)), :class => "pro_new_username_fork fl", :target => "_blank" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -140,25 +140,25 @@
|
||||||
|
|
||||||
<div class="subNavBox ">
|
<div class="subNavBox ">
|
||||||
<div class="subNav ">
|
<div class="subNav ">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'show',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'show',:id=>@user)%>" class=" f14 c_blue02">
|
||||||
动态
|
动态
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<% if @center_flag %>
|
<% if @center_flag %>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courselist',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_courselist',:id=>@user)%>" class=" f14 c_blue02">
|
||||||
我的课程
|
我的课程
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_projectlist',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_projectlist',:id=>@user)%>" class=" f14 c_blue02">
|
||||||
我的项目
|
我的项目
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>@user.id,:type=>1)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>@user,:type=>1)%>" class=" f14 c_blue02">
|
||||||
我的资源库
|
我的资源库
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=Attachment.where("(author_id = #{@user.id} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) or (container_type = 'Course' and container_id in (#{@user.courses.map{|c| c.id}.empty? ? '0' : @user.courses.map{|c| c.id}.join(',')}))").count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=Attachment.where("(author_id = #{@user.id} and container_type in('Project','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) or (container_type = 'Course' and container_id in (#{@user.courses.map{|c| c.id}.empty? ? '0' : @user.courses.map{|c| c.id}.join(',')}))").count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -166,13 +166,13 @@
|
||||||
|
|
||||||
<% else%>
|
<% else%>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_courselist',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_courselist',:id=>@user)%>" class=" f14 c_blue02">
|
||||||
TA的课程
|
TA的课程
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.visible.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.visible.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="subNav">
|
<div class="subNav">
|
||||||
<a href="<%=url_for(:controller => 'users', :action => 'user_projectlist',:id=>@user.id)%>" class=" f14 c_blue02">
|
<a href="<%=url_for(:controller => 'users', :action => 'user_projectlist',:id=>@user)%>" class=" f14 c_blue02">
|
||||||
TA的项目
|
TA的项目
|
||||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.visible.count%>)</span>
|
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.visible.count%>)</span>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -148,7 +148,7 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="<%=user_fanslist_user_path(@user) %>">
|
<a href="<%=user_fanslist_user_path(@user) %>">
|
||||||
<strong>粉丝</strong><br />
|
<strong>粉丝</strong><br />
|
||||||
<span class="sy_cgrey"><%= @user.watcher_users.count %></span>
|
<span id="user_fans_number" class="sy_cgrey"><%= @user.watcher_users.count %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -162,8 +162,8 @@
|
||||||
<% if hidden_unproject_infos %>
|
<% if hidden_unproject_infos %>
|
||||||
<ul class="users_accordion mb10">
|
<ul class="users_accordion mb10">
|
||||||
<li id="user_01" class="user_icons_course">
|
<li id="user_01" class="user_icons_course">
|
||||||
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
|
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list" %>
|
||||||
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_courselist", :id => @user.id}, :style => "color:#aaa;" %></font>
|
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_courselist", :id => @user}, :style => "color:#aaa;" %></font>
|
||||||
<% courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
|
<% courses = @user.favorite_courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(updated_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(10) %>
|
||||||
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
|
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
|
||||||
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
|
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
|
||||||
|
@ -181,7 +181,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% if @user == User.current %>
|
<% if @user == User.current %>
|
||||||
<li id="user_05" class="user_icons_myhw">
|
<li id="user_05" class="user_icons_myhw">
|
||||||
<%=link_to '我的作业', my_homeworks_user_path(@user.id), :target => "_blank", :style => "font-size:14px;" %>
|
<%=link_to '我的作业', my_homeworks_user_path(@user), :target => "_blank", :style => "font-size:14px;" %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -190,8 +190,8 @@
|
||||||
|
|
||||||
<ul class="users_accordion mb10">
|
<ul class="users_accordion mb10">
|
||||||
<li id="user_06" class="user_icons_project">
|
<li id="user_06" class="user_icons_project">
|
||||||
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
|
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user}, :id => 'user_project_list'%>
|
||||||
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :style => "color:#aaa;" %></font>
|
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_projectlist", :id => @user}, :style => "color:#aaa;" %></font>
|
||||||
<% projects = @user.favorite_projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
|
<% projects = @user.favorite_projects.visible.select("projects.*, (SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(10)%>
|
||||||
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
|
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
|
||||||
<%=render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => projects} %>
|
<%=render :partial => 'layouts/homepage_left_project_list', :locals => {:projects => projects} %>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Message', :user_activity_id => @topic.id}%>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||||
<%= reply.content.html_safe%>
|
<%= reply.content.html_safe%>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @reply_count > @page * @limit + 10 %>
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
<div id="more_message_replies">
|
<div id="more_message_replies">
|
||||||
<div class="detail_cont_hide clearfix">
|
<div class="detail_cont_hide clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33, :height => 33), user_path(reply.author) %>
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33, :height => 33), user_path(reply.author) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply} %>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Message', :user_activity_id => @topic.id} %>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||||
<%= reply.content.html_safe %>
|
<%= reply.content.html_safe %>
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @reply_count > @page * @limit + 10 %>
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
<div id="more_message_replies">
|
<div id="more_message_replies">
|
||||||
<div class="detail_cont_hide clearfix">
|
<div class="detail_cont_hide clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||||
<%= render :partial => 'projects/project_message_contents', :locals => {:comment => reply}%>
|
<%= render :partial => 'projects/project_message_contents', :locals => {:comment => reply, :user_activity_id => @topic.id}%>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||||
<%= reply.content.html_safe%>
|
<%= reply.content.html_safe%>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @reply_count > @page * @limit + 10 %>
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
<div id="more_message_replies">
|
<div id="more_message_replies">
|
||||||
<div class="detail_cont_hide clearfix">
|
<div class="detail_cont_hide clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<% if params[:is_project] %>
|
<% if params[:is_project] %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%elsif @course%>
|
<%elsif @course%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% elsif @org_subfield %>
|
<% elsif @org_subfield %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'organizations/org_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<%end%>
|
<%end%>
|
||||||
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity");
|
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity");
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
<% if params[:is_project] %>
|
<% if params[:is_project] %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'projects/act_messages', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/project_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%elsif @course%>
|
<%elsif @course%>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id,:is_course=>@is_course,:is_board=>@is_board}) %>");
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'users/course_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<% elsif @org_subfield %>
|
<% elsif @org_subfield %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
$("#activity_post_reply_<%= @user_activity_id%>").html("<%= escape_javascript(render :partial => 'organizations/org_message_post_reply', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||||
<%end%>
|
<%end%>
|
||||||
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity");
|
sd_create_editor_from_data(<%= @user_activity_id %>,"","100%", "UserActivity");
|
||||||
|
|
|
@ -214,7 +214,8 @@
|
||||||
<li>确认密码 : </li>
|
<li>确认密码 : </li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="setting_right ">
|
<ul class="setting_right ">
|
||||||
<li><input id="password" name="password" class="w210" type="password" required="true" nh_required="1"></li>
|
<input style="display:none;">
|
||||||
|
<li><input id="password" name="password" autocomplete="off" class="w210" type="password" required="true" nh_required="1"></li>
|
||||||
<li><input id="new_password" name="new_password" class="w210" type="password" required="true" nh_required="1"><span class="c_red ml5">请输入8-12个字符</span></li>
|
<li><input id="new_password" name="new_password" class="w210" type="password" required="true" nh_required="1"><span class="c_red ml5">请输入8-12个字符</span></li>
|
||||||
<li><input id="new_password_confirmation" name="new_password_confirmation" class="w210" type="password" required="true" nh_required="1"></li>
|
<li><input id="new_password_confirmation" name="new_password_confirmation" class="w210" type="password" required="true" nh_required="1"></li>
|
||||||
<li class="ml2">
|
<li class="ml2">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment, :type => 'News', :user_activity_id => @news.id}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @comments_count > @page * @limit + 10 %>
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
<div id="more_news_replies">
|
<div id="more_news_replies">
|
||||||
<div class="detail_cont_hide clearfix">
|
<div class="detail_cont_hide clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment, :type => 'OrgDocumentComment', :user_activity_id => @document.id}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% if @reply_count > @page * @limit + 10 %>
|
<% if @limit_count > @page * @limit + 10 %>
|
||||||
<div id="more_document_replies">
|
<div id="more_document_replies">
|
||||||
<div class="detail_cont_hide clearfix">
|
<div class="detail_cont_hide clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//location.reload();
|
//location.reload();
|
||||||
<% if @act %>
|
<% if @act %>
|
||||||
$("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => 2, :act => @act}) %>");
|
$("#activity_post_reply_<%= @act.id %>").html("<%= escape_javascript(render :partial => 'organizations/org_document_post_reply', :locals => {:activity => @document, :user_activity_id => @act.id}) %>");
|
||||||
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
||||||
<% elsif params[:detail_page] %>
|
<% elsif params[:detail_page] %>
|
||||||
window.location.href = '<%= organization_path(params[:organization_id],:org_subfield_id => @org_sub_id )%>';
|
window.location.href = '<%= organization_path(params[:organization_id],:org_subfield_id => @org_sub_id )%>';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<% if @user_activity_id %>
|
<% if @user_activity_id %>
|
||||||
$("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document,:flag => 2, :act => @act}) %>");
|
$("#activity_post_reply_<%= @user_activity_id %>").html("<%= escape_javascript(render :partial => 'organizations/org_document_post_reply', :locals => {:activity => @document, :user_activity_id => @user_activity_id}) %>");
|
||||||
<% end %>
|
<% end %>
|
||||||
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
||||||
|
|
|
@ -74,9 +74,6 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_replies = OrgDocumentComment.where("root_id = #{@document.id}").reorder("created_at desc") %>
|
|
||||||
<% count = all_replies.count %>
|
|
||||||
|
|
||||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= @document.id %>">
|
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= @document.id %>">
|
||||||
<%# if count > 0 %>
|
<%# if count > 0 %>
|
||||||
|
@ -89,7 +86,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%# comments = all_replies %>
|
|
||||||
<div class="" id="reply_div_<%= @document.id %>">
|
<div class="" id="reply_div_<%= @document.id %>">
|
||||||
<%= render :partial => "document_show_replies" %>
|
<%= render :partial => "document_show_replies" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<% all_replies = OrgDocumentComment.where("root_id = #{activity.id}").reorder("created_at desc") %>
|
||||||
|
<% count = all_replies.count %>
|
||||||
|
<% no_children_comments = get_no_children_comments all_replies %>
|
||||||
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
|
<% if count > 0 %>
|
||||||
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
|
<%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'OrgDocumentComment', :activity_id =>activity.id}%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id %>">
|
||||||
|
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
|
||||||
|
</div>
|
||||||
|
<div class="homepagePostReplyInputContainer">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
||||||
|
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => activity.id, :act_id => user_activity_id, :flag => 2), :method => "post", :remote => true) do |f| %>
|
||||||
|
<div nhname='toolbar_container_<%= user_activity_id %>'></div>
|
||||||
|
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id %>' name="org_content"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= user_activity_id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
|
||||||
|
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p nhname='contentmsg_<%= user_activity_id %>'></p>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
|
@ -0,0 +1,35 @@
|
||||||
|
<% all_replies = Message.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
||||||
|
<% count = all_replies.count %>
|
||||||
|
<% no_children_comments = get_no_children_comments all_replies %>
|
||||||
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
|
<% if count > 0 %>
|
||||||
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
|
<%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id}%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if !activity.locked? && authorize_for_course('messages', 'reply') %>
|
||||||
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||||
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id},:method => "post", :remote => true) do |f|%>
|
||||||
|
<input type="hidden" name="quote[quote]" value="">
|
||||||
|
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||||
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||||
|
<% end%>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -69,42 +69,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_replies = OrgDocumentComment.where("root_id = #{activity.id}").reorder("created_at desc") %>
|
|
||||||
<% count = all_replies.count %>
|
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => 0,:is_board =>0} %>
|
<div id="activity_post_reply_<%=user_activity_id %>">
|
||||||
|
<%=render :partial => 'organizations/org_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
<% comments = all_replies[0..2] %>
|
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => 0, :is_board =>0}%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id,:is_course => 0, :is_board => 0},:method => "post", :remote => true) do |f|%>
|
|
||||||
<input type="hidden" name="quote[quote]" value="">
|
|
||||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -55,37 +55,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% count=activity.comments.count %>
|
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
<div id="activity_post_reply_<%=user_activity_id %>">
|
||||||
|
<%=render :partial => 'users/course_news_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
||||||
<%= render :partial => 'users/news_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'News', :activity_id => activity.id} %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
|
||||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -67,41 +67,10 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_replies = OrgDocumentComment.where("root_id = #{document.id}").reorder("created_at desc") %>
|
|
||||||
<% count = all_replies.count %>
|
|
||||||
|
|
||||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
|
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => document, :user_activity_id => act.id} %>
|
<div id="activity_post_reply_<%=act.id %>">
|
||||||
|
<%=render :partial => 'organizations/org_document_post_reply', :locals => {:activity => document, :user_activity_id => act.id} %>
|
||||||
<% comments = all_replies[0..2] %>
|
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= act.id %>">
|
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => act.id, :type => 'OrgDocumentComment', :activity_id =>document.id}%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= act.id %>">
|
|
||||||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
|
|
||||||
</div>
|
|
||||||
<div class="homepagePostReplyInputContainer">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= act.id %>' style="display:none;">
|
|
||||||
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
|
|
||||||
<div nhname='toolbar_container_<%= act.id %>'></div>
|
|
||||||
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= act.id %>'></p>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -81,45 +81,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_replies = get_all_children(all_comments, activity) %>
|
|
||||||
<% count = all_replies.count %>
|
|
||||||
<%# allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %>
|
|
||||||
<%# count = fetch_user_leaveWord_reply(activity).count %>
|
|
||||||
<div class="container-big-grey">
|
<div class="container-big-grey">
|
||||||
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
|
<div id="activity_post_reply_<%=user_activity_id %>">
|
||||||
|
<%=render :partial => 'projects/project_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
<% comments = all_replies[0..2] %>
|
</div>
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
||||||
<%= render :partial => 'projects/project_message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if !activity.locked? %>
|
|
||||||
<div class="reply-container ml15 borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
|
||||||
<div class="reply-content mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id,:is_course => is_course, :is_board => 'true', :is_project => true},:method => "post", :remote => true) do |f|%>
|
|
||||||
<input type="hidden" name="quote[quote]" value="">
|
|
||||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "projects/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -16,5 +16,25 @@
|
||||||
<%= comment.content_detail.html_safe %>
|
<%= comment.content_detail.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="orig_reply mt-10">
|
||||||
|
<div class="reply">
|
||||||
|
<span class="reply-right">
|
||||||
|
<span id="reply_praise_count_<%=comment.id %>">
|
||||||
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
|
</span>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => 'Message', :user_activity_id => user_activity_id, :is_project => true},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="reply_message_<%= comment.id%>"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||||
<div>
|
<div>
|
||||||
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => comment} %>
|
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => comment, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<% unless comment.parent.nil? %>
|
<% unless comment.parent.nil? %>
|
||||||
<div>
|
<div>
|
||||||
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent} %>
|
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => comment} %>
|
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => comment, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
|
@ -16,5 +16,25 @@
|
||||||
<%= comment.content_detail.html_safe %>
|
<%= comment.content_detail.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="orig_reply mt-10">
|
||||||
|
<div class="reply">
|
||||||
|
<span class="reply-right">
|
||||||
|
<span id="reply_praise_count_<%=comment.id %>">
|
||||||
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
|
</span>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => 'Issue', :user_activity_id => user_activity_id, :is_project => true},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="reply_message_<%= comment.id%>"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
|
@ -8,18 +8,18 @@
|
||||||
<% length = parents_rely.length %>
|
<% length = parents_rely.length %>
|
||||||
<div id="comment_reply_<%=comment.id %>">
|
<div id="comment_reply_<%=comment.id %>">
|
||||||
<% if length <= 2 %>
|
<% if length <= 2 %>
|
||||||
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent} %>
|
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 1]} %>
|
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 1], :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_cont_hide_issue clearfix">
|
<div class="orig_cont_hide_issue clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
<span class="orig_icon" style="display:none;" > ↑</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
|
<span class="orig_icon" style="display:none;" > ↑</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
|
||||||
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class), :remote=>true, :class => 'linkBlue2' %>
|
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class), :remote=>true, :class => 'linkBlue2' %>
|
||||||
</div>
|
</div>
|
||||||
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').hide();">
|
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity.id %>_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'projects/project_issue_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'projects/project_issue_contents', :locals => {:comment => comment, :user_activity_id => user_activity_id}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<% count = activity.journals.count %>
|
<% count = activity.journals.count %>
|
||||||
|
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc") %>
|
||||||
|
<% no_children_comments = get_no_children_comments comments %>
|
||||||
<div class="container-big-grey">
|
<div class="container-big-grey">
|
||||||
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
<%= render :partial => "projects/project_issue_expand_show", :locals => {:comments => comments, :activity => activity, :user_activity_id => user_activity_id} %>
|
<%= render :partial => "projects/project_issue_expand_show", :locals => {:comments => no_children_comments[:no_children_comments], :activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -8,18 +8,18 @@
|
||||||
<% length = parents_rely.length %>
|
<% length = parents_rely.length %>
|
||||||
<div id="comment_reply_<%=comment.id %>">
|
<div id="comment_reply_<%=comment.id %>">
|
||||||
<% if length <= 2 %>
|
<% if length <= 2 %>
|
||||||
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id} %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 1]} %>
|
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<div class="orig_cont_hide_issue clearfix">
|
<div class="orig_cont_hide_issue clearfix">
|
||||||
<span class="orig_icon" >↓ </span>
|
<span class="orig_icon" >↓ </span>
|
||||||
<span class="orig_icon" style="display:none;" > ↑</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
|
<span class="orig_icon" style="display:none;" > ↑</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
|
||||||
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class), :remote=>true, :class => 'linkBlue2' %>
|
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class), :remote=>true, :class => 'linkBlue2' %>
|
||||||
</div>
|
</div>
|
||||||
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
<% all_replies = Message.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
||||||
|
<% count = all_replies.count %>
|
||||||
|
<% no_children_comments = get_no_children_comments all_replies %>
|
||||||
|
|
||||||
|
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
|
<% if count > 0 %>
|
||||||
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
|
<%= render :partial => 'projects/project_message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id}%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if !activity.locked? %>
|
||||||
|
<div class="reply-container ml15 borderBottomNone minHeight48">
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||||
|
<div class="reply-content mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true', :is_project => true},:method => "post", :remote => true) do |f|%>
|
||||||
|
<input type="hidden" name="quote[quote]" value="">
|
||||||
|
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||||
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "projects/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -11,7 +11,7 @@
|
||||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').hide();">
|
<div class="reply-content ml15" onmouseover="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'projects/project_message_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'projects/project_message_contents', :locals => {:comment => comment, :user_activity_id => user_activity_id}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_reply),
|
l(:button_reply),
|
||||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_project => true, :is_board => is_board},
|
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_project => true},
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:title => l(:button_reply)) %>
|
:title => l(:button_reply)) %>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) %>
|
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) %>
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_project => true, :is_board => is_board),
|
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_project => true),
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||||
<%if count>3 %>
|
<% if expand_more %>
|
||||||
<div class="homepagePostReplyBannerMore">
|
<div class="homepagePostReplyBannerMore">
|
||||||
<% if activity.class.to_s == 'Issue' %>
|
<% if activity.class.to_s == 'Issue' %>
|
||||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||||
展开更多
|
展开更多
|
||||||
</a>
|
</a>
|
||||||
<% elsif activity.class.to_s == 'Message' %>
|
<% elsif activity.class.to_s == 'Message' %>
|
||||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_message',<%=user_activity_id %>,<%=is_course %>,<%=is_board %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'is_project_message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||||
展开更多
|
展开更多
|
||||||
</a>
|
</a>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
|
@ -14,4 +14,14 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div style="text-align:center;">
|
||||||
|
<div class="pages" style="width:auto; display:inline-block;">
|
||||||
|
<ul id="homework_pository_ref_pages">
|
||||||
|
<%= pagination_links_full @forked_pages, @forked_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,11 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<label class=" fl"> </label>
|
<label class=" fl"> </label>
|
||||||
<p class=" fl c_grey pro_new_grey">1.长度必须在1到254个字符之间<br/>
|
<p class=" fl c_grey pro_new_grey">
|
||||||
|
1.长度必须在1到254个字符之间<br/>
|
||||||
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
2.仅限使用小写字母(a-z)、数字、破折号(-)和下划线(_)<br>
|
||||||
3.一旦保存,标识无法修改</p>
|
3.一旦保存,标识无法修改
|
||||||
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<a href="javascript:void(0)" onclick="cancel_for_create();" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
|
<a href="javascript:void(0)" onclick="cancel_for_create();" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<!--新版项目头部结束-->
|
<!--新版项目头部结束-->
|
||||||
<div class="ke-block pro_new_info mb10 break_word" style="padding-bottom: 5px" >
|
<div class="ke-block pro_new_info mb10 " style="padding-bottom: 5px;word-break: normal;word-wrap: break-word" >
|
||||||
<div id="project_invite_code"><%= render :partial => 'projects/invite_code' %></div>
|
<div id="project_invite_code"><%= render :partial => 'projects/invite_code' %></div>
|
||||||
<div id="project_description_code" style="padding: 0 15px 10px 15px;">
|
<div id="project_description_code" style="padding: 0 15px 10px 15px;">
|
||||||
<% if @project.description.blank? %>
|
<% if @project.description.blank? %>
|
||||||
<p class="break_word" style="padding-top:5px"><%= @project.name %></p>
|
<p style="padding-top:5px"><%= @project.name %></p>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p class="break_word" style="padding-top:5px"><%=h @project.description.html_safe %></p>
|
<p style="padding-top:5px"><%=h @project.description.html_safe %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<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">
|
||||||
<% @project.watcher_users.each do |user| %>
|
<% @watchers.each do |user| %>
|
||||||
<li class="clear">
|
<li class="clear">
|
||||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像", :class => "pro_new_users fl mr5" %>
|
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像", :class => "pro_new_users fl mr5" %>
|
||||||
<div class="fl mt5 clear">
|
<div class="fl mt5 clear">
|
||||||
|
@ -14,4 +14,16 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<div style="text-align:center;">
|
||||||
|
<div class="pages" style="width:auto; display:inline-block;">
|
||||||
|
<ul id="homework_pository_ref_pages">
|
||||||
|
<%= pagination_links_full @watcher_pages, @watchers_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||||
|
</ul>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,9 @@
|
||||||
<% if @forked_project.nil? %>
|
<% if @forked_project.nil? %>
|
||||||
<%= select_tag :branch, options_for_select(@source_rev), :id => "pull_request_branch", :name => "target_branch", :value => "target_branch",:class => "fl PullReques_minselect ml5" %>
|
<%= select_tag :branch, options_for_select(@source_rev), :id => "pull_request_branch", :name => "target_branch", :value => "target_branch",:class => "fl PullReques_minselect ml5" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" id="target_project_id" name="target_project_id" value="target_project_id" class="fl PullReques_minselect">
|
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>, <%= @project.id %>, <%= @project.forked_from_project_id %>);" id="target_project_id" name="target_project_id" value="target_project_id" class="fl PullReques_minselect">
|
||||||
<option id="source_project_name" name="<%= @project.id %>" value="<%= @project.id %>" ><%= @source_project_name %></option>
|
<option id="source_project_name" name="source_project_name" value="<%= @project.id %>" ><%= @source_project_name %></option>
|
||||||
<option id="target_project_name" name="<%= @forked_project.id %>" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
|
<option id="target_project_name" name="forked_project_name" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
|
||||||
</select>
|
</select>
|
||||||
<select name="target_branch" id="pull_request_branch" class = "fl PullReques_minselect ml5" >
|
<select name="target_branch" id="pull_request_branch" class = "fl PullReques_minselect ml5" >
|
||||||
<% @source_rev.each do |rev| %>
|
<% @source_rev.each do |rev| %>
|
||||||
|
|
|
@ -31,15 +31,7 @@
|
||||||
改动已合并至 <%= @request.target_branch %> 分支
|
改动已合并至 <%= @request.target_branch %> 分支
|
||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if is_project_manager?(User.current.id, @project.id) %>
|
<%= render "show_container" %>
|
||||||
<% if @request.state == "closed" %>
|
|
||||||
该请求已被关闭
|
|
||||||
<% else %>
|
|
||||||
<div class="alert alert-orange mb15 ">
|
|
||||||
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
<% if @request.state == "closed" %>
|
||||||
|
<div class="alert alert-orange mb15 ">
|
||||||
|
该请求已被关闭
|
||||||
|
</div>
|
||||||
|
<% elsif @commits_count == 0 %>
|
||||||
|
<div class="alert alert-orange mb15 ">
|
||||||
|
项目分支 <%= @request.source_branch %> 和 <%= @request.target_branch %> 似乎没有差异,请将新改动提交至源分支或者切换到其它目标分支
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<% if is_project_manager?(User.current.id, @project.id) %>
|
||||||
|
<div class="alert alert-orange mb15 ">
|
||||||
|
在管理员接受后,将由系统自动合并。<%= link_to "接受", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "linkBlue2", :remote => true %></a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
|
@ -3,9 +3,18 @@
|
||||||
<div class="new_roadmap_conbox mb10" >
|
<div class="new_roadmap_conbox mb10" >
|
||||||
<div class="new_roadmap_navbox clear">
|
<div class="new_roadmap_navbox clear">
|
||||||
<ul class="new_roadmap_nav fl" >
|
<ul class="new_roadmap_nav fl" >
|
||||||
<li class="new_roadmap_nav_hover"><%= link_to "待处理<span class='new_roadmap_nav_taghover ml5'>#{@requests_opened_count}</span>".html_safe, project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
|
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
||||||
<li><%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_merged_count}</span>".html_safe, project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
|
<%= link_to "待处理<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@requests_opened_count}</span>".html_safe,
|
||||||
<li><%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5'>#{@requests_closed_count}</span>".html_safe, project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal" %></li>
|
project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_1" %>
|
||||||
|
</li>
|
||||||
|
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
|
||||||
|
<%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@requests_merged_count}</span>".html_safe,
|
||||||
|
project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_2" %>
|
||||||
|
</li>
|
||||||
|
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
||||||
|
<%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@requests_closed_count}</span>".html_safe,
|
||||||
|
project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<% if allow_pull_request(@project) && User.current.member_of?(@project) %>
|
<% if allow_pull_request(@project) && User.current.member_of?(@project) %>
|
||||||
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %>
|
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %>
|
||||||
|
@ -34,11 +43,23 @@
|
||||||
<script>
|
<script>
|
||||||
// $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
// $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
||||||
// $("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
|
// $("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
|
||||||
|
function g(o){
|
||||||
|
return document.getElementById(o);
|
||||||
|
}
|
||||||
|
function HoverLi(n){
|
||||||
|
//如果有N个标签,就将i<=N;
|
||||||
|
for(var i=1;i<=3;i++){
|
||||||
|
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
|
||||||
|
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
|
||||||
|
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
|
||||||
|
g('pull_requests_list').className='undis';
|
||||||
|
}
|
||||||
|
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
|
||||||
|
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
|
||||||
|
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
|
||||||
|
g('pull_requests_list').className='dis';
|
||||||
|
}
|
||||||
|
|
||||||
$(".new_roadmap_nav li").click(function(){
|
|
||||||
$(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
|
|
||||||
$(this).addClass("new_roadmap_nav_hover");
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render :partial => "projects/no_data" %>
|
<%= render :partial => "projects/no_data" %>
|
||||||
|
|
|
@ -27,7 +27,13 @@
|
||||||
<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 st.student_score%> student_score_info pr">
|
||||||
<% if st.student_score.nil? %>
|
<% if st.student_score.nil? %>
|
||||||
<span title="该作品未被匿评">未参与</span>
|
<% if @homework.homework_detail_manual.comment_status == 2 && st.student_works_evaluation_distributions.count != 0 %>
|
||||||
|
<span title="该作品未被匿评">待匿评</span>
|
||||||
|
<% elsif @homework.homework_detail_manual.comment_status == 3 && st.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 %>
|
<% end %>
|
||||||
|
|
|
@ -14,28 +14,31 @@
|
||||||
<div class="pr">
|
<div class="pr">
|
||||||
<span class="fl ml25 fontGrey2">关联项目:</span>
|
<span class="fl ml25 fontGrey2">关联项目:</span>
|
||||||
<div class="fl projectName">
|
<div class="fl projectName">
|
||||||
<% if student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? || User.current.allowed_to?(:as_teacher, @homework.course) %>
|
<% if student_work.project.status != 9 && (student_work.project.is_public || User.current.member_of?(student_work.project) || User.current.admin? || User.current.allowed_to?(:as_teacher, @homework.course)) %>
|
||||||
<%= link_to student_work.project.name, project_path(student_work.project.id), :class => 'link-blue fl hidden', :style => "max-width:550px;", :title => "项目名称", :target => "_blank" %>
|
<%= link_to student_work.project.name, project_path(student_work.project.id), :class => 'link-blue fl hidden', :style => "max-width:550px;", :title => "项目名称", :target => "_blank" %>
|
||||||
<% else %>
|
<% elsif student_work.project.status != 9 %>
|
||||||
<span class="fontBlue fr hidden" style="max-width:550px;" title="该项目是私有的"><%= student_work.project.name %></span>
|
<span class="fontBlue fr hidden" style="max-width:550px;" title="该项目是私有的"><%= student_work.project.name %></span>
|
||||||
<% end %>
|
<% else %>
|
||||||
|
<span class="fontGrey2 fr hidden" style="max-width:550px;" title="该项目已删除"><%= student_work.project.name %>(已删除)</span><% end %>
|
||||||
<% project = student_work.project %>
|
<% project = student_work.project %>
|
||||||
<div class="score-tip none tl f12" style="width:300px; top:-48px; right:-372px;">
|
<div class="score-tip none tl f12" style="width:300px; top:-48px; right:-372px;">
|
||||||
<em style="bottom:45px;"></em>
|
<em style="bottom:45px;"></em>
|
||||||
<font style="bottom:45px;"></font>
|
<font style="bottom:45px;"></font>
|
||||||
|
|
||||||
<p class="fb break_word mw280"><%= project.name %></p>
|
<p class="fb break_word mw280"><%= project.name %><%= project.status == 9 ? "(已删除)" : ""%></p>
|
||||||
|
|
||||||
<p class="mb10">
|
<p class="mb10">
|
||||||
<span class="mr15">创建者:<%= project.creater %></span><span>成员数量:<%= project.members.count %></span></p>
|
<span class="mr15">创建者:<%= project.creater %></span><span>成员数量:<%= project.members.count %></span></p>
|
||||||
<% project_score = project.project_score %>
|
<% project_score = project.project_score %>
|
||||||
<p>项目综合得分:<%= static_project_score(project_score).to_i %></p>
|
<p>项目综合得分:<%= project.status == 9 ? 0 : static_project_score(project_score).to_i %></p>
|
||||||
|
|
||||||
|
<% if project.status != 9 %>
|
||||||
<p>= 代码提交得分 + issue得分 + 资源得分 + 帖子得分</p>
|
<p>= 代码提交得分 + issue得分 + 资源得分 + 帖子得分</p>
|
||||||
|
|
||||||
<p>= <%= (project_score.changeset_num||0) * 4 %>
|
<p>= <%= (project_score.changeset_num||0) * 4 %>
|
||||||
+ <%= project_score.issue_num * 4 + project_score.issue_journal_num %> + <%= project_score.attach_num * 5 %>
|
+ <%= project_score.issue_num * 4 + project_score.issue_journal_num %> + <%= project_score.attach_num * 5 %>
|
||||||
+ <%= project_score.board_num * 2 + project_score.board_message_num + project_score.news_num %></p>
|
+ <%= project_score.board_num * 2 + project_score.board_message_num + project_score.news_num %></p>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -69,7 +69,13 @@
|
||||||
<% 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 student_work.student_score%> student_score_info pr">
|
||||||
<% if student_work.student_score.nil? %>
|
<% if student_work.student_score.nil? %>
|
||||||
<span title="该作品未被匿评">未参与</span>
|
<% if @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>
|
||||||
|
<% else %>
|
||||||
|
<span title="该作品未被匿评">未参与</span>
|
||||||
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%=format("%.1f",student_work.student_score) %>
|
<%=format("%.1f",student_work.student_score) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -31,10 +31,8 @@
|
||||||
<%= l(:label_publish_time)%>:<%= homework.publish_time%> 00:00
|
<%= l(:label_publish_time)%>:<%= homework.publish_time%> 00:00
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if homework.homework_detail_manual && homework.homework_detail_manual.comment_status < 2 %>
|
<% if !homework.end_time.nil? %>
|
||||||
<div class="homepagePostDeadline ml15 <%= (is_pro || is_base_group) ? 'mt8' : '' %>">提交截止时间:<%= homework.end_time.to_s %> 23:59</div>
|
<div class="homepagePostDeadline ml15 <%= (is_pro || is_base_group) ? 'mt8' : '' %>">提交截止时间:<%= homework.end_time.to_s %> 23:59</div>
|
||||||
<% elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status >= 2 && homework.anonymous_comment == 0%>
|
|
||||||
<div class="homepagePostDeadline ml15 <%= (is_pro || is_base_group) ? 'mt8' : '' %>">匿评截止时间:<%= homework.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
<div class="syllabus_courses_box">
|
<div class="syllabus_courses_box">
|
||||||
<% projects.each do |project|%>
|
<% projects.each do |project|%>
|
||||||
<% allow_visit = project.is_public || User.current.member_of?(project) || User.current.admin? || User.current.allowed_to?(:as_teacher, @homework.course) %>
|
<% allow_visit = project.status != 9 && (project.is_public || User.current.member_of?(project) || User.current.admin? || User.current.allowed_to?(:as_teacher, @homework.course)) %>
|
||||||
<div class="syllabus_courses_list" style="cursor: default">
|
<div class="syllabus_courses_list" style="cursor: default">
|
||||||
<div class="sy_courses_open">
|
<div class="sy_courses_open">
|
||||||
<h3>
|
<h3>
|
||||||
<% if allow_visit %>
|
<% if allow_visit %>
|
||||||
<%= link_to "#{project.name}", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%>
|
<%= link_to "#{project.name}", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%>
|
||||||
<% else %>
|
<% elsif project.status != 9 %>
|
||||||
<a href="javascript:void(0)" class="new_project_title fl" title="私有项目不可访问"><%=project.name %></a>
|
<a href="javascript:void(0)" class="new_project_title fl" title="私有项目不可访问"><%=project.name %></a>
|
||||||
|
<% else %>
|
||||||
|
<a href="javascript:void(0)" class="new_project_title fl" title="项目已删除"><%=project.name %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</h3>
|
</h3>
|
||||||
<span class="<%= project.is_public? ? 'syllabus_class_open' : 'syllabus_class_private' %> fl ml10 mt3 syllabus_class_property"><%= project.is_public? ? '公开' : '私有' %></span>
|
<span class="<%= project.is_public? ? 'syllabus_class_open' : 'syllabus_class_private' %> fl ml10 mt3 syllabus_class_property"><%= project.is_public? ? '公开' : '私有' %></span>
|
||||||
|
|
|
@ -36,8 +36,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p class="sy_cgrey">
|
<div class="sy_cgrey">
|
||||||
<span class=" mr15">创建老师:<%=link_to course.teacher.show_name, user_path(course.teacher), :class => 'sy_cblue' %></span>
|
<p class="mr15 hidden fl" style="max-width: 140px;">创建老师:<%=link_to course.teacher.show_name, user_path(course.teacher), :class => 'sy_cblue', :title => "#{course.teacher.show_name}" %></p>
|
||||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,course) %>
|
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,course) %>
|
||||||
<% homework_num = course.homework_commons.count %>
|
<% homework_num = course.homework_commons.count %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span class=" mr15">学期:<%= current_time_and_term course %></span>
|
<span class=" mr15">学期:<%= current_time_and_term course %></span>
|
||||||
<span class=" mr15">更新时间:<%= format_date(course.updated_on) %></span>
|
<span class=" mr15">更新时间:<%= format_date(course.updated_on) %></span>
|
||||||
</p>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if @list_type == 0 %>
|
<% if @list_type == 0 %>
|
||||||
<% if User.current.member_of_course?(course) %>
|
<% if User.current.member_of_course?(course) %>
|
||||||
|
@ -68,11 +68,11 @@
|
||||||
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "hw_btn_green fr mt5",:method => "post"%>
|
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "hw_btn_green fr mt5",:method => "post"%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if User.current == course.teacher || User.current.admin? %>
|
<% if User.current == course.teacher || User.current.admin? %>
|
||||||
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 0);" class="btn_grey_big fr mt5 mr5" style="width: 56px;">归档</a>
|
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 0, 1);" class="btn_grey_big fr mt5 mr5" style="width: 56px;">归档</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if User.current == course.teacher || User.current.admin? %>
|
<% if User.current == course.teacher || User.current.admin? %>
|
||||||
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 1);" class="btn_grey_big fr mt5" style="width: 56px;">恢复</a>
|
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, 1, 1);" class="btn_grey_big fr mt5" style="width: 56px;">恢复</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
@ -119,19 +119,4 @@
|
||||||
$(function() {
|
$(function() {
|
||||||
$(".sy_con_l").css("min-height",$(".sy_con_r").height());
|
$(".sy_con_l").css("min-height",$(".sy_con_r").height());
|
||||||
});
|
});
|
||||||
function archive_course(id, type){
|
|
||||||
if(type == 0){
|
|
||||||
var htmlvalue = '<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>'+
|
|
||||||
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>您是否确定归档此班级</p>' +
|
|
||||||
'<a href="javascript:void(0);" class="btn btn-grey mt10 mr10" onclick="hideModal();">取 消</a>' +
|
|
||||||
'<a href="/courses/'+ id +'/archive_course?source=1&type=0" class="btn btn-blue mt10" onclick="hideModal();" data-remote="true">确 定</a></div></div></div>';
|
|
||||||
pop_box_new(htmlvalue, 400, 132);
|
|
||||||
} else{
|
|
||||||
var htmlvalue = '<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>'+
|
|
||||||
'<div class="clear muban_popup_con"><div class="newupload_conbox newupload_tishi"><p>您和您的学生将可以重新在此班级中互动<br/>此班级的动态会在首页中显示<br/><br/>' +
|
|
||||||
'您是否确定恢复此班级</p><a href="javascript:void(0);" class="btn btn-grey mt10 mr10" onclick="hideModal();">取 消</a>' +
|
|
||||||
'<a href="/courses/'+ id +'/archive_course?source=1&type=1" class="btn btn-blue mt10" onclick="hideModal();" data-remote="true">确 定</a></div></div></div>';
|
|
||||||
pop_box_new(htmlvalue, 400, 200);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
|
@ -0,0 +1,31 @@
|
||||||
|
<% count=activity.journals_for_messages.count %>
|
||||||
|
<% comments = activity.journals_for_messages.reorder("created_on desc") %>
|
||||||
|
<% no_children_comments = get_no_children_comments comments %>
|
||||||
|
|
||||||
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
|
<% if count > 0 %>
|
||||||
|
<div class="" id="reply_div_<%= activity.id %>">
|
||||||
|
<%=render :partial => 'users/news_replies', :locals => {:comments => no_children_comments[:no_children_comments], :type => 'Syllabus', :activity_id => activity.id, :user_activity_id => user_activity_id} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= activity.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||||
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= activity.id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_syllabus_message', :id => activity.id},:method => "post") do |f|%>
|
||||||
|
<div nhname='toolbar_container_<%= activity.id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= activity.id%>' name="comment"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= activity.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_<%= activity.id%>'></p>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
|
@ -62,35 +62,10 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!--HomeWork end-->
|
</div><!--HomeWork end-->
|
||||||
<% end %>
|
<% end %>
|
||||||
<% count=@syllabus.journals_for_messages.count %>
|
|
||||||
<div class="homepagePostReply" style="margin-bottom: 20px;">
|
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => @syllabus, :user_activity_id => @syllabus.id} %>
|
|
||||||
|
|
||||||
<% comments = @syllabus.journals_for_messages.reorder("created_on desc").limit(3) %>
|
<div class="homepagePostReply" style="margin-bottom: 20px;">
|
||||||
<% if count > 0 %>
|
<div id="activity_post_reply_<%=@syllabus.id %>">
|
||||||
<div class="" id="reply_div_<%= @syllabus.id %>">
|
<%=render :partial => 'syllabuses/syllabus_post_reply', :locals => {:activity => @syllabus, :user_activity_id => @syllabus.id} %>
|
||||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'Syllabus', :activity_id => @syllabus.id} %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @syllabus.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= @syllabus.id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_syllabus_message', :id => @syllabus.id},:method => "post") do |f|%>
|
|
||||||
<div nhname='toolbar_container_<%= @syllabus.id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @syllabus.id%>' name="comment"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= @syllabus.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_<%= @syllabus.id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div><!--回复框 用正式版样式-->
|
</div><!--回复框 用正式版样式-->
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<% unless comment.parent.nil? %>
|
<% unless comment.parent.nil? %>
|
||||||
<div>
|
<div>
|
||||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment} %>
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment, :type => type, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="orig_right fl">
|
<div class="orig_right fl">
|
||||||
<%= 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">
|
||||||
<% if comment.class == Journal %>
|
<% if comment.class == Journal %>
|
||||||
<% if comment.details.any? %>
|
<% if comment.details.any? %>
|
||||||
<% details_to_strings(comment.details).each do |string| %>
|
<% details_to_strings(comment.details).each do |string| %>
|
||||||
|
@ -16,5 +16,40 @@
|
||||||
<%= comment.content_detail.html_safe %>
|
<%= comment.content_detail.html_safe %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="orig_reply mt-10">
|
||||||
|
<div class="reply">
|
||||||
|
<span class="reply-right">
|
||||||
|
<span id="reply_praise_count_<%=comment.id %>">
|
||||||
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||||
|
</span>
|
||||||
|
<% if type == 'Message' %>
|
||||||
|
<% topic = comment.root %>
|
||||||
|
<% if !topic.locked? && authorize_for('messages', 'reply') %>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<span style="position: relative" class="fr mr20">
|
||||||
|
<%= link_to(
|
||||||
|
l(:button_reply),
|
||||||
|
{:controller => 'users' ,:action => 'reply_to_comment', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id},
|
||||||
|
:remote => true,
|
||||||
|
:method => 'get',
|
||||||
|
:title => l(:button_reply)) %>
|
||||||
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup03" style="display: none"> ︿</span>
|
||||||
|
</span>
|
||||||
|
<% end %>
|
||||||
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p id="reply_message_<%= comment.id%>"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
|
@ -1,7 +1,7 @@
|
||||||
<div class = "cl"> </div>
|
<div class = "cl"> </div>
|
||||||
<div id="course-boardlist">
|
<div id="course-boardlist">
|
||||||
<div class="listbox mt10" >
|
<div class="listbox mt10" >
|
||||||
<h2 class="list-h2">讨论区列表</h2>
|
<p class="list-h2">讨论区列表</p>
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<span class="grayTxt ">排序:</span>
|
<span class="grayTxt ">排序:</span>
|
||||||
<%= link_to "时间", {:controller => 'boards', :action => 'index', :board_id =>@board.id, :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
<%= link_to "时间", {:controller => 'boards', :action => 'index', :board_id =>@board.id, :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
||||||
|
@ -20,9 +20,9 @@
|
||||||
<div class="list-file">
|
<div class="list-file">
|
||||||
<div><span class="item_list fl"></span>
|
<div><span class="item_list fl"></span>
|
||||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||||
<%= link_to activity.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title fl" %>
|
<%= link_to activity.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title-normal fl" %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to activity.parent.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title f1" %>
|
<%= link_to activity.parent.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title-normal f1" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if activity.sticky == 1 %>
|
<% if activity.sticky == 1 %>
|
||||||
<span class="fl ml10 red-cir-btn">顶</span>
|
<span class="fl ml10 red-cir-btn">顶</span>
|
||||||
|
@ -30,20 +30,20 @@
|
||||||
<% if activity.locked %>
|
<% if activity.locked %>
|
||||||
<span class="fl ml10 green-cir-btn" title="已锁定">锁</span>
|
<span class="fl ml10 green-cir-btn" title="已锁定">锁</span>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% u = User.where("id=?",activity.author_id).first%>
|
<%# u = User.where("id=?",activity.author_id).first%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="massages-content ml15">
|
<!--<div class="massages-content ml15">-->
|
||||||
<% if activity.parent_id.nil? %>
|
<!--<%# if activity.parent_id.nil? %>-->
|
||||||
<% content = activity.content %>
|
<!--<% content = activity.content %>-->
|
||||||
<% else %>
|
<!--<%# else %>-->
|
||||||
<% content = activity.parent.content %>
|
<!--<%# content = activity.parent.content %>-->
|
||||||
<% end %>
|
<!--<%# end %>-->
|
||||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>75, :maxwidth=>563} %></p>
|
<!--<p><%#=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>75, :maxwidth=>563} %></p>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="ml15 mt10">
|
<div class="ml15 mt10">
|
||||||
<span class="grayTxt">
|
<span class="grayTxt mr15">
|
||||||
发帖人: <%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
|
发帖人:<%= link_to activity.author.show_name, user_path(activity.author), :class => "link-blue" %>
|
||||||
</span>
|
</span>
|
||||||
<span class="grayTxt">更新:<%= format_time(activity.children.any? ? activity.children.last[:created_on] : activity[:created_on] ) %></span>
|
<span class="grayTxt">更新:<%= format_time(activity.children.any? ? activity.children.last[:created_on] : activity[:created_on] ) %></span>
|
||||||
<% all_comments = []%>
|
<% all_comments = []%>
|
||||||
|
|
|
@ -33,10 +33,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="homepagePostSubmitContainer">
|
<div class="homepagePostSubmitContainer">
|
||||||
<%= render :partial => 'users/homework_opr', :locals => {:activity => activity, :is_teacher => is_teacher, :hw_status => hw_status, :user_activity_id => user_activity_id} %>
|
<%= render :partial => 'users/homework_opr', :locals => {:activity => activity, :is_teacher => is_teacher, :hw_status => hw_status, :user_activity_id => user_activity_id} %>
|
||||||
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
<% if !activity.end_time.nil? %>
|
||||||
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||||
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 && activity.anonymous_comment == 0%>
|
|
||||||
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if activity.homework_detail_manual.comment_status == 0 && !activity.publish_time.nil? %>
|
<% if activity.homework_detail_manual.comment_status == 0 && !activity.publish_time.nil? %>
|
||||||
<div class="homepagePostDeadline ml15">
|
<div class="homepagePostDeadline ml15">
|
||||||
|
@ -59,5 +57,5 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render :partial => 'users/homework_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id, :hw_status => hw_status, :is_teacher => is_teacher} %>
|
<%= render :partial => 'users/homework_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id, :is_teacher => is_teacher} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -38,43 +38,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<% all_replies = JournalsForMessage.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
|
||||||
<% count = all_replies.count %>
|
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
<div id="activity_post_reply_<%=user_activity_id %>">
|
||||||
|
<%=render :partial => 'users/user_journal_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
<% comments = all_replies[0..2] %>
|
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'JournalsForMessage', :activity_id =>activity.id}%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%>
|
|
||||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
|
|
||||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
|
|
||||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
|
|
||||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
|
||||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -78,45 +78,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<% all_comments = []%>
|
|
||||||
<%# all_replies = get_all_children(all_comments, activity) %>
|
|
||||||
<% all_replies = Message.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
|
||||||
<% count = all_replies.count %>
|
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
|
<div id="activity_post_reply_<%=user_activity_id %>">
|
||||||
|
<%=render :partial => 'users/course_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
<% comments = all_replies[0..2] %>
|
</div>
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
||||||
<%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% if !activity.locked? && authorize_for_course('messages', 'reply') %>
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => is_board,:is_course=>is_course},:method => "post", :remote => true) do |f|%>
|
|
||||||
<input type="hidden" name="quote[quote]" value="">
|
|
||||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
<% all_replies = Message.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
||||||
|
<% count = all_replies.count %>
|
||||||
|
<% no_children_comments = get_no_children_comments all_replies %>
|
||||||
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
|
<% if count > 0 %>
|
||||||
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
|
<%= render :partial => 'users/message_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id}%>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if !activity.locked? && authorize_for_course('messages', 'reply') %>
|
||||||
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||||
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id},:method => "post", :remote => true) do |f|%>
|
||||||
|
<input type="hidden" name="quote[quote]" value="">
|
||||||
|
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||||
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||||
|
<% end%>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -63,39 +63,10 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% count=activity.comments.count %>
|
|
||||||
<div class="homepagePostReply">
|
<div class="homepagePostReply">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
<div id="activity_post_reply_<%=user_activity_id %>">
|
||||||
|
<%=render :partial => 'users/course_news_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
</div>
|
||||||
<% if count > 0 %>
|
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
|
||||||
<%= render :partial => 'users/news_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'News', :activity_id => activity.id} %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% if activity.commentable? %>
|
|
||||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
|
||||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
|
||||||
<div class="homepagePostReplyInputContainer mb10">
|
|
||||||
<% if User.current.logged? %>
|
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
|
||||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
|
||||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
|
||||||
<% end%>
|
|
||||||
</div>
|
|
||||||
<% else %>
|
|
||||||
<%= render :partial => "users/show_unlogged" %>
|
|
||||||
<% end %>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<% count=activity.comments.count %>
|
||||||
|
<% comments = activity.comments.reorder("created_on desc") %>
|
||||||
|
<% no_children_comments = get_no_children_comments comments %>
|
||||||
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more] } %>
|
||||||
|
|
||||||
|
<% if count > 0 %>
|
||||||
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
|
<%= render :partial => 'users/news_replies', :locals => {:comments => no_children_comments[:no_children_comments], :user_activity_id => user_activity_id, :type => 'News', :activity_id => activity.id} %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<% if activity.commentable? %>
|
||||||
|
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||||
|
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||||
|
<div class="homepagePostReplyInputContainer mb10">
|
||||||
|
<% if User.current.logged? %>
|
||||||
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||||
|
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||||
|
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||||
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||||
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||||
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||||
|
<% end%>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
<%= render :partial => "users/show_unlogged" %>
|
||||||
|
<% end %>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -1,7 +1,7 @@
|
||||||
<div class = "cl"> </div>
|
<div class = "cl"> </div>
|
||||||
<div id="course-newslist">
|
<div id="course-newslist">
|
||||||
<div class="listbox mt10" >
|
<div class="listbox mt10" >
|
||||||
<h2 class="list-h2">通知列表</h2>
|
<p class="list-h2">通知列表</p>
|
||||||
<div class="category">
|
<div class="category">
|
||||||
<span class="grayTxt ">排序:</span>
|
<span class="grayTxt ">排序:</span>
|
||||||
<%= link_to "时间", {:controller => 'news', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
<%= link_to "时间", {:controller => 'news', :action => 'index', :type => @type, :sort => @b_sort, :order => 1 }, :class => "sortTxt", :remote => true %>
|
||||||
|
@ -19,18 +19,19 @@
|
||||||
<% topics.each do |activity| %>
|
<% topics.each do |activity| %>
|
||||||
<div class="list-file">
|
<div class="list-file">
|
||||||
<div><span class="item_list fl"></span>
|
<div><span class="item_list fl"></span>
|
||||||
<%= link_to activity.title.to_s, User.current.logged? ? news_path(activity) : signin_url_without_domain, :class => "list-title fl" %>
|
<%= link_to activity.title.to_s, User.current.logged? ? news_path(activity) : signin_url_without_domain, :class => "list-title-normal fl" %>
|
||||||
<% if activity.sticky == 1 %>
|
<% if activity.sticky == 1 %>
|
||||||
<span class="fl ml10 red-cir-btn">顶</span>
|
<span class="fl ml10 red-cir-btn">顶</span>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% u = User.where("id=?",activity.author_id).first%> <div class="cl"></div>
|
<% u = User.where("id=?",activity.author_id).first%>
|
||||||
</div>
|
<div class="cl"></div>
|
||||||
<div class="massages-content ml15">
|
|
||||||
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100, :maxwidth=>563} %></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
<!--<div class="massages-content ml15">-->
|
||||||
|
<!--<p><%#=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100, :maxwidth=>563} %></p>-->
|
||||||
|
<!--</div>-->
|
||||||
<div class="ml15 mt10">
|
<div class="ml15 mt10">
|
||||||
<span class="grayTxt">
|
<span class="grayTxt mr15">
|
||||||
发布者: <%= activity.author.show_name %>
|
发布者:<%= link_to activity.author.show_name, user_path(activity.author), :class => "link-blue" %>
|
||||||
</span>
|
</span>
|
||||||
<span class="grayTxt">更新:<%= format_time(activity.course_acts.first.try(:updated_at)) %></span>
|
<span class="grayTxt">更新:<%= format_time(activity.course_acts.first.try(:updated_at)) %></span>
|
||||||
<% count=0 %>
|
<% count=0 %>
|
||||||
|
|
|
@ -1,36 +1,47 @@
|
||||||
<% unless courses.nil? %>
|
<% unless courses.nil? %>
|
||||||
<% courses.each_with_index do |course, i| %>
|
<% courses.each_with_index do |course, i| %>
|
||||||
<li class="syllabus_class_list <%= i > 2 ? 'none' : '' %>">
|
<li class="syllabus_class_list <%= i > 2 ? 'none' : '' %>">
|
||||||
<% allow_visit = User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1 %>
|
<% allow_visit = course.is_delete == 0 && (User.current.member_of_course?(course) || User.current.admin? || course.is_public == 1) %>
|
||||||
|
<% if course.is_delete == 0 %>
|
||||||
<span id="collect_course_icon_<%=course.id %>">
|
<span id="collect_course_icon_<%=course.id %>">
|
||||||
<%=render :partial => 'collect_course', :locals => {:course => course} %>
|
<%=render :partial => 'collect_course', :locals => {:course => course} %>
|
||||||
</span>
|
</span>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="fl">
|
<div class="fl">
|
||||||
<div class="syllabus_class_w ">
|
<div class="syllabus_class_w" style="width: 580px;">
|
||||||
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" class="syllabus_class_title fl" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= course.name %></a>
|
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" class="syllabus_class_title fl" target="_blank" title="<%= allow_visit ? "" : "班级不可访问" %>"><%= course.name %></a>
|
||||||
<span class="<%= course.is_public == 0 ? 'syllabus_class_private' : 'syllabus_class_open' %> fl ml10 mt3 syllabus_class_property"><%= course.is_public == 0 ? '私有' : '公开' %></span>
|
<span class="<%= course.is_public == 0 ? 'syllabus_class_private' : 'syllabus_class_open' %> fl ml10 mt3 syllabus_class_property"><%= course.is_public == 0 ? '私有' : '公开' %></span>
|
||||||
<span class="fr sy_p_grey hidden" style="max-width: 120px;">创建老师:<%= link_to course.teacher.show_name, user_path(course.teacher) %></span>
|
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="">
|
<div class="">
|
||||||
<p class="fl grayTxt ">更新:<%= format_date Time.at(course.updatetime) %><span class="mr10"></span>
|
<p class="fl grayTxt ">更新:<%= format_date Time.at(course.updatetime) %><span class="mr10"></span>
|
||||||
学期:<%= current_time_and_term(course) %></p>
|
创建老师:<%= link_to course.teacher.show_name, user_path(course.teacher) %>
|
||||||
|
|
||||||
<p class="list-info fr grayTxt">
|
|
||||||
<% student_link = (User.current.logged? && course.open_student == 1 && course.is_public == 1) || (User.current.member_of_course?(course)) || User.current.admin? %>
|
|
||||||
<span><a href="<%= student_link ? course_member_path(course, :role => 2) : "javascript:void(0)" %>" target="_blank" title="<%= student_link ? "" : "学生列表不对外公开" %>"><%= studentCount course %></a></span><span>学生</span>
|
|
||||||
<span>|</span>
|
|
||||||
<span><a href="<%= allow_visit ? homework_common_index_path(:course => course.id) : "javascript:void(0)" %>" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= visable_course_homework course %></a></span><span>作业</span>
|
|
||||||
<span>|</span>
|
|
||||||
<span><a href="<%= allow_visit ? course_files_path(course) : "javascript:void(0)" %>" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= visable_attachemnts_incourse(course).count %></a></span><span>资源</span>
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="icons_sy_arrow fl mt19 ml10"></span>
|
<% if User.current == @user && (User.current == course.teacher || User.current.admin?) %>
|
||||||
|
<div class="pr">
|
||||||
|
<a href="javascript:void(0)" onclick="archive_course(<%=course.id %>, <%=course.is_delete %>, 0);" onmouseover="$('#archive_notice_<%=course.id %>').show();" onmouseout="$('#archive_notice_<%=course.id %>').hide();"
|
||||||
|
class="btn_grey_big fr mt5 mr15" style="width: 56px;"><%= course.is_delete == 0 ? '归档' : '恢复' %></a>
|
||||||
|
<div class="archive_course_notice fontGrey2 none" id="archive_notice_<%=course.id %>" style="width: 230px;">
|
||||||
|
<em></em>
|
||||||
|
<span></span>
|
||||||
|
<p class="mt5 mb5 break_word">
|
||||||
|
<% if course.is_delete == 0 %>
|
||||||
|
此班级的信息将不再显示<br/>
|
||||||
|
您和您的学生将不能在此班级中继续互动<br/>
|
||||||
|
但您可以点击上方的“归档管理”
|
||||||
|
<% else %>
|
||||||
|
此班级的信息将恢复显示<br/>
|
||||||
|
您和您的学生将可以重新在此班级中互动
|
||||||
|
<% end %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<% count=activity.journals_for_messages.count %>
|
<% count=activity.journals_for_messages.count %>
|
||||||
|
<% comments = activity.journals_for_messages.reorder("created_on desc") %>
|
||||||
|
<% no_children_comments = get_no_children_comments comments %>
|
||||||
<div class="homepagePostReply" id="homework_post_reply_<%= user_activity_id %>">
|
<div class="homepagePostReply" id="homework_post_reply_<%= user_activity_id %>">
|
||||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :hw_status => hw_status} %>
|
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||||
|
|
||||||
<% comments = activity.journals_for_messages.reorder("created_on desc").limit(3) %>
|
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :hw_status => hw_status, :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
|
<%=render :partial => 'users/news_replies', :locals => {:comments => no_children_comments[:no_children_comments], :type => 'HomeworkCommon', :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
@ -16,7 +17,6 @@
|
||||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
||||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||||
<%= hidden_field_tag 'hw_status',params[:hw_status],:value =>hw_status %>
|
|
||||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<div class="orig_cont clearfix">
|
<div class="orig_cont clearfix">
|
||||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||||
<div>
|
<div>
|
||||||
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment} %>
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment, :type => type, :user_activity_id => user_activity_id} %>
|
||||||
</div>
|
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue