Merge branch 'szzh' into develop

This commit is contained in:
sw 2015-08-26 17:59:35 +08:00
commit 0e0756a42c
86 changed files with 3088 additions and 1251 deletions

View File

@ -25,21 +25,29 @@ class AccountController < ApplicationController
# Login request and validation
def login
if request.get?
@login = params[:login] || true
if User.current.logged?
redirect_to home_url
else
render :layout => 'login'
end
else
authenticate_user
end
end
# 服务协议
def agreement
render :layout => 'static_base'
end
# Log out current user and redirect to welcome page
def logout
if User.current.anonymous?
redirect_to home_url
redirect_to signin_path
elsif request.post?
logout_user
redirect_to home_url
redirect_to signin_path
end
# display the logout form
end
@ -71,7 +79,7 @@ class AccountController < ApplicationController
return
end
end
render :template => "account/password_recovery"
render :layout => 'static_base', :template => "account/password_recovery"
return
else
if request.post?
@ -79,6 +87,7 @@ class AccountController < ApplicationController
# user not found or not active
unless user && user.active?
flash.now[:error] = l(:notice_account_unknown_email)
render :layout => 'static_base'
return
end
# user cannot change its password
@ -91,10 +100,11 @@ class AccountController < ApplicationController
if token.save
Mailer.run.lost_password(token)
flash[:notice] = l(:notice_account_lost_email_sent)
redirect_to signin_url
redirect_to lost_password_path
return
end
end
render :layout => 'static_base'
end
end
@ -128,10 +138,12 @@ class AccountController < ApplicationController
end
when '3'
#register_automatically(@user)
unless @user.new_record?
if !@user.new_record?
self.logged_user = @user
flash[:notice] = l(:notice_account_activated)
redirect_to my_account_url
else
redirect_to signin_path
end
else
#register_manually_by_administrator(@user)
@ -354,11 +366,13 @@ class AccountController < ApplicationController
def invalid_credentials
logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}"
flash.now[:error] = l(:notice_account_invalid_creditentials)
render :layout => 'login'
end
def invalid_credentials_new
logger.warn "Failed login for '#{params[:username]}' from #{request.remote_ip} at #{Time.now.utc}"
flash.now[:error] = l(:notice_account_invalid_creditentials_new)
render :layout => 'login'
end
# Register a user for email activation.

View File

@ -113,7 +113,8 @@ class CoursesController < ApplicationController
courses = Course.visible.where("LOWER(name) like '%#{params[:name].to_s.downcase}%'")
@courses = paginateHelper courses,10
end
@name = params[:name]
@type = 'courses'
respond_to do |format|
format.html {
render :layout => 'course_base'

View File

@ -137,7 +137,7 @@ class MyController < ApplicationController
@se.identity = params[:identity].to_i if params[:identity]
@se.technical_title = params[:technical_title] if params[:technical_title]
@se.student_id = params[:no] if params[:no]
@se.brief_introduction = params[:brief_introduction]
# @se.brief_introduction = params[:brief_introduction]
@se.description = params[:description]
if @user.save && @se.save
@ -157,7 +157,7 @@ class MyController < ApplicationController
File.delete(diskfile1) if File.exist?(diskfile1)
end
render :layout=>'base_users_new'
render :layout=>'new_base_user'
end
# Destroys user's account

View File

@ -93,7 +93,8 @@ class ProjectsController < ApplicationController
@project_count = Project.project_entities.visible.like(params[:name]).page(params[:page]).count
@project_pages = Paginator.new @project_count, @limit, params['page']
@name = params[:name]
@type = 'projects'
respond_to do |format|
format.html {
render :layout => 'base'

View File

@ -45,14 +45,14 @@ class UsersController < ApplicationController
:activity_new_score_index, :influence_new_score_index, :score_new_index,:update_score,:user_activities,:user_projects_index,
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,
:user_resource,:user_resource_create,:user_resource_delete,:rename_resource,:search_user_course,:add_exist_file_to_course,
:search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages, :user_messages_new]
:search_user_project,:resource_preview,:resource_search,:add_exist_file_to_project,:user_messages,:edit_brief_introduction,:user_new_homework]
#edit has been deleted by huang, 2013-9-23
before_filter :find_user, :only => [:user_fanslist, :user_watchlist, :show, :edit, :update, :destroy, :edit_membership, :user_courses,
:user_homeworks, :destroy_membership, :user_activities, :user_projects, :user_newfeedback, :user_comments,
:watch_contests, :info, :watch_projects, :show_score, :topic_score_index, :project_score_index,
:activity_score_index, :influence_score_index, :score_index,:show_new_score, :topic_new_score_index, :project_new_score_index,
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction, :user_messages_new]
:user_courses4show,:user_projects4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction]
before_filter :auth_user_extension, only: :show
#before_filter :rest_user_score, only: :show
#before_filter :select_entry, only: :user_projects
@ -74,7 +74,10 @@ class UsersController < ApplicationController
include WordsHelper
include GitlabHelper
include UserScoreHelper
include PollHelper
helper :user_score
helper :journals
# added by liuping 关注
@ -119,7 +122,7 @@ class UsersController < ApplicationController
user_querys.update_all(:viewed => true)
forum_querys.update_all(:viewed => true)
end
@new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count
@new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
case params[:type]
when nil
@message_alls = []
@ -127,27 +130,15 @@ class UsersController < ApplicationController
messages.each do |message_all|
@message_alls << message_all.message
end
# @user_course_messages = MessageAll.where("user_id =? and message_type=?",@user,"CourseMessage").order("created_at desc")
# @user_forge_messages = MessageAll.where("user_id =? and message_type=?",@user,"ForgeMessage").order("created_at desc")
# @user_memo_messages = MessageAll.where("user_id =? and message_type=?",@user,"MemoMessage").order("created_at desc")
# @user_feedback_messages = MessageAll.where("user_id =? and message_type=?",@user,"UserFeedbackMessage").order("created_at desc")
# @user_course_messages_count = @user_course_messages.count
# @user_forge_messages_count = @user_forge_messages.count
# @user_memo_messages_count = @user_memo_messages.count
# @user_feedback_messages_count = @user_feedback_messages.count
when 'homework'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_course_messages_count = @user_course_messages.count
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_course_messages_count = @user_course_messages.count
when 'forge_message'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_forge_messages_count = @user_forge_messages.count
when 'course_news'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc")
@message_alls_count = @message_alls.count
@ -155,126 +146,32 @@ class UsersController < ApplicationController
when 'forge_news'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_forge_messages_count = @user_forge_messages.count
when 'course_news_reply'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'forge_news_reply'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_forge_messagess_count = @user_forge_messages.count
when 'poll'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_course_messages_count = @user_course_messages.count
when 'works_reviewers'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_course_messages_count = @user_course_messages.count
when 'works_reply'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_course_messages_count = @user_course_messages.count
when 'issue'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_forge_messages_count = @user_forge_messages.count
when 'issue_update' # 缺陷状态更新、留言
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_forge_messages_count = @user_forge_messages.count
when 'forum'
@message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_memo_messages_count = @user_memo_messages.count
when 'user_feedback'
@message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
@message_alls_count = @message_alls.count
#@user_feedback_messages_count = @user_feedback_messages.count
else
render_404
return
end
respond_to do |format|
format.html{render :layout=>'new_base_user'}
end
end
def user_messages_new
unless User.current.logged?
render_403
return
end
# 当前用户查看消息,则设置消息为已读
course_querys = @user.course_messages
forge_querys = @user.forge_messages
user_querys = @user.user_feedback_messages
forum_querys = @user.memo_messages
# if User.current.id == @user.id
# course_querys.update_all(:viewed => true)
# forge_querys.update_all(:viewed => true)
# user_querys.update_all(:viewed => true)
# forum_querys.update_all(:viewed => true)
# end
@new_message_count = @user.forge_messages.count + @user.memo_messages.count + @user.course_messages.count + @user.user_feedback_messages.count
case params[:type]
when nil
@message_alls = []
messages = MessageAll.where("user_id =?",@user).order("created_at desc")
messages.each do |message_all|
@message_alls << message_all.message
end
# @user_course_messages = MessageAll.where("user_id =? and message_type=?",@user,"CourseMessage").order("created_at desc")
# @user_forge_messages = MessageAll.where("user_id =? and message_type=?",@user,"ForgeMessage").order("created_at desc")
# @user_memo_messages = MessageAll.where("user_id =? and message_type=?",@user,"MemoMessage").order("created_at desc")
# @user_feedback_messages = MessageAll.where("user_id =? and message_type=?",@user,"UserFeedbackMessage").order("created_at desc")
# @user_course_messages_count = @user_course_messages.count
# @user_forge_messages_count = @user_forge_messages.count
# @user_memo_messages_count = @user_memo_messages.count
# @user_feedback_messages_count = @user_feedback_messages.count
when 'homework'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "HomeworkCommon", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'forge_message'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user).order("created_at desc")
#@user_forge_messages_count = @user_forge_messages.count
when 'course_news'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "News", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'forge_news'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "News", @user).order("created_at desc")
#@user_forge_messages_count = @user_forge_messages.count
when 'course_news_reply'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'forge_news_reply'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Comment", @user).order("created_at desc")
#@user_forge_messagess_count = @user_forge_messages.count
when 'poll'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'works_reviewers'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "StudentWorksScore", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'works_reply'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
#@user_course_messages_count = @user_course_messages.count
when 'issue'
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Issue", @user).order("created_at desc")
#@user_forge_messages_count = @user_forge_messages.count
when 'issue_update' # 缺陷状态更新、留言
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Journal", @user).order("created_at desc")
#@user_forge_messages_count = @user_forge_messages.count
when 'forum'
@message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user).order("created_at desc")
#@user_memo_messages_count = @user_memo_messages.count
when 'user_feedback'
@message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user).order("created_at desc")
#@user_feedback_messages_count = @user_feedback_messages.count
else
render_404
return
@ -405,26 +302,47 @@ class UsersController < ApplicationController
end
# end
# added by huang
#用户作业列表
def user_homeworks
# @membership = @user.memberships.all(:conditions => Project.visible_condition(User.current))
# @memberships = []
# @membership.each do |membership|
# if membership.project.project_type == 1
# @memberships << membership
# end
# end
# @bid = []
# @memberships.each do |membership|
# @bid += membership.project.homeworks
# end
# @bid = @bid.group_by {|bid| bid.courses.first.id}
# unless User.current.admin?
# if !@user.active?
# render_404
# return
# end
# end
@page = params[:page] ? params[:page].to_i + 1 : 0
user_course_ids = "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
@homework_commons = HomeworkCommon.where("course_id in #{user_course_ids}").order("created_at desc").limit(10).offset(@page * 10)
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
end
end
def user_new_homework
if params[:homework_common]
homework = HomeworkCommon.new
homework.name = params[:homework_common][:name]
homework.description = params[:homework_common][:description]
homework.end_time = params[:homework_common][:end_time]
homework.publish_time = Time.now
homework.homework_type = 1
homework.late_penalty = 2
homework.user_id = User.current.id
homework.course_id = params[:course_id]
homework.save_attachments(params[:attachments])
render_attachment_warning_if_needed(homework)
#匿评作业相关属性
homework_detail_manual = HomeworkDetailManual.new
homework_detail_manual.ta_proportion = params[:ta_proportion] || 0.6
homework_detail_manual.comment_status = 1
homework_detail_manual.evaluation_start = Time.now
homework_detail_manual.evaluation_end = Time.now
homework_detail_manual.evaluation_num = params[:evaluation_num] || 3
homework_detail_manual.absence_penalty = 2
homework.homework_detail_manual = homework_detail_manual
if homework.save
homework_detail_manual.save if homework_detail_manual
redirect_to user_homeworks_user_path(User.current.id)
end
end
end
@ -459,7 +377,7 @@ class UsersController < ApplicationController
end
@jour = paginateHelper jours,10
@state = false
render :layout=>'base_users_new'
render :layout=>'new_base_user'
end
def user_comments
@ -567,6 +485,8 @@ class UsersController < ApplicationController
end
@users = scope.offset(@offset).limit(limit).all.reverse
end
@name = params[:name]
@type = 'users'
respond_to do |format|
format.html {
@groups = Group.all.sort
@ -576,42 +496,18 @@ class UsersController < ApplicationController
end
end
#显示更多用户课程
def user_courses4show
query = Course.joins("join members m on #{Course.table_name}.id=m.course_id")
query = query.where("m.user_id = ?",@user.id).order("#{Course.table_name}.id desc")
if User.current == @user #看自己
else
if @user.user_extensions!=nil && @user.user_extensions.identity == 0 #看老师
query = query.joins("join member_roles r on m.id = r.member_id")
query = query.where("r.role_id in(3,7,9)")
@page = params[:page].to_i + 1
@courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5).offset(@page * 5)
end
query = query.where(Course.table_name+".is_public = 1")
end
if params[:lastid]!=nil && !params[:lastid].empty?
query = query.where(" #{Course.table_name}.id < ?",params[:lastid],)
end
@list = query.limit(8)
render :layout=>nil
end
#显示更多用户项目
def user_projects4show
query = Project.joins("join members m on #{Project.table_name}.id=m.project_id")
query = query.where("m.user_id = ? and #{Project.table_name}.project_type=?",@user.id,Project::ProjectType_project)
if User.current == @user #看自己
else
query = query.where(Project.table_name+".is_public = 1")
# TODO or exists (select 1 from project c2,members m2 where c2.id=m2.course_id and c2.id=#{Project.table_name}.id and m2.user_id= User.current.id)
@page = params[:page].to_i + 1
@projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5).offset(@page * 5)
end
if params[:lastid]!=nil && !params[:lastid].empty?
query = query.where("( (#{Project.table_name}.updated_on=? and #{Project.table_name}.id < ?) or #{Project.table_name}.updated_on<?)",params[:lasttime],params[:lastid],params[:lasttime])
end
@list = query.order("#{Project.table_name}.updated_on desc,#{Project.table_name}.id desc").limit(8).all
render :layout=>nil
end
def user_course_activities
lastid = nil
if params[:lastid]!=nil && !params[:lastid].empty?
@ -687,7 +583,37 @@ class UsersController < ApplicationController
end
def show
render :layout=>'new_base_user'
@page = params[:page] ? params[:page].to_i + 1 : 0
@type = params[:type]
user_project_ids = @user.projects.visible.empty? ? "(-1)" : "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
user_course_ids = @user.courses.visible.empty? ? "(-1)" : "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
course_types = "('Message','News','HomeworkCommon','poll')"
project_types = "('Message','Issue')"
if @type
case @type
when "course_homework"
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'HomeworkCommon'").order('created_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('created_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('created_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('created_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('created_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('created_at desc').limit(10).offset(@page * 10)
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}").order('created_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}").order('created_at desc').limit(10).offset(@page * 10)
end
# @user_activities = paginateHelper @user_activities,500
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
end
end
def show_old
@ -1385,8 +1311,8 @@ class UsersController < ApplicationController
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
render :template=>'users/user_fanslist',:layout=>'base_users_new'
@action = 'watch'
render :template=>'users/user_fanslist',:layout=>'new_base_user'
end
###add by huang
def user_fanslist
@ -1396,7 +1322,7 @@ class UsersController < ApplicationController
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'fans'
render :layout=>'base_users_new'
render :layout=>'new_base_user'
end
def user_visitorlist
limit = 10;
@ -1420,47 +1346,6 @@ class UsersController < ApplicationController
end
end
# added by bai
def topic_score_index
end
def project_score_index
end
def activity_score_index
end
def influence_score_index
end
def score_index
end
# end
def topic_new_score_index
end
def project_new_score_index
end
def activity_new_score_index
end
def influence_new_score_index
end
def score_new_index
end
def update_score
@user = User.find(params[:id])
end

View File

@ -22,9 +22,26 @@ class WatchersController < ApplicationController
def watch
s = WatchesService.new
watchables = s.watch params.merge(:current_user_id => User.current.id)
if params[:action_name] == 'watch'
limit = 10;
query = User.watched_by(params[:target_id]);
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'watch'
elsif params[:action_name] == 'fans'
limit = 10;
query = User.find(params[:target_id]).watcher_users;
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'fans'
else
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (true ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add'} }
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'add',:list => @list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
end
rescue Exception => e
if e.message == "404"
@ -38,9 +55,25 @@ class WatchersController < ApplicationController
def unwatch
s = WatchesService.new
watchables = s.unwatch params.merge(:current_user_id => User.current.id)
if params[:action_name] == 'watch'
limit = 10;
query = User.watched_by(params[:target_id]);
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'watch'
elsif params[:action_name] == 'fans'
limit = 10;
query = User.find(params[:target_id]).watcher_users;
@obj_count = query.count();
@obj_pages = Paginator.new @obj_count,limit,params['page']
@list = query.order("#{Watcher.table_name}.id desc").limit(limit).offset(@obj_pages.offset).all();
@action = 'fans'
else
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => (false ? 'Watcher added.' : 'Watcher removed.'), :layout => true}}
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete'} }
format.js { render :partial => 'set_watcher', :locals => {:user => User.current, :watched => watchables,:params=>params,:opt=>'delete',:list=>@list,:action_name=>params[:action_name],:page=>params[:page],:count=>@obj_count} }
end
rescue Exception => e
if e.message == "404"

View File

@ -2314,7 +2314,27 @@ module ApplicationHelper
elsif homework.homework_type == 2 #编程作业不能修改作品
"<span class='fr mr10 pr_join_span ' title='编程作业不可修改作品'>作品已交</span>".html_safe
else
link_to l(:label_edit_homework), edit_student_work_path(work.id),:class => 'fr mr10 work_edit'
link_to l(:label_edit_homework), edit_student_work_path(work.id),:class => 'fr mr10 work_edit c_blue'
end
end
end
#根据传入作业确定显示为编辑作品还是新建作品,或者显示作品数量
def user_for_homework_common homework,is_teacher
if is_teacher #老师显示作品数量
link_to "提交(#{homework.student_works.count}",student_work_index_path(:homework => homework.id),:class => "c_blue"
else #学生显示提交作品、修改作品等按钮
work = cur_user_works_for_homework homework
if work.nil?
link_to "提交作品", new_student_work_path(:homework => homework.id),:class => 'c_blue'
else
if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前
link_to "修改作品", "", :class => 'c_blue', :title => "开启匿评后不可修改作品"
elsif homework.homework_type == 2 #编程作业不能修改作品
link_to "作品已交", "",:class => 'c_blue',:title => "编程作业不可修改作品"
else
link_to "修改作品", edit_student_work_path(work.id),:class => 'c_blue'
end
end
end
end

View File

@ -537,4 +537,16 @@ module UsersHelper
end
end
#获取指定用户作为老师的课程
def get_as_teacher_courses user
type = []
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
option = []
option << course.name
option << course.id
type << option
end
type
end
end

View File

@ -15,8 +15,8 @@ class CourseActivity < ActiveRecord::Base
user_activity.save
else
user_activity = UserActivity.new
user_activity.act_id = self.id
user_activity.act_type = self.class.to_s
user_activity.act_id = self.course_act_id
user_activity.act_type = self.course_act_type
user_activity.container_type = "Course"
user_activity.container_id = self.course_id
user_activity.save

View File

@ -1,5 +1,5 @@
class CourseMessage < ActiveRecord::Base
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status
# 多态 虚拟关联
belongs_to :course_message ,:polymorphic => true

View File

@ -30,8 +30,8 @@ class ForgeActivity < ActiveRecord::Base
user_activity.save
else
user_activity = UserActivity.new
user_activity.act_id = self.id
user_activity.act_type = self.class.to_s
user_activity.act_id = self.forge_act_id
user_activity.act_type = self.forge_act_type
user_activity.container_type = "Project"
user_activity.container_id = self.project_id
user_activity.save

View File

@ -1,3 +1,4 @@
#encoding=UTF-8
class StudentWorksScore < ActiveRecord::Base
#reviewer_role: 1:教师评分;2:教辅评分;3:学生匿评
attr_accessible :student_work_id, :user_id, :score, :comment, :reviewer_role
@ -9,13 +10,31 @@ class StudentWorksScore < ActiveRecord::Base
acts_as_attachable
after_create :act_as_course_message
after_save :act_as_course_message
# 评阅作品消息提示
def act_as_course_message
if self.student_work
if self.student_work && self.student_work.user && self.student_work.homework_common.course
receiver = self.student_work.user
self.course_messages << CourseMessage.new(:user_id => receiver.id, :course_id => self.student_work.homework_common.course.id, :viewed => false)
# 判断是第一次评阅还是更新 status:0 新建1 更新
if self.created_at == self.updated_at
if self.comment.nil?
self.course_messages << CourseMessage.new(:user_id => receiver.id, :course_id => self.student_work.homework_common.course.id,
:viewed => false, :content => "作业评分:#{self.score}", :status=> false)
else
self.course_messages << CourseMessage.new(:user_id => receiver.id, :course_id => self.student_work.homework_common.course.id,
:viewed => false, :content => "作业评分:#{self.score}&nbsp;&nbsp;&nbsp; 评语:#{self.comment}", :status=> false)
end
else # 更新
if self.comment.nil?
self.course_messages << CourseMessage.new(:user_id => receiver.id, :course_id => self.student_work.homework_common.course.id,
:viewed => false, :content => "作业评分:#{self.score}", :status=> true)
else
self.course_messages << CourseMessage.new(:user_id => receiver.id, :course_id => self.student_work.homework_common.course.id,
:viewed => false, :content => "作业评分:#{self.score}&nbsp;&nbsp;&nbsp; 评语:#{self.comment}", :status=> true)
end
end
end
end
end

View File

@ -0,0 +1,51 @@
<%= stylesheet_link_tag 'new_user'%>
<!--<div class="homepageContentContainer mb20" >-->
<div class="homepageContent BgBox">
<h2 class="BgBox_h2">Trustie服务协议</h2>
<div class="AgreementBox">
<p>尊敬的用户,您好!<br />
欢迎使用Trustie平台在您使用Trustie平台前请您认真阅读并遵守《Trustie服务协议》以下简称"本协议"),请您务必审慎阅读、充分理解协议的各条款内容。<br />
当您在注册过程中点击查看"看过并同意本服务协议"按照注册流程成功注册为Trustie平台的用户即表示您已充分阅读、理解并完全接受本协议中的全部条款。您承诺接受并遵守本协议的约定届时您不应以未阅读本协议的内容等理由主张本协议无效或本协议中的某些条款无效或要求撤销本协议。</p>
<h4 class="Agreementh4">一、Trustie平台权利和义务</h4>
<p>1、尊重用户隐私尊重用户隐私保障用户隐私安全是Trustie平台的一项基本政策<br />
2、管理平台用户Trustie平台依据国家法律、地方法律和国际法律等的标准以及本行业的规则来管理平台注册用户<br />
3、处理用户反馈Trustie平台的相关人员会及时处理用户反馈的问题并给予及时回复。</p>
<h4 class="Agreementh4">二、用户权利和义务</h4>
<p>用户在使用Trustie平台的过程中必须遵守如下原则<br />
1、遵守中国的有关法律和法规<br />
2、使用网络服务不作非法用途<br />
3、不干扰和混乱网络服务<br />
4、遵守所有使用网络服务的网络协议、规定、程序和惯例<br />
5、不传输任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的淫秽等信息资料<br />
6、不传输任何教唆他人构成犯罪行为的资料<br />
7、用户不得故意或者过失损害Trustie平台合法权利和利益。及时回复。</p>
<h4 class="Agreementh4">三、关于责任</h4>
<p>鉴于网络服务的特殊性用户同意Trustie团队有权在事先通知的情况下变更、中断、升级部分网络服务。Trustie团队不担保网络服务不会中断但承诺在用户可承受的时间内快速恢复服务同时确保用户数据的安全性和可靠性。</p>
<h4 class="Agreementh4">四、服务条款的修改</h4>
<p>Trustie团队保留在必要时对本协议修改的权利一旦发生变动这些条款可由Trustie团队及时更新且毋须另行通知修改后的条款一旦在网页上公布即有效代替原来的服务条款。您可随时查阅最新版服务条款。</p>
<p class=" mt15 fb">本协议最终解释权归Trustie团队所有。</p>
</div>
</div><!---BgBox end--->
<!--</div>&lt;!&ndash;-homepageContentContainer end-&ndash;&gt;-->
<script>
$(".resourcesList").mousedown(function(e) {
if (3 == e.which) {
document.oncontextmenu = function() {return false;}
$("#contextMenu").hide();
$("#contextMenu").attr("style","display: block; position: fixed; top:"
+ e.pageY
+ "px; left:"
+ e.pageX
+ "px; width: 80px;");
$("#contextMenu").show();
}
});
$(".resourcesList").click(function(e) {
$("#contextMenu").hide();
document.oncontextmenu = function() {return true;}
});
</script>

View File

@ -1,17 +1,58 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<%= call_hook :view_account_login_top %>
<%= stylesheet_link_tag 'new_user'%>
<%= stylesheet_link_tag 'leftside'%>
<script type="text/javascript" language="javascript">
function clearInfo(id, content) {
var text = $('#' + id);
if (text.val() == content) {
$('#' + id).val('');
<script>
// $(document).ready(function(){
// $("#loginSignButton").click(function(){
// $("#signUpBox").css({display:"block"});
// $("#loginInBox").css({display:"none"});
// });
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
// });
$(document).ready(function(){
$(".homepageSearchIcon").click(function(){
var val=$('input:radio[name="search_type"]:checked').val();
if(val==null){
$("#navSearchAlert").css({display:"block"});
}
else {
$("#navSearchAlert").css({display:"none"});
}
});
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
});
$(document).ready(function(){
$(".navHomepageSearchBoxcontainer").mouseover(function(){
$(".navSearchTypeBox").css({display:"block"});
});
$(".navHomepageSearchBoxcontainer").mouseout(function(){
$(".navSearchTypeBox").css({display:"none"});
});
})
$(document).ready(function(){
if(<%= @login%>){
$("#signUpBox").css({display:"none"});
$("#loginInBox").css({display:"block"});
}else{
$("#signUpBox").css({display:"block"});
$("#loginInBox").css({display:"none"});
}
}
});
function clearInfo(id, content) {
var text = $('#' + id);
if (text.val() == content) {
$('#' + id).val('');
}
}
function showInfo(id, content) {
var text = $('#' + id);
@ -19,80 +60,201 @@
$('#' + id).val(content);
}
}
</script>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9">
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
</head>
<div id="login-form">
<%= form_tag(signin_path) do %>
<%= back_url_hidden_field_tag %>
<table>
<tr>
<td align="right">
<label for="username">
<%=l(:lable_user_name)%>:
</label>
</td>
<td align="left">
<%= text_field_tag 'username', params[:username], :tabindex => '1' , :value => "#{l(:label_login_prompt)}",
:onfocus => "clearInfo('username','#{l(:label_login_prompt)}')",
:onblur => "showInfo('username','#{l(:label_login_prompt)}')",
:style => "resize: none;font-size: 12px;color: #818283;"%>
</td>
</tr>
<tr>
<td align="right">
<label for="password">
<%=l(:field_password)%>:
</label>
</td>
<td align="left">
<%= password_field_tag 'password', nil, :tabindex => '2' %>
</td>
</tr>
<% if Setting.openid? %>
<tr>
<td align="right">
<label for="openid_url">
<%=l(:field_identity_url)%>
</label>
</td>
<td align="left">
<%= text_field_tag "openid_url", nil, :tabindex => '3' %>
</td>
</tr>
<% end %>
<tr>
<td></td>
<td align="left">
<% if Setting.autologin? %>
<label for="autologin">
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
<%= l(:label_stay_logged_in) %>
</label>
<% end %>
</td>
</tr>
<tr>
<td colspan="2" >
<span style="float: left">
<% if Setting.lost_password? %>
<%= link_to l(:label_password_lost), lost_password_path %>
<% end %></span>
<span style="float: right">
<input type="submit" class="small" name="login" value="<%=l(:button_login)%> &#187;" tabindex="5"/></span>
</td>
</tr>
</table>
<% end %>
</div>
<%= call_hook :view_account_login_bottom %>
<% if params[:username].present? %>
<%= javascript_tag "$('#password').focus();" %>
<% else %>
<%= javascript_tag "$('#username').focus();" %>
<% end %>
function login(){
$('#main_login_form').submit(); //表单提交没有任何反应的原因js冲突
}
function register(){
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
$("#main_reg_form").submit();
}else{
$('#user_login').blur();
$('#user_mail').blur();
$('#user_password').blur();
$('#user_password_confirmation').blur();
}
}
var $login_correct = false;
var $mail_correct = false;
var $passwd_correct = false;
var $passwd_comfirm_correct = false;
jQuery(document).ready(function () {
var $login = $('#user_login')
var $mail = $('#user_mail')
var $password = $('#user_password')
var $password_confirmation = $('#user_password_confirmation')
$login.blur(function (event) {
if ($(this).is('#user_login')) {
$.get(
'<%=account_valid_ajax_path%>',
{ valid: "login",
value: this.value },
function (data) {
if (data.valid) {
$('#login_req').html('<span style="color: green">'+data.message+'</span>');
$login_correct = true;
} else {
$('#login_req').html( '<span style="color: red">'+data.message+'</span>');
$login_correct = false;
}
$('#login_req').css('display','block');
});
}
;
});
$mail.blur(function (event) {
if ($(this).is('#user_mail')) {
$.get('<%=account_valid_ajax_path%>',
{ valid: "mail",
value: this.value },
function (data) {
if (data.valid) {
$('#mail_req').html( '<span style="color: green">'+data.message+'</span>' );
$mail_correct = true;
} else {
$('#mail_req').html( '<span style="color: red">'+data.message+'</span>' );
$mail_correct = false;
}
$('#mail_req').css('display','block');
});
}
;
});
$password.blur(function () {
var pas1 = document.getElementById("user_password").value;
var password_min_length = <%= Setting.password_min_length.to_i %>
if (pas1.length >= password_min_length) {
$('#passwd_req').html('');
$passwd_correct = true;
}
else {
$('#passwd_req').html( '<span style="color: red">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
$passwd_correct = false;
}
$('#passwd_req').css('display','block');
});
$password_confirmation.blur(function () {
var password_min_length = <%= Setting.password_min_length.to_i %>
var pas1 = document.getElementById("user_password").value;
var pas2 = document.getElementById("user_password_confirmation").value;
if (pas1.length >= password_min_length && pas1 == pas2 ) {
$('#confirm_req').html('<span style="color: green">'+'<%= l(:setting_password_success) %>'+'</span>');
$passwd_comfirm_correct = true;
}
else {
$('#confirm_req').html('<span style="color: red">'+'<%= l(:setting_password_error) %>'+'</span>');
$passwd_comfirm_correct = false;
}
$('#confirm_req').css('display','block');
});
});
</script>
<div class="loginContentContainer">
<div class="loginContent">
<div class="loginLeft">
<div class="loginLogo"><img src="images/trustie_big_log.png" width="100" height="88" alt="Trustie Logo" /></div>
<div class="loginInro">欢迎加入Trustie高校创新实践社区老师、学生和科研人员可以在此开展各种在线协同学习、协同作业、协同开发等活动。Trustie是在中国推行大规模开放在线研究模式MOORE的支撑平台。</div>
</div>
<div class="loginRight">
<div id="loginInBox">
<div class="loginChooseBox">
<div class="mb5">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">登录</span></li>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
</div>
<div class="loginIn">
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
<%= back_url_hidden_field_tag %>
<div class="mb20">
<%= text_field_tag 'username', params[:username], :tabindex => '1' ,
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或昵称'%>
<!--<input type="text" placeholder="请输入邮箱地址或昵称" class="loginSignBox" />-->
</div>
<% if Setting.openid? %>
<div class="mb20">
<%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %>
</div>
<% end %>
<div>
<!--<input type="text" placeholder="请输密码" class="loginSignBox" />-->
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码'%>
</div>
<div class="loginSignOption">
<% if Setting.autologin? %>
<div class="fl mt3 mr5">
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
</div>
<%= l(:label_stay_logged_in) %>
<% end %>
<a href="<%= lost_password_path %>" class="newsBlue mr40 fr">
<% if Setting.lost_password? %>
<u>忘记密码?</u>
<% end %>
</a></div>
<% end %>
<div class="loginInButton" >
<a href="javascript:void(0);" class="c_white db" onclick="$('#main_login_form').submit();">登录</a>
</div>
</div>
</div>
<div id="signUpBox">
<div class="loginChooseBox">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></a></span>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginIn">
<%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %>
<%= error_messages_for 'user' %>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入邮箱地址" class="loginSignBox" />-->
<%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%>
<div class="loginSignAlert" id="mail_req" style="display: none" >请输入有效邮箱地址</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入密码" class="loginSignBox" />-->
<%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="passwd_req" style="display: none">至少需要 6 个字符</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请再次输入密码" class="loginSignBox" />-->
<%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="confirm_req" style="display: none">密码不一致</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入用户昵称" class="loginSignBox" />-->
<%= f.text_field :login, :size => 25,:placeholder=>"请输入用户昵称",:class=>'loginSignBox'%>
<div class="loginSignAlert" id="login_req" style="display: none">用户昵称为2-18个中英文数字或下划线</div>
</div>
<div class="loginSignOption">
<div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm"/>
</div>
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpButton">
<a href="javascript:void(0);" class="c_white db" onclick="register();">注册</a>
</div>
<% end %>
</div>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -1,16 +1,26 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<h3><%=l(:label_password_forget)%></h3>
<%= stylesheet_link_tag 'new_user'%>
<%= form_tag(lost_password_path) do %>
<div class="box tabular">
<p>
<label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱'%>
<%= submit_tag l(:button_submit) %>
</p>
</div>
<% end %>
<div class="homepageContentContainer " style="margin-top:20px;">
<div class="homepageContent BgBox">
<h2 class="BgBox_h2">忘记密码</h2>
<div class="BgBoxCon">
<%= form_tag(lost_password_path) do %>
<p class="BgBoxConP mb5">通过注册邮箱链接重设密码</p>
<!--<input type="text" class="NomalInput mb20 " value="请输入登录邮箱地址" />-->
<%= text_field_tag 'mail', nil, :size => 40, :placeholder => '请输入注册邮箱',:class=>'NomalInput mb20'%>
<% if flash[:error] %>
<p class="c_red mb5"><%= flash[:error]%></p>
<!--<div style="color: red" class="mb5" ><%#= flash[:error]%></div>-->
<% elsif flash[:notice] %>
<p class="c_green mb5"><%= flash[:notice]%></p>
<!--<div style="color: green" class="mb5" ><%#= flash[:notice]%></div>-->
<% end %>
<div class="LoginButton"><a href="javascript:void(0);" class="c_white db" onclick="$(this).parent().parent().submit();">提交</a></div>
<% end %>
</div>
</div><!---BgBox end--->
</div><!---homepageContentContainer end--->
</body>
</html>

View File

@ -19,10 +19,10 @@
</td>
<td rowspan="2" width="250px" >
<div class="top-content-search">
<%= form_tag(:controller => 'forums', :action => "search_forum", :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
<%#= form_tag(:controller => 'forums', :action => "search_forum", :method => :get) do %>
<%#= text_field_tag 'name', params[:name], :size => 20 %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%# end %>
</div>
</td>
</tr>

View File

@ -0,0 +1,40 @@
<div id="Footer">
<div class="footerAboutContainer">
<ul class="footerAbout">
<li class="fl"><a href="javascript:void(0);" class="f_grey mw20" target="_blank"><%= l(:label_about_us)%></a>|</li>
<li class="fl"><a href="http://forge.trustie.net/projects/2/member" class="f_grey mw20" target="_blank"><%= l(:label_contact_us)%></a>|</li>
<li class="fl"><a href="javascript:void(0);" class="f_grey mw20" target="_blank"><%= l(:label_recruitment_information)%></a>|</li>
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
<li class="fl"><a href="javascript:void(0);" class="f_grey mw20" target="_blank"><%= l(:label_forums)%></a></li>
</ul>
</div>
<div class="cl"></div>
<ul class="departments">
<li class="fl mr10">
<strong><%= l(:label_hosted_organization)%></strong><a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=47" class=" ml10 f_grey" target="_blank"><%= l(:label_hosted_by)%></a>
</li>
<li class="fl">
<a href="http://www.nudt.edu.cn/ArticleShow.asp?ID=41" class="mr45 f_grey" target="_blank"><%= l(:label_sponsor)%></a>
</li>
<li class="fl mr10">
<strong><%= l(:label_partners)%></strong><a href="http://eecs.pku.edu.cn" class="ml10 f_grey" target="_blank"><%= l(:label_co_organizer_EECS)%></a>
</li>
<li class="fl">
<a href="http://scse.buaa.edu.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_BHU)%></a>
</li>
<li class="fl">
<a href="http://www.iscas.ac.cn/" class="mr10 f_grey" target="_blank"><%= l(:label_co_organizer_CAS)%></a>
</li>
<li class="fl">
<a href="http://www.inforbus.com/" class="f_grey" target="_blank"><%= l(:label_co_organizer_InforS)%></a>
</li>
</ul>
<div class="cl"></div>
<ul class="copyright">
<li class="fl"><%= l(:label_rights_reserved)%></li>
<span class="fl mw15">|</span>
<li class="fl"><a href="http://www.miibeian.gov.cn/" class="fl f_grey" target="_blank"><%= l(:label_license)%></a></li>
</ul>
</div><!--Footer end-->

View File

@ -5,24 +5,58 @@
<div class="fl">
<ul>
<li class="navHomepageMenu fl">
<a href="javascript:void(0);" class="homepageWhite f16">首页</a>
<%= link_to "首页",user_activities_path(User.current.id), :class => "homepageWhite f16"%>
</li>
<li class="navHomepageMenu fl">
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>@user.id,:type=>1)%>" class="homepageWhite f16">资源库</a></li>
<a href="<%=url_for(:controller => 'users', :action => 'user_resource',:id=>User.current.id,:type=>1)%>" class="homepageWhite f16">资源库</a></li>
<li class="navHomepageMenu fl">
<a href="javascript:void(0);" class="homepageWhite f16">作业</a>
<%= link_to "作业", user_homeworks_user_path(User.current.id), :class => "homepageWhite f16"%>
</li>
<li class="navHomepageMenu fl">
<a href="javascript:void(0);" class="homepageWhite f16">联系人</a>
<a href="http://forge.trustie.net/forums/1/memos/1168" class="homepageWhite f16">帮助中心</a>
</li>
</ul>
</div>
<script>
<% type = type%>
$(document).ready(function (){
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
$('input:radio[value="courses"]').attr('checked','checked');
}
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
$('input:radio[value="projects"]').attr('checked','checked');
}
if('<%= type %>' != null && '<%= type %>' == 'users' ){
$('input:radio[value="users"]').attr('checked','checked');
}
});
</script>
<div class="fl" id="navHomepageSearch">
<!--<form class="navHomepageSearchBox">-->
<% name = name%>
<div class="fl">
<form class="navHomepageSearchBox">
<input type="text" name="navHomepageSearch" class="navHomepageSearchInput" />
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
</form>
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" class="navHomepageSearchInput" />
<input type="hidden" name="search_type" id="type" value=""/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#type').val($('input[type=radio]:checked').val());$(this).parent().submit();"></a>
<% end %>
<div class="navSearchTypeBox" id="navHomepageSearchType">
<div class="fl mr15 mt8">
<input type="radio" value="courses" name="search_type" checked/>
课程
</div>
<div class="fl mr15 mt8">
<input type="radio" value="projects" name="search_type" />
项目
</div>
<div class="fl mr15 mt8">
<input type="radio" value="users" name="search_type" />
用户
</div>
<div id="navSearchAlert" class="fr mr10">
<span class="c_red">请选择搜索类型</span>
</div>
</div>
</div>
<div class="navHomepageProfile">
@ -30,9 +64,13 @@
<li class="homepageProfileMenuIcon">
<%= link_to "<div class='mt5 mb8'>#{image_tag(url_to_avatar(User.current),:width =>"40",:height => "40",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe,user_activities_path(User.current.id)%>
<ul class="topnav_login_list">
<li><a href="javascript:void(0);" class="menuGrey">修改资料</a> </li>
<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>
<li><a href="javascript:void(0);" class="menuGrey">退出</a></li>
<li>
<%= link_to "修改资料", my_account_path, :class => "menuGrey"%>
</li>
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
<li>
<%= link_to "退出",signout_path,:class => "menuGrey",:method => "post"%>
</li>
</ul>
</li>
</ul>
@ -43,4 +81,20 @@
<div ><%= link_to "" , user_message_path(User.current), :class => "newsActive" %></div>
<% end %>
</div>
</div>
</div>
<script type="text/javascript">
//搜索相关
$("#navHomepageSearch").mouseover(function(){
$("#navHomepageSearchType").show();
}).mouseout(function(){
$("#navHomepageSearchType").hide();
});
function signout(){
$.post(
'<%= signout_path%>',
{}
);
}
</script>

