Merge remote-tracking branch 'remotes/cxt_new/develop' into cxt_course
This commit is contained in:
commit
11256c213f
|
@ -39,3 +39,4 @@ public/javascripts/wechat/node_modules/
|
|||
.access_token
|
||||
tmux*.log
|
||||
config/wechat.yml
|
||||
config/oneapm.yml
|
||||
|
|
|
@ -40,9 +40,10 @@ class BlogCommentsController < ApplicationController
|
|||
end
|
||||
def show
|
||||
@article = BlogComment.find(params[:id])
|
||||
all_comments = []
|
||||
@replies = get_all_children(all_comments, @article)
|
||||
@replies = BlogComment.where("root_id = #{@article.id}").reorder("created_on desc")
|
||||
@reply_count = @replies.count
|
||||
@replies = get_no_children_comments_all @replies
|
||||
@limit_count = @replies.count
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@limit = 10
|
||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||
|
|
|
@ -26,7 +26,7 @@ class BlogsController < ApplicationController
|
|||
@type = 2
|
||||
|
||||
@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
|
||||
topic[:infocount] = 0
|
||||
end
|
||||
|
|
|
@ -102,6 +102,7 @@ class IssuesController < ApplicationController
|
|||
@issue_count = @query.issue_count
|
||||
@test = params[:test]
|
||||
@project_sort = 'issues.updated_on desc'
|
||||
|
||||
if params[:test] != "0"
|
||||
case @test
|
||||
when "1"
|
||||
|
@ -284,11 +285,11 @@ class IssuesController < ApplicationController
|
|||
|
||||
# 用户编辑更改issue
|
||||
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]
|
||||
issue = Issue.find(params[:id])
|
||||
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)
|
||||
return
|
||||
else
|
||||
|
@ -296,6 +297,7 @@ class IssuesController < ApplicationController
|
|||
return unless update_issue_from_params
|
||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||
@issue.assigned_to_id = nil if @issue.assigned_to_id == 0
|
||||
@issue.fixed_version_id = nil if @issue.fixed_version_id == 0
|
||||
saved = false
|
||||
begin
|
||||
@saved = @issue.save_issue_with_child_records(params, @time_entry)
|
||||
|
@ -630,7 +632,9 @@ class IssuesController < ApplicationController
|
|||
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?
|
||||
# @results = @issues_filter
|
||||
|
@ -668,7 +672,7 @@ class IssuesController < ApplicationController
|
|||
@alltotal[issue.tracker_id.to_i] = @alltotal[issue.tracker_id.to_i] + 1
|
||||
user_id = issue.assigned_to_id
|
||||
if issue.assigned_to_id.nil?
|
||||
user_id = issue.author_id
|
||||
user_id = 0
|
||||
end
|
||||
|
||||
if !@results[user_id].nil?
|
||||
|
@ -696,7 +700,7 @@ class IssuesController < ApplicationController
|
|||
|
||||
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
|
||||
for i in 1..17 do
|
||||
|
|
|
@ -50,6 +50,8 @@ class MessagesController < ApplicationController
|
|||
all_comments = []
|
||||
@replies = Message.where("root_id = #{@topic.id}").reorder("created_on desc")
|
||||
@reply_count = @replies.count
|
||||
@replies = get_no_children_comments_all @replies
|
||||
@limit_count = @replies.count
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@limit = 10
|
||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||
|
@ -171,9 +173,6 @@ class MessagesController < ApplicationController
|
|||
@reply.root_id = parent.root_id.nil? ? parent.id : parent.root_id
|
||||
# @reply.reply_id = params[:id]
|
||||
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
|
||||
@quote = params[:quote][:quote]
|
||||
@reply = Message.new
|
||||
|
@ -207,8 +206,8 @@ class MessagesController < ApplicationController
|
|||
end
|
||||
if params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@is_course = params[:is_course]
|
||||
@is_board = params[:is_board]
|
||||
@is_course = params[:is_course] if params[:is_course]
|
||||
@is_board = params[:is_board] if params[:is_board]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
@ -282,8 +281,8 @@ class MessagesController < ApplicationController
|
|||
@message.destroy
|
||||
@topic = Message.find(params[:activity_id].to_i)
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@is_course = params[:is_course]
|
||||
@is_board = params[:is_board]
|
||||
@is_course = params[:is_course] if params[:is_course]
|
||||
@is_board = params[:is_board] if params[:is_board]
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -172,6 +172,8 @@ class NewsController < ApplicationController
|
|||
@news = result[:news]
|
||||
@comments = result[:comments]
|
||||
@comments_count = @comments.count
|
||||
@comments = get_no_children_comments_all @comments
|
||||
@limit_count = @comments.count
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@limit = 10
|
||||
@comments = @comments[@page * @limit..@page * @limit + 9]
|
||||
|
|
|
@ -41,8 +41,10 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
@org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
all_comments = []
|
||||
@replies = get_all_children(all_comments, @document)
|
||||
@replies = OrgDocumentComment.where("root_id = #{@document.id}").reorder("created_at desc")
|
||||
@reply_count = @replies.count
|
||||
@replies = get_no_children_comments_all @replies
|
||||
@limit_count = @replies.count
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
@limit = 10
|
||||
@replies = @replies[@page * @limit..@page * @limit + 9]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# encoding: utf-8
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2013 Jean-Philippe Lang
|
||||
#
|
||||
|
@ -31,7 +32,7 @@ class ProjectsController < ApplicationController
|
|||
before_filter :authorize, :only => [:show, :settings, :edit, :sort_project_members, :update, :modules, :close, :reopen,:view_homework_attaches,:course]
|
||||
before_filter :authorize_global, :only => [:new, :create,:view_homework_attaches]
|
||||
before_filter :require_admin, :only => [ :copy, :unarchive, :destroy, :calendar]
|
||||
before_filter :file, :statistics #:watcherlist
|
||||
before_filter :file
|
||||
# 除非项目内人员,不可查看成员, TODO: 完了写报表里去
|
||||
# before_filter :memberAccess, only: :member
|
||||
|
||||
|
@ -534,6 +535,23 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def project_watcherlist
|
||||
unless @project.nil?
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin?
|
||||
render_403
|
||||
else
|
||||
@users -= watched.watcher_users if @watched
|
||||
end
|
||||
@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
|
||||
|
||||
# include CoursesHelper
|
||||
def member
|
||||
# 消息"同意加入项目"
|
||||
|
@ -600,6 +618,13 @@ class ProjectsController < ApplicationController
|
|||
def member_forked
|
||||
@forked_projects = Project.where(:forked_from_project_id => @project.id)
|
||||
|
||||
@limit = 20
|
||||
@is_remote = true
|
||||
@forked_count = @forked_projects.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} ;")
|
||||
end
|
||||
|
||||
|
@ -739,7 +764,7 @@ class ProjectsController < ApplicationController
|
|||
rescue Exception => e
|
||||
puts e
|
||||
end
|
||||
# 删除Trustie班额本库记录
|
||||
# 删除Trustie版本库记录
|
||||
repoisitory = Repository.where(:project_id => @project.id, :type => GITLABTYPE).first
|
||||
repoisitory.delete
|
||||
@project.update_column(:gpid, nil)
|
||||
|
@ -799,6 +824,31 @@ class ProjectsController < ApplicationController
|
|||
@project = nil
|
||||
end
|
||||
|
||||
REP_TYPE = "Repository::Gitlab"
|
||||
# Delete @project's repository
|
||||
def destroy_repository
|
||||
if is_project_manager?(User.current.id, @project.id)
|
||||
@gitlab_repository = Repository.where(:project_id => @project, :type => REP_TYPE).first
|
||||
@is_true = params[:is_true]
|
||||
if @is_true
|
||||
begin
|
||||
g = Gitlab.client
|
||||
g.delete_project(@project.gpid)
|
||||
@gitlab_repository.destroy
|
||||
@gitlab_repository = nil
|
||||
scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
|
||||
@repository = Repository.factory(scm)
|
||||
@repository.is_default = @project.repository.nil?
|
||||
@project.update_attribute(:gpid, nil)
|
||||
rescue Exception => e
|
||||
puts e
|
||||
end
|
||||
end
|
||||
else
|
||||
return render_403
|
||||
end
|
||||
end
|
||||
|
||||
def show_projects_score
|
||||
respond_to do |format|
|
||||
format.html { render :layout => "base_projects"}
|
||||
|
@ -939,16 +989,6 @@ class ProjectsController < ApplicationController
|
|||
true
|
||||
end
|
||||
|
||||
def watcherlist
|
||||
unless @project.nil?
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin?
|
||||
render_403
|
||||
else
|
||||
@users -= watched.watcher_users if @watched
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#gcm
|
||||
def desc_sort_course_by_avtivity(activity_count,projects)
|
||||
return projects if activity_count.size<2
|
||||
|
@ -962,5 +1002,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
return projects
|
||||
end
|
||||
|
||||
#gcmend
|
||||
end
|
||||
|
||||
|
|
|
@ -91,10 +91,11 @@ class PullRequestsController < ApplicationController
|
|||
# 如果分支有改动
|
||||
if compare_pull_request(source_branch, target_project_id, target_branch)
|
||||
# 如果传送了目标项目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].to_i != @project.id
|
||||
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)
|
||||
@fork_project_name = Project.find(@project.forked_from_project_id).try(:name)
|
||||
@fork_project_name = Project.find(params[:target_project_id]).try(:name)
|
||||
@fork_pr_message = true if @fork_project_name
|
||||
else
|
||||
request = @g.create_merge_request(@project.gpid, title, User.current.gid, :description => description, :source_branch => source_branch, :target_branch => target_branch)
|
||||
|
@ -108,7 +109,7 @@ class PullRequestsController < ApplicationController
|
|||
format.js{redirect_to new_project_pull_request_path(:show_tip => tip)}
|
||||
end
|
||||
end
|
||||
rescue Exception => e
|
||||
rescue Gitlab::Error::Conflict => e
|
||||
@message = e.message
|
||||
end
|
||||
end
|
||||
|
@ -226,7 +227,7 @@ class PullRequestsController < ApplicationController
|
|||
# Gets the comments on a merge request.
|
||||
#
|
||||
# @example
|
||||
# Gitlab.merge_request_comments(5, 1)
|
||||
# Gitlab.merge_request_comments(5, 1)
|
||||
def pull_request_comments
|
||||
begin
|
||||
@comments = @g.merge_request_comments(@project.gpid, params[:id]).reverse
|
||||
|
|
|
@ -92,7 +92,7 @@ class SyllabusesController < ApplicationController
|
|||
def destroy
|
||||
if @syllabus && @syllabus.courses.not_deleted.empty?
|
||||
@syllabus.destroy
|
||||
redirect_to user_courselist_user_path(User.current.id)
|
||||
redirect_to user_courselist_user_path(User.current)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ class UsersController < ApplicationController
|
|||
case params[:type]
|
||||
when 'JournalsForMessage'
|
||||
@comment = JournalsForMessage.find params[:comment].to_i
|
||||
when 'Message'
|
||||
when 'Message','is_project_message'
|
||||
@comment = Message.find params[:comment].to_i
|
||||
when 'BlogComment'
|
||||
@comment = BlogComment.find params[:comment].to_i
|
||||
|
@ -153,9 +153,11 @@ class UsersController < ApplicationController
|
|||
@comment = OrgDocumentComment.find params[:comment].to_i
|
||||
when 'Comment'
|
||||
@comment = Comment.find params[:comment].to_i
|
||||
when 'Journal'
|
||||
when 'Journal','is_project_issue'
|
||||
@comment = Journal.find params[:comment].to_i
|
||||
end
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@parent_id = params[:parent_id] if params[:parent_id]
|
||||
end
|
||||
|
||||
#二级回复
|
||||
|
@ -171,7 +173,6 @@ class UsersController < ApplicationController
|
|||
else
|
||||
@user_activity_id = -1
|
||||
end
|
||||
@hw_status = params[:hw_status].to_i
|
||||
when 'JournalsForMessage'
|
||||
@reply = JournalsForMessage.find params[:reply_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
|
@ -181,15 +182,11 @@ class UsersController < ApplicationController
|
|||
@reply = Message.find params[:reply_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@activity_id = params[:activity_id]
|
||||
@is_course = params[:is_course]
|
||||
@is_board = params[:is_board]
|
||||
@type = 'Message'
|
||||
when 'BlogComment'
|
||||
@reply = BlogComment.find params[:reply_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@activity_id = params[:activity_id]
|
||||
@homepage = params[:homepage]
|
||||
@user_id = params[:user_id]
|
||||
@type = 'BlogComment'
|
||||
when 'OrgDocumentComment'
|
||||
@reply = OrgDocumentComment.find params[:reply_id]
|
||||
|
@ -215,6 +212,104 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#叠层回复框中的回复
|
||||
def reply_to_comment
|
||||
@type = params[:type]
|
||||
@reply = get_reply_by_type @type, params[:reply_id]
|
||||
@parent_id = params[:parent_id] if params[:parent_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]
|
||||
if @type == 'JournalsForMessage'
|
||||
if reply.jour_type == "HomeworkCommon"
|
||||
@type = "HomeworkCommon"
|
||||
elsif reply.jour_type == "Syllabus"
|
||||
@type = "Syllabus"
|
||||
end
|
||||
end
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
case @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','Comment'
|
||||
@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', 'Journal'
|
||||
@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
|
||||
if !(@user.nil?) && !(@user.memberships.nil?)
|
||||
@user.memberships.each do |member|
|
||||
|
@ -430,13 +525,13 @@ class UsersController < ApplicationController
|
|||
|
||||
member.course_group_id = 0
|
||||
member.save
|
||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>1)
|
||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>1)
|
||||
@msg.update_attributes(:status=>1,:viewed=>1)
|
||||
else
|
||||
members = []
|
||||
members << Member.new(:role_ids => integer_ids, :user_id => @msg.course_message_id)
|
||||
Course.find(@msg.course_id).members << members
|
||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>1)
|
||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>1)
|
||||
@msg.update_attributes(:status=>1,:viewed=>1)
|
||||
|
||||
if integer_ids.include?(9)
|
||||
|
@ -451,7 +546,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
when 'N'
|
||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>2)
|
||||
CourseMessage.create(:user_id => @msg.course_message_id, :course_id => @msg.course_id, :viewed => false,:course_message_id=>User.current.id,:content=>@msg.content,:course_message_type=>'CourseRequestDealResult',:status=>2)
|
||||
@msg.update_attributes(:status=>2,:viewed=>1)
|
||||
|
||||
if integer_ids.include?(9)
|
||||
|
@ -501,13 +596,13 @@ class UsersController < ApplicationController
|
|||
when 'Y'
|
||||
unless ah.empty?
|
||||
ah.first.update_column('status', 2)
|
||||
CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>1)
|
||||
CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>1)
|
||||
@msg.update_attributes(:apply_result=>1,:viewed=>1)
|
||||
end
|
||||
when 'N'
|
||||
unless ah.empty?
|
||||
ah.first.update_column('status', 3)
|
||||
CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:content=> @msg.content,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>2)
|
||||
CourseMessage.create(:user_id => @msg.apply_user_id, :course_id => @msg.course_id, :viewed => false,:course_message_id=>@msg.course_message_id,:content=>@msg.content,:course_message_type=>'HomeworkCommon',:status=>6,:apply_result=>2)
|
||||
@msg.update_attributes(:apply_result=>2,:viewed=>1)
|
||||
end
|
||||
end
|
||||
|
@ -1369,9 +1464,10 @@ class UsersController < ApplicationController
|
|||
@jour = jours.limit(10).offset(@page * 10)
|
||||
@type = params[:type]
|
||||
if User.current == @user
|
||||
jours.update_all(:is_readed => true, :status => false)
|
||||
jours.each do |journal|
|
||||
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||
@jour.update_all(:is_readed => true, :status => false)
|
||||
@jour.each do |journal|
|
||||
# fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
|
||||
journal.delay.set_children_readed_delay
|
||||
end
|
||||
end
|
||||
@state = false
|
||||
|
@ -3397,7 +3493,11 @@ class UsersController < ApplicationController
|
|||
|
||||
@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 and syllabus_id is NOT NULL").blank? ? "(-1)" : "(" + Course.where("tea_id = #{@user.id} and is_delete = 1 and syllabus_id is NOT NULL").map{|course| course.syllabus_id}.join(",") + ")"
|
||||
@archive_syllabuses = Syllabus.where("id in #{archive_ids}")
|
||||
end
|
||||
|
||||
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_members = SyllabusMember.where("user_id = #{@user.id}")
|
||||
|
@ -3469,11 +3569,58 @@ class UsersController < ApplicationController
|
|||
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 and syllabus_id is NOT NULL").blank? ? "(-1)" : "(" + Course.where("tea_id = #{@user.id} and is_delete = 1 and syllabus_id is NOT NULL").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
|
||||
@syllabus = Syllabus.where("id = #{params[:syllabus_id]}").first
|
||||
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|
|
||||
format.js
|
||||
end
|
||||
|
@ -3566,18 +3713,12 @@ class UsersController < ApplicationController
|
|||
if params[:type].present?
|
||||
case params[:type]
|
||||
when 'OrgDocumentComment'
|
||||
#obj = OrgDocumentComment.where('id = ?', params[:id].to_i).first
|
||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||
@type = 'OrgDocumentComment'
|
||||
#comments = []
|
||||
@journals = OrgDocumentComment.where("root_id = #{params[:id].to_i}").reorder("created_at desc")
|
||||
when 'Message','is_project_message'
|
||||
#obj = Message.where('id = ?', params[:id].to_i).first
|
||||
@type = 'Message'
|
||||
@is_course = params[:is_course]
|
||||
@is_board = params[:is_board]
|
||||
@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")
|
||||
when 'News'
|
||||
obj = News.where('id = ?', params[:id].to_i).first
|
||||
|
@ -3590,8 +3731,6 @@ class UsersController < ApplicationController
|
|||
@type = 'Syllabus'
|
||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||
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")
|
||||
@type = 'JournalsForMessage'
|
||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||
|
@ -3608,20 +3747,17 @@ class UsersController < ApplicationController
|
|||
when 'BlogComment'
|
||||
obj = BlogComment.where('id = ?', params[:id].to_i).first
|
||||
@user_activity_id = params[:div_id].to_i if params[:div_id]
|
||||
@homepage = params[:homepage].to_i
|
||||
@type = 'BlogComment'
|
||||
@user_id = obj.author_id
|
||||
#comments = []
|
||||
@journals = BlogComment.where("root_id = #{params[:id].to_i}").reorder("created_on desc")
|
||||
when 'HomeworkCommon'
|
||||
obj = HomeworkCommon.where('id = ?', params[:id].to_i).first
|
||||
@type = 'HomeworkCommon'
|
||||
@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)
|
||||
@user_activity_id = params[:user_activity_id].to_i if params[:user_activity_id]
|
||||
end
|
||||
end
|
||||
@journals = get_no_children_comments_all @journals
|
||||
end
|
||||
|
||||
def homepage
|
||||
|
|
|
@ -125,7 +125,8 @@ class VersionsController < ApplicationController
|
|||
@issue_pages = Paginator.new @issue_count, @limit, params['page'] || 1
|
||||
# @offset ||= @issue_pages.offset
|
||||
@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 {
|
||||
# @issues = @version.fixed_issues.visible.
|
||||
# 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();
|
||||
@action = 'fans'
|
||||
else
|
||||
|
||||
if params[:target_id]
|
||||
@user = User.find(params[:target_id])
|
||||
end
|
||||
end
|
||||
|
||||
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();
|
||||
@action = 'fans'
|
||||
else
|
||||
if params[:target_id]
|
||||
@user = User.find(params[:target_id])
|
||||
end
|
||||
end
|
||||
if params[:object_type] == 'project'
|
||||
@project = Project.find(params[:object_id])
|
||||
|
|
|
@ -137,7 +137,7 @@ class WechatsController < ActionController::Base
|
|||
on :fallback, respond: 'fallback message'
|
||||
|
||||
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
|
||||
|
||||
on :click, with: 'MY_NEWS' do |request, key|
|
||||
|
|
|
@ -116,7 +116,7 @@ class WordsController < ApplicationController
|
|||
else
|
||||
@user_activity_id = -1
|
||||
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?
|
||||
elsif @journal_destroyed.jour_type == 'Syllabus'
|
||||
@syllabus = Syllabus.find @journal_destroyed.jour_id
|
||||
|
@ -315,7 +315,7 @@ class WordsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.js{
|
||||
@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?
|
||||
}
|
||||
end
|
||||
|
@ -349,7 +349,7 @@ class WordsController < ApplicationController
|
|||
respond_to do |format|
|
||||
format.js{
|
||||
@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?
|
||||
}
|
||||
end
|
||||
|
@ -454,45 +454,5 @@ class WordsController < ApplicationController
|
|||
end
|
||||
obj
|
||||
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
|
||||
|
|
|
@ -2837,6 +2837,12 @@ module ApplicationHelper
|
|||
tag_list
|
||||
end
|
||||
|
||||
# 获取项目fork成员数
|
||||
def project_fork_count
|
||||
@forked_projects = Project.where(:forked_from_project_id => @project.id)
|
||||
@forked_count = @forked_projects.count
|
||||
end
|
||||
|
||||
def get_org_subfield_tag_list org_subfield
|
||||
all_attachments = org_subfield.attachments.select{|attachment| attachment.is_public? ||
|
||||
(attachment.container_type == "OrgSubfield" && User.current.member_of_org?(org_subfield.organization))||
|
||||
|
@ -3394,6 +3400,63 @@ def secdomain_with_protocol secdomain
|
|||
return Setting.protocol + "://" + secdomain + ".trustie.net"
|
||||
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','Comment'
|
||||
reply = Comment.find reply_id
|
||||
when 'Issue'
|
||||
reply = Journal.find reply_id
|
||||
when 'Journal'
|
||||
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
|
||||
|
@ -3746,3 +3809,43 @@ def homework_type_option
|
|||
type
|
||||
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
|
||||
grouped = Hash.new {|h,k| h[k] = []}
|
||||
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|
|
||||
grouped[version.project.name] << [version.name, version.id]
|
||||
end
|
||||
|
@ -302,6 +312,16 @@ module ProjectsHelper
|
|||
type << option2
|
||||
end
|
||||
|
||||
# 判断用户是否为项目管理员
|
||||
def is_project_manager?(user_id, project_id)
|
||||
@result = false
|
||||
mem = Member.where("user_id = ? and project_id = ?",user_id, project_id)
|
||||
unless mem.blank?
|
||||
@result = mem.first.roles.to_s.include?("Manager") ? true : false
|
||||
end
|
||||
return @result
|
||||
end
|
||||
|
||||
# 用来判断用户是否是项目的管理员
|
||||
# added by william
|
||||
def is_manager?(user_id,project_id)
|
||||
|
|
|
@ -2,12 +2,12 @@ module PullRequestsHelper
|
|||
|
||||
# 获取diff内容行号
|
||||
def diff_line_num content
|
||||
content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.nil? ? "" : content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
||||
result = content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.nil? ? "" : content.scan(/@@ -(\d+),\d+ \+\d+,\d+ @@/).first.join("").to_i
|
||||
end
|
||||
|
||||
# 处理内容
|
||||
def diff_content content
|
||||
content.gsub!(/.*@@ -\d+,\d+ \+\d+,\d+ @@\n/m,'')
|
||||
result = content.gsub!(/.*@@.*@@\n/m,'')
|
||||
end
|
||||
|
||||
def get_user_name user_id
|
||||
|
|
|
@ -100,7 +100,7 @@ module UsersHelper
|
|||
def applied_project_users applied_message
|
||||
# case applied_message.status
|
||||
# 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
|
||||
|
||||
|
|
|
@ -333,6 +333,7 @@ module WatchersHelper
|
|||
return '' unless user && user.logged?
|
||||
objects = Array.wrap(objects)
|
||||
watched = objects.any? {|object| object.watched_by?(user)}
|
||||
watched = true if user.id == @project.user_id
|
||||
@watch_flag = objects.first.instance_of?(Project)
|
||||
id = watcher_css(objects)
|
||||
text = @watch_flag ?
|
||||
|
@ -340,8 +341,13 @@ module WatchersHelper
|
|||
url = watch_path(:object_type => objects.first.class.to_s.underscore,
|
||||
:object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort))
|
||||
method = watched ? 'delete' : 'post'
|
||||
link_to text, url, :remote => true, :method => method,
|
||||
:class => "pro_new_topbtn_left fl" ,:id=>id
|
||||
if user.id != @project.user_id
|
||||
link_to text, url, :remote => true, :method => method,
|
||||
:class => "pro_new_topbtn_left fl" ,:id => id
|
||||
else
|
||||
link_to "关注", "javascript:void(0)", :remote => true, :method => method,
|
||||
:class => "pro_new_grey_topbtn_left fl" , :id => id
|
||||
end
|
||||
end
|
||||
|
||||
def store_project_link project_id, user_id
|
||||
|
|
|
@ -854,7 +854,8 @@ class Issue < ActiveRecord::Base
|
|||
return @assignable_versions if @assignable_versions
|
||||
|
||||
# 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_id_changed?
|
||||
# nothing to do
|
||||
|
|
|
@ -344,4 +344,9 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
def content_detail
|
||||
self.notes
|
||||
end
|
||||
|
||||
def set_children_readed_delay
|
||||
# fetch_user_leaveWord_reply(self).update_all(:is_readed => true, :status => false)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -9,6 +9,7 @@ class Organization < ActiveRecord::Base
|
|||
has_many :org_subfields, :dependent => :destroy
|
||||
has_many :users, :through => :org_members
|
||||
has_many :files
|
||||
has_many :org_messages, :class_name => 'OrgMessage', :dependent => :destroy
|
||||
acts_as_attachable
|
||||
validates_uniqueness_of :name
|
||||
after_create :save_as_org_activity, :add_default_subfields
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
<% for attachment in attachments %>
|
||||
<div style="float:left;">
|
||||
<p style="height:14px;line-height:12px;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
|
||||
<%if is_float%>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end%>
|
||||
<% if is_float %>
|
||||
<div style="max-width:55%;white-space: nowrap; overflow: hidden; text-overflow: ellipsis;float: left;">
|
||||
<% end %>
|
||||
<span title="<%= attachment.filename %>" id = "attachment_">
|
||||
<% if options[:length] %>
|
||||
<% if User.current.logged? %>
|
||||
|
@ -42,15 +42,15 @@
|
|||
<% end %>
|
||||
<% else %>
|
||||
<% 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 %>
|
||||
<%= 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 %>
|
||||
</span>
|
||||
<%if is_float%>
|
||||
<% if is_float %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% end %>
|
||||
|
||||
<% if attachment.is_text? %>
|
||||
<%= 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) %>
|
||||
</div>
|
||||
<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? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
|
@ -52,7 +52,7 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<% if @limit_count > @page * @limit + 10 %>
|
||||
<div id="more_blog_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<% if @in_user_homepage %>
|
||||
<% 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}) %>");
|
||||
<% else%>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% end %>
|
||||
<%# if @in_user_homepage %>
|
||||
<%# 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}) %>");
|
||||
<%# else%>
|
||||
//$("#user_activity_<%#= @user_activity_id%>").replaceWith("<%#= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
|
||||
<%# 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');
|
|
@ -1,11 +1,12 @@
|
|||
<% if @in_user_homepage %>
|
||||
<% 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}) %>");
|
||||
<% 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}) %>");
|
||||
<%# if @in_user_homepage %>
|
||||
<%# 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}) %>");
|
||||
<%# 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}) %>");
|
||||
// init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
||||
<% else%>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
||||
<%# else%>
|
||||
//$("#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');
|
||||
<% 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');
|
|
@ -109,9 +109,7 @@
|
|||
<div class="cl"></div>
|
||||
</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="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
|
@ -124,7 +122,6 @@
|
|||
<div class="homepagePostReplyBannerTime"></div>
|
||||
</div>
|
||||
|
||||
<%# comments = all_replies %>
|
||||
<% if @reply_count > 0 %>
|
||||
<div class="" id="reply_div_<%= @article.id %>">
|
||||
<%= render :partial => 'blog_comment_show_replies' %>
|
||||
|
|
|
@ -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 class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% all_repies = BlogComment.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
||||
<% count = all_repies.count %>
|
||||
<% no_children_comments = get_no_children_comments all_repies %>
|
||||
<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 %>
|
||||
<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>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% 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}) %>");
|
||||
<% 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 %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% end %>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<% 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}) %>");
|
||||
<% 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 %>
|
||||
$("#user_activity_<%= @user_activity_id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_news', :locals => {:activity => @news,:user_activity_id =>@user_activity_id}) %>");
|
||||
<% end %>
|
||||
|
|
|
@ -13,5 +13,11 @@ function click_OK(){
|
|||
hideModal();
|
||||
<% if params[:source] == "1" %>
|
||||
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 %>
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
<% 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 %>
|
||||
<% if @group && @group != "-1" %>
|
||||
//$("#member_content").html("<%#= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @results})%>");
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
<span>测验时长:<%= exercise.time %>分钟</span>
|
||||
<% end %>
|
||||
</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;">
|
||||
<%= exercise.exercise_description.nil? ? "" :exercise.exercise_description.html_safe%>
|
||||
</pre>
|
||||
<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>
|
||||
<div class="cl"></div>
|
||||
</div>
|
|
@ -98,8 +98,8 @@
|
|||
<li class=" clear" style="border:1px solid #c8c8c8;">
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
<%= f.text_field :start_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||
:required => @issue.required_attribute?('start_date'), :onchange=>"issue_start_date_change();",
|
||||
:class=>"fl calendar_input", :style=>"width:170px;" %>
|
||||
:required => @issue.required_attribute?('start_date'), :onchange => "issue_start_date_change();",
|
||||
:class => "fl calendar_input", :style => "width:170px;" %>
|
||||
<%= calendar_for('issue_start_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -110,8 +110,8 @@
|
|||
<label class="label02" ></label>
|
||||
<% if @issue.safe_attribute? 'due_date' %>
|
||||
<%= f.text_field :due_date, :size => 22, :disabled => !@issue.leaf?, :no_label => true,
|
||||
:required => @issue.required_attribute?('due_date'), :onchange=>"issue_end_date_change();",
|
||||
:class=>"fl calendar_input",:style=>"width: 170px;", :placeholder=> "请选择结束日期" %>
|
||||
:required => @issue.required_attribute?('due_date'), :onchange => "issue_end_date_change();",
|
||||
:class => "fl calendar_input",:style => "width: 170px;", :placeholder => "请选择结束日期" %>
|
||||
<%= calendar_for('issue_due_date', 'start_date') if @issue.leaf? %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
@ -121,7 +121,7 @@
|
|||
<li class=" clear">
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<%= 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 %>
|
||||
</li>
|
||||
<li class=" clear"><%= l(:field_estimated_hours) %></li>
|
||||
|
@ -160,9 +160,5 @@
|
|||
}
|
||||
// 里程碑添加默认选项
|
||||
$("#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>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<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 %>">
|
||||
<% 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" %>
|
||||
</li>
|
||||
<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>
|
||||
</ul>
|
||||
</div><!--issues_statistics end-->
|
||||
|
|
|
@ -11,9 +11,18 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<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|%>
|
||||
<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[2] %></td>
|
||||
<td class="w130"><%= v[4] %></td>
|
||||
|
@ -22,14 +31,5 @@
|
|||
<td class="w130"><%= v[5] %></td>
|
||||
</tr>
|
||||
<% 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>
|
||||
</table>
|
|
@ -11,10 +11,19 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<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|%>
|
||||
<% if v[12] > 0 %>
|
||||
<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[14] %></td>
|
||||
<td class="w130"><%= v[16] %></td>
|
||||
|
@ -24,14 +33,5 @@
|
|||
</tr>
|
||||
<% 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>
|
||||
</table>
|
|
@ -11,10 +11,19 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<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|%>
|
||||
<% if v[6] > 0 %>
|
||||
<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[8] %></td>
|
||||
<td class="w130"><%= v[10] %></td>
|
||||
|
@ -24,14 +33,5 @@
|
|||
</tr>
|
||||
<% 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>
|
||||
</table>
|
|
@ -9,6 +9,7 @@
|
|||
<div class="pro_new_top clear mb10">
|
||||
<div class="fl pro_new_name ml15 clear">
|
||||
<% unless @project.is_public? %><span class="icons_newpro_lock fl "></span><% end %>
|
||||
<%=link_to "#{@project.owner.try(:show_name)}<span class='ml5 mr5'>/</span>".html_safe, user_path(@project.owner), :class => "pro_new_username" %>
|
||||
<%=link_to @project.name, project_path(@project), :class => "pro_new_username break_word" %>
|
||||
</div>
|
||||
|
||||
|
@ -19,8 +20,8 @@
|
|||
<div class="cl"></div>
|
||||
<% unless @project.forked_from_project_id.nil? %>
|
||||
<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" %>
|
||||
<%=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" %>
|
||||
<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", :target => "_blank" %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
|
|
@ -140,25 +140,25 @@
|
|||
|
||||
<div class="subNavBox ">
|
||||
<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>
|
||||
</div>
|
||||
<% if @center_flag %>
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
|
@ -166,13 +166,13 @@
|
|||
|
||||
<% else%>
|
||||
<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的课程
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.courses.visible.count%>)</span>
|
||||
</a>
|
||||
</div>
|
||||
<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的项目
|
||||
<span style="font-weight:normal;font-size:12px;color:#FF5722;">(<%=@user.projects.visible.count%>)</span>
|
||||
</a>
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
<li>
|
||||
<a href="<%=user_fanslist_user_path(@user) %>">
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -162,8 +162,8 @@
|
|||
<% if hidden_unproject_infos %>
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_01" class="user_icons_course">
|
||||
<%= link_to '班级',{:controller => "users", :action => "user_courselist", :id => @user.id}, :id => "user_course_list" %>
|
||||
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_courselist", :id => @user.id}, :style => "color:#aaa;" %></font>
|
||||
<%= 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}, :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) %>
|
||||
<div class="<%= courses.empty? ? 'none' : ''%>" id="homepage_left_course_list">
|
||||
<%=render :partial => 'layouts/homepage_left_course_list', :locals => {:courses => courses} %>
|
||||
|
@ -181,7 +181,7 @@
|
|||
</li>
|
||||
<% if @user == User.current %>
|
||||
<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>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -190,8 +190,8 @@
|
|||
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_06" class="user_icons_project">
|
||||
<%= link_to '项目',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :id => 'user_project_list'%>
|
||||
<font class="show-all-sub"><%= link_to '全部',{:controller => "users", :action => "user_projectlist", :id => @user.id}, :style => "color:#aaa;" %></font>
|
||||
<%= 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}, :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)%>
|
||||
<div class="<%= projects.empty? ? 'none' : ''%>" id="homepage_left_project_list">
|
||||
<%=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) %>
|
||||
</div>
|
||||
<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 %>">
|
||||
<%= reply.content.html_safe%>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<% if @limit_count > @page * @limit + 10 %>
|
||||
<div id="more_message_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<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) %>
|
||||
</div>
|
||||
<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 %>">
|
||||
<%= reply.content.html_safe %>
|
||||
|
@ -48,7 +48,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<% if @limit_count > @page * @limit + 10 %>
|
||||
<div id="more_message_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<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) %>
|
||||
</div>
|
||||
<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 %>">
|
||||
<%= reply.content.html_safe%>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<% if @limit_count > @page * @limit + 10 %>
|
||||
<div id="more_message_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<% 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}) %>");
|
||||
<% 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 %>
|
||||
|
||||
<%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 %>
|
||||
$("#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%>
|
||||
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] %>
|
||||
$("#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 %>
|
||||
$("#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 %>
|
||||
|
||||
<%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 %>
|
||||
$("#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%>
|
||||
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>
|
||||
</ul>
|
||||
<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_confirmation" name="new_password_confirmation" class="w210" type="password" required="true" nh_required="1"></li>
|
||||
<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) %>
|
||||
</div>
|
||||
<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? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
|
@ -52,7 +52,7 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @comments_count > @page * @limit + 10 %>
|
||||
<% if @limit_count > @page * @limit + 10 %>
|
||||
<div id="more_news_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<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) %>
|
||||
</div>
|
||||
<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? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
|
@ -53,7 +53,7 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if @reply_count > @page * @limit + 10 %>
|
||||
<% if @limit_count > @page * @limit + 10 %>
|
||||
<div id="more_document_replies">
|
||||
<div class="detail_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//location.reload();
|
||||
<% 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%>");
|
||||
<% elsif params[:detail_page] %>
|
||||
window.location.href = '<%= organization_path(params[:organization_id],:org_subfield_id => @org_sub_id )%>';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% 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 %>
|
||||
sd_create_editor_from_data(<%= @act.id %>,"","100%", "<%=@act.class.to_s%>");
|
||||
|
|
|
@ -74,9 +74,6 @@
|
|||
<% end %>
|
||||
</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 %>">
|
||||
<%# if count > 0 %>
|
||||
|
@ -89,7 +86,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<%# comments = all_replies %>
|
||||
<div class="" id="reply_div_<%= @document.id %>">
|
||||
<%= render :partial => "document_show_replies" %>
|
||||
</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 class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% all_replies = OrgDocumentComment.where("root_id = #{activity.id}").reorder("created_at desc") %>
|
||||
<% count = all_replies.count %>
|
||||
|
||||
<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} %>
|
||||
|
||||
<% 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 id="activity_post_reply_<%=user_activity_id %>">
|
||||
<%=render :partial => 'organizations/org_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -55,37 +55,10 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% count=activity.comments.count %>
|
||||
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= 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 id="activity_post_reply_<%=user_activity_id %>">
|
||||
<%=render :partial => 'users/course_news_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -67,41 +67,10 @@
|
|||
<% end %>
|
||||
</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 %>">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :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 id="activity_post_reply_<%=act.id %>">
|
||||
<%=render :partial => 'organizations/org_document_post_reply', :locals => {:activity => document, :user_activity_id => act.id} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -81,45 +81,11 @@
|
|||
</div>
|
||||
<div class="cl"></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">
|
||||
<%= 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} %>
|
||||
|
||||
<% comments = all_replies[0..2] %>
|
||||
<% 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 id="activity_post_reply_<%=user_activity_id %>">
|
||||
<%=render :partial => 'projects/project_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<!--关注项目-->
|
||||
<li class="mr5 fl">
|
||||
<%= watcher_link_for_project(@project, User.current) %>
|
||||
<%= link_to "#{@project.watcher_users.count}", {:controller=>"projects", :action=>"watcherlist", :id => @project.id},:id=>"fans_num", :class => 'pro_new_topbtn fl' %>
|
||||
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
||||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||
</li>
|
||||
<!--加入项目-->
|
||||
<li class="mr5 fl">
|
||||
|
@ -12,15 +13,21 @@
|
|||
<% else %>
|
||||
<a style="cursor: default" class="pro_new_topbtn_left fl">等待审批</a>
|
||||
<% end %>
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<!--项目创建者不能退出项目-->
|
||||
<% if User.current.id != @project.user_id %>
|
||||
<% if User.current.login? %>
|
||||
<li class="mr5 fl">
|
||||
<a class="pro_new_topbtn_left fl "> 已加入</a>
|
||||
<a href="<%= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%= Member.where(:project_id => @project.id).count %></a>
|
||||
<%= watcher_link_for_project(@project, User.current) %>
|
||||
<%= link_to "#{@project.watcher_users.count}", {:controller => "projects", :action => "project_watcherlist",
|
||||
:id => @project.id}, :id => "fans_num", :class => 'pro_new_topbtn fl', :title => "关注成员列表" %>
|
||||
</li>
|
||||
<li class="mr5 fl">
|
||||
<a class="pro_new_topbtn_left fl " style="cursor:default;"> 已加入</a>
|
||||
<!-- <a href="<%= project_member_path(@project) %>" class=" pro_new_topbtn fl"><%= Member.where(:project_id => @project.id).count %></a>-->
|
||||
<%= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员列表" %>
|
||||
</li>
|
||||
<%#= link_to "#{Member.where(:project_id => @project.id).count}", project_member_path(@project), :class => 'pro_new_topbtn fl', :title => "项目成员" %>
|
||||
<% end %>
|
||||
|
@ -35,8 +42,17 @@
|
|||
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="pro_new_topbtn_left fl" target="_blank">Fork</a>-->
|
||||
<%= link_to "<span class='vl_fork'></span>".html_safe+"Fork", forked_pop_project_path(@project),
|
||||
:class=>"pro_new_topbtn_left fl", :remote => true %>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl"><%= @project.forked_count.to_i %></a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
||||
|
||||
</li>
|
||||
<% else%>
|
||||
<li class="mr5 fl">
|
||||
<%#= link_to "<span class='vl_fork '></span>".html_safe+"Fork","#",
|
||||
:class=>"pro_new_grey_topbtn_left fl"%>
|
||||
<a href="javascript:void(0)" class="pro_new_grey_topbtn_left fl" >
|
||||
<span class='vl_fork'>Fork</span>
|
||||
</a>
|
||||
<a href="<%= member_forked_project_path(@project) %>" class=" pro_new_topbtn fl" title="fork成员列表"><%= project_fork_count %></a>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
|
@ -16,5 +16,25 @@
|
|||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</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, :parent_id => parent_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 class="cl"></div>
|
|
@ -1,8 +1,8 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||
<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, :parent_id => parent_id} %>
|
||||
</div>
|
||||
<% 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, :parent_id => parent_id} %>
|
||||
</div>
|
|
@ -1,8 +1,8 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% unless comment.parent.nil? %>
|
||||
<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, :parent_id => parent_id} %>
|
||||
</div>
|
||||
<% 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, :parent_id => parent_id} %>
|
||||
</div>
|
|
@ -16,5 +16,25 @@
|
|||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</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, :parent_id => parent_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 class="cl"></div>
|
|
@ -8,18 +8,18 @@
|
|||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% 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, :parent_id => comment.id} %>
|
||||
<% else %>
|
||||
<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, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide_issue clearfix">
|
||||
<span class="orig_icon" >↓ </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 => 'is_project_issue', :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %>
|
||||
</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, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</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) %>
|
||||
</div>
|
||||
<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 %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<% 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">
|
||||
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
|
||||
<%= render :partial => 'projects/project_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id, :expand_more =>no_children_comments[:three_more]} %>
|
||||
<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>
|
|
@ -1,30 +1,31 @@
|
|||
<div class="st_list2" style="width:970px;">
|
||||
<div class="st_box">
|
||||
<a href="#" class="fr fb mb5" >加入时间</a>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
||||
<ul class="clear pro_new_users_box">
|
||||
<% members.each do |member| %>
|
||||
<div class="st_boxlist">
|
||||
<a href="javascript:" class="st_img">
|
||||
<%= member.user.nil? ? '' : (image_tag(url_to_avatar(member.user), :width => 32, :height => 32)) %>
|
||||
</a>
|
||||
<span class="fr ml10 c_grey"><%= l(:label_user_for_project_grade) %>:<span class="c_orange"><%= format("%.2f" ,read_user_project_scores(member.user,@project)).to_i %></span></span>
|
||||
<li class="clear">
|
||||
<%= link_to image_tag(url_to_avatar(member.user), :width => "50", :height => "50"), user_path(member.user), :alt => "用户头像", :class => "pro_new_users fl mr5" %>
|
||||
<div class="fl mt5 clear">
|
||||
<%= link_to member.user.try(:show_name), user_path(member.user), :class => "pro_new_users mt5 fl" %>
|
||||
<!--<span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%#= link_to project.name, user_path(member.user), :class => "pro_new_users mt5 fl" %>-->
|
||||
<br/>
|
||||
<span class=" c_grey mt3 fl"><%= h time_tag(member.created_on) %></span>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
|
||||
<%= link_to(member.user.name, user_path(member.user),:class => "ml10 c_blue02") %>(<%= rolesToLanguage(member.roles.sort.collect(&:to_s)).join(', ') %>)<br/>
|
||||
</div>
|
||||
|
||||
|
||||
<span class="fr c_grey"><%= format_date(member.created_on)%></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
|
||||
<ul class="wlist">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
<div style="text-align:center;">
|
||||
<div class="pages" style="width:auto; display:inline-block;">
|
||||
<ul id="homework_pository_ref_pages">
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,18 +8,18 @@
|
|||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% 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, :parent_id => comment.id} %>
|
||||
<% else %>
|
||||
<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, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide_issue clearfix">
|
||||
<span class="orig_icon" >↓ </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 => 'is_project_message', :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %>
|
||||
</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, :parent_id => comment.id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</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) %>
|
||||
</div>
|
||||
<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? %>
|
||||
<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">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :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,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
|
@ -39,7 +39,7 @@
|
|||
<% if comment.course_destroyable_by?(User.current) || comment.destroyable_by?(User.current) %>
|
||||
<%= link_to(
|
||||
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,
|
||||
:remote => true,
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<% if expand_more %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<% 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>
|
||||
<% 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>
|
||||
<% else %>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<div style="width:460px;">
|
||||
<div class="sy_popup_top">
|
||||
<h3 class="fl">提示</h3>
|
||||
<a href="javascript:void(0);" class="sy_icons_close fr" onclick="hideModal()"></a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="sy_popup_con" style="width:380px;">
|
||||
<ul class="sy_popup_add" >
|
||||
<li class="center mb5" style="line-height:20px">
|
||||
删除操作会彻底删除版本库及源码,一旦删除不能恢复</br>
|
||||
你确定删除吗?
|
||||
</li>
|
||||
<li class="mt10">
|
||||
<label class="mr27"> </label>
|
||||
<a href="javascript:void(0);" class="sy_btn_grey fl " onclick="hideModal()">取 消</a>
|
||||
<!-- <a href="<%#= {:controller => 'repositories', :action => 'forked'} %>" class="sy_btn_blue fl ml20" onclick="hideModal();">确 定</a>-->
|
||||
<%= link_to "确 定", destroy_repository_project_path(@project, :is_true => true), :remote => true, :class => "sy_btn_blue fl ml20", :onclick => "hideModal();" %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,6 @@
|
|||
<% if @is_true %>
|
||||
$("#pro_st_tbc_06").html('<%= escape_javascript( render :partial => 'projects/settings/new_repositories') %>');
|
||||
<% else %>
|
||||
var htmlvalue = "<%= escape_javascript(render :partial => 'projects/reposistory_destory_pop') %>";
|
||||
pop_box_new(htmlvalue,460,316);
|
||||
<% end %>
|
|
@ -1,11 +1,12 @@
|
|||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title %></h2>
|
||||
<div class="pro_new_info mb10">
|
||||
<div class="project_r_h">
|
||||
<h2 class="clear"><%= @subPage_title %>
|
||||
<% if is_project_manager?(User.current, @project) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
<%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %>
|
||||
<%=link_to "成员管理", settings_project_url(@project, :tab => 'members'), :id => @project.id, :class => "sy_cblue", :style => "font-weight: normal;" %>
|
||||
</span>
|
||||
<% end %>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="member_content">
|
||||
<%= error_messages_for 'member' %>
|
||||
|
|
|
@ -9,9 +9,19 @@
|
|||
<span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%= link_to project.name, project_path(project), :class => "pro_new_users mt5 fl" %>
|
||||
<br/>
|
||||
<span class=" c_grey mt3"><%=h time_tag(project.created_on) %>前</span>
|
||||
<span class=" c_grey mt3"><%=h time_tag(project.created_on) %></span>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</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>
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<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>
|
||||
<ul class="clear pro_new_users_box">
|
||||
<% @watchers.each do |user| %>
|
||||
<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" %>
|
||||
<div class="fl mt5 clear">
|
||||
<%= link_to user.try(:show_name), user_path(user), :class => "pro_new_users mt5 fl" %>
|
||||
<!-- <span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%#= link_to project.name, project_path(project), :class => "pro_new_users mt5 fl" %>-->
|
||||
<br/>
|
||||
<span class=" c_grey mt3 fl"><%=h time_tag(user.created_on) %></span>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</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>
|
||||
|
||||
|
||||
|
|
@ -14,14 +14,16 @@
|
|||
<input type="text" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<input type="password" style="display: none"/> <!--阻止表单自动填充 -->
|
||||
<label class=" fl"><span class="c_red f12">*</span> 版本库名称 : </label>
|
||||
<%= f.text_field :identifier, :disabled =>@repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
|
||||
<%= f.text_field :identifier, :disabled => @repository.nil? || @repository.identifier_frozen? ? true:false, :label=>"", :no_label => true, :class => "w650 fl", :style => "height: 28px;", :id => "project_setting_repository" %>
|
||||
<span style="display: none" class="c_orange ml100" id="valid_repository_name">版本库名是无效的</span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<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>
|
||||
3.一旦保存,标识无法修改</p>
|
||||
3.一旦保存,标识无法修改
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
<a href="javascript:void(0)" onclick="cancel_for_create();" class="fr sy_btn_grey"><%=l(:button_cancel)%></a>
|
||||
|
@ -35,14 +37,22 @@
|
|||
<tr>
|
||||
<th class="w130 pl10 pr10 hidden fl">版本库名</th>
|
||||
<th class="w90 pr10 hidden fl">管理系统</th>
|
||||
<th class="w536 hidden fl">库路径</th>
|
||||
<th class="w490 hidden fl">库路径</th>
|
||||
<th class="w46 hidden fl"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="w130 pl10 pr10 hidden fl"><%= @gitlab_repository.identifier %></th>
|
||||
<th class="w90 pr10 hidden fl">Git</th>
|
||||
<th class="w536 hidden fl"><%=h @repos_url %></th>
|
||||
<th class="w490 hidden fl"><%=h @repos_url %></th>
|
||||
<th class="w46 hidden fl">
|
||||
<% if is_project_manager?(User.current.id, @project.id) %>
|
||||
<%= link_to "删除", destroy_repository_project_path(@project), :class => "c_blue", :remote => true %>
|
||||
<% else %>
|
||||
<%= "删除" %>
|
||||
<% end %>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<!--新版项目头部结束-->
|
||||
<div class="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_description_code" >
|
||||
<div id="project_description_code" style="padding: 0 15px 10px 15px;">
|
||||
<% if @project.description.blank? %>
|
||||
<p class="break_word" style="padding-top:5px"><%= @project.name %></p>
|
||||
<p style="padding-top:5px"><%= @project.name %></p>
|
||||
<% 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 %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,28 +1,29 @@
|
|||
<div class="container-big mb10">
|
||||
<div class="project_r_h" style="width:970px;">
|
||||
<h2 class="project_h2"><%= l(:label_user_watcher)%></h2>
|
||||
<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>
|
||||
<ul class="clear pro_new_users_box">
|
||||
<% @watchers.each do |user| %>
|
||||
<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" %>
|
||||
<div class="fl mt5 clear">
|
||||
<%= link_to user.try(:show_name), user_path(user), :class => "pro_new_users mt5 fl" %>
|
||||
<!-- <span class="ml5 mr5 mt5 fl"> / </span>
|
||||
<%#= link_to project.name, project_path(project), :class => "pro_new_users mt5 fl" %>-->
|
||||
<br/>
|
||||
<span class=" c_grey mt3 fl"><%=h time_tag(user.created_on) %></span>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</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 class="st_list2" style="width:970px;">
|
||||
<div class="st_box">
|
||||
<a href="#" class="fr fb mb5" >加入时间</a>
|
||||
<div class="cl"></div><!--st_box_top end-->
|
||||
|
||||
<% for user in @project.watcher_users %>
|
||||
<div class="st_boxlist">
|
||||
<a href="javascript:" class="st_img">
|
||||
<%= user.nil? ? '' : (image_tag(url_to_avatar(user), :width => 32, :height => 32)) %>
|
||||
</a>
|
||||
<span class="fl ml10 c_grey"><%= l(:label_username)%></span>
|
||||
<%= link_to(user.name, user_path(user),:class => "ml10 c_blue02") %>
|
||||
<span class="fr c_grey"><%= format_date(user.created_on) %></span>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_followers)) -%>
|
||||
</div>
|
|
@ -12,9 +12,9 @@
|
|||
<% 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" %>
|
||||
<% 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">
|
||||
<option id="source_project_name" name="<%= @project.id %>" value="<%= @project.id %>" ><%= @source_project_name %></option>
|
||||
<option id="target_project_name" name="<%= @forked_project.id %>" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
|
||||
<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="source_project_name" value="<%= @project.id %>" ><%= @source_project_name %></option>
|
||||
<option id="target_project_name" name="forked_project_name" value="<%= @forked_project.id %>" ><%= @forked_project_name %></option>
|
||||
</select>
|
||||
<select name="target_branch" id="pull_request_branch" class = "fl PullReques_minselect ml5" >
|
||||
<% @source_rev.each do |rev| %>
|
||||
|
|
|
@ -31,15 +31,7 @@
|
|||
改动已合并至 <%= @request.target_branch %> 分支
|
||||
</div>
|
||||
<% else %>
|
||||
<% if is_project_manager?(User.current.id, @project.id) %>
|
||||
<% 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 %>
|
||||
<%= render "show_container" %>
|
||||
<% 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_navbox clear">
|
||||
<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><%= 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>
|
||||
<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>
|
||||
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
||||
<%= link_to "待处理<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@requests_opened_count}</span>".html_safe,
|
||||
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>
|
||||
<% 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" %>
|
||||
|
@ -34,11 +43,23 @@
|
|||
<script>
|
||||
// $("#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>");
|
||||
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>
|
||||
<% else %>
|
||||
<%= render :partial => "projects/no_data" %>
|
||||
|
|
|
@ -31,10 +31,8 @@
|
|||
<%= l(:label_publish_time)%>:<%= homework.publish_time%> 00:00
|
||||
</div>
|
||||
<% 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>
|
||||
<% 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 %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -68,11 +68,11 @@
|
|||
<%= link_to "加入班级",join_private_courses_courses_path,:remote => true,:class => "hw_btn_green fr mt5",:method => "post"%>
|
||||
<% end %>
|
||||
<% 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 %>
|
||||
<% else %>
|
||||
<% 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 %>
|
||||
<div class="cl"></div>
|
||||
|
@ -119,19 +119,4 @@
|
|||
$(function() {
|
||||
$(".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>
|
|
@ -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><!--HomeWork 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) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= @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 class="homepagePostReply" style="margin-bottom: 20px;">
|
||||
<div id="activity_post_reply_<%=@syllabus.id %>">
|
||||
<%=render :partial => 'syllabuses/syllabus_post_reply', :locals => {:activity => @syllabus, :user_activity_id => @syllabus.id} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--回复框 用正式版样式-->
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% unless comment.parent.nil? %>
|
||||
<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, :parent_id => parent_id} %>
|
||||
</div>
|
||||
<% 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, :parent_id => parent_id} %>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
<div class="orig_right fl">
|
||||
<%= 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>
|
||||
<div class="orig_content ">
|
||||
<div class="orig_content">
|
||||
<% if comment.class == Journal %>
|
||||
<% if comment.details.any? %>
|
||||
<% details_to_strings(comment.details).each do |string| %>
|
||||
|
@ -16,5 +16,40 @@
|
|||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</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, :parent_id => parent_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, :parent_id => parent_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 class="cl"></div>
|
|
@ -33,10 +33,8 @@
|
|||
<% end %>
|
||||
<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} %>
|
||||
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
||||
<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>
|
||||
<% if !activity.end_time.nil? %>
|
||||
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||
<% end %>
|
||||
<% if activity.homework_detail_manual.comment_status == 0 && !activity.publish_time.nil? %>
|
||||
<div class="homepagePostDeadline ml15">
|
||||
|
@ -59,5 +57,5 @@
|
|||
<div class="cl"></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>
|
||||
|
|
|
@ -38,43 +38,10 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% all_comments = []%>
|
||||
<% all_replies = JournalsForMessage.where("root_id = #{activity.id}").reorder("created_on desc") %>
|
||||
<% count = all_replies.count %>
|
||||
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :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 id="activity_post_reply_<%=user_activity_id %>">
|
||||
<%=render :partial => 'users/user_journal_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -78,45 +78,10 @@
|
|||
</div>
|
||||
<div class="cl"></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">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
|
||||
|
||||
<% 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 => 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 id="activity_post_reply_<%=user_activity_id %>">
|
||||
<%=render :partial => 'users/course_message_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
<% count=activity.comments.count %>
|
||||
<div class="homepagePostReply">
|
||||
<%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
|
||||
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<%= 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 id="activity_post_reply_<%=user_activity_id %>">
|
||||
<%=render :partial => 'users/course_news_post_reply', :locals => {:activity => activity, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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,36 +1,47 @@
|
|||
<% unless courses.nil? %>
|
||||
<% courses.each_with_index do |course, i| %>
|
||||
<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 %>">
|
||||
<%=render :partial => 'collect_course', :locals => {:course => course} %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<div class="fl">
|
||||
<div class="syllabus_class_w ">
|
||||
<a href="<%= allow_visit ? course_path(course.id) : "javascript:void(0)" %>" class="syllabus_class_title fl" target="_blank" title="<%= allow_visit ? "" : "私有班级不可访问" %>"><%= course.name %></a>
|
||||
<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>
|
||||
<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>
|
||||
<div class="">
|
||||
<p class="fl grayTxt ">更新:<%= format_date Time.at(course.updatetime) %><span class="mr10"></span>
|
||||
学期:<%= current_time_and_term(course) %></p>
|
||||
|
||||
<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>
|
||||
创建老师:<%= link_to course.teacher.show_name, user_path(course.teacher) %>
|
||||
</p>
|
||||
|
||||
<div class="cl"></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>
|
||||
</li>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<% 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 %>">
|
||||
<%= 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 %>
|
||||
<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>
|
||||
<% end %>
|
||||
|
||||
|
@ -16,7 +17,6 @@
|
|||
<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|%>
|
||||
<%= 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>
|
||||
<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>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<div class="orig_cont clearfix">
|
||||
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
||||
<div>
|
||||
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent} %>
|
||||
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id, :parent_id => parent_id} %>
|
||||
</div>
|
||||
<% 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, :parent_id => parent_id} %>
|
||||
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue