Merge branch 'cxt_course' into develop
Conflicts: app/views/users/_news_replies.html.erb
This commit is contained in:
commit
aaefd8b4aa
|
@ -599,8 +599,19 @@ class AdminController < ApplicationController
|
|||
|
||||
#学校列表
|
||||
def schools
|
||||
|
||||
@order = ""
|
||||
@sort = ""
|
||||
@schools = School.find_by_sql("SELECT * FROM schools ORDER BY created_at DESC")
|
||||
if params[:sort] && (params[:order] == 'num')
|
||||
@order = params[:order]
|
||||
@sort = params[:sort]
|
||||
@schools.each do |school|
|
||||
count = UserExtensions.where("school_id = #{school.id} or occupation = '#{school.name}'").count
|
||||
school[:infocount] = count.to_i
|
||||
end
|
||||
@sort == 'asc' ? (@schools = @schools.sort{|x,y| x[:infocount] <=> y[:infocount] }) : (@schools = @schools.sort{|x,y| y[:infocount] <=> x[:infocount]})
|
||||
end
|
||||
|
||||
@school_count = @schools.count
|
||||
|
||||
@school_pages = Paginator.new @school_count, 30, params['page'] || 1
|
||||
|
|
|
@ -40,7 +40,7 @@ class AvatarController < ApplicationController
|
|||
@urlfile='/' << File.join("images","avatars",avatar_directory(@source_type),avatar_filename(@source_id,@image_file))
|
||||
|
||||
# 用户头像上传时进行特别处理
|
||||
if @is_direct == '1' && (@source_type == 'User' || @source_type == 'Course' || @source_type == 'Project')
|
||||
if @is_direct == '1' && (@source_type == 'User' || @source_type == 'Course' || @source_type == 'Project' || @source_type == 'Organization')
|
||||
diskfile += "temp"
|
||||
@urlfile += "temp"
|
||||
end
|
||||
|
|
|
@ -96,6 +96,9 @@ class MyController < ApplicationController
|
|||
elsif params[:project]
|
||||
@project = Project.find params[:project]
|
||||
diskfile = disk_filename('Project', @project.id)
|
||||
elsif params[:organization]
|
||||
@organization = Organization.find params[:organization]
|
||||
diskfile = disk_filename('Organization', @organization.id)
|
||||
else
|
||||
@user = User.current
|
||||
diskfile = disk_filename('User', @user.id)
|
||||
|
@ -116,6 +119,9 @@ class MyController < ApplicationController
|
|||
when 'Project'
|
||||
@project = Project.find params[:source_id]
|
||||
diskfile = disk_filename('Project', @project.id)
|
||||
when 'Organization'
|
||||
@organization = Organization.find params[:source_id]
|
||||
diskfile = disk_filename('Organization', @organization.id)
|
||||
end
|
||||
end
|
||||
diskfile1 = diskfile + 'temp'
|
||||
|
|
|
@ -1402,7 +1402,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
|
||||
def find_or_save_student_work(is_test)
|
||||
student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id).first
|
||||
student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id, is_test: is_test).first
|
||||
if student_work.nil?
|
||||
@homework.student_works.build(
|
||||
name: params[:title],
|
||||
|
@ -1413,7 +1413,7 @@ class StudentWorkController < ApplicationController
|
|||
unless @homework.save
|
||||
logger.debug @homework.errors.full_messages
|
||||
else
|
||||
student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id).first
|
||||
student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id, is_test: is_test).first
|
||||
end
|
||||
end
|
||||
student_work
|
||||
|
|
|
@ -983,7 +983,7 @@ class UsersController < ApplicationController
|
|||
@user = User.current
|
||||
@homework = HomeworkCommon.find(params[:homework_id])
|
||||
@is_test = params[:is_test] == 'true'
|
||||
@student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id).first
|
||||
@student_work = StudentWork.where(homework_common_id: @homework.id, user_id: User.current.id, is_test: @is_test).first
|
||||
if @student_work.nil?
|
||||
@student_work = StudentWork.new
|
||||
end
|
||||
|
@ -1660,55 +1660,117 @@ class UsersController < ApplicationController
|
|||
course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
container_type = ''
|
||||
act_type = ''
|
||||
if params[:type].present?
|
||||
case params[:type]
|
||||
when "course_homework"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'HomeworkCommon'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Course'
|
||||
act_type = 'HomeworkCommon'
|
||||
when "course_news"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'News'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Course'
|
||||
act_type = 'News'
|
||||
when "course_message"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Course'
|
||||
act_type = 'Message'
|
||||
when "course_poll"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Poll'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Course'
|
||||
act_type = 'Poll'
|
||||
when "course_journals"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'JournalsForMessage'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Course'
|
||||
act_type = 'JournalsForMessage'
|
||||
when "project_issue"
|
||||
@user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Project'
|
||||
act_type = 'Issue'
|
||||
when "project_message"
|
||||
@user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Course'
|
||||
act_type = 'Message'
|
||||
when "user_journals"
|
||||
@user_activities = UserActivity.where("container_type = 'Principal' and act_type= 'JournalsForMessage' and container_id = #{@user.id}").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
container_type = 'Principal'
|
||||
act_type = 'JournalsForMessage'
|
||||
when "current_user"
|
||||
@user_activities = UserActivity.where("user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
else
|
||||
if @user == User.current
|
||||
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
container_type = 'Principal'
|
||||
act_type = 'Principal'
|
||||
end
|
||||
end
|
||||
if container_type != '' && act_type != ''
|
||||
if container_type == 'Course'
|
||||
sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'"
|
||||
elsif container_type == 'Project'
|
||||
sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'"
|
||||
elsif container_type == 'Principal' && act_type == 'JournalsForMessage'
|
||||
sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}"
|
||||
elsif container_type == 'Principal' && act_type == 'Principal'
|
||||
sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
|
||||
end
|
||||
if User.current != @user
|
||||
sql += "and user_id = #{@user.id}"
|
||||
end
|
||||
else
|
||||
if User.current != @user
|
||||
blog_ids = "("+@user.blog.id.to_s+")"
|
||||
end
|
||||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
sql = "user_id = #{@user.id} and((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
end
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids}))"
|
||||
else
|
||||
# @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
|
||||
end
|
||||
end
|
||||
@user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# if params[:type].present?
|
||||
# case params[:type]
|
||||
# when "course_homework"
|
||||
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'HomeworkCommon'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "course_news"
|
||||
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'News'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "course_message"
|
||||
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "course_poll"
|
||||
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Poll'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "course_journals"
|
||||
# @user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'JournalsForMessage'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "project_issue"
|
||||
# @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "project_message"
|
||||
# @user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Message'").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "user_journals"
|
||||
# @user_activities = UserActivity.where("container_type = 'Principal' and act_type= 'JournalsForMessage' and container_id = #{@user.id}").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# when "current_user"
|
||||
# @user_activities = UserActivity.where("user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# else
|
||||
# if @user == User.current
|
||||
# blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
# 减少数据库交互
|
||||
if @user == User.current
|
||||
watched_user_ids = User.watched_by(@user.id).count == 0 ? " " : ("," + User.watched_by(@user.id).map{|u| u.id.to_s }.join(','))
|
||||
user_ids = "(" + @user.id.to_s + watched_user_ids + ")"
|
||||
else
|
||||
user_ids = "(" + @user.id.to_s + ")"
|
||||
end
|
||||
watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}")
|
||||
blog_ids = watched_user_blog_ids.empty? ? "(-1)" : "(" + watched_user_blog_ids.map { |blog| blog.id}.join(",") + ")"
|
||||
|
||||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
end
|
||||
# else
|
||||
# blog_ids = "("+@user.blog.id.to_s+")"
|
||||
# end
|
||||
# @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
# "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
# "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
# "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# end
|
||||
# else
|
||||
# # @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types})or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# # blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
# # 减少数据库交互
|
||||
# if @user == User.current
|
||||
# watched_user_ids = User.watched_by(@user.id).count == 0 ? " " : ("," + User.watched_by(@user.id).map{|u| u.id.to_s }.join(','))
|
||||
# user_ids = "(" + @user.id.to_s + watched_user_ids + ")"
|
||||
# else
|
||||
# user_ids = "(" + @user.id.to_s + ")"
|
||||
# end
|
||||
# watched_user_blog_ids = Blog.select("id").where("author_id in #{user_ids}")
|
||||
# blog_ids = watched_user_blog_ids.empty? ? "(-1)" : "(" + watched_user_blog_ids.map { |blog| blog.id}.join(",") + ")"
|
||||
#
|
||||
# @user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
# "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
# "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
# "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# end
|
||||
# @user_activities = paginateHelper @user_activities,500
|
||||
@type = params[:type]
|
||||
respond_to do |format|
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module SchoolHelper
|
||||
def schoolMember_num school
|
||||
count = student_num(school) + teacher_num(school)
|
||||
count = UserExtensions.where("school_id = #{school.id} or occupation = '#{school.name}'").count
|
||||
count.to_s
|
||||
end
|
||||
|
||||
|
|
|
@ -22,9 +22,13 @@ module StudentWorkHelper
|
|||
end
|
||||
|
||||
#获取指定用户对某一作业的评分结果
|
||||
def student_work_score work,user
|
||||
def student_work_score work,user,reviewer_role=0
|
||||
if reviewer_role != 0
|
||||
StudentWorksScore.where(:user_id => user.id,:student_work_id => work.id,:reviewer_role => reviewer_role).last
|
||||
else
|
||||
StudentWorksScore.where(:user_id => user.id,:student_work_id => work.id).last
|
||||
end
|
||||
end
|
||||
|
||||
#获取指定评分的角色
|
||||
def student_work_score_role score
|
||||
|
|
|
@ -184,8 +184,10 @@ class AtMessage < ActiveRecord::Base
|
|||
when 'JournalsForMessage'
|
||||
if at_message.jour_type == 'Principal'
|
||||
{controller: :users, action: :user_messages, id: at_message.at_user}
|
||||
else
|
||||
elsif at_message.jour_type == 'HomeworkCommon'
|
||||
{controller: :homework_common, action: :index, course: at_message.jour.course_id}
|
||||
elsif at_message.jour_type == 'Course'
|
||||
{controller: :courses, action: :feedback, id: at_message.jour_id}
|
||||
end
|
||||
|
||||
else
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
<th style="width: 100px;">
|
||||
学校名称
|
||||
</th>
|
||||
<th style="width: 35px;">
|
||||
用户数
|
||||
<th style="width: 35px;" class = "<%= @order == 'num' ? (@sort == 'desc' ? 'st_up' : (@sort == 'asc' ? 'st_down' : '')) : '' %>">
|
||||
<%= link_to '用户数', admin_schools_path(:sort=> @sort == "desc" ? 'asc' : 'desc', :order => 'num') %>
|
||||
</th>
|
||||
<th style="width: 90px;">
|
||||
创建时间
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% if @is_direct == '1' && (@source_type=='User'|| @source_type == 'Course' || @source_type == 'Project') %>
|
||||
<% if @is_direct == '1' && (@source_type=='User'|| @source_type == 'Course' || @source_type == 'Project' || @source_type == 'Organization') %>
|
||||
var imgSpan = $("img[nhname='avatar_image']");
|
||||
imgSpan.attr({"src":'<%= "#{@urlfile.to_s}?#{Time.now.to_i}" %>'});
|
||||
<% else %>
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
|
@ -161,7 +161,8 @@
|
|||
l(:button_delete),
|
||||
{:controller => 'blog_comments', :action => 'destroy', :id => comment.id},
|
||||
:method => :delete,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) %>
|
||||
|
|
|
@ -11,27 +11,27 @@
|
|||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
onImage = true;
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
var cur = $(this);
|
||||
onImage = false;
|
||||
setTimeout(function(){
|
||||
if (onUserCard == false && onImage == false){
|
||||
$(cur).children(".userCard").css("display", "none");
|
||||
}
|
||||
}, 500);
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
onUserCard = true;
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
onUserCard = false;
|
||||
$(this).css("display","none");
|
||||
})
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// })
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false){
|
||||
// $(cur).children(".userCard").css("display", "none");
|
||||
// }
|
||||
// }, 500);
|
||||
// })
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// })
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="ping_dispic">
|
||||
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
|
||||
</div>
|
||||
<div class="ping_discon upload_img" style="width: 610px;">
|
||||
<div class="ping_discon upload_img" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||
<div class="ping_distop f14">
|
||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span>
|
||||
|
@ -28,17 +28,17 @@
|
|||
<span id="reply_praise_count_<%=journal.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%#= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
||||
<%= link_to l(:label_bid_respond_quote),'javascript:;',{:nhname=>"reply_btn"} %>
|
||||
<% end %>
|
||||
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :id => "delete_reply_#{journal.id}",
|
||||
:class => "delete undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
|
|
@ -218,8 +218,12 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="ur_buttons">
|
||||
<% if exercise.time == -1 %>
|
||||
<%= link_to "保存",commit_exercise_exercise_path(exercise,:save => 1),:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:format => 'js',:remote=>true %>
|
||||
<%= link_to "提交",commit_exercise_exercise_path(exercise), :data => {:confirm => "您确定要提交吗?"},:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:style => "margin-left:20px;",:format => 'js',:remote=>true %>
|
||||
<% else %>
|
||||
<%= link_to "提交",commit_exercise_exercise_path(exercise), :data => {:confirm => "您确定要提交吗?"},:id=>"exercise_submit_btn", :method => :post,:class => "ur_button_submit",:style => "margin-left:84px;",:format => 'js',:remote=>true %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<!--contentbox end-->
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="homepagePostReplyPortrait" >
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
|
@ -40,7 +40,8 @@
|
|||
l(:button_delete),
|
||||
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>comment.id},
|
||||
:method => :get,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if comment.user_id == User.current.id %>
|
||||
|
|
|
@ -6,7 +6,7 @@ $("#issue_detail").show();
|
|||
$("#issue_edit").hide();
|
||||
$("#reply_div_<%= @issue.id %>").html("<%= escape_javascript(render :partial => 'issues/issue_replies', :locals => {:issue => @issue,:replies_all_i=>0}) %>");
|
||||
sd_create_editor_from_data(<%= @issue.id%>, null, "100%","<%=@issue.class.name%>");
|
||||
$(".homepagePostReplyBannerCount").html('回复(<%= @issue.journals.count %>)')
|
||||
$(".homepagePostReplyBannerCount").html('<%= escape_javascript(render :partial => 'issues/issue_reply_banner') %>');
|
||||
//edit里的编辑器貌似显示不出来,所以手动js生成。
|
||||
issue_desc_editor = KindEditor.create('#issue_description',
|
||||
{"width":"85%",
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<div class="cl"></div>
|
||||
<div class="sy_class_logo fl">
|
||||
<div class="pr" style="width: 96px; height:96px;">
|
||||
<% if User.current.logged? && (User.current == @course.teacher || User.current.admin?)%>
|
||||
<% if is_teacher%>
|
||||
<%=link_to image_tag(url_to_avatar(@course),width:"96", height: "96", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:course => @course.id), :remote => true%>
|
||||
<div class="homepageEditProfile undis">
|
||||
<%=link_to '', my_clear_user_avatar_temp_path(:course => @course.id), :class => 'homepageEditProfileIcon', :title => '点击编辑头像', :remote => true %>
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<%= link_to content.html_safe, { :controller=> "my",:action => "account", :flag => 1, :applied_message_id => ma.id }, :title => "系统提示:“#{ma.name}”的申请,经确认为无效的单位信息,已被删除,请重新编辑您的单位资料。谢谢!", :target => '_blank'%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% elsif ma.class == ForgeMessage %>
|
||||
<% elsif ma.class == ForgeMessage && ma.forge_message %>
|
||||
<% if ma.forge_message_type == "AppliedProject" %>
|
||||
<li><a href="<%=settings_project_path(:id => ma.project, :tab => "members") %>" target="_blank" title="<%=ma.forge_message.user.show_name %> 申请加入项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=ma.forge_message.user.show_name %> </span>申请加入项目:<%= ma.project.name%></a></li>
|
||||
<% elsif ma.forge_message_type == "JoinProject" %>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<p style="position:relative; display:inline;"><% if syllabus.eng_name && !syllabus.eng_name.empty? %>
|
||||
<span><%=syllabus.eng_name %></span>
|
||||
<% else%>
|
||||
<span style="color: #888">课程英文名称</span>
|
||||
<span style="color: #888"></span>
|
||||
<% end %>
|
||||
<% if User.current == syllabus.user || User.current.admin? %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_ng_name_png", :style => "width:15px; position:absolute; right: -20px; top: 5px;", :class => "none", :onclick => "show_edit_eng_name('#{syllabus.eng_name}');"%>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_ng_name_png", :style => "width:15px; position:absolute; right: -20px; top: 5px;", :class => "none", :onclick => "show_edit_eng_name('#{syllabus.eng_name}');", :title => '编辑课程英文名称'%>
|
||||
<% end %>
|
||||
</p>
|
|
@ -1,5 +1,6 @@
|
|||
<h2 style="position:relative; display:inline;">课程名称:<%=syllabus.title %>
|
||||
<h2 style="position:relative; display:inline;">
|
||||
<%=syllabus.title %>
|
||||
<% if User.current == syllabus.user || User.current.admin? %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :style => "width:15px; position:absolute; right: -20px; top: 15px;", :onclick => "show_edit_title('#{syllabus.title}');"%>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);",:id => "syllabus_edit_title_png", :class => "none", :style => "width:15px; position:absolute; right: -20px; top: 15px;", :onclick => "show_edit_title('#{syllabus.title}');", :title => '编辑课程名称'%>
|
||||
<% end %>
|
||||
</h2>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'prettify','jquery/jquery-ui-1.9.2','css/common','css/structure','css/public','repository','css/courses','css/org','css/project', 'css/popup' %>
|
||||
<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
|
||||
<%= javascript_include_tag 'cookie','project',"avatars", 'organization','header','prettify','select_list_move','org'%>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<!-- page specific tags -->
|
||||
|
@ -77,16 +77,14 @@
|
|||
<!--<div class="pr_info_logo fl mr10 mb5">-->
|
||||
<!--<%#= image_tag(url_to_avatar(@organization), :width=>"60", :height=>"60", :alt=>"组织logo") %>-->
|
||||
<!--</div>-->
|
||||
<div class="pr_info_logo fl fl mr10 mb5" id="homepage_portrait_image">
|
||||
<%= image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_user_tx') %>
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current.id == @organization.creator_id%>
|
||||
<div id="edit_org_file_btn" class="none">
|
||||
<div class="homepageEditProfile">
|
||||
<a href="<%= clear_org_avatar_temp_organization_path(@organization) %>" data-remote="true" class="homepageEditProfileIcon"></a>
|
||||
<div class="pr_info_logo fl fl mr10 mb5 pr" id="homepage_portrait_image">
|
||||
<% if User.current.logged? && User.current.admin_of_org?(@organization)%>
|
||||
<%=link_to image_tag(url_to_avatar(@organization),width:"60", height: "60", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:organization => @organization.id), :remote => true%>
|
||||
<div class="homepageEditProfile undis">
|
||||
<%=link_to '', my_clear_user_avatar_temp_path(:organization => @organization.id), :remote => true, :class => 'homepageEditProfileIcon', :title => '点击编辑Logo' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(@organization), :width => "60", :height => "60", :alt => "组织logo") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--<div class="orgName fl mb5 f14">组织id:<%#= @organization.id %></div>-->
|
||||
|
@ -172,6 +170,10 @@
|
|||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
|
||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @organization} %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#courseMenu").mouseenter(function(){
|
||||
$("#topnav_course_menu").show();
|
||||
|
|
|
@ -34,9 +34,12 @@
|
|||
<%# 弹框 %>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
<div id="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @organization} %>
|
||||
</div>
|
||||
<%= call_hook :view_layouts_base_body_bottom %>
|
||||
<%# JS提前加载 %>
|
||||
<%= javascript_include_tag 'cookie','project', 'organization','header','prettify','select_list_move','org'%>
|
||||
<%= javascript_include_tag 'cookie','project',"avatars", 'organization','header','prettify','select_list_move','org'%>
|
||||
<%= javascript_include_tag 'attachments' %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -33,31 +33,31 @@
|
|||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
});
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
onImage = true;
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
var cur = $(this);
|
||||
onImage = false;
|
||||
setTimeout(function(){
|
||||
if (onUserCard == false && onImage == false) {
|
||||
$(cur).children(".userCard").css("display","none");
|
||||
}
|
||||
},500);
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
onUserCard = true;
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
onUserCard = false;
|
||||
$(this).css("display","none");
|
||||
})
|
||||
});
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// });
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false) {
|
||||
// $(cur).children(".userCard").css("display","none");
|
||||
// }
|
||||
// },500);
|
||||
// });
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// });
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
|
|
|
@ -33,34 +33,34 @@
|
|||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
});
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
onImage = true;
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
var cur = $(this);
|
||||
onImage = false;
|
||||
setTimeout(function(){
|
||||
if (onUserCard == false && onImage == false) {
|
||||
$(cur).children(".userCard").css("display","none");
|
||||
}
|
||||
},500);
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
onUserCard = true;
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
onUserCard = false;
|
||||
$(this).css("display","none");
|
||||
})
|
||||
});
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// });
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false) {
|
||||
// $(cur).children(".userCard").css("display","none");
|
||||
// }
|
||||
// },500);
|
||||
// });
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// });
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
});
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
});
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
|
@ -132,7 +132,8 @@
|
|||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{reply.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.course_destroyable_by?(User.current) %>
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
|
@ -196,7 +196,8 @@
|
|||
l(:button_delete),
|
||||
{:action => 'destroy', :id => reply},
|
||||
:method => :post,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{reply.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if reply.destroyable_by?(User.current) %>
|
||||
|
|
|
@ -10,5 +10,15 @@ if($("#course_avatar_form").length > 0) {
|
|||
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@project), :id=>'nh_source_tx',:style=>"width:60px;height:60px;overflow:hidden",:alt=>"项目logo") %>');
|
||||
if($("#project_avatar_form").length > 0) {
|
||||
window.location.href = "<%=settings_project_path(@project) %>";
|
||||
}<% end %>
|
||||
}
|
||||
<% elsif @organization %>
|
||||
<% if @organization.show_mode == 1 %>
|
||||
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@organization), :id=>'nh_source_tx',:style=>"width:51px;height:51px;overflow:hidden",:alt=>"组织logo") %>');
|
||||
<% else %>
|
||||
$("#nh_source_tx").replaceWith('<%= image_tag(url_to_avatar(@organization), :id=>'nh_source_tx',:style=>"width:60px;height:60px;overflow:hidden",:alt=>"组织logo") %>');
|
||||
<% end %>
|
||||
if($("#org_avatar_form").length > 0) {
|
||||
window.location.href = "<%=setting_organization_path(@organization) %>";
|
||||
}
|
||||
<% end %>
|
||||
hideModal();
|
|
@ -19,7 +19,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
|
@ -47,7 +47,8 @@
|
|||
:action => 'destroy', :id => @news,
|
||||
:comment_id => comment},
|
||||
:method => :delete,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) if User.current.allowed_to?(:manage_news, object) %>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
|
@ -129,7 +129,8 @@
|
|||
l(:button_delete),
|
||||
{:controller => 'org_document_comments',:action => 'delete_reply', :id => comment.id},
|
||||
:method => :delete,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
:upload_path => upload_avatar_path(:format => 'js'),
|
||||
:description_placeholder => nil ,# l(:label_optional_description)
|
||||
:source_type => source.class.to_s,
|
||||
:source_id => source.id.to_s
|
||||
:source_id => source.id.to_s,
|
||||
:is_direct => 0
|
||||
} %>
|
||||
<!--</span>-->
|
||||
<% content_for :header_tags do %>
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
|
||||
<div class="por_header_top">
|
||||
<div class="por_header_con">
|
||||
<%= image_tag(url_to_avatar(@organization), width:"51", height: "51", :id => 'nh_user_tx', :class => "por_logo fl mt1", :target => "_blank") %>
|
||||
<div class="pr fl">
|
||||
<% if User.current.logged? && User.current.admin_of_org?(@organization)%>
|
||||
<%=link_to image_tag(url_to_avatar(@organization),width:"51", height: "51", :id=>'nh_source_tx'), my_clear_user_avatar_temp_path(:organization => @organization.id), :remote => true%>
|
||||
<div class="homepageEditProfile undis">
|
||||
<%=link_to '', my_clear_user_avatar_temp_path(:organization => @organization.id), :remote => true, :class => 'homepageEditProfileIcon', :title => '点击编辑Logo' %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(@organization), :width => "51", :height => "51", :alt => "组织logo") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<%#= image_tag(url_to_avatar(@organization), width:"51", height: "51", :id => 'nh_user_tx', :class => "por_logo fl mt1", :target => "_blank") %>
|
||||
<% if User.current.logged? %>
|
||||
<div class="navHomepageProfile" id="navHomepageProfile">
|
||||
<ul>
|
||||
|
|
|
@ -4,45 +4,45 @@
|
|||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
});
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
onImage = true;
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
var cur = $(this);
|
||||
onImage = false;
|
||||
setTimeout(function(){
|
||||
if (onUserCard == false && onImage == false) {
|
||||
$(cur).children(".userCard").css("display", "none");
|
||||
}
|
||||
}, 500);
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
onUserCard = true;
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
onUserCard = false;
|
||||
$(this).css("display","none");
|
||||
})
|
||||
});
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// });
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false) {
|
||||
// $(cur).children(".userCard").css("display", "none");
|
||||
// }
|
||||
// }, 500);
|
||||
// });
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// });
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
});
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
})
|
||||
});
|
||||
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
||||
$(this).prev().css("color","#ffffff");
|
||||
$(this).css("z-index", "9999");
|
||||
})
|
||||
});
|
||||
$(".homepagePostSetting").mouseout(function(){
|
||||
$(this).prev().css("color","#808080");
|
||||
$(this).css("z-index", "1");
|
||||
})
|
||||
});
|
||||
|
||||
//二级菜单滑动时箭头方向控制
|
||||
$(".homepageLeftMenuMoreIcon").toggle(function(){
|
||||
|
|
|
@ -47,7 +47,9 @@
|
|||
<!--<a href="javascript:void(0);" class="logoEnter fl linkGrey4">上传图片</a>-->
|
||||
<%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %>
|
||||
<%= labelled_form_for @organization do |f|%>
|
||||
<div id="org_avatar_form">
|
||||
<%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %>
|
||||
</div>
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<div class="orgRow mb10"><span class="c_red">* </span>组织名称:<input type="text" name="organization[name]" id="organization_name" maxlength="100" onblur="check_uniq(<%=@organization.id %>);" onfocus="$('#check_name_hint').hide()" class="orgNameInput" value="<%= @organization.name%>" />
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<% for journal in journals %>
|
||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %></div>
|
||||
<div class="ping_discon" style="width: 610px;">
|
||||
<div class="ping_discon" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||
<div class="ping_distop f14">
|
||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||
<span><%= link_to journal.user.show_name, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
|
||||
|
@ -20,17 +20,17 @@
|
|||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if journal.user == User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%#= link_to l(:label_bid_respond_quote),'',
|
||||
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
||||
<%= link_to l(:label_bid_respond_quote),'javascript:;', {:nhname=>"reply_btn"} %>
|
||||
|
||||
<% end %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :id => "delete_reply_#{journal.id}",
|
||||
:class => "delete undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
|
|
|
@ -5,41 +5,41 @@
|
|||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
});
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
onImage = true;
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
var cur = $(this);
|
||||
onImage = false;
|
||||
setTimeout(function(){
|
||||
if (onUserCard == false && onImage == false) {
|
||||
$(cur).children(".userCard").css("display", "none");
|
||||
}
|
||||
}, 500);
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
onUserCard = true;
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
onUserCard = false;
|
||||
$(this).css("display","none");
|
||||
})
|
||||
});
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// });
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false) {
|
||||
// $(cur).children(".userCard").css("display", "none");
|
||||
// }
|
||||
// }, 500);
|
||||
// });
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// });
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
});
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
})
|
||||
});
|
||||
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
||||
$(this).prev().css("color","#ffffff");
|
||||
$(this).css("z-index", "9999");
|
||||
})
|
||||
});
|
||||
$(".homepagePostSetting").mouseout(function(){
|
||||
$(this).prev().css("color","#808080");
|
||||
$(this).css("z-index", "1");
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</td>
|
||||
<% end%>
|
||||
|
||||
<% my_score = student_work_score(student_work,User.current) %>
|
||||
<% my_score = student_work_score(student_work,User.current,3) %>
|
||||
<td class="hworkList70 <%= my_score.nil? ? 'c_grey' : score_color(my_score.score)%> mr10 ml10">
|
||||
<%= my_score.nil? ? "--" : format("%.1f",my_score.score)%>
|
||||
</td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ul class="ping_box_ul <%= is_last ? '' : 'ping_line'%> fl">
|
||||
<% show_real_name = @is_teacher || score.user == User.current || score.user.allowed_to?(:as_teacher,@course) %>
|
||||
<% show_real_name = @is_teacher || score.user == User.current || score.user.allowed_to?(:as_teacher,@course) || score.reviewer_role != 3 %>
|
||||
<%= link_to image_tag(url_to_avatar(show_real_name ? score.user : ""), :width => "34", :height => "34"), show_real_name ? user_path(score.user) : "javascript:void(0)",:class => "ping_pic fl" %>
|
||||
<div class="pingBoxTit">
|
||||
<%= link_to show_real_name ? score.user.show_name : "匿名", show_real_name ? user_path(score.user) : "javascript:void(0)", :title => show_real_name ? score.user.show_name : "匿评用户", :class => "linkBlue fl" %>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<span class="<%= course.is_public == 0 ? 'hw_icon_private' : 'hw_icon_open' %> fl mr20 mt3"></span>
|
||||
<div class="cl"></div>
|
||||
<p class="sy_cgrey">
|
||||
<span class=" mr15">主讲老师:<%=link_to course.teacher.show_name, user_path(course.teacher), :class => 'sy_cblue' %></span>
|
||||
<span class=" mr15">创建老师:<%=link_to course.teacher.show_name, user_path(course.teacher), :class => 'sy_cblue' %></span>
|
||||
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,course) %>
|
||||
<% homework_num = course.homework_commons.count %>
|
||||
<% else %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
$("#syllabus_eng_name_show").html("<%= escape_javascript render :partial => 'layouts/syllabus_eng_name', :locals => {:syllabus => @syllabus} %>");
|
||||
$("#syllabus_eng_name_show").show();
|
||||
$("#syllabus_edit_ng_name_png").show();
|
||||
$("#syllabus_eng_name_edit").hide();
|
|
@ -215,15 +215,18 @@
|
|||
</script>
|
||||
|
||||
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% com_time = project.project_score.commit_time %>
|
||||
<% forge_time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p class="mh18"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p class="mh18"><%=time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像", :target => '_blank' %>
|
||||
<p class="mh18 hidden"><%=link_to (User.find project.user_id).show_name+"(组长)", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :title => "#{(User.find project.user_id).show_name}(组长)" %></p>
|
||||
<% update_time = time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %>
|
||||
<p class="mh18 hidden"><%=link_to update_time+" "+project.project_score.changeset_num.to_s+"提交", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :title => "#{update_time} #{project.project_score.changeset_num.to_s}提交" %></p>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像",:title => "私有项目不可访问") %>
|
||||
<p class="mh18 hidden" title="私有项目不可访问"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p class="mh18 hidden" title="私有项目不可访问"><%=time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<% end %>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
|
@ -295,7 +298,7 @@
|
|||
<% 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', :is_in_course => -1,:course_activity=>course_activity, :is_teacher => is_teacher, :user_activity_id => user_activity_id} %>
|
||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => -1,:course_activity=>course_activity, :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
|
@ -39,7 +39,8 @@
|
|||
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_board => is_board),
|
||||
:method => :post,
|
||||
:remote => true,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)
|
||||
) %>
|
||||
|
@ -56,7 +57,7 @@
|
|||
</span>
|
||||
<% if comment.creator_user == User.current || User.current.admin? %>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% elsif type == 'OrgDocumentComment' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
|
@ -74,7 +75,8 @@
|
|||
{:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
||||
:method => :delete,
|
||||
:remote => true,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
|
@ -94,7 +96,8 @@
|
|||
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id, :homepage => homepage, :user_id => user_id},
|
||||
:method => :delete,
|
||||
:remote => true,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').hide();">
|
||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||
|
||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
||||
|
@ -44,7 +44,7 @@
|
|||
</span>
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course, :user_activity_id => user_activity_id, :course_activity => course_activity},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% elsif type == 'News' %>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
|
@ -75,7 +75,8 @@
|
|||
:method => 'get',
|
||||
:confirm => l(:text_are_you_sure),
|
||||
:remote=>true,
|
||||
:class => 'fr mr20',
|
||||
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:class => 'fr mr20 undis',
|
||||
:title => l(:button_delete)
|
||||
) if comment.user_id == User.current.id %>
|
||||
<% elsif type == 'Syllabus' %>
|
||||
|
@ -89,8 +90,8 @@
|
|||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<% if User.current.admin? || User.current == Syllabus.find(activity_id).user || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user},:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
|
|
@ -225,15 +225,18 @@
|
|||
</script>
|
||||
|
||||
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% com_time = project.project_score.commit_time %>
|
||||
<% forge_time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p class="mh18"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p class="mh18"><%=time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像", :target => '_blank' %>
|
||||
<p class="mh18 hidden"><%=link_to (User.find project.user_id).show_name+"(组长)", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :title => "#{(User.find project.user_id).show_name}(组长)" %></p>
|
||||
<% update_time = time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %>
|
||||
<p class="mh18 hidden"><%=link_to update_time+" "+project.project_score.changeset_num.to_s+"提交", project_path(project.id,:host=>Setting.host_name), :target => '_blank', :title => "#{update_time} #{project.project_score.changeset_num.to_s}提交" %></p>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius relatePImage",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像",:title => "私有项目不可访问") %>
|
||||
<p class="mh18 hidden" title="私有项目不可访问"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p class="mh18 hidden" title="私有项目不可访问"><%=time_from_now !com_time.nil? && format_time(com_time) > format_time(forge_time) ? com_time : forge_time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<% end %>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=homework_common.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
|
@ -307,7 +310,7 @@
|
|||
<% comments = homework_common.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= homework_common.id %>">
|
||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => is_in_course,:course_activity=>-1, :is_teacher => is_teacher, :user_activity_id => -1} %>
|
||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => is_in_course,:course_activity=>-1, :is_teacher => is_teacher, :user_activity_id => -1, :activity_id => homework_common.id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% if ma.class == ForgeMessage %>
|
||||
<% if ma.class == ForgeMessage && ma.forge_message %>
|
||||
<!--申请加入项目-->
|
||||
<% if ma.forge_message_type == "AppliedProject" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if params[:type] == 'HomeworkCommon' %>
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :type => @type, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id}) %>');
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :type => @type, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id, :activity_id => params[:id].to_i}) %>');
|
||||
<% elsif params[:type] == 'JournalsForMessage' %>
|
||||
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id =>params[:id].to_i}) %>');
|
||||
<% elsif params[:type] == 'Message' %>
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
<ul class="homepagePostTypeProject fl">
|
||||
<li class="f14">更多</li>
|
||||
<li class="mt-4"><%= link_to "个人留言", {:controller => "users", :action => "show", :type => "user_journals"}, :class =>"homepagePostTypeMessage postTypeGrey"%>
|
||||
<li class="mt-4"><%= link_to @user == User.current ? "我的动态" : "他的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
|
||||
<% if @user == User.current %>
|
||||
<li class="mt-4"><%= link_to "我的动态", {:controller => "users", :action => "show", :type => "current_user"}, :class =>"homepagePostTypeMine postTypeGrey"%>
|
||||
<% end %>
|
||||
<li class="mt-4"><%= link_to "全部动态", {:controller => "users", :action => "show", :type => nil}, :class =>"homepagePostTypeAll postTypeGrey"%>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -39,15 +39,15 @@
|
|||
<span id="reply_praise_count_<%=reply.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<%#= link_to l(:button_reply),'',
|
||||
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
||||
<%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %>
|
||||
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
||||
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id='<%=id%>' class="respond-form">
|
||||
|
|
|
@ -1140,7 +1140,7 @@ $.fn.atwho["default"] = {
|
|||
searchKey: "name",
|
||||
suffix: void 0,
|
||||
hideWithoutSuffix: false,
|
||||
startWithSpace: true,
|
||||
startWithSpace: false,
|
||||
highlightFirst: true,
|
||||
limit: 5,
|
||||
maxLen: 20,
|
||||
|
|
|
@ -25,28 +25,28 @@ function description_show_hide(id){
|
|||
|
||||
//名片的显示
|
||||
function user_card_show_hide() {
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
$(".userCard").css("display","none");
|
||||
onImage = true;
|
||||
$(this).children(".userCard").css("display","block");
|
||||
});
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
var cur = $(this);
|
||||
onImage = false;
|
||||
setTimeout(function(){
|
||||
if (onUserCard == false && onImage == false){
|
||||
$(cur).children(".userCard").css("display", "none");
|
||||
}
|
||||
}, 500);
|
||||
});
|
||||
$(".userCard").mouseover(function(){
|
||||
onUserCard = true;
|
||||
$(this).css("display","block");
|
||||
});
|
||||
$(".userCard").mouseout(function(){
|
||||
onUserCard = false;
|
||||
$(this).css("display","none");
|
||||
});
|
||||
// $(".homepagePostPortrait").mouseover(function(){
|
||||
// $(".userCard").css("display","none");
|
||||
// onImage = true;
|
||||
// $(this).children(".userCard").css("display","block");
|
||||
// });
|
||||
// $(".homepagePostPortrait").mouseout(function(){
|
||||
// var cur = $(this);
|
||||
// onImage = false;
|
||||
// setTimeout(function(){
|
||||
// if (onUserCard == false && onImage == false){
|
||||
// $(cur).children(".userCard").css("display", "none");
|
||||
// }
|
||||
// }, 500);
|
||||
// });
|
||||
// $(".userCard").mouseover(function(){
|
||||
// onUserCard = true;
|
||||
// $(this).css("display","block");
|
||||
// });
|
||||
// $(".userCard").mouseout(function(){
|
||||
// onUserCard = false;
|
||||
// $(this).css("display","none");
|
||||
// });
|
||||
}
|
||||
|
||||
function cleanArray (actual){
|
||||
|
|
Loading…
Reference in New Issue