View File

@ -1,40 +1,78 @@
<div class="navHomepage">
<div class="navHomepageLogo fl">
<%=link_to image_tag("../images/logo.png",weight:"51px", height: "45px",class: "mt3")%>
<%=link_to image_tag("../images/logo.png",width:"51px", height: "45px",class: "mt3"), signin_path%>
</div>
<div class="fl">
<ul>
<li class="navHomepageMenu fl"><a href="javascript:void(0);" class="homepageWhite f16">首页</a></li>
<li class="navHomepageMenu fl"><a href="javascript:void(0);" class="homepageWhite f16">资源库</a></li>
<li class="navHomepageMenu fl"><a href="javascript:void(0);" class="homepageWhite f16">作业</a></li>
<li class="navHomepageMenu fl"><a href="javascript:void(0);" class="homepageWhite f16">联系人</a></li>
</ul>
</div>
<div class="fl">
<form class="navHomepageSearchBox">
<input type="text" name="navHomepageSearch" class="navHomepageSearchInput" />
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
</form>
</div>
<div class="navHomepageProfile">
<ul>
<li class="homepageProfileMenuIcon">
<a href="javascript:void(0);">
<div class="mt5 mb8">
<img src="images/homepageProfileImage.png" width="40" height="40" />
</div>
</a>
<ul class="topnav_login_list">
<li><a href="javascript:void(0);" class="menuGrey">修改资料</a> </li>
<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>
<li><a href="javascript:void(0);" class="menuGrey">退出</a></li>
</ul>
<li class="navHomepageMenu fl">
<a href="http://forge.trustie.net/forums/1/memos/1168" class="c_white f16">帮助中心</a>
</li>
</ul>
</div>
<div class="navHomepageNews">
<a href="javascript:void(0);" class="homepageNewsIcon">
<div class="newsActive"></div>
</a>
<script>
function search(doc){
//alert(1)
// val = $('input:radio[name="search_type"]:checked').val();
// alert(2)
// $("#search_type").val(val);
// alert(3)
$(doc).parent().submit();
}
<% type = type%>
$(document).ready(function (){
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
$('input:radio[value="courses"]').attr('checked','checked');
}
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
$('input:radio[value="projects"]').attr('checked','checked');
}
if('<%= type %>' != null && '<%= type %>' == 'users' ){
$('input:radio[value="users"]').attr('checked','checked');
}
});
</script>
<div class="fl" id="navHomepageSearch">
<!--<form class="navHomepageSearchBox">-->
<% name = name%>
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" class="navHomepageSearchInput"/>
<input type="hidden" name="search_type" id="type" value=""/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#type').val($('input[type=radio]:checked').val());$(this).parent().submit();"></a>
<% end %>
<div class="navSearchTypeBox" id="navHomepageSearchType">
<div class="fl mr15 mt8">
<input type="radio" value="courses" name="search_type" checked/>
课程
</div>
<div class="fl mr15 mt8">
<input type="radio" value="projects" name="search_type" />
项目
</div>
<div class="fl mr15 mt8">
<input type="radio" value="users" name="search_type" />
用户
</div>
<div id="navSearchAlert" class="fr mr10">
<span class="c_red">请选择搜索类型</span>
</div>
</div>
</div>
</div>
<div id="loginInButton" class="fr ml20">
<a href="<%= signin_path(:login=>true) %>" class="c_white db">登录</a>
</div>
<div id="loginSignButton" class="fr">
<a href="<%= signin_path(:login=>false) %>" class="c_white db">注册</a>
</div>
</div>
<script type="text/javascript">
//搜索相关
$("#navHomepageSearch").mouseover(function(){
$("#navHomepageSearchType").show();
}).mouseout(function(){
$("#navHomepageSearchType").hide();
});
</script>

View File

@ -4,7 +4,5 @@
这位童鞋很懒,什么也没有留下~&nbsp;
<% end %>
<% if User.current == user%>
<a href="javascript:void(0);" onclick="show_edit_user_introduction();">
<img src="../images/signature_edit.png" width="12" height="12" />
</a>
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_user_introduction();"%>
<% end%>

View File

@ -0,0 +1,12 @@
<% courses.each do |course|%>
<li class="homepageLeftMenuCoursesLine">
<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :class => "coursesLineGrey hidden #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}", :title => course.name%>
</li>
<% end %>
<% if courses.size == 5%>
<li class="homepageLeftMenuMore" id="user_show_more_course">
<input type="hidden" value="<%= page%>" id="course_page_num">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_course('<%= user_courses4show_user_path(user.id)%>');"></a>
</li>
<% end%>

View File

@ -0,0 +1,11 @@
<% projects.each do |project|%>
<li class="homepageLeftMenuCoursesLine">
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => project.name%>
</li>
<% end %>
<% if projects.size == 5%>
<li class="homepageLeftMenuMore" id="user_show_more_project">
<input type="hidden" value="<%= page%>" id="project_page_num">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_project('<%= user_projects4show_user_path(user.id)%>');"></a>
</li>
<% end%>

View File

@ -17,19 +17,30 @@
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<body class="<%=h body_css_classes %>">
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header',:locals=>{:name=>@name,:type=>@type} %>
<% else%>
<%= render :partial => 'layouts/unlogin_header',:locals=>{:name=>@name,:type=>@type} %>
<% end%>
</div>
<div class="cl"></div>
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<div id="main" class="nosidebar">
<div id="content_">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%=render :partial => 'layouts/base_footer'%>
<%#=render :partial => 'layouts/base_footer'%>
</div>
</div>
@ -41,6 +52,9 @@
</div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -1,4 +1,4 @@
<% course_model %>
<%# course_model %>
<% teacher_num = teacherCount(@course) %>
<% student_num = studentCount(@course) %>
<% course_file_num = visable_attachemnts_incourse(@course).count%>
@ -17,17 +17,22 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'public', 'leftside', 'jquery/jquery-ui-1.9.2', 'courses'%>
<%= stylesheet_link_tag 'public', 'leftside', 'jquery/jquery-ui-1.9.2', 'courses','header'%>
<%= javascript_include_tag "course","header","attachments" %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div id="Container">
<%= render :partial => 'layouts/new_header' %>
<div class="cl"></div>
<div id="TopBar">
<div class="topbar_info02 fl">
<h2>
@ -46,16 +51,16 @@
<%= link_to @course.name, course_path(@course) %>
</p>
</div>
<div class="search fl">
<%= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>
<input class="search_text fl" id="name" name="name" onkeyup="regexName('搜索条件不能为空');" placeholder="课程名称" type="text">
<a href="javascript:void(0)" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
<%= l(:label_search)%>
</a>
<div class="cl"></div>
<span id="project_name_span" style="float: left"></span>
<% end %>
</div>
<!--<div class="search fl">-->
<!--<%#= form_tag({:controller => 'courses', :action => 'search'},:id => "course_search_form", :method => :get, :class => "search_form") do %>-->
<!--<input class="search_text fl" id="name" name="name" onkeyup="regexName('搜索条件不能为空');" placeholder="课程名称" type="text">-->
<!--<a href="javascript:void(0)" onclick="submitSerch('<%#= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >-->
<!--<%#= l(:label_search)%>-->
<!--</a>-->
<!--<div class="cl"></div>-->
<!--<span id="project_name_span" style="float: left"></span>-->
<!--<%# end %>-->
<!--</div>-->
</div><!--TopBar end-->
<div class="cl"></div>
<div id="content">
@ -178,11 +183,12 @@
<div style="clear:both;"></div>
</div><!--Content end-->
<div class="cl"></div>
<%= render :partial => 'layouts/new_footer' %>
<div class="cl"></div>
</div><!--Container end-->
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= render :partial => 'layouts/new_feedback' %>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>

View File

@ -1,8 +1,3 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<!DOCTYPE html>
<html lang="en">
<head>
@ -20,25 +15,36 @@
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
</head>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<body class="<%= h body_css_classes %>">
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<div id="wrapper3">
<div id="main">
<div class="top-content">
<div class="top-content">
<table>
<tr>
<td class="info_font" style="width: 240px; color: #15bccf"><%= l(:label_projects_community)%></td>
<td style="width: 430px; color: #15bccf"><strong><%= l(:label_user_location) %> : </strong></td>
<td rowspan="2" width="250px">
<div class="top-content-search">
<%= form_tag(:controller => 'forums', :action => "search_memo", :id => params[:id], :method => :get) do %>
<%= text_field_tag 'name', params[:name], :size => 20 %>
<%= hidden_field_tag 'forum_id', params[:id] %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>
<%#= form_tag(:controller => 'forums', :action => "search_memo", :id => params[:id], :method => :get) do %>
<%#= text_field_tag 'name', params[:name], :size => 20 %>
<%#= hidden_field_tag 'forum_id', params[:id] %>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<%# end %>
</div>
</td>
</tr>
@ -46,46 +52,46 @@
<td style="padding-left: 8px"><%= link_to request.host()+"/forums", forums_path %></td>
<td><p class="top-content-list"><%=link_to l(:label_home),home_path %> > <%=link_to '公共贴吧', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %></p></td>
</tr>
</table>
</div>
</table>
</div>
<div id="sidebar">
<!--informations-->
<div class="sidebar-forums">
<div class="forums-line">
<div class="forums-line">
<div class="forums-title"><%= @forum.name %></div>
<div class="forums-description upload_img"><%= @forum.description.html_safe %></div>
</div>
</div>
<!--informations-->
<div class="formus-first-title" >创建人信息</div>
<div class="forums-info">
<div class="forums-info">
<div style="padding-top: 20px" >
<span class="forums-avatar-left"><%= image_tag(url_to_avatar(@forum.creator), :class =>'vatar-size') %></span>
<span class="forums-avatar-right">
<% unless @forum.creator.nil? %>
<%=link_to @forum.creator.name, user_path(@forum.creator) %>
<div>
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %>
<%= link_to l(:label_user_watcher)+"("+User.watched_by(@forum.creator.id).count.to_s+")" ,:controller=>"users", :action=>"user_watchlist", :id => @forum.creator.id %>
<%= link_to l(:label_x_user_fans, :count => User.current.watcher_users(User.current.id).count)+"("+@forum.creator.watcher_users(@forum.creator.id).count.to_s+")", :controller=>"users", :action=>"user_fanslist", :id => @forum.creator.id %>
</div>
<% end %>
</span>
</div>
</div>
</div>
<!--tags-->
<% if User.current.logged? || User.current.admin? %>
<!--tags-->
<% if User.current.logged? || User.current.admin? %>
<div class="forums-tags"><%= render :partial => 'tags/tag', :locals => {:obj => @forum,:object_flag => "5"}%></div>
<% end %>
<% end %>
</div>
</div>
<div id="content">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
<%= render :partial => 'layouts/base_footer'%>
<%#= render :partial => 'layouts/base_footer'%>
</div>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>
@ -94,6 +100,9 @@
</div>
</div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -1,8 +1,3 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_main_course_label = 1
@nav_dispaly_main_project_label = 1
@nav_dispaly_main_contest_label = 1 %>
<% @nav_dispaly_forum_label = 1%>
<!DOCTYPE html>
<html lang="en">
<head>
@ -20,13 +15,24 @@
<%= javascript_include_tag "ckeditor/ckeditor.js" %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<!--add by huang-->
<body class="<%= h body_css_classes %>">
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<div id="wrapper3">
<div id="main">
<!-- added by bai -->
@ -78,7 +84,7 @@
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
</div>
<%= render :partial => 'layouts/base_footer'%>
<%#= render :partial => 'layouts/base_footer'%>
</div>
<div id="ajax-indicator" style="display:none;">
@ -87,6 +93,9 @@
<div id="ajax-modal" style="display:none;"></div>
</div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</div>
</body>

View File

@ -12,7 +12,7 @@
<%= favicon %>
<%= javascript_heads %>
<%= heads_for_theme %>
<%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2' %>
<%= stylesheet_link_tag 'public', 'pleft', 'project','jquery/jquery-ui-1.9.2','header' %>
<%= javascript_include_tag 'cookie','project', 'header','select_list_move' %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
@ -22,9 +22,18 @@
</head>
<!--add by huang-->
<body>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div id="Container">
<%= render :partial => 'layouts/new_header'%>
<%#= render :partial => 'layouts/new_header'%>
<div class="cl"></div>
<!--TopBar begin-->
@ -40,16 +49,16 @@
<%= link_to l(:field_homepage), home_path %> > <a href="http://<%= Setting.host_name %>"><%=l(:label_project_hosting_platform) %> </a>><%= link_to @project.name, project_path(@project.id) %>
</p>
</div>
<div class="search fl">
<%= form_tag(projects_search_path, :method => :get, :id => "project_search_form", :class => "search_form") do %>
<%= text_field_tag 'name', params[:name], :placeholder => "项目名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>
<a href="#" onclick="submitSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >
<%= l(:label_search)%>
</a>
<div class="cl"></div>
<span id="project_name_span" class="fl"></span>
<% end %>
</div>
<!--<div class="search fl">-->
<!--<%#= form_tag(projects_search_path, :method => :get, :id => "project_search_form", :class => "search_form") do %>-->
<!--<%#= text_field_tag 'name', params[:name], :placeholder => "项目名称", :class => "search_text fl", :onkeyup => "regexName('#{l(:label_search_conditions_not_null)}');" %>-->
<!--<a href="#" onclick="submitSerch('<%#= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white" >-->
<!--<%#= l(:label_search)%>-->
<!--</a>-->
<!--<div class="cl"></div>-->
<!--<span id="project_name_span" class="fl"></span>-->
<!--<%# end %>-->
<!--</div>-->
</div><!--TopBar end-->
<div id="content">
@ -172,10 +181,13 @@
<div style="clear:both;"></div>
</div>
<div style="clear:both;"></div>
<div class="cl"></div>
<%= render :partial => 'layouts/new_footer'%>
<div class="cl"></div>
</div><!--Container end-->
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<div id="light" class="white_content02">
<!-- 这里写需弹出框的HTML代码 -->
<% text = @project.project_new_type == 1 ? "development_group" : (@project.project_new_type == 2 ? "research_group" : "friend_organization")%>

View File

@ -21,19 +21,29 @@
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<body class="<%=h body_css_classes %>">
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' ,:locals=>{:name=>@name,:type=>@type}%>
<% else%>
<%= render :partial => 'layouts/unlogin_header' ,:locals=>{:name=>@name,:type=>@type}%>
<% end%>
</div>
<div class="cl"></div>
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<%#=render :partial => 'layouts/base_header'%>
<div id="main" class="nosidebar">
<div id="content_">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%=render :partial => 'layouts/base_footer'%>
<!--<div style="clear:both;"></div>-->
<!--<%#=render :partial => 'layouts/base_footer'%>-->
</div>
</div>
@ -45,6 +55,10 @@
</div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -0,0 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_user', 'user_leftside', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","new_user"%>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
</head>
<div class="navContainer">
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<%= yield %>

View File

@ -13,15 +13,25 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'public', 'leftside', 'courses'%>
<%= stylesheet_link_tag 'public', 'leftside', 'courses','header'%>
<%= javascript_include_tag "course","header" %>
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<!--add by huang-->
<body>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header' %>
<% else%>
<%= render :partial => 'layouts/unlogin_header' %>
<% end%>
</div>
<div class="cl"></div>
<div id="Container">
<%= render :partial => 'layouts/new_header' %>
<%#= render :partial => 'layouts/new_header' %>
<div class="cl"></div>
<div id="content02" >
@ -31,9 +41,12 @@
</div><!--Content end-->
<div class="cl"></div>
<%= render :partial => 'layouts/new_footer' %>
<%#= render :partial => 'layouts/new_footer' %>
<div class="cl"></div>
</div><!--Container end-->
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= render :partial => 'layouts/new_feedback' %>
<div id="ajax-indicator" style="display:none;">
<span><%= l(:label_loading) %></span>

View File

@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_public', 'user_leftside', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_user', 'user_leftside','users',:media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap","avatars","new_user"%>
@ -47,7 +47,7 @@
<% end%>
</div>
<div>
<div class="homepageImageName hidden">
<div class="homepageImageName hidden db">
<%= @user.login %>
</div>
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
@ -66,14 +66,14 @@
</div>
<div>
<div class="homepageImageBlock">
<div>
<div id="watch_user_number_div">
<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
</div>
<div class="homepageImageText">关注</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock">
<div>
<div id="fans_user_number_div">
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
</div>
<div class="homepageImageText">粉丝</div>
@ -95,52 +95,36 @@
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">课程</a>
<a href="javascript:void(0);" class="homepageMenuSetting">
<img src="../images/menu_setting.png" width="14" height="14" />
</a>
<% if is_current_user%>
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), new_course_path%>
<% else%>
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), join_private_courses_courses_path ,:remote => true%>
<% end%>
<% end%>
</div>
<div class="homepageLeftMenuCourses">
<ul>
<% courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5)%>
<% courses.each do |course|%>
<li class="homepageLeftMenuCoursesLine">
<a href="<%= url_for(:controller => 'courses', :action=>"show", :id=>course.id, :host=>Setting.host_course) %>" class="coursesLineGrey">
<%= course.name %>
</a>
</li>
<% end %>
<% if courses.size == 5%>
<li class="homepageLeftMenuMore">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon"></a>
</li>
<% end%>
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
</ul>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">项目</a>
<a href="javascript:void(0);" class="homepageMenuSetting">
<img src="../images/menu_setting.png" width="14" height="14" />
</a>
<% if is_current_user%>
<%=link_to image_tag("../images/menu_setting.png",width:"14px", height: "14px",class: "homepageMenuSetting"), new_project_path%>
<% end%>
</div>
<div class="homepageLeftMenuCourses">
<ul>
<% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%>
<% projects.each do |project|%>
<li class="homepageLeftMenuCoursesLine">
<a href="<%= url_for(:controller => 'projects', :action=>"show", :id=>project.id, :host=>Setting.host_name) %>" class="coursesLineGrey">
<%= project.name %>
</a>
</li>
<% end %>
<% if projects.size == 5%>
<li class="homepageLeftMenuMore">
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon"></a>
</li>
<% end%>
<%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :page => 0} %>
</ul>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">留言</a>
<!--<a href="javascript:void(0);" class="homepageMenuText">留言</a>-->
<%= link_to '留言',feedback_path(@user),:class=>'homepageMenuText'%>
</div>
</div>
<div class="homepageLeftLabelContainer">
@ -153,12 +137,15 @@
</div>
</div>
</div>
<div class="homepageRight">
<div class="homepageRight" id="RSide">
<%= yield %>
</div>
</div>
<%= render :partial => 'layouts/new_feedback' %>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<div id="ajax-modal" style="display:none;"></div>
<div id="ajax-indicator" style="display:none;">

View File

@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="<%= current_language %>">
<head>
<meta charset="utf-8" />
<title><%=h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "jquery.leanModal.min" %>
<%= javascript_include_tag 'seems_rateable/jRating', 'seems_rateable/rateable'%>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<body>
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header',:locals=>{:name=>@name,:type=>@type} %>
<% else%>
<%= render :partial => 'layouts/unlogin_header',:locals=>{:name=>@name,:type=>@type} %>
<% end%>
</div>
<div class="cl"></div>
<div>
<%= yield %>
<div style="clear:both;"></div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -1,8 +1,3 @@
<% @nav_dispaly_home_path_label = 1
@nav_dispaly_user_label = 1
@nav_dispaly_store_all_label = 1
%>
<% @nav_dispaly_forum_label = 1%>
<!DOCTYPE html>
<html lang="<%= current_language %>">
<head>
@ -21,19 +16,29 @@
<%= call_hook :view_layouts_base_html_head %>
<!-- page specific tags -->
<%= yield :header_tags -%>
<%= stylesheet_link_tag 'base','header', :media => 'all'%>
</head>
<body class="<%=h body_css_classes %>">
<body>
<div class="cl"></div>
<div class="navContainer mb10">
<% if User.current.logged? %>
<%= render :partial => 'layouts/logined_header',:locals=>{:name=>@name,:type=>@type} %>
<% else%>
<%= render :partial => 'layouts/unlogin_header',:locals=>{:name=>@name,:type=>@type} %>
<% end%>
</div>
<div class="cl"></div>
<div id="wrapper">
<div id="wrapper2">
<div id="wrapper3">
<%=render :partial => 'layouts/base_header'%>
<%#=render :partial => 'layouts/base_header'%>
<div id="main" class="nosidebar">
<div id="content_">
<%= render_flash_messages %>
<%= yield %>
<%= call_hook :view_layouts_base_content %>
<div style="clear:both;"></div>
<%=render :partial => 'layouts/base_footer'%>
</div>
</div>
@ -45,6 +50,11 @@
</div>
</div>
<div class="cl"></div>
<%= render :partial => 'layouts/footer' %>
<div class="cl"></div>
<%= call_hook :view_layouts_base_body_bottom %>
</body>
</html>

View File

@ -7,10 +7,11 @@
<!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
<div class="cl"></div>
<label class="fl" style="margin-left: -80px;margin-top: 10px;"><%= l(:label_attachment_plural) %></label>
<div style="margin-left: 110px;margin-top: 10px;margin-bottom: 10px;" class="fl">
<label class="fl" style="margin-left: -80px;margin-top: 5px;"><%= l(:label_attachment_plural) %></label>
<div style="margin-left: 10px;" class="fl">
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
</div>
<div class="cl"></div>
<%= f.submit :value => l(:label_memo_create), :style => "margin-left: 100px;"%> <%= link_to l(:button_back), forum_path(@forum) %>
</div>
<% end %>

View File

@ -1,9 +1,4 @@
<style>
div.content{padding-top:10px;}
.pcontent>.school_list,.content>.school_list { padding-left: 5px;}
</style>
<div id="RSide" class="fl">
<div class="fl">
<div id="users_setting">
<div id="users_tb_" class="users_tb_">
<ul>
@ -30,7 +25,7 @@
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">工作单位&nbsp;:&nbsp;</li>
<li>地区&nbsp;:&nbsp;</li>
<li>邮件通知&nbsp;:&nbsp;</li>
<li>个人签名&nbsp;:&nbsp;</li>
<!--<li>个人签名&nbsp;:&nbsp;</li>-->
<li>个人简介&nbsp;:&nbsp;</li>
<li>&nbsp;&nbsp;</li>
</ul>
@ -141,7 +136,7 @@
<%= select_tag( 'user[mail_notification]', options_for_select( user_mail_notification_options(@user), @user.mail_notification) ) %>
<label>不要发送对我自己提交的修改的通知<%= check_box_tag 'no_self_notified', 1, @user.pref[:no_self_notified],:style=>"height:14px;" %></label>
</li>
<li><input name="brief_introduction" class="w450" type="text" maxlength="255" value="<%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.brief_introduction %>"></li>
<!--<li><input name="brief_introduction" class="w450" type="text" maxlength="255" value="<%#= (@user.user_extensions.nil?) ? '' : @user.user_extensions.brief_introduction %>"></li>-->
<li style="height:auto;"><textarea name="description" class="w450 h200" maxlength="255" style="resize:none;"><%= (@user.user_extensions.nil?) ? '' : @user.user_extensions.description %></textarea></li>
<li style="display:none;"><%= f.select :language, :Chinese => :zh, :English => :en %></li>
<li class="ml2">

View File

@ -0,0 +1,39 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.container_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey"><%=activity.filename.to_s(附件名称)%></a>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
</div>
<div class="homepagePostIntro">(附件描述)<%=activity.description.to_s%></div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理课程创建</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,39 @@
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo" style="word-break:break-all;">
<% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %> TO
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
</div>
<div class="homepagePostTitle" style="word-break:break-all;">
<%= link_to activity.name.to_s+"(作业名称)", student_work_index_path(:homework => activity.id), :class => "postGrey", :style=>"word-break:break-all" %>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit">
<%= link_to "提交("+activity.student_works.count.to_s+")", student_work_index_path(:homework => activity.id), :class=> "c_blue" %>
</div>
<div class="homepagePostDeadline">截止时间:<%= format_date(activity.end_time) %></div>
</div>
<div class="homepagePostIntro" style="word-break:break-all">(作业描述)<%= activity.description.html_safe %></div>
<div class="homepagePostSetting" style="visibility: hidden" id="act-<%=user_activity.id %>">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理留言</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,102 @@
<div class="resources mt15">
<div class="homepagePostBrief"> <!-- onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')"-->
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo" style="word-break:break-all;">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to activity.course.name.to_s+"(课程讨论区)", course_path(activity.course), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
</div>
<div class="homepagePostTitle" style="word-break:break-all;">
<% if activity.parent_id.nil? %>
<%= link_to activity.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
<% end %>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
</div>
<div class="homepagePostIntro" style="word-break:break-all">(描述)
<% if activity.parent_id.nil? %>
<%= activity.content.to_s.html_safe%>
<% else %>
<%= activity.parent.content.to_s.html_safe%>
<% end %>
</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<!--<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(
<%# if activity.parent_id.nil? %>
<%#=activity.replies_count %>
<%# else %>
<%#=activity.parent.replies_count %>
<%# end %>
</div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
</div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
</div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
</div>
<div class="cl"></div>
</div>
<%# activity= activity.parent_id.nil? ? activity:activity.parent%>
<%# activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<%#= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher">
<%# if reply.try(:author).try(:realname) == ' ' %>
<%#= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<%# else %>
<%#= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<%# end %>
<%#=format_date(reply.created_on)%>
<%#= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => 'replyGrey fr ml10'
) if reply.course_destroyable_by?(User.current) %>
&lt;!&ndash;<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>&ndash;&gt;
</div>
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%#= reply.content.html_safe %>"><%#= reply.content.html_safe %></div>
</div>
<div class="cl"></div>
</div>
<%# end %>
<%# end %>
</div>-->
</div>

View File

@ -0,0 +1,81 @@
<div class="resources mt15">
<div class="homepagePostBrief" >
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo" style="word-break:break-all;">
<% if @ctivity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.course), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
</div>
<div class="homepagePostTitle" style="word-break:break-all;">
<%=link_to activity.title.to_s+"(通知标题)", news_path(activity), :class=> "postGrey", :style=>"word-break:break-all" %>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">发布时间:<%= format_date(activity.created_on) %></div>
</div>
<div class="homepagePostIntro" style="word-break:break-all">(通知描述)<%= activity.description.html_safe %></div>
<div class="homepagePostSetting" id="act-<%=user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<!--<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(<%#=activity.comments_count %></div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
</div>
</div>
<%#= render :partial => 'course_news_reply',:locals => { :contest => @contest, :journals => @jour, :state => false}%>
<div class="homepagePostReplyInputContainer">
<%#= form_tag({:controller => 'comments', :action => 'create', :id => activity}, :id => "add_reply_form") do %>
<textarea id="new_reply" class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
<div class="homepagePostReplyCancel">
<a href="javascript:void(0);" class="postReplyCancel" onclick="$('#new_reply').value('');">取消</a>
</div>
<div class="homepagePostReplySubmit">
<a href="javascript:void(0);" class="postReplySubmit" onclick="$('#add_reply_form').submit();">发送</a>
</div>
<div class="cl"></div>
<%# end %>
</div>
<%# activity.comments.reorder("created_on desc").each do |comment| unless activity.comments.nil?%>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<%#= link_to image_tag(url_to_avatar(comment.author), :width => "45", :height => "45"), user_path(comment.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher">
<%# if comment.try(:author).try(:realname) == ' ' %>
<%#= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<%# else %>
<%#= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<%# end %>
<%#=format_date(comment.created_on)%>
<%#= link_to_if_authorized_course l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => activity, :comment_id => comment},
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
&lt;!&ndash;<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>&ndash;&gt;
</div>
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%#= comment.comments.html_safe %>"><%#= comment.comments.html_safe %></div>
</div>
<div class="cl"></div>
</div>
<%# end %>
<%# end %>
</div>-->
</div>

View File

@ -0,0 +1,177 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<% if @news.commentable? %>
<div class="msg_box fl">
<h4><%= l(:label_comment_add) %></h4>
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form") do %>
<div class="box" id="news_comment">
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= kindeditor_tag :comment, '',:height=>'100',:editor_id =>'comment_editor', :placeholder=>"最多250个字"%>
</div>
<p class="mt10">
<a href="javascript:void(0)" class="grey_btn fr ml10" onclick="KindEditor.instances[0].html('');">
<%= l(:label_cancel_with_space) %>
</a>
<a href="javascript:void(0)" class="blue_btn fr" onclick="submitComment();">
<%= l(:label_comment_with_space) %>
</a>
</p>
<% end %>
</div>
<% end %>
<div class="homepagePostReplyInputContainer" id='leave-message' nhname="new_message">
<%= form_for('new_form', :method => :post,
:url => {:controller => 'words', :action => 'leave_course_message'},:html => {:id=>'leave_message_form'}) do |f|%>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<textarea class="homepagePostReplyInput" nhname="new_message_textarea" name="new_form[course_message]" placeholder="请输入回复"></textarea>
<p nhname="contentmsg"></p>
<% end %>
<div class="cl"></div>
<div>
<div class="fl" style="padding-top:5px;" nhname="toolbar_container"></div>
<a href="javascript:void(0)" class="grey_btn fr ml10 mt10" nhname="cancel_btn">取&nbsp;&nbsp;消</a>
<a href="javascript:void(0)" onclick='$("#leave_message_form").submit();' class="blue_btn fr mt10">
发送
</a>
</div>
</div>
<div class="cl"></div>
<script type="text/javascript">
$(function(){
function init_editor(params){
var editor = params.kindutil.create(params.textarea, {
resizeType : 1,minWidth:"1px",width:"100%",height:"45px",
items:['emoticons'],
afterChange:function(){//按键事件
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
},
afterCreate:function(){
var toolbar = $("div[class='ke-toolbar']",params.div_form);
$(".ke-outline>.ke-toolbar-icon",toolbar).append('表情');
params.toolbar_container.append(toolbar);
}
}).loadPlugin('paste');
return editor;
}
function nh_check_field(params){
var result=true;
if(params.content!=undefined){
if(params.content.isEmpty()){
result=false;
}
if(params.content.html()!=params.textarea.html() || params.issubmit==true){
params.textarea.html(params.content.html());
params.content.sync();
if(params.content.isEmpty()){
params.contentmsg.html('内容不能为空');
params.contentmsg.css({color:'#ff0000'});
}else{
params.contentmsg.html('填写正确');
params.contentmsg.css({color:'#008000'});
}
params.contentmsg.show();
}
}
return result;
}
function init_form(params){
params.form.submit(function(){
var flag = false;
if(params.form.attr('data-remote') != undefined ){
flag = true
}
var is_checked = nh_check_field({
issubmit:true,
content:params.editor,
contentmsg:params.contentmsg,
textarea:params.textarea
});
if(is_checked){
if(flag){
return true;
}else{
$(this)[0].submit();
return false;
}
}
return false;
});
}
function nh_reset_form(params){
params.form[0].reset();
params.textarea.empty();
if(params.editor != undefined){
params.editor.html(params.textarea.html());
}
params.contentmsg.hide();
}
KindEditor.ready(function(K){
$("a[nhname='reply_btn']").live('click',function(){
var params = {};
params.kindutil = K;
params.container = $(this).parent('div').parent('div');
params.div_form = $(">.respond-form",params.container);
params.form = $("form",params.div_form);
params.textarea = $("textarea[name='user_notes']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
params.cancel_btn = $("input[nhname='cancel_btn']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
params.cancel_btn.click(function(){
nh_reset_form(params);
});
}
params.cancel_btn.click();
toggleAndSettingWordsVal(params.div_form, params.textarea);
setTimeout(function(){
if(!params.div_form.is(':hidden')){
params.textarea.show();
params.textarea.focus();
params.textarea.hide();
}
},300);
params.textarea.data('init',1);
});
$("div[nhname='new_message']").each(function(){
var params = {};
params.kindutil = K;
params.div_form = $(this);
params.form = $("form",params.div_form);
if(params.form==undefined || params.form.length==0){
return;
}
params.textarea = $("textarea[nhname='new_message_textarea']",params.div_form);
params.contentmsg = $("p[nhname='contentmsg']",params.div_form);
params.toolbar_container = $("div[nhname='toolbar_container']",params.div_form);
if(params.textarea.data('init') == undefined){
params.editor = init_editor(params);
init_form(params);
$("a[nhname='cancel_btn']",params.div_form).click(function(){
nh_reset_form(params);
});
params.textarea.data('init',1);
}
});
});
});
</script>
<!--
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
</div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
</div>-->

View File

@ -0,0 +1,46 @@
<%# has_commit = has_commit_poll?(activity.id ,User.current)%>
<% poll_name = activity.polls_name.empty? ? l(:label_poll_new) : activity.polls_name%>
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo" style="word-break:break-all;">
<% if activity.try(:user).try(:realname) == ' ' %>
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
</div>
<div class="homepagePostTitle" style="word-break:break-all;">
<%#= link_to activity.polls_name.to_s+"(问卷名称)", %>
<%# if has_commit %>
<%#= link_to poll_name, poll_result_poll_path(activity.id), :class => "polls_title polls_title_w fl c_dblue"%>
<%# else %>
<%= link_to poll_name+"(问卷名称)", poll_path(activity.id), :class => "postGrey"%>
<%# end %>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>
</div>
<div class="homepagePostIntro" style="word-break:break-all;">(问卷描述)<%=activity.polls_description.to_s%></div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目附件</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目创建</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理文档名称</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,120 @@
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo" style="word-break:break-all;">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %> TO
<%= link_to activity.project.name.to_s+"(项目名称)", project_path(activity.project), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
</div>
<div class="homepagePostTitle" style="word-break:break-all;">
<%= link_to activity.subject.to_s+"(缺陷标题)", issue_path(activity), :class => "postGrey", :style=>"word-break:break-all" %>
<span class="homepagePostProjectState"><%=activity.status.name %></span>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo">指派给&nbsp;&nbsp;
<% unless activity.assigned_to_id.nil? %>
<% if activity.try(:assigned_to).try(:realname) == ' ' %>
<%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %>
<% end %>
<% end %>
</div>
<div class="homepagePostDeadline">时间:<%=format_date(activity.created_on) %></div>
</div>
<div class="homepagePostIntro" style="word-break:break-all;">(缺陷描述)<%=activity.description.html_safe %></div>
<div class="mt10" style="font-weight:normal;">
<% if activity.attachments.any? %>
<% activity.attachments.each do |attachment| %>
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">
<span title="<%= attachment.filename %>" id="attachment_">
<%= link_to_short_attachment attachment, :class => 'homepagePostFileAtt newsBlue', :download => true -%>
</span>
<% if attachment.is_text? %>
<%= link_to image_tag('magnifier.png'),
:controller => 'attachments',
:action => 'show',
:id => attachment,
:filename => attachment.filename %>
<% end %>
<span class="postAttSize">(
<%= number_to_human_size attachment.filesize %>)
</span>
</div>
<% end %>
<% end %>
</div>
<!--<div class="mt10">
<a href="javascript:void(0);" class="homepagePostFileAtt newsBlue">文件附件.zip</a><span class="postAttSize">(123KB)</span>
</div>
<div>
<a href="javascript:void(0);" class="homepagePostImageAtt newsBlue">图片附件.png</a><span class="postAttSize">(123KB)</span>
</div>-->
<div class="homepagePostSetting" id="act-<%=user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<!--<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(<%#=activity.journals.count %></div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
</div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<%# activity.journals.reorder("created_on desc").each do |reply| unless activity.journals.nil?%>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<%#= link_to image_tag(url_to_avatar(reply.user), :width => "45", :height => "45"), user_path(reply.user_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher">
<%# if reply.try(:user).try(:realname) == ' ' %>
<%#= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<%# else %>
<%#= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<%# end %>
<%#= format_date(reply.created_on) %>
#&lt;!&ndash;<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>&ndash;&gt;
</div>
<%# if reply.details.any? %>
<%# details_to_strings(reply.details).each do |string| %>
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%#=string %></div>
<%# end %>
<%# else %>
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"><%#=reply.notes.html_safe %></div>
<%# end %>
</div>
<div class="cl"></div>
</div>
<%# end %>
<%# end %>
</div>-->
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目日志</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,96 @@
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo" style="word-break:break-all;">
<% if activity.try(:author).try(:realname) == ' ' %>
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% else %>
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
<% end %>
TO
<%= link_to activity.project.name.to_s+"(项目讨论区)", project_path(activity.project), :class => "newsBlue ml15 mr5", :style=>"word-break:break-all"%>
<!--<a href="javascript:void(0);" class="newsBlue ml15 mr5"><%= activity.project.name %>(项目讨论区)</a>-->
</div>
<div class="homepagePostTitle" style="word-break:break-all;">
<% if activity.parent_id.nil? %>
<%= link_to activity.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all" %>
<% else %>
<%= link_to activity.parent.subject.to_s.html_safe+"(帖子标题)", project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey", :style=>"word-break:break-all"%>
<% end %>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
</div>
<div class="homepagePostIntro" style="word-break:break-all">(描述)<%= activity.content.html_safe %></div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<!--<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(
<%# if activity.parent_id.nil? %>
<%#=activity.replies_count %>
<%# else %>
<%#=activity.parent.replies_count %>
<%# end %></div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a>
</div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a>
</div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a>
</div>
<div class="cl"></div>
</div>
<%# activity= activity.parent_id.nil? ? activity:activity.parent%>
<%# activity.children.reorder("created_on desc").each do |reply| unless activity.children.nil?%>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<%#= link_to image_tag(url_to_avatar(reply.author), :width => "45", :height => "45"), user_path(reply.author_id), :alt => "用户头像" %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher">
<%# if reply.try(:author).try(:realname) == ' ' %>
<%#= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<%# else %>
<%#= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<%# end %>
<%#= format_date(reply.created_on) %>
<%#= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => 'replyGrey fr ml10'
) if reply.course_destroyable_by?(User.current) %>
# &lt;!&ndash;<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>&ndash;&gt;
</div>
<div class="homepagePostReplyContent" style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title="<%#= reply.content.html_safe %>"><%#= reply.content.html_safe %></div>
</div>
<div class="cl"></div>
</div>
<%# end %>
<%# end %>
</div>-->
</div>

View File

@ -0,0 +1,29 @@
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理项目新闻</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -0,0 +1,46 @@
<% user_activities.each do |user_activity|
unless user_activities.nil? %>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity =>user_activity} %>
<% when 'News' %>
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity =>user_activity} %>
<% when 'Message'%>
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'Course'%>
<%#= render :partial => 'course_create', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'Attachment' %>
<%#= render :partial => 'course_attachment', :locals => {:activity => act, :user_activity => user_activity} %>
<%# when 'JournalsForMessage' %>
<%#= render :partial => 'course_journalsformessage', :locals => {:activity => act, :user_activity => user_activity} %>
<% when 'Poll' %>
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity => user_activity} %>
<% end %>
<% end %>
<% when 'Project' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'Issue' %>
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
<% when 'Message' %>
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'Journal' %>
<%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'News' %>
<%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'Document' %>
<%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'Attachment' %>
<%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
<%# when 'ProjectCreateInfo' %>
<%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<input type="hidden" value="<%= page%>" id="show_more_activities" />

View File

@ -1,3 +1,5 @@
<% unless list.nil?%>
<% for item in list %>
<div class="courses_list line" id="fans_item_<%=item.id%>">
<div class="courses_list_pic fl">
<a href="<%= user_path(item) %>">
@ -39,12 +41,15 @@
</tr></tbody></table>
</div>
</div>
<!-- 如果只有自己的关注页面才能关注人 取消关注操作,那么还要加 一句&& User.current.id == target.id-->
<% if(User.current.logged? && User.current != item )%>
<%if(item.watched_by?(User.current))%>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id) %>" class="grey_n_btn fr mt20" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="grey_n_btn fr mt20" data-method="delete" data-remote="true" title="取消关注">取消关注</a>
<% else %>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id) %>" class="blue_n_btn fr mt20" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<a href="<%= watch_path(:object_type=>'user',:object_id=>item.id,:target_id=>target.id,:action_name=>action_name,:page=>page) %>" class="blue_n_btn fr mt20" data-method="post" data-remote="true" title="添加关注">添加关注</a>
<% end %>
<% end %>
<div class="cl"></div>
</div>
<% end %>
<% end %>

View File

@ -0,0 +1,53 @@
<div class="mt10">
<span id="attachments_fields" class="attachments_fields">
<% if defined?(container) && container && container.saved_attachments %>
<% container.attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename link_file', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
<span id="attachments_p<%= i %>">
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'filename readonly', :readonly=>'readonly')%>
<%= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 254, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<span class="ispublic-label"><%= l(:field_is_public)%>:</span>
<%= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false,:class => 'is_public')%>
<%= link_to('&nbsp;'.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') unless attachment.id.nil? %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
</span>
<% end %>
<% end %>
</span>
<%= file_field_tag 'attachments[dummy][file]',
:id => '_file',
:class => ie8? ? '' : 'file_selector',
:multiple => true,
:onchange => 'addInputFiles(this);',
:style => ie8? ? '' : 'display:none',
:data => {
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
:upload_path => uploads_path(:format => 'js',:project =>nil),
:description_placeholder => l(:label_optional_description),
:field_is_public => l(:field_is_public),
:are_you_sure => l(:text_are_you_sure),
:file_count => l(:label_file_count),
:delete_all_files => l(:text_are_you_sure_all)
} %>
</div>
<div class="cl"></div>
<div class="mt5 fl">
<a href="javascript:void(0);" class="AnnexBtn fl mt3" onclick="$('#_file').click();">上传附件</a>
<!--<a href="javascript:void(0);" class="FilesBtn fl mr15 mt3">资源库</a>-->
</div>
<% content_for :header_tags do %>
<%= javascript_include_tag 'attachments' %>
<% end %>

View File

@ -0,0 +1,42 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<div class="HomeWorkCon">
<div class="mt15">
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox W700" maxlength="255" onkeyup="regex_homework_name();" placeholder="请输入作业标题" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red mt5"></p>
</div>
<div class="cl"></div>
<div class=" mt10">
<a href="javascript:void(0);" class="BlueCirBtn fl mr10">导入作业</a>
<div class="calendar_div fl">
<input type="text" name="homework_common[end_time]" id="homework_end_time" placeholder="截止日期" class="InputBox fl W120 calendar_input" readonly="readonly" value="<%= homework.end_time || (Time.now + 3600 * 24).strftime('%Y-%m-%d')%>" >
<%= calendar_for('homework_end_time')%>
</div>
</div>
<div class="cl"></div>
<div class="mt10">
<% if edit_mode %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px",:owner_id => homework.id,:owner_type =>OwnerTypeHelper::HOMEWORKCOMMON %>
<% else %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :description,:editor_id => 'homework_description_editor',:height => "150px" %>
<% end %>
</div>
<div class="cl"></div>
<div class="mt10">
<!--<input type="text" class="InputBox W700 SearchIcon" placeholder="发送到课程" />-->
<%= select_tag :course_id,options_for_select(get_as_teacher_courses(User.current),homework.course_id), {:class => "InputBox W700 SearchIcon"} %>
</div>
<div class="cl"></div>
<%= render :partial => 'users/user_homework_attachment', :locals => { :container => homework } %>
<div class="mt5 fr">
<a href="javascript:void(0);" class="BlueCirBtnMini fr" onclick=" submit_homework('new_homework_common');">发送</a>
<span class="fr mr10 mt3">或</span>
<a href="javascript:void(0);" class=" fr mr10 mt3">取消</a>
</div>
</div>
<div class="cl"></div>

View File

@ -0,0 +1,56 @@
<% homework_commons.each do |homework_common|%>
<% is_teacher = User.current.allowed_to?(:as_teacher,homework_common.course) %>
<div class="HomeWork mb10">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<%=link_to image_tag(url_to_avatar(homework_common.user),width:"90px", height: "90px"), user_activities_path(homework_common.user.id)%>
</div>
<div class="homepagePostDes">
<div class="homepagePostTo">
<%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%>
TO
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
</div>
<div class="homepagePostTitle">
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit">
<%= user_for_homework_common homework_common,is_teacher %>
</div>
<div class="homepagePostDeadline">
<%= l(:label_end_time)%><%= homework_common.end_time%>
</div>
</div>
<div class="homepagePostIntro upload_img break_word">
<%= homework_common.description.html_safe %>
</div>
<div class="mt10">
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
<div class="cl"></div>
</div>
<%# if is_teacher%>
<% if false%>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= link_to l(:button_edit),edit_homework_common_path(homework_common), :class => "postOptionLink"%>
</li>
<li>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
</li>
</ul>
</li>
</ul>
</div>
<% end%>
</div>
<div class="cl"></div>
</div>
</div><!----HomeWork end-->
<% end%>
<input type="hidden" value="<%= page%>" id="user_show_more_homework" />

View File

@ -28,14 +28,14 @@
<td rowspan="2">
</td>
<td rowspan="2" >
<div class="project-search" style="float: right">
<!--label for="user_browse_label"><%#= l(:label_user_search_type) %></label-->
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]],@search_by), :onchange => "searchByChange();",:style=>'display:none;' ) %>
<%= text_field_tag 'name', params[:name], :size => 30, :placeholder=>'昵称/姓名/邮箱' %>
<input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div>
<!--<div class="project-search" style="float: right">-->
<!--&lt;!&ndash;label for="user_browse_label"><%#= l(:label_user_search_type) %></label&ndash;&gt;-->
<!--<%#= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]],@search_by), :onchange => "searchByChange();",:style=>'display:none;' ) %>-->
<!--<%#= text_field_tag 'name', params[:name], :size => 30, :placeholder=>'昵称/姓名/邮箱' %>-->
<!--<input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">-->
<!--<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>-->
<!--<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>-->
<!--</div> -->
</td>
</tr>
<tr>

View File

@ -1,3 +1,20 @@
<script type="text/javascript">
var scrollHandler = function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
$.get(
'<%= user_activities_path(@user.id)%>',
{ page : $("#show_more_activities").val(),
type: $("#user_activities_type").val()},
function (data) {
}
);
}
};
$(window).scroll(scrollHandler);
</script>
<input type="hidden" value="<%= @type%>" id="user_activities_type">
<div class="resources">
<div class="homepageRightBanner">
<div class="NewsBannerName">最新动态</div>
@ -7,215 +24,35 @@
<li>
<ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</li>
<li><a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>
<li><%= link_to "作业动态", {:controller => "users", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
<!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li>
<li><%= link_to "通知动态", {:controller => "users", :action => "show", :type => "course_news"}, :class => "homepagePostTypeNotice postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>-->
<li><%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "course_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<li><%= link_to "问卷动态", {:controller => "users", :action => "show", :type => "course_poll"}, :class => "homepagePostTypeQuiz postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<li class="f14">项目动态</li>
<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
<li><%= link_to "问题动态", {:controller => "users", :action => "show", :type => "project_issue"}, :class => "homepagePostTypeQuestion postTypeGrey"%>
<li><%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "project_message"}, :class => "homepagePostTypeForum postTypeGrey"%>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<li class="f14">更多</li>
<li><%= link_to "全部动态", {:controller => "users", :action => "show", :type => nil}, :class =>"homepagePostTypeAssignment postTypeGrey"%>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="homepagePostBrief">
<div class="homepagePostPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像" /></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle"><a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理作业名称</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复5</div>
<div class="homepagePostReplyBannerTime">2015-07-28</div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a> 2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a> 2015-08-02<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
<div class="homepagePostReplyInputContainer2">
<textarea class="homepagePostReplyInput2" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer2 mb10">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr15 f14">尹教授</a><span class="f14">回复</span><a href="javascript:void(0);" class="newsBlue mr10 ml15 f14">Tang学生</a>刚刚<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">回答非常好!</div>
</div>
<div class="cl"></div>
</div>
</div>
</div>
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像" /></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <a href="javascript:void(0);" class="newsBlue ml15 mr5">黄井泉</a><span class="c_blue"></span><a href="javascript:void(0);" class="newsBlue ml5">陈正东</a></div>
<div class="homepagePostTitle"><a href="javascript:void(0);" class="postGrey">假期开心吗?(讨论区内容)</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间2015-07-31</div>
</div>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复5</div>
<div class="homepagePostReplyBannerTime">2015-07-31</div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">黄井泉 学生</a> 2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">很开心!</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">陈正东 学生</a> 2015-08-02<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">假期好热,没出去。</div>
</div>
<div class="cl"></div>
</div>
</div>
</div>
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像" /></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO <a href="javascript:void(0);" class="newsBlue ml15">Trustie Forge项目名称</a></div>
<div class="homepagePostTitle"><a href="javascript:void(0);" class="postGrey">上传资源未显示在项目动态中(缺陷标题)</a><span class="homepagePostProjectState">正常</span></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo">指派给&nbsp;&nbsp;<a href="javascript:void(0);" class="newsBlue mr15">苏稳</a></div>
<div class="homepagePostDeadline">时间2015-08-20</div>
</div>
<div class="homepagePostIntro">缺陷描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="mt10"><a href="javascript:void(0);" class="homepagePostFileAtt newsBlue">文件附件.zip</a><span class="postAttSize">(123KB)</span></div>
<div><a href="javascript:void(0);" class="homepagePostImageAtt newsBlue">图片附件.png</a><span class="postAttSize">(123KB)</span></div>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复5</div>
<div class="homepagePostReplyBannerTime">2015-07-26</div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a> 2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a> 2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
</div>
<div class="cl"></div>
</div>
</div>
</div>
<!-- 美化设置,勿删! -->
<div id="RSide" class="rside_back">
</div>
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities,:page => @page} %>

View File

@ -0,0 +1,4 @@
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page} )%>");
<% if @user_activities.count < 10%>
$(window).off("scroll", scrollHandler);
<% end%>

View File

@ -0,0 +1,279 @@
<div class="resources">
<div class="homepageRightBanner">
<div class="NewsBannerName">最新动态</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType">
<li>
<ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</li>
<li><a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<li class="f14">项目动态</li>
<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="homepagePostBrief" onmouseover="$('.homepagePostSetting').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理作业名称</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<div class="resources mt15">
<div class="homepagePostBrief" onmouseover="$('.homepagePostSetting').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理作业名称</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交10</a></div>
<div class="homepagePostDeadline">截止时间2015-08-20</div>
</div>
<div class="homepagePostIntro">作业描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="homepagePostSetting" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<!-- <div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复5</div>
<div class="homepagePostReplyBannerTime">2015-07-28</div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a> 2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a> 2015-08-02<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
<div class="homepagePostReplyInputContainer2">
<textarea class="homepagePostReplyInput2" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer2 mb10">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait"><a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像" /></a></div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr15 f14">尹教授</a><span class="f14">回复</span><a href="javascript:void(0);" class="newsBlue mr10 ml15 f14">Tang学生</a>刚刚<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><a href="javascript:void(0);" class="newsBlue fr">回复</a></div>
<div class="homepagePostReplyContent">回答非常好!</div>
</div>
<div class="cl"></div>
</div>
</div>-->
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15 mr5">黄井泉</a><span class="c_blue"></span><a href="javascript:void(0);" class="newsBlue ml5">陈正东</a>
</div>
<div class="homepagePostTitle"><a href="javascript:void(0);" class="postGrey">假期开心吗?(讨论区内容)</a></div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostDeadline">时间2015-07-31</div>
</div>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复5</div>
<div class="homepagePostReplyBannerTime">2015-07-31</div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">黄井泉 学生</a>
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
</div>
<div class="homepagePostReplyContent">很开心!</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer borderBottomNone">
<div class="homepagePostReplyPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">陈正东 学生</a>
2015-08-02<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
</div>
<div class="homepagePostReplyContent">假期好热,没出去。</div>
</div>
<div class="cl"></div>
</div>
</div>
</div>
<div class="resources mt15">
<div class="homepagePostBrief">
<div class="homepagePostPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
<div class="homepagePostDes">
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
<a href="javascript:void(0);" class="newsBlue ml15">Trustie Forge项目名称</a></div>
<div class="homepagePostTitle">
<a href="javascript:void(0);" class="postGrey">上传资源未显示在项目动态中(缺陷标题)</a><span class="homepagePostProjectState">正常</span>
</div>
<div class="homepagePostSubmitContainer">
<div class="homepagePostAssignTo">指派给&nbsp;&nbsp;<a href="javascript:void(0);" class="newsBlue mr15">苏稳</a>
</div>
<div class="homepagePostDeadline">时间2015-08-20</div>
</div>
<div class="homepagePostIntro">缺陷描述系统中有多个ckeditor且每个ckeditor的id未知怎么样做到当光标聚焦某个ckeditor的文本框中该编辑器的默认值应自动消失的处理网络拓扑图开发</div>
<div class="mt10">
<a href="javascript:void(0);" class="homepagePostFileAtt newsBlue">文件附件.zip</a><span class="postAttSize">(123KB)</span>
</div>
<div>
<a href="javascript:void(0);" class="homepagePostImageAtt newsBlue">图片附件.png</a><span class="postAttSize">(123KB)</span>
</div>
<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复5</div>
<div class="homepagePostReplyBannerTime">2015-07-26</div>
<div class="homepagePostReplyBannerMore"><a href="javascript:void(0);" class="replyGrey">点击展开更多回复</a></div>
</div>
<div class="homepagePostReplyInputContainer">
<textarea class="homepagePostReplyInput" placeholder="请输入回复"></textarea>
</div>
<div class="homepagePostReplyInputContainer">
<div class="homepagePostReplyEmotion"><a href="javascript:void(0);" class="replyGrey">表情</a></div>
<div class="homepagePostReplyCancel"><a href="javascript:void(0);" class="postReplyCancel">取消</a></div>
<div class="homepagePostReplySubmit"><a href="javascript:void(0);" class="postReplySubmit">发送</a></div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">尹教授</a>
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
</div>
<div class="homepagePostReplyContent">请大家说下软件工程是什么!</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReplyContainer">
<div class="homepagePostReplyPortrait">
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="45" height="45" alt="用户头像"/></a>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="javascript:void(0);" class="newsBlue mr10 f14">Tang 学生</a>
2015-08-01<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a><!--<a href="javascript:void(0);" class="newsBlue fr">回复</a>-->
</div>
<div class="homepagePostReplyContent">软件工程是一门研究用工程化方法构建和维护有效的、实用的和高质量的软件的学科。它涉及程序设计语言、数据库、软件开发工具、系统平台、标准、设计模式等方面。</div>
</div>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -1,4 +1,9 @@
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'users/show_new_score') %>');
showModal('ajax-modal', '400px');
$('#ajax-modal').siblings().show();
$('#ajax-modal').addClass('new-watcher');
$('#ajax-modal').css('height','auto');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='javascript:void(0)' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
//$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","30%").css("left","35%");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -1,16 +0,0 @@
<% for item in @list %>
<div class="home_courses_list fl" nhname="rec" data-id="<%= item.id %>" data-time="<%= item.updated_at %>">
<div class="courses_list_pic fl ml10 mr10">
<a href="<%= url_for(:controller => 'courses', :action=>"show", :id=>item.id, :host=>Setting.host_course) %>"><%= image_tag(url_to_avatar(item), :style => 'width:64px;height:64px;') %></a>
</div>
<span class="fl" style="width:260px;">
<a href="<%= url_for(:controller => 'courses', :action=>"show", :id=>item.id, :host=>Setting.host_course) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %></a>
</span>
<div class="fl c_dgrey">
<p>主讲老师:<a href="<%= user_path(item.teacher) %>" title="<%= item.teacher.show_name %>"><%= item.teacher.show_name %></a></p>
<p>课程作业:<a href="<%=url_for(:controller => 'homework_common', :action => 'index',:course=>item.id, :host=>Setting.host_course)%>"><%= item.homework_commons.count %></a> <span class="ml10"></span>学生:<a href="<%= url_for(:controller => 'courses', :action=>"member", :id=>item.id,:role=>2, :host=>Setting.host_course) %>"><%= studentCount(item) %></a></p>
</div>
<div class="cl"></div>
</div>
<% end %>

View File

@ -0,0 +1 @@
$("#user_show_more_course").replaceWith("<%= escape_javascript( render :partial => 'layouts/user_courses',:locals => {:courses => @courses,:user => @user, :page => @page} )%>");

View File

@ -1,25 +1,35 @@
<div id="RSide" class="fl">
<div class="courses_box">
<!--<div id="RSide" class="fl">-->
<script>
function addWatch(){
}
function cancelWatch(){
}
</script>
<div class="courses_box" id="users_setting">
<div class="courses_top mb10" id="<%= (@action == 'fans' || @action == 'visitor' ) ? 'nh_fans_list' : 'nh_wacth_list' %>">
<% if @action == 'fans' %>
<h2 class="courses_h2 fl">粉丝</h2>
<div class="courses_select fr">共有<span class="c_orange" nh_name="fans_count"><%=@obj_count%></span>名粉丝</div>
<div class="courses_select fr">共有<span class="c_orange" nh_name="fans_count" id="fans_span"><%=@obj_count%></span>名粉丝</div>
<% elsif @action == 'visitor' %>
<h2 class="courses_h2 fl">访客</h2>
<div class="courses_select fr">共有<span class="c_orange"><%=@obj_count%></span>访客</div>
<% else %>
<h2 class="courses_h2 fl">关注</h2>
<div class="courses_select fr">一共关注<span class="c_orange" nh_name="watcher_count"><%=@obj_count%></span>人</div>
<div class="courses_select fr">一共关注<span class="c_orange" nh_name="watcher_count" id="watch_span"><%=@obj_count%></span>人</div>
<% end %>
<div class="cl"></div>
</div>
<% for item in @list %>
<%= render :partial => 'users/user_fans_item', :locals => {:item => item,:target=>@user} %>
<% end %>
<div id="users_list">
<%# for item in @list %>
<%= render :partial => 'users/user_fans_item', :locals => {:list => @list,:target=>@user,:action_name=>@action,:page=>params[:page]} %>
<%# end %>
</div>
<p id="nodata" class="nodata" style="display:<%= @list.count > 0 ? 'none' : 'block' %>;"><%= l(:label_no_data) %></p>
</div>
<ul class="wlist" style=" border:none;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>
</div>
<!--</div>-->

View File

@ -1,9 +1,37 @@
<!-- added by fq -->u
<!--huang-->
<% if @user.user_extensions.identity == 0 %>
<%= render :partial => 'my_create_homework' %>
<% else %>
<%= render :partial => 'my_homework' %>
<% end %>
<script type="text/javascript">
var scrollHandler = function(){
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
$.get(
'<%= user_homeworks_user_path(User.current.id)%>',
{ page : $("#user_show_more_homework").val()},
function (data) {
}
);
}
};
$(window).scroll(scrollHandler);
</script>
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
<!-- 老师身份才可以发布作业 -->
<div class="HomeWork mb10">
<div class="RightBanner">
<div class="NewsBannerName">发布作业</div>
</div>
<% homework = HomeworkCommon.new %>
<%= labelled_form_for homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
<%= render :partial => 'users/user_homework_form', :locals => { :homework => homework,:f => f,:edit_mode => false } %>
<% end%>
</div><!----HomeWork end-->
<%else%>
<div class="resources mb10">
<div class="homepageRightBanner">
<div class="NewsBannerName">作业</div>
</div>
</div>
<div class="cl"></div>
<% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>

View File

@ -0,0 +1,4 @@
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page} )%>");
<% if @homework_commons.count < 10%>
$(window).off("scroll", scrollHandler);
<% end%>

View File

@ -5,25 +5,25 @@
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="newsType">
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "全部",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user} %></a></li>
<li><%= link_to "全部",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user}, :class => "resourcesGrey" %></li>
<%# 课程相关消息 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作业消息",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'homework'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程讨论区",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_message'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程通知",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_news'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "通知回复",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_news_reply'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程问卷",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'poll'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作品评阅",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'works_reviewers'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作品讨论",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'works_reply'} %></a></li>
<li><%= link_to "作业消息",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'homework'}, :class => "resourcesGrey" %></li>
<li><%= link_to "课程讨论区",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_message'}, :class => "resourcesGrey" %></li>
<li><%= link_to "课程通知",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_news'}, :class => "resourcesGrey" %></li>
<li><%= link_to "通知回复",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'course_news_reply'}, :class => "resourcesGrey" %></li>
<li><%= link_to "课程问卷",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'poll'}, :class => "resourcesGrey" %></a></li>
<li><%= link_to "作品评阅",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'works_reviewers'}, :class => "resourcesGrey" %></li>
<li><%= link_to "作品讨论",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'works_reply'}, :class => "resourcesGrey" %></li>
<%# 项目相关消息 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "指派问题",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "问题更新",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue_update'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "项目讨论区",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_message'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "项目新闻",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_news'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "新闻回复",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_news_reply'} %></a></li>
<li><%= link_to "指派问题",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue'}, :class => "resourcesGrey" %></li>
<li><%= link_to "问题更新",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'issue_update'}, :class => "resourcesGrey" %></li>
<li><%= link_to "项目讨论区",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_message'}, :class => "resourcesGrey" %></li>
<li><%= link_to "项目新闻",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_news'}, :class => "resourcesGrey" %></li>
<li><%= link_to "新闻回复",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forge_news_reply'}, :class => "resourcesGrey" %></li>
<%# 项目相关消息 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "贴吧帖子",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forum'} %></a></li>
<li><%= link_to "贴吧帖子",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'forum'}, :class => "resourcesGrey" %></li>
<%# 系统贴吧 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "用户留言",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'user_feedback'} %></a></li>
<li><%= link_to "用户留言",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user, :type => 'user_feedback'}, :class => "resourcesGrey" %></li>
</ul>
</li>
@ -51,7 +51,7 @@
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了通知</li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知</li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
@ -106,17 +106,19 @@
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评阅了作品</li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.status == 0 ? "评阅了作品" : "重新评阅了作品" %></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to "#{ma.course_message.comment.nil? ? "分数:"+ma.course_message.score.to_s : "分数:"+ma.course_message.score.to_s + "----" + "评语:" + ma.course_message.comment}", student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.comment}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_at).html_safe %> </li>
<% unless ma.content.nil? %>
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.content.html_safe}" %></a></li>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了作品</li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了作品评论</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.notes}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>

View File

@ -1,267 +0,0 @@
<div class="homepageRight">
<div class="resources">
<div class="homepageRightBanner">
<div class="NewsBannerName">消息</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="newsType">
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "全部",{:controller=> 'users', :action => 'user_messages', id: User.current.id, host: Setting.host_user} %></a></li>
<%# 课程相关消息 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作业消息",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'homework'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程讨论区",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'course_message'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程通知",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'course_news'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "通知回复",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'course_news_reply'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "课程问卷",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'poll'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作品评阅",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'works_reviewers'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "作品讨论",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'works_reply'} %></a></li>
<%# 项目相关消息 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "指派给我",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'issue'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "更新了问题",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'issue_update'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "项目讨论区",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'forge_message'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "项目新闻",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'forge_news'} %></a></li>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "新闻回复",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'forge_news_reply'} %></a></li>
<%# 项目相关消息 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "贴吧帖子",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'forum'} %></a></li>
<%# 系统贴吧 %>
<li><a href="javascript:void(0);" class="resourcesGrey"><%= link_to "用户留言",{:controller=> 'users', :action => 'user_messages_new', id: User.current.id, host: Setting.host_user, :type => 'user_feedback'} %></a></li>
</ul>
</li>
</ul>
</div>
<% if params[:type].nil? %>
<div class="newsReadSetting">
有&nbsp;<span class="c_red">8</span>&nbsp;封未读<a href="javascript:void(0);" class="ml15">全部设为已读</a>
</div>
<% end %>
<div>
<% if @new_message_count >0 %>
<%# 课程消息 %>
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
<% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布通知</li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:title => "#{ma.course_message.title}" %></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复了通知</li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:title => "#{ma.course_message.comments.html_safe}" %></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></a></li>
<li class="homepageNewsType fl">发布作业</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),:class => "newsGrey", :title => "#{ma.course_message.name}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Poll" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></a></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布问卷</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_index_path(:polls_type => "Course", :polls_group_id => ma.course_id),
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.course_message.polls_name}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue" %></li>
<% if ma.course_message.parent_id.nil? %>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布帖子</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%=link_to ma.course_message.subject.html_safe, course_boards_path(ma.course_message.course,:parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id,
:topic_id => ma.course_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.course_message.subject.html_safe}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
<% else %>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">回复帖子</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%=link_to ma.course_message.subject.html_safe, course_boards_path(ma.course_message.course,:parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id,
:topic_id => ma.course_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.course_message.subject.html_safe}" %> </a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
<% end %>
</ul>
<% end %>
<% if ma.course_message_type == "StudentWorksScore" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></li>
<li class="homepageNewsType fl">评阅了作品</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to "#{ma.course_message.comment.nil? ? "分数:"+ma.course_message.score.to_s : "分数:"+ma.course_message.score.to_s + "----" + "评语:" + ma.course_message.comment}", student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.comment}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue" %></li>
<li class="homepageNewsType fl">回复了作品</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id),:class=>"newsGrey",:title => "#{ma.course_message.notes}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.course_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--项目消息-->
<% if ma.class == ForgeMessage %>
<% if ma.forge_message_type == "Issue" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30") %></a>
</li>
<li class="homepageNewsPublisher fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
</li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">指派问题给我</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject.html_safe, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",:title => "#{ma.forge_message.subject.html_safe}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Journal" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30") %></a>
</li>
<li class="homepageNewsPublisher fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue" %>
</li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
更新了问题
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to get_issue_des_update(ma.forge_message),
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:title => "#{get_issue_des_update(ma.forge_message)}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %></li>
<li class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布帖子" : "回复帖子" %></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%=link_to ma.forge_message.subject.html_safe, project_boards_path(ma.forge_message.project,
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30") %></a>
</li>
<li class="homepageNewsPublisher fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %>
</li>
<li class="homepageNewsType fl">发布新闻</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id}, :class => "newsGrey", :title => "#{ma.forge_message.title.html_safe}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30") %></a></li>
<li class="homepageNewsPublisher fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue" %></li>
<li class="homepageNewsType fl">回复了新闻</li>
<li class="homepageNewsContent fl">
<%= link_to "#{ma.forge_message.comments.html_safe}",
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%></li>
<li class="homepageNewsTime fl"><%= time_tag(ma.forge_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--公共贴吧-->
<% if ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30") %></a>
</li>
<li class="homepageNewsPublisher fl">
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue" %>
</li>
<li class="homepageNewsType fl" ><%= ma.memo.parent_id.nil? ? "新建贴吧帖子" : "回复贴吧帖子" %></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id),:class => "newsGrey" , :title => "#{ma.memo.content.html_safe}" %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--用户留言-->
<% if ma.class == UserFeedbackMessage %>
<% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30") %></a>
</li>
<li class="homepageNewsPublisher fl">
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue" %>
</li>
<li class="homepageNewsType fl"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了" : "回复了你的留言" %></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class => "newsGrey", :title => "#{ma.journals_for_message.notes}".html_safe %></a>
</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% end %>
<% end %>
<!--项目消息-->
<% else %>
<div class="flash notice">暂无消息!</div>
<% end %>
<div class="cl"></div>
</div>
</div>
</div>

View File

@ -1,16 +1,33 @@
<div class="top_new">
<span class="<%= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>
<% if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>
<a href="<%= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>
<% end %>
<div class="cl"></div>
</div>
<!--<div class="top_new">-->
<!--<span class="<%#= (@user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true)) ? 'top_new_bg' : 'top_newcourses_bg'%> fl"></span>-->
<!--<%# if @user.user_extensions.identity == 0 && @user.allowed_to?(:add_course, nil, :global => true) %>-->
<!--<a href="<%#= url_for(:controller => 'courses', :action => 'new',) %>" class="green_n_btn fr mt2" target="_blank">新建课程</a>-->
<!--<%# end %>-->
<!--<div class="cl"></div>-->
<!--</div>-->
<style type="text/css">
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
div.recall_con{width:570px;}
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
.fr.cr{ clear: right}
</style>
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"user" %>
<div id="RSide" class="fl">
<!--<div id="RSide" class="fl">-->
<!--<div class="users_r_top">-->
<!--<h2 class="users_r_h2">用户留言</h2>-->
<!--</div>-->
<div id="users_setting">
<div class="homepageRightBanner">
<div class="NewsBannerName">留言</div>
</div>
<div class="message_box mb10">
<div nhname='new_message' style="display:none;">
<%= form_for('new_form',:url => leave_user_message_path(@user.id),:method => "post") do |f|%>

View File

@ -1,16 +0,0 @@
<% for item in @list %>
<div class="home_courses_list fl" nhname="rec" data-id="<%= item.id %>" data-time="<%= item.updated_on %>">
<div class="courses_list_pic fl ml10 mr10">
<a href="<%= url_for(:controller => 'projects', :action=>"show", :id=>item.id, :host=>Setting.host_name) %>"><%= image_tag(url_to_avatar(item), :style => 'width:64px;height:64px;') %></a>
</div>
<span class="fl" style="width:260px;">
<a href="<%= url_for(:controller => 'projects', :action=>"show", :id=>item.id, :host=>Setting.host_name) %>" class="home_list_title c_blue02 fl mb10" title="<%= item.name %>"><%= item.name %></a>
</span>
<div class="fl c_dgrey">
<!--<p>项目评分:<a href="<%#= url_for(:controller => 'projects', :action => 'show_projects_score', :id => item.id,:host=>Setting.host_name) %>" data-remote="true"><%#= format( "%.2f" , project_scores(item) ).to_i %></a></p>-->
<p>项目评分:<a href="<%= url_for(:controller => 'projects', :action => 'show_projects_score', :id => item.id) %>" data-remote="true"><%= format( "%.2f" , project_scores(item) ).to_i %></a></p>
<p>发布缺陷:<a href="<%= url_for(:controller => 'issues', :action=>"index", :project_id=>item.id, :host=>Setting.host_name) %>"><%= item.issues.count %></a> <span class="ml10"></span>成员:<a href="<%= url_for(:controller => 'projects', :action=>"member", :id=>item.id, :host=>Setting.host_name) %>"><%= item.members.count %></a></p>
</div>
<div class="cl"></div>
</div>
<% end %>

View File

@ -0,0 +1 @@
$("#user_show_more_project").replaceWith("<%= escape_javascript( render :partial => 'layouts/user_projects',:locals => {:projects => @projects,:user => @user, :page => @page} )%>");

View File

@ -5,10 +5,16 @@
$("#user_fans_number").html("<%= watched.first.watcher_users.count.to_s%>");
//在当前用户的粉丝、关注页面
<% elsif( params[:target_id] == User.current.id.to_s )%>
$("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.current,:action_name=>action_name,:page=>params[:page]}) %>");
$("#watch_user_number_div").html('<%= escape_javascript ( link_to User.watched_by(params[:target_id]).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>params[:target_id]},:class=>"homepageImageNumber") %>');
$("#fans_user_number_div").html('<%= escape_javascript ( link_to User.find(params[:target_id]).watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>params[:target_id]},:class=>"homepageImageNumber", :id => "user_fans_number") %>');
$("#fans_span").html('<%= count %>');
$("#watch_span").html('<%= count %>');
//在其他用户的粉丝、关注页面
<% else %>
$("#users_list").html("<%= escape_javascript (render :partial => 'users/user_fans_item', :locals => {:list => list,:target=>User.find(params[:target_id]),:action_name=>action_name,:page=>params[:page]}) %>");
//在他人的用户分析下关注,不会改变他人的关注数,所以不必要刷新
//$("#watch_user_number").html('<%#= escape_javascript ( link_to User.watched_by(params[:target_id]).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>params[:target_id]},:class=>"homepageImageNumber") %>');
<% end %>
<% else %>

View File

@ -1,5 +1,6 @@
<%hidden_non_project = Setting.find_by_name("hidden_non_project")
visiable = hidden_non_project && hidden_non_project.value == "0"%>
visiable = true #hidden_non_project && hidden_non_project.value == "0"
%>
<% unless visiable%>
<div class="linkother" style="margin-left: 30%; float: left">
<a href="http://<%= Setting.host_name%>" class="link_other_item"><%=l(:label_projects_management_platform)%></a>

View File

@ -2061,22 +2061,22 @@ zh:
lable_unset: 未设置
label_chose_group: 请选择分班
# label_hosted_organization: 主办单位
# label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
# label_sponsor: 计算机科学与技术系
# label_partners: 合作单位
# label_co_organizer_NUDT: 国防科学技术大学计算机学院
# label_co_organizer_EECS: 北京大学
# label_co_organizer_BHU: 北京航空航天大学
# label_co_organizer_CAS: 中国科学院软件研究所
# label_co_organizer_InforS: 中创软件
# label_rights_reserved: Copyright 2007~2015, All Rights Riserved
# label_about_us: 关于我们
# label_contact_us: 联系我们
# label_recruitment_information: 招聘信息
# label_surpport_group: 帮助中心
# label_forums: 论坛反馈
# label_language: 语言
# label_license: 湘ICP备09019772
label_hostedz_organization: 主办单位
label_hosted_by: 国防科学技术大学并行与分布处理国家重点实验室
label_sponsor: 计算机科学与技术系
label_partners: 合作单位
label_co_organizer_NUDT: 国防科学技术大学计算机学院
label_co_organizer_EECS: 北京大学
label_co_organizer_BHU: 北京航空航天大学
label_co_organizer_CAS: 中国科学院软件研究所
label_co_organizer_InforS: 中创软件
label_rights_reserved: Copyright 2007~2015, All Rights Riserved
label_about_us: 关于我们
label_contact_us: 联系我们
label_recruitment_information: 招聘信息
label_surpport_group: 帮助中心
label_forums: 论坛反馈
label_language: 语言
label_license: 湘ICP备09019772

View File

@ -262,6 +262,7 @@ RedmineApp::Application.routes.draw do
match 'account/heartbeat', to: 'account#heartbeat', :via => :get
match 'login', :to => 'account#login', :as => 'signin', :via => [:get, :post]
match 'logout', :to => 'account#logout', :as => 'signout', :via => [:get, :post]
match 'agreement',:to => 'account#agreement',:as => 'agreement',:via=>[:get]
match 'account/register', :via => [:get, :post], :as => 'register'
match 'account/lost_password', :via => [:get, :post], :as => 'lost_password'
match 'account/activate', :via => :get
@ -307,6 +308,7 @@ RedmineApp::Application.routes.draw do
resources :users do
collection do
match "tag_saveEx" , :via => [:get, :post]
post "user_new_homework"
end
member do
match 'user_projects_index', :to => 'users#user_projects_index', :via => :get
@ -325,7 +327,7 @@ RedmineApp::Application.routes.draw do
match 'user_visitorlist', :to => 'users#user_visitorlist', :via => :get
match 'user_homeworks', :to => 'users#user_homeworks', :via => :get
match 'watch_projects', :to => 'users#watch_projects', :via => :get
#
# added by bai
match 'show_score', :to => 'users#show_score', :via => :get
match 'topic_score_index', :to => 'users#topic_score_index', :via => [:get, :post]
@ -366,7 +368,6 @@ RedmineApp::Application.routes.draw do
match 'users/:id/user_projects', :to => 'users#user_projects', :via => :get
#消息
match 'users/:id/user_messages', :to => 'users#user_messages', :via => :get, :as => "user_message"
match 'users/:id/user_messages_new', :to => 'users#user_messages_new', :via => :get, :as => "user_messages_new"
#match 'users/:id/user_messages/:homework', :to => 'users#user_messages_homework', :via => :get, :as => "user_message_homewrok"

View File

@ -5,8 +5,8 @@ class AboutUserActivities < ActiveRecord::Migration
for i in 1 ... forge_count do i
ForgeActivity.page(i).per(30).each do |activity|
user_activity = UserActivity.new
user_activity.act_id = activity.id
user_activity.act_type = activity.class.to_s
user_activity.act_id = activity.forge_act_id
user_activity.act_type = activity.forge_act_type
user_activity.container_type = "Project"
user_activity.container_id = activity.project_id
user_activity.created_at = activity.created_at
@ -20,8 +20,8 @@ class AboutUserActivities < ActiveRecord::Migration
for i in 1 ... course_count do i
CourseActivity.page(i).per(30).each do |activity|
user_activity = UserActivity.new
user_activity.act_id = activity.id
user_activity.act_type = activity.class.to_s
user_activity.act_id = activity.course_act_id
user_activity.act_type = activity.course_act_type
user_activity.container_type = "Course"
user_activity.container_id = activity.course_id
user_activity.created_at = activity.created_at

View File

@ -0,0 +1,5 @@
class AddContentToCourseMessage < ActiveRecord::Migration
def change
add_column :course_messages, :content, :string
end
end

View File

@ -0,0 +1,5 @@
class AddStatusToCourseMessage < ActiveRecord::Migration
def change
add_column :course_messages, :status, :integer
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150824133916) do
ActiveRecord::Schema.define(:version => 20150826061843) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -374,6 +374,8 @@ ActiveRecord::Schema.define(:version => 20150824133916) do
t.integer "viewed"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "content"
t.integer "status"
end
create_table "course_statuses", :force => true do |t|
@ -572,16 +574,6 @@ ActiveRecord::Schema.define(:version => 20150824133916) do
t.datetime "updated_at", :null => false
end
create_table "forum_messages", :force => true do |t|
t.integer "user_id"
t.integer "forum_id"
t.integer "memo_message_id"
t.string "memo_message_type"
t.integer "viewed"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "forums", :force => true do |t|
t.string "name", :null => false
t.text "description"
@ -1325,6 +1317,7 @@ ActiveRecord::Schema.define(:version => 20150824133916) do
t.datetime "updated_at", :null => false
t.integer "late_penalty", :default => 0
t.integer "absence_penalty", :default => 0
t.integer "system_score"
end
create_table "student_works_evaluation_distributions", :force => true do |t|
@ -1542,7 +1535,6 @@ ActiveRecord::Schema.define(:version => 20150824133916) do
t.string "identity_url"
t.string "mail_notification", :default => "", :null => false
t.string "salt", :limit => 64
t.integer "gid"
end
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,5 +1,7 @@
$(function(){
$("#RSide").css("min-height",$("#LSide").height()-40).css("padding","10px");
//右侧最小高度 = 左侧高度 - 15px 保证两边高度基本一样,页面美观
$("#RSide").css("min-height",$("#LSide").height()-15);
$("#users_setting").css("min-height",$("#LSide").height()-35);
//头像相关
$("#homepage_portrait_image").live("mouseover",function(){
@ -9,6 +11,9 @@ $(function(){
$("#edit_user_file_btn").hide();
$("#watch_user_btn").hide();
});
//日历选择样式
//$(".ui-datepicker-trigger").replaceWith("<div class='fl DateBorder mr10'><img class='ui-datepicker-trigger'></div>")
});
//编辑个人简介
@ -29,18 +34,54 @@ function edit_user_introduction(url){
);
}
$(function(){
$(".newsType").mouseover(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
});
$(".newsType").mouseout(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
});
$(".resourcesSelected").mouseover(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
});
$(".resourcesSelected").mouseout(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
});
});
//个人动态 end
//显示更多的课程
function show_more_course(url){
$.get(
url,
{ page: $("#course_page_num").val() },
function (data) {
}
);
}
//显示更多的项目
function show_more_project(url){
$.get(
url,
{ page: $("#project_page_num").val() },
function (data) {
}
);
}
//老师提交 新建/修改 作业
function submit_homework(id)
{
if(!regex_homework_name())
{
$("#homework_name").focus();
}
else
{
homework_description_editor.sync();
$("#"+id).submit();
}
}
//验证新建作业的名字
function regex_homework_name()
{
var name = $.trim($("#homework_name").val());
if(name=="")
{
$("#homework_name_span").text("名称不能为空");
return false;
}
else
{
$("#homework_name_span").text("");
return true;
}
}

109
public/stylesheets/base.css Normal file
View File

@ -0,0 +1,109 @@
/* CSS Document */
/* 2015-06-26 */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.5;}
div,img,tr,td,table{ border:0;}
table,tr,td{border:0;cellspacing:0; cellpadding:0;}
ol,ul,li{ list-style-type:none}
a:link,a:visited{text-decoration:none;}
/*a:hover,a:active{color:#000;}*/
/*常用*/
/*#RSide{ background:#fff;}*/
/*上传图片处理*/
.navSearchTypeBox{margin-top: 32px;}
#navHomepageSearch{margin-top: 11px;background-color: white;}
.upload_img img{max-width: 100%;}
blockquote img{max-width: 100%;}
.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.none{display: none;}
.rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;}
.break_word{ word-break:break-all; word-wrap: break-word;}
select,input,textarea{ border:1px solid #64bdd9; background:#fff; color:#000; padding-left:5px; }
.sub_btn{ cursor:pointer; -moz-border-radius:3px; -webkit-border-radius:3px; border:1px solid #707070; color:#000; border-radius:3px; padding:1px 10px; background:#dbdbdb;}
.sub_btn:hover{ background:#b5e2fa; color:#000; border:1px solid #3c7fb1;}
/*table{ background:#fff;}*/
.more{ font-weight:normal; color:#999; font-size:12px;}
.no_line{ border-bottom:none;}
.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
.no_border{ border:none;background:none;}
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
.db {display:block;}
/* font & color */
.f12{font-size:12px; font-weight:normal;}
.f14{font-size:14px;}
.f16{font-size:16px;}
.f18{font-size:18px;}
.fb{font-weight:bold;}
/* Float & Clear */
.cl{ clear:both; overflow:hidden; }
.fl{float:left;display:inline;}
.fr{float:right;display:inline;}
.f_l{ float:left;}
.f_r{ float:right;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1}
.break_word{ word-break:break-all; word-wrap: break-word;}
.white_space{white-space:nowrap;}
a.c_white{ color:#fff !important;}
input.c_white { color:#fff !important;}
/* Spacing */
.ml2{ margin-left:2px;}
.ml3{ margin-left:3px;}
.ml4{ margin-left:4px;}
.ml5{ margin-left:5px;}
.ml8{ margin-left:8px;}
.ml10{ margin-left:10px;}
.ml15{ margin-left:15px;}
.ml20{ margin-left:20px;}
.ml40{ margin-left:40px;}
.ml45{ margin-left:45px;}
.ml55{ margin-left:55px;}
.ml30{ margin-left:30px;}
.ml60{ margin-left:60px;}
.ml80{ margin-left:80px;}
.ml90{ margin-left:90px;}
.ml100{ margin-left:100px;}
.ml110{ margin-left:110px;}
.ml150 { margin-left:150px;}
.mr5{ margin-right:5px;}
.mr45 {margin-right:45px;}
.mr55{ margin-right:55px;}
.mr10{ margin-right:10px;}
.mr15 {margin-right:15px;}
.mr20{ margin-right:20px;}
.mr30{ margin-right:30px;}
.mr40{ margin-right:40px;}
.mw20{ margin: 0 20px;}
.mt3{ margin-top:3px;}
.mt5{ margin-top:5px;}
.mt8{ margin-top:8px;}
.mt10{ margin-top:10px !important;}
.mt15 {margin-top:15px;}
.mb4{ margin-bottom:4px;}
.mb5{ margin-bottom:5px;}
.mb8 {margin-bottom:8px;}
.mb10{ margin-bottom:10px !important;}
.mb20{ margin-bottom:20px;}
.pl15{ padding-left:15px;}
.w20{ width:20px;}
.w60{ width:60px;}
.w70{ width:70px;}
.w90{ width:90px;}
.w210{ width:210px;}
.w150{ width:150px;}
.w280{ width:280px;}
.w430{ width:470px;}
.w520{ width:520px;}
.w543{ width:543px;}
.w557{ width:557px;}
.w583{ width:583px;}
.w350{ width:350px;}
.w610{ width:610px;}
.w600{ width:600px;}
.h22{ height:22px;}
.h26{ height:26px;}
.h50{ height:50px;}
.h70{ height:70px;}
.h150{ height:150px;}

View File

@ -0,0 +1,113 @@
/*新个人主页框架css*/
.navContainer {width:100%; background-color:#15bccf;}
.homepageContentContainer {width:100%; margin:0 auto; background-color:#eaebed;}
.homepageContent {width:1000px; background-color:#eaebed; margin:0 auto;}
.navHomepage {width:1000px; height:54px; background-color:#15bccf; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:40px;}
.navHomepageMenu {margin-right:40px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
/*.navHomepageMenu:hover {background-color:#0ea6b7;}*/
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none !important; float:left;padding: 0 0 0 5px !important; margin:0;}
.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:12px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:29px; display:block;}
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;}
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
.navHomepageProfile ul li ul {display:none;}
.navHomepageProfile ul li:hover ul {display:block;}
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;}
.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;}
.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;}
.homepagePortraitImage:hover {border:1px solid #15bccf;}
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 15px;;}
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;}
.homepageImageNumber {font-size:12px; color:#484848;}
a.homepageImageNumber:hover {color:#15bccf;}
.homepageImageText {font-size:12px; color:#888888;}
.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
a.coursesLineGrey {color:#808080; display:block;}
a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#b3e0ee;}
.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;}
.homepageMenuSetting {display:inline-block; margin-left:155px;}
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;}
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;}
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;}
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
.homepageNewsContent {width:395px; max-width:395px; margin-right:10px; font-size:12px; color:#4b4b4b; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
a.homepageWhite {color:#ffffff !important;}
a.homepageWhite:hover {color:#a1ebff !important;}
a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;}
a.replyGrey {color:#888888; display:inline-block;}
a.replyGrey:hover {color:#4b4b4b;}
a.replyGrey1 {color:#888888;}
a.replyGrey1:hover {color:#4b4b4b;}
a.newsBlue {color:#15bccf;}
a.newsBlue:hover {color:#0781b4;}
a.menuGrey {color:#808080;}
a.menuGrey:hover {color:#fe7d68;}
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
/*myctrip*/
.userImage{position:absolute; right:140px; top:5px; width:30px;height:30px; background: url(../images/item.png) 2px 4px no-repeat; line-height:1.4;}
a.topnav_login_a{color:#fff; display:inline-block;}
a.topnav_login_a:hover {color:#a1ebff;}
a.topnav_login_mes{color:#fff; width:10px;height:20px; padding-left:15px; background: url(../images/item.png) -84px -145px no-repeat; display:inline-block; vertical-align:top;}
a.topnav_login_mes:hover {color:#a1ebff;}
a.topnav_login_box{ color:#fff; font-size:14px; font-weight:bold; width:90px; display:inline-block;}
.menuArrow {background:url(../images/item.png) -20px -40px no-repeat;}
li.menuArrow:hover {background:url(../images/item.png) -20px -70px no-repeat;}
a.topnav_login_box:hover {color:#a1ebff;}
.navRow1 {margin:0; padding:0;}
.navRow2 {margin:0; padding:0;}
.topnav_login_list{ border:1px solid #15bccf; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2;margin-top: -7px;}
.topnav_login_list a{color:#15bccf;}
.topnav_login_list li{ }
/*底部*/
#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;}
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; }
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;}
.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;}
a.f_grey {color:#666666;}
a.f_grey:hover {color:#000000;}
/*注册登陆页面*/
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginSignButton:hover {background-color:#0ea6b7;}
#loginInButton:hover {background-color:#0ea6b7;}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -9,6 +9,11 @@ a:link,a:visited{color:#7f7f7f;text-decoration:none;}
a:hover,a:active{color:#000;}
/*常用*/
/*#RSide{ background:#fff;}*/
#users_setting{clear:both;width:730px;background: #fff;padding: 10px;/*滑动门的宽度*/}
/*上传图片处理*/
.upload_img img{max-width: 100%;}
blockquote img{max-width: 100%;}
.hidden{overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.none{display: none;}
.rside_back{ width:670px; margin-left:10px; background:#fff; margin-bottom:10px;}
@ -22,7 +27,7 @@ table{ background:#fff;}
.line{border-bottom:1px dashed #d4d4d4; padding-bottom:10px; margin-bottom:10px;}
.no_border{ border:none;background:none;}
.min_search{ width:150px; height:20px; border:1px solid #d0d0d0; color:#666; background:url(../images/public_icon.png) 135px -193px no-repeat; cursor:pointer;}
.db {display:block;}
/* font & color */
h2{ font-size:18px; color:#15bccf;}
h3{ font-size:14px; color:#e8770d;}
@ -70,6 +75,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.ml90{ margin-left:90px;}
.ml100{ margin-left:100px;}
.ml110{ margin-left:110px;}
.ml150 { margin-left:150px;}
.mr5{ margin-right:5px;}
.mr45 {margin-right:45px;}
.mr55{ margin-right:55px;}
@ -82,7 +88,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mt3{ margin-top:3px;}
.mt5{ margin-top:5px;}
.mt8{ margin-top:8px;}
.mt10{ margin-top:10px;}
.mt10{ margin-top:10px !important;}
.mt15 {margin-top:15px;}
.mb4{ margin-bottom:4px;}
.mb5{ margin-bottom:5px;}
@ -122,6 +128,7 @@ a.c_blue{ color:#15bccf;}
a.c_dblue{ color:#09658c;}
a:hover.c_dblue{ color:#15bccf;}
a.c_white{ color:#fff;}
input.c_white { color:#fff}
a.c_dorange{ color:#fd6e2a;}
a.c_dark{color: #3e4040;}
a:hover.c_dark{color: #3ca5c6;}
@ -228,7 +235,7 @@ a:hover.bgreen_n_btn{background:#08a384;}
#TopNav{}
#TopNav ul li{ margin-top:8px;}
.topnav_a a{ font-size:14px; font-weight:bold; color:#fff; margin-right:10px;}
.topnav_a a:hover{color: #a1ebff;;}
.topnav_a a:hover{color: #a1ebff;}
#userInfo {float:right; display:inline-block; width:130px; padding-top:5px;}
.userInfoRow2 {margin-top:-5px;}
.myPractice {display:inline-block;}
@ -284,101 +291,6 @@ a.search_btn{ display:block; background:#15bccf; color:#fff; width:60px; height:
a:hover.search_btn{ background: #0fa9bb;}
.search_text{ border:1px solid #15bccf; background:#fff; width:220px; height:25px; padding-left:5px; }
/*资源库*/
/*.resources {width:730px; background-color:#ffffff; padding:10px;}*/
/*.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}*/
/*.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;}*/
/*.resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;}*/
/*.resourcesSelected {width:25px; height:20px; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat;}*/
/*.resourcesSelected:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}*/
/*.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}*/
/*.resourcesType {width:50px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-30px; font-size:12px; color:#888888; display:none;}*/
/*a.resourcesGrey {font-size:12px; color:#888888;}*/
/*a.resourcesGrey:hover {font-size:12px; color:#15bccf;}*/
/*.resourcesBanner ul li:hover ul.resourcesType {display:block;}*/
/*ul li:hover ul {display:block;}*/
/*.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#64bdd9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}*/
/*.uploadIcon {background:url(images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:30px; height:30px; margin-left:-3px;}*/
/*a.uploadText {color:#ffffff; font-size:14px;}*/
/*.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:right; background-color:#ffffff;}*/
/*.searchResource {border:none; outline:none; background-color:#ffffff; width:184px; height:32px; padding-left:10px; display:block; float:left;}*/
/*.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;}*/
/*.resourcesSearchBanner {height:34px; margin-bottom:10px;}*/
/*.resourcesListTab {width:730px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a;}*/
/*.resourcesListCheckbox {width:40px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}*/
/*.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;}*/
/*.resourcesListName {width:135px; height:40px; line-height:40px; text-align:left;}*/
/*.resourcesListSize {width:110px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListType {width:150px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListUploader {width:130px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesListTime {width:165px; height:40px; line-height:40px; text-align:center;}*/
/*.resourcesList {width:730px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px;}*/
/*a.resourcesBlack {font-size:12px; color:#4c4c4c;}*/
/*a.resourcesBlack:hover {font-size:12px; color:#000000;}*/
/*.dropdown-menu {*/
/*position: absolute;*/
/*top: 100%;*/
/*left: 0;*/
/*z-index: 1000;*/
/*display: none;*/
/*float: left;*/
/*min-width: 80px;*/
/*padding: 5px 0;*/
/*margin: 2px 0 0;*/
/*font-size: 12px;*/
/*text-align: left;*/
/*background-color: #fff;*/
/*-webkit-background-clip: padding-box;*/
/*background-clip: padding-box;*/
/*border: 1px solid #ccc;*/
/*border-radius: 4px;*/
/*-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);*/
/*box-shadow: 0 6px 12px rgba(0, 0, 0, .175);*/
/*}*/
/*.dropdown-menu > li > a {*/
/*display: block;*/
/*padding: 3px 20px;*/
/*clear: both;*/
/*font-weight: normal;*/
/*line-height: 1.5;*/
/*color:#616060;*/
/*white-space: nowrap;*/
/*}*/
/*.dropdown-menu > li > a:hover{*/
/*color: #ffffff;*/
/*text-decoration: none;*/
/*background-color: #64bdd9;*/
/*outline:none;*/
/*}*/
/*发送资源弹窗*/
/*.resourceShareContainer {width:100%; height:100%; background:#666; filter:alpha(opacity=50); opacity:0.5; -moz-opacity:0.5; position:absolute; left:0; top:0; z-index:-999;}*/
/*.resourceSharePopup {width:300px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;}*/
/*.sendText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;}*/
/*.resourcePopupClose {width:20px; height:20px; display:inline-block; float:right;}*/
/*.resourceClose {background:url(images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block;}*/
/*.resourcesSearchBox {border:1px solid #e6e6e6; width:225px; height:25px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}*/
/*.searchResourcePopup {border:none; outline:none; background-color:#ffffff; width:184px; height:25px; padding-left:10px; display:inline-block; float:left;}*/
/*.searchIconPopup{width:31px; height:25px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -18px no-repeat; display:inline-block; float:left;}*/
/*.courseSend {width:260px; height:15px; line-height:15px; margin-bottom:10px;}*/
/*.courseSendCheckbox {padding:0px; margin:0px; width:12px; height:12px; margin-right:10px; display:inline-block; margin-top:2px;}*/
/*.sendCourseName {font-size:12px; color:#5f6060;}*/
/*.courseSendSubmit {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#64bdd9; margin-right:25px; float:left;}*/
/*.courseSendCancel {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#c1c1c1; float:left}*/
/*a.sendSourceText {font-size:14px; color:#ffffff;}*/
/*上传资源弹窗*/
/*.resourceUploadPopup {width:400px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}*/
/*.uploadText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;}*/
/*.uploadBoxContainer {height:33px; line-height:33px; margin-top:10px; position:relative;}*/
/*.uploadBox {width:100px; height:33px; line-height:33px; text-align:center; vertical-align:middle; background-color:#64bdd9; border-radius:3px; float:left; margin-right:12px;}*/
/*a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat; width:100px; height:33px;}*/
/*.chooseFile {color:#ffffff; display:block; margin-left:32px;}*/
/*.uploadResourceIntr {width:250px; height:33px; float:left; line-height:33px; font-size:12px;}*/
/*.uploadResourceName {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444; margin-bottom:2px;}*/
/*.uploadResourceIntr2 {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444;}*/
/*.uploadType {margin:10px 0; border:1px solid #e6e6e6; width:100px; height:30px; outline:none; font-size:12px; color:#888888;}*/
/*.uploadKeyword {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:280px;}*/
/*资源库*/
.resources {width:728px; background-color:#ffffff; padding:10px; border:1px solid #dddddd;float: right}
@ -431,7 +343,7 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
a.sendButtonBlue {color:#15bccf;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#15bccf;}
.db {display:block;}
.db {display:block !important;}
.dropdown-menu {
position: absolute;
@ -501,6 +413,8 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
/*.resourceSharePopup {width:300px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;}*/
.resourceSharePopup {width:300px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;}
.sendText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:100px; display:inline-block;}
.resourcesSendTo {float:left; height:20px; margin-top:15px;}
.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;}
.resourcePopupClose {width:20px; height:20px; display:inline-block; float:right;}
.resourceClose {background:url(images/resource_icon_list.png) 0px -40px no-repeat; width:20px; height:20px; display:inline-block;}
.resourcesSearchBox {border:1px solid #e6e6e6; width:225px; height:25px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
@ -509,14 +423,30 @@ a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat;
.courseSend {width:260px; height:15px; line-height:15px; margin-bottom:10px;}
.courseSendCheckbox {padding:0px; margin:0px; width:12px; height:12px; margin-right:10px; display:inline-block; margin-top:2px;}
.sendCourseName {font-size:12px; color:#5f6060;}
.courseSendSubmit {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#64bdd9; margin-right:25px; float:left;}
.courseSendSubmit {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#64bdd9; margin-right:25px; float:left;cursor: pointer;}
/*.courseSendSubmit:hover {background-color:#0182bb;}*/
.courseSendCancel {width:50px; height:25px; line-height:25px; text-align:center; vertical-align:middle; background-color:#c1c1c1; float:left}
a.sendSourceText {font-size:14px; color:#ffffff;}
input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;}
input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;cursor: pointer;}
/*input.sendSourceText:hover {font-size:14px; color:#ffffff;}*/
.resourcesSendTo {float:left; height:20px; margin-top:15px;}
.resourcesSendType {border:1px solid #e6e6e6; width:60px; height:24px; outline:none; font-size:14px; color:#888888;}
.courseReferContainer {float:left; max-height:120px;margin-right:16px;margin-bottom:10px; overflow:scroll; overflow-x:hidden;}
/*上传资源弹窗*/
.resourceUploadPopup {width:400px; height:auto; border:3px solid #15bccf; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
.uploadText {font-size:16px; color:#15bccf; line-height:16px; padding-top:20px; width:140px; display:inline-block;}
.uploadBoxContainer {height:33px; line-height:33px; margin-top:10px; position:relative;}
.uploadBox {width:100px; height:33px; line-height:33px; text-align:center; vertical-align:middle; background-color:#64bdd9; border-radius:3px; float:left; margin-right:12px;}
.uploadBox:hover {background-color:#0182bb;}
a.uploadIcon {background:url(images/resource_icon_list.png) 8px -60px no-repeat; width:100px; height:33px; display:block;}
.chooseFile {color:#ffffff; display:block; margin-left:32px;}
.uploadResourceIntr {width:250px; height:33px; float:left; line-height:33px; font-size:12px;}
.uploadResourceName {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444; margin-bottom:2px;}
.uploadResourceIntr2 {width:250px; display:inline-block; line-height:15px; font-size:12px; color:#444444;}
.uploadType {margin:10px 0; border:1px solid #e6e6e6; width:100px; height:30px; outline:none; font-size:12px; color:#888888;}
.uploadKeyword {margin-bottom:10px; outline:none; border:1px solid #e6e6e6; height:30px; width:280px;}
/*新个人主页框架css*/
.navContainer {width:100%; margin:0 auto; background-color:#15bccf;}
@ -525,10 +455,14 @@ input.sendSourceText {font-size:14px;color:#ffffff;background-color:#64bdd9;}
.navHomepage {width:1000px; height:54px; background-color:#15bccf; margin:0 auto;}
.navHomepageLogo {width:60px; height:54px; line-height:54px; vertical-align:middle; margin-left:2px; margin-right:40px;}
.navHomepageMenu {margin-right:40px;display:inline-block;height:54px; line-height:54px; vertical-align:middle;}
/*.navHomepageMenu:hover {background-color:#0ea6b7;}*/
.navHomepageSearchBoxcontainer {margin-top:11px; }
.navHomepageSearchBox {width:380px; border:none; outline:none; height:32px; margin-top:11px; background-color:#ffffff;}
.navHomepageSearchInput {width:345px; height:32px; outline:none; border:none; float:left; padding-left:5px;; margin:0;}
.homepageSearchIcon {width:30px; height:32px; background:url(../images/nav_icon.png) -8px 3px no-repeat; float:left;}
a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-repeat;}
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
.navHomepageNews {width:30px; display:block; float:right; margin-top:12px; position:relative;}
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:29px; display:block;}
.newsActive {width:10px; height:10px; border-radius:50%; border:2px solid #ffffff; background-color:#ff0000; position:absolute; left:17px; top:5px;}
@ -540,14 +474,14 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;}
.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;}
.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 13px 5px 13px;; position:relative; border:1px solid #cbcbcb;}
.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 14px 10px 14px; position:relative; border:1px solid #cbcbcb;}
.homepagePortraitImage:hover {border:1px solid #15bccf;}
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; height:21px; float:left;max-width: 100px;}
.homepageImageSexMan {width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSexWomen {width: 20px;height: 20px;background: url(../images/homepage_icon.png) -10px -149px no-repeat;float: left;}
.homepageSignatureTextarea {width:207px; height:80px; max-width:207px; max-height:80px; border:1px solid #d9d9d9; outline:none; margin:0px 0px 12px 15px;;}
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
@ -573,7 +507,7 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;}
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;}
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
.homepageRightBlock {}
.newsReadSetting {width:700px; background-color:#f6f6f6; border-bottom:1px solid #eeeeee; margin:10px auto; height:39px; line-height:39px; vertical-align:middle; font-size:14px; color:#7a7a7a; padding-left:10px;}
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;}
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
.homepageNewsPublisher {width:80px; max-width:80px; margin-right:10px; font-size:12px; color:#15bccf; display:block; padding-left:5px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
@ -582,9 +516,9 @@ a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
.homepageNewsTime {width:75px; font-size:12px; color:#888888; display:block; text-align:right;}
a.homepageWhite {color:#ffffff;}
a.homepageWhite:hover {color:#a1ebff}
a.newsGrey1 {color:#4b4b4b;}
a.newsGrey1:hover {color:#000000;}
a.replyGrey {color:#888888; display:block;}
a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;}
a.replyGrey {color:#888888; display:inline-block;}
a.replyGrey:hover {color:#4b4b4b;}
a.replyGrey1 {color:#888888;}
a.replyGrey1:hover {color:#4b4b4b;}
@ -592,6 +526,8 @@ a.newsBlue {color:#15bccf;}
a.newsBlue:hover {color:#0781b4;}
a.menuGrey {color:#808080;}
a.menuGrey:hover {color:#fe7d68;}
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #98a1a6; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
#navSearchAlert {display:none;}
/*个人主页右部分*/
.homepagePostType {width:180px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-170px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
@ -608,11 +544,11 @@ a.postTypeGrey:hover {color:#15bccf;}
.homepagePostPortrait {float:left; width:90px;}
.homepagePostDes {float:left; width:600px; margin-left:20px;}
.homepagePostTo {font-size:14px; color:#484848; margin-bottom:15px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:15px;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:15px; font-weight:bold;}
.homepagePostSubmitContainer {height:30px; margin-bottom:15px;}
.homepagePostSubmit {font-size:14px; color:#888888; width:80px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;}
.homepagePostSubmit {font-size:14px; color:#888888; width:90px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;}
.homepagePostIntro {font-size:12px; color:#888888;}
.homepagePostIntro {font-size:14px; color:#484848;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; height:30px; line-height:30px; vertical-align:middle;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:15px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
@ -622,7 +558,7 @@ a.postTypeGrey:hover {color:#15bccf;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
.homepagePostReplyInputContainer {width:670px; margin:0px auto;}
.homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;}
.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:70px; height:24px; float:left; padding-left:30px;}
.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:50px; height:24px; float:left; padding-left:30px;}
.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#15bccf;}
.homepagePostReplySubmit:hover {background-color:#329cbd;}
a.postReplySubmit {color:#ffffff; display:block;}
@ -643,7 +579,7 @@ a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
.homepagePostReplyDes {float:left; width:595px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
@ -653,12 +589,67 @@ a.postGrey:hover {color:#000000;}
a.gz_btn{display:block; background:url(../images/pic_uersall.png) -318px -25px no-repeat; width:53px; height:18px; border:1px solid #cdcdcd; color:#333333; padding:0px 0 0 18px;margin-top: 2px;margin-right: 15px;}
a:hover.gz_btn{ color:#ff5722;}
/*课程主页css*/
.homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
/*注册登陆页面*/
#loginInBox {display:block; margin-top:143px;}
#signUpBox {display:none; margin-top:79px;}
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginSignButton:hover {background-color:#0ea6b7;}
#loginInButton:hover {background-color:#0ea6b7;}
.loginContentContainer {width:100%; background-color:#15bccf; margin-top:1px; height:580px;}
.loginContent {width:1000px; margin:0px auto;}
.loginLeft {width:595px; float:left;}
.loginLogo {padding-left:208px; padding-top:155px;}
.loginInro {width:465px; padding-top:55px; padding-left:50px; font-size:16px; color:#ffffff;}
.loginRight {width:405px; float:left;}
.loginChooseBox {width:405px; height:54px; background-color:#ffffff; padding-top:18px;}
.loginChooseList {width:350px; height:30px; font-size:14px; margin:0px auto;}
.loginChoose {width:55px; height:30px; border-bottom:1px solid #8ad2da; text-align:center;}
a.loginChooseTab {color:#484848; height:30px; display:block;}
.loginInButton {width:315px; height:40px; background-color:#15bccf; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:20px;}
.loginUpButton {width:315px; height:40px; background-color:#15bccf; margin-left:46px; font-size:14px; text-align:center; line-height:40px; vertical-align:middle; margin-top:30px;}
.loginChooseBorder {width:295px; height:30px; border-bottom:1px solid #e3e3e3;}
.loginChoose:hover {border-bottom:1px solid #8ad2da;}
.loginSign {width:405px; background-color:#ffffff;}
.loginSignBox {width:308px; height:38px; margin-left:46px; border:1px solid #98a1a6; outline:none;}
.loginSignOption {margin-left:46px; margin-top:15px;}
.loginIn {width:405px; background-color:#ffffff; padding-bottom:30px;}
.loginSignAlert {font-size:12px; margin-left:60px;}
.loginSignRow {height:60px; min-height:60px;}
/*关注列表*/
.inf_user_image{ padding-left:8px; margin:0px; background-color:#fff; height: auto;padding-bottom: 8px;}
ul.list_watch{
padding-left: 0px;
list-style-type:none;
height:auto;
border-bottom: 1px dashed rgb(204, 204, 204);
}
/*留言*/
.feedBack {width:728px; background-color:#ffffff; padding:10px; border:1px solid #dddddd;float: right}
/*20150826忘记密码 LB*/
.BgBox{ width:968px; border:1px solid #dddddd; background:#fff; padding:15px; padding-top:10px;margin: 20px auto}
.BgBox_h2{ font-size:16px; color:#484848; width:968px;border-bottom:1px solid #e3e3e3; padding-bottom:5px;}
.NomalInput{width:308px; height:38px; border:1px solid #98a1a6; outline:none; color:#888888; font-size:14px;}
.BgBoxCon{ width:310px; margin:80px auto;}
.BgBoxConP{ font-size:14px; color:#484848;}
.LoginButton {width:315px; height:40px; background-color:#269ac9; font-size:14px; text-align:center; line-height:40px; vertical-align:middle;}
.LoginButton:hover {background-color:#297fb8;}
/*20150826协议 LB*/
.AgreementBox{ margin:20px 0; color:#666666; font-size:14px; line-height:1.9;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px;}
/*底部*/
#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;}
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
.footerAbout{ width:585px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; }
.footerAbout{ width:455px; margin:0 auto;height:35px; line-height:35px; border-bottom:1px solid #efefef; }
.languageBox {width:55px; height:20px; margin-left:5px; outline:none; color:#666666; border:1px solid #d9d9d9;}
.departments{ width:890px; margin:5px auto 0 auto;height:30px;line-height:30px;}
.copyright{ width:375px; margin:0 auto;height:20px;line-height:20px;}
@ -820,18 +811,96 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
.mr15{ margin-right:15px;}
.uppic_btn{border:none; width:150px; background:none; margin-bottom:5px; color:#666; margin-top:105px;}
/*消息*/
.newsReadSetting{
width: 700px;
background-color: #F6F6F6;
border-bottom: 1px solid #EEE;
margin: 10px auto;
height: 39px;
line-height: 39px;
/*20150820课程作业 LB*/
.HomeWork {width:708px; background-color:#ffffff; padding:20px; border:1px solid #dddddd;}
.RightBanner {width:708px; height:34px; border-bottom:1px solid #e9e9e9;}
select.InputBox,input.InputBox,textarea.InputBox{ border:1px solid #d9d9d9; color:#888888; height:28px; line-height:28px; padding-left:5px; font-size:14px;}
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtn{ background:#15bccf; color:#fff;}
.W440{ width:440px;}
.W120{ width:110px;}
.W700{ width:700px;}
a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#15bccf;}
a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#15bccf;}
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMini{ background:#15bccf; color:#fff;}
a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
a:hover.DropBtn{background: url(../images/homepage_icon.png) -125px -370px no-repeat;}
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
/*20150820编程作业 LB*/
.W320{ width:320px;}
.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;}
a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
.icon_remove{background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/
.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
.c_grey{ color:#888888;}
.c_dark_grey{color:#a9a9a9 !important;}
.HomeWorkP{ width:690px; font-size:14px;}
.H150{ height:150px;}
.ProResult{width:748px; background-color:#fff; border:1px solid #dddddd;border-bottom:none; }
.ProResultTop{ height:38px; line-height:38px; border-bottom:1px solid #dddddd; background:#f2f2f2; padding:0 10px;}
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
.W50{ width:50px;}
.W200{ width:200px;}
.ProResultTable{ color:#888888;}
.T_C{ text-align:center;}
.SearchIcon{background:url(../images/homepage_icon.png) 676px -393px no-repeat; }
.SearchIcon:hover{background:url(../images/homepage_icon.png) 676px -419px no-repeat; }
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}
.ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; }
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
/*日历选择图*/
img.ui-datepicker-trigger {
display:block;
background:url(../images/public_icon.png) -31px 0 no-repeat;
cursor: pointer;
vertical-align: middle;
font-size: 14px;
color: #7A7A7A;
padding-left: 10px;
width:16px;
height:15px;
float:left;
margin: 7px;
}
/*消息*/
.homepageNewsType {width:95px; font-size:12px; color:#888888; display:block;}
.homepageNewsTypeNotRead {width:95px; font-size:12px; color:#888888; display:block;}
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
.calendar_div{border: 1px solid #d9d9d9;}
#attachments_fields input.filename {
border: 0;
height: 1.8em;
max-width: 670px;
color: #7f7f7f;
background-color: inherit;
background: url(../images/pic_file.png) 0 3px no-repeat;
padding-left: 18px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-bottom: 3px;
}
.description{display: none !important;}
.ispublic-label{display: none !important;}
.is_public_checkbox{display: none !important;}

View File

@ -69,8 +69,6 @@ a.select_btn_select{ background:#64bddb; color:#fff;}
.wlist a{ float:left; border:1px solid #64bdd9; padding:0 5px; margin-left:3px; color:#64bdd9;}
.wlist a:hover{border:1px solid #64bdd9; background-color:#64bdd9; color:#fff; text-decoration:none;}
.wlist_select a { background-color:#48aac9; color:#fff;}
/* 设置 */
#users_setting{clear:both;width:730px;/*滑动门的宽度*/}
/* TAB 切换效果 */
.users_tb_{ border-bottom:3px solid #CCC; height:26px; }
.users_tb_ ul{height:26px; }
@ -135,13 +133,16 @@ a:hover.c_lgrey{ color:#3ca5c6;}
.users_r_h2{background:#64bdd9; color:#fff; height:33px; width:90px; text-align:center; font-weight:normal; padding-top:7px; font-size:16px;}
a.hidepic>img{display:none;}
/*a.hidepic>img{display:none;}*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
.cr{clear: right;}
/*div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}*/
/*span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}*/
/*span.ke-toolbar-icon-url{background-image:url( ../images/public_icon.png )}*/
/*div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}*/
/*span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}*/
/*span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}*/
/*div.ke-toolbar .ke-outline{border:none;}*/
/*.cr{clear: right;}*/
div.content{padding-top:10px;}
.pcontent>.school_list,.content>.school_list { padding-left: 5px;}