icon
This commit is contained in:
commit
008e8a0f7a
1
Gemfile
1
Gemfile
|
@ -59,6 +59,7 @@ gem 'elasticsearch-rails'
|
|||
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
gem 'sextant'
|
||||
gem 'better_errors', '~> 1.1.0'
|
||||
# gem "query_reviewer"
|
||||
gem 'rack-mini-profiler', '~> 0.9.3'
|
||||
|
|
|
@ -21,7 +21,7 @@ curl -X PUT http://localhost:3001/api/v1/homes/sync_count \
|
|||
|
||||
token(requires): String,权限验证
|
||||
|
||||
type(requires): String;同步的类型,取值范围: {user(用户) | project(开源项目) | practical_training_project(实训项目) | scholl(应用高校)}
|
||||
type(requires): String;同步的类型,取值范围: {user(用户) | project(开源项目) | practical_training_project(实训项目) | school(应用高校)}
|
||||
|
||||
number(optional): Integer;同步数量, 该参数可选,不传时,后台默认值为1
|
||||
|
||||
|
|
|
@ -8,15 +8,15 @@ class HomesController < ApplicationController
|
|||
@dynamic_news = DynamicNew.desc.limit(4)
|
||||
|
||||
@companies = WebFooterCompany.dedicators
|
||||
# @partners = WebFooterCompany.partners
|
||||
|
||||
@partners = WebFooterCompany.opensources
|
||||
|
||||
@first_companies_group = Array(@companies.slice(0, 5))
|
||||
@second_companies_group = Array(@companies.slice(5, 8))
|
||||
@third_companies_group = Array(@companies.slice(13, 5))
|
||||
end
|
||||
|
||||
def partners
|
||||
@companies = WebFooterCompany.all.group_by {|company| company.key }
|
||||
@companies = WebFooterCompany.where(key: ['opensource', 'dedicator']).group_by(&:key).sort { |a, b| b[0]<=>a[0] }
|
||||
end
|
||||
|
||||
def news
|
||||
|
|
|
@ -37,13 +37,13 @@ class RepositoriesController < ApplicationController
|
|||
before_filter :find_repository, :only => [:edit, :update, :destroy, :committers]
|
||||
|
||||
before_filter :find_project_repository, :except => [:new, :create, :newcreate, :edit, :update, :destroy, :committers, :newrepo,
|
||||
:to_gitlab, :forked, :export_rep_static, :training_project_extend, :che_request]
|
||||
:to_gitlab, :forked, :export_rep_static, :training_project_extend, :che_request, :build_socks_shop]
|
||||
# 连接gitlab
|
||||
# before_filter :connect_gitlab, :only => [:quality_analysis, :commit_diff]
|
||||
|
||||
before_filter :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
|
||||
# before_filter :authorize , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis, :commit_diff]
|
||||
before_filter :authorize_visible , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis, :commit_diff, :che_request]
|
||||
before_filter :authorize_visible , :except => [:newrepo,:newcreate,:fork, :to_gitlab, :forked, :project_archive, :quality_analysis, :commit_diff, :che_request, :build_socks_shop]
|
||||
# 版本库新增权限
|
||||
# before_filter :show_rep, :only => [:show, :stats, :revisions, :revision, :diff, :commit_diff ]
|
||||
accept_rss_auth :revisions
|
||||
|
@ -75,6 +75,37 @@ class RepositoriesController < ApplicationController
|
|||
|
||||
end
|
||||
|
||||
def build_socks_shop
|
||||
begin
|
||||
# r = RestClient::Request.execute(method: :get, url: 'http://106.75.6.173:8080/job/socks-shop/build?token=socks-shop&j_username=jenkins&j_password=12', max_redirects: 0)
|
||||
# logger.info "socks shop request success-===========> #{r.response}"
|
||||
RestClient.get('http://106.75.6.173:8080/job/socks-shop/build?token=socks-shop&j_username=jenkins&j_password=12') { |response, request, result|
|
||||
case response.code
|
||||
when 200, 201
|
||||
logger.info "socks shop request success-===========> #{response}"
|
||||
render :json => {:result => "succuss", :message => "ok"}
|
||||
when 423
|
||||
logger.info "socks shop request failed---------> #{response}"
|
||||
render :json => {:result => "fail", :message => "SomeCustomExceptionIfYouWant"}
|
||||
raise SomeCustomExceptionIfYouWant
|
||||
else
|
||||
logger.info "return else ======> #{response}"
|
||||
render :json => {:result => "fail", :message => "...."}
|
||||
end
|
||||
}
|
||||
rescue RestClient::ExceptionWithResponse => err
|
||||
render :json => {:result => "failed", :message => "fail"}
|
||||
logger.info "socks shop request failed---------> #{err}"
|
||||
rescue RestClient::Unauthorized, RestClient::Forbidden => err
|
||||
render :json => {:result => "failed", :message => "Access denied"}
|
||||
logger.info "Access denied======> #{err.response}"
|
||||
rescue RestClient::ImATeapot => err
|
||||
render :json => {:result => "failed", :message => "The server is a teapot! # RFC 2324"}
|
||||
logger.info "The server is a teapot! # RFC 2324 ==> #{err.response}"
|
||||
return err.response
|
||||
end
|
||||
end
|
||||
|
||||
def export_rep_static
|
||||
# 管理员界面导出所有项目
|
||||
@project = Project.find(params[:id])
|
||||
|
|
|
@ -42,7 +42,7 @@ class UsersController < ApplicationController
|
|||
:activity_new_score_index, :influence_new_score_index, :score_new_index,:user_projects_index,:user_resource,:user_contestlist, :user_manage_issues, :user_receive_issues,
|
||||
:user_courses4show,:user_projects4show,:user_contests4show,:user_course_activities,:user_project_activities,:user_feedback4show,:user_visitorlist,:user_messages,:edit_brief_introduction,
|
||||
:user_import_homeworks,:user_search_homeworks,:user_import_resource, :user_system_messages,:choose_user_course,:user_courselist,:user_projectlist,:sort_syllabus_list,
|
||||
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage, :user_issues, :course_community, :project_community, :contest_community]
|
||||
:sort_project_list,:my_homeworks,:manage_or_receive_homeworks,:search_m_r_homeworks, :cancel_or_collect,:expand_courses,:homepage, :user_issues, :course_community, :project_community, :contest_community, :undo_items]
|
||||
before_filter :auth_user_extension, only: :show
|
||||
before_filter :show_system_message, :only => [:show]
|
||||
#before_filter :rest_user_score, only: :show
|
||||
|
@ -490,6 +490,7 @@ class UsersController < ApplicationController
|
|||
# 说明: homework 发布作业;message:讨论区; news:新闻; poll:问卷;works_reviewers:作品评阅;works_reply:作品回复,exercise:课程测验
|
||||
# issue:问题;journal:缺陷状态更新; forum:公共贴吧: user_feedback: 用户留言; new_reply:新闻回复(comment)
|
||||
def user_messages
|
||||
@msg_type = params[:type] || "all"
|
||||
if !User.current.logged?
|
||||
redirect_to signin_url
|
||||
return
|
||||
|
@ -497,72 +498,38 @@ class UsersController < ApplicationController
|
|||
return render_403
|
||||
end
|
||||
# 初始化/更新 点击按钮时间, 24小时内显示系统消息
|
||||
update_onclick_time
|
||||
user_all_messages = MessageAll.where(:user_id => @user.id).includes(:message)
|
||||
# 全部设为已读
|
||||
# if params[:viewed] == "all"
|
||||
# update_message_viewed(@user)
|
||||
# end
|
||||
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
|
||||
courses = @user.courses.where("is_delete = 1")
|
||||
course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")"
|
||||
case params[:type]
|
||||
when nil
|
||||
# 系统消息为管理员发送,我的消息中包含有系统消息
|
||||
@message_alls = []
|
||||
messages = MessageAll.where(:user_id => @user.id).includes(:message).order("created_at desc")
|
||||
messages.each do |message_all|
|
||||
mess = message_all.message
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
when 'unviewed'
|
||||
@message_alls = []
|
||||
messages = MessageAll.where("message_alls.user_id =?", @user.id).includes(:message).order("created_at desc")
|
||||
messages.each do |message_all|
|
||||
# 在点击或者刷新消息列表后未读的消息存放在数组
|
||||
mess = message_all.message
|
||||
if message_all.message_type != "SystemMessage"&& !mess.nil? && (mess.viewed == 0 || !mess.viewed)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
end
|
||||
#课程相关消息
|
||||
when 'homework'
|
||||
@message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage','StudentWork','Exercise') and user_id =? and course_id NOT IN #{course_ids}", @user.id).order("created_at desc")
|
||||
when 'course_message'
|
||||
@message_alls = CourseMessage.where("course_message_type =? and user_id =? and course_id NOT IN #{course_ids}", "Message", @user.id).order("created_at desc")
|
||||
when 'course_news'
|
||||
# 课程通知包含发布的通知和回复的通知
|
||||
@message_alls = CourseMessage.where("course_message_type in ('News', 'Comment') and user_id =? and course_id NOT IN #{course_ids}", @user.id).order("created_at desc")
|
||||
when 'poll'
|
||||
@message_alls = CourseMessage.where("course_message_type =? and user_id =? and course_id NOT IN #{course_ids}", "Poll", @user.id).order("created_at desc")
|
||||
#项目相关消息
|
||||
when 'issue'
|
||||
@message_alls = ForgeMessage.where("forge_message_type in ('Issue', 'Journal') and user_id =?" , @user.id).order("created_at desc")
|
||||
when 'forge_message'
|
||||
@message_alls = ForgeMessage.where("forge_message_type =? and user_id =?", "Message", @user.id).order("created_at desc")
|
||||
when 'forge_news'
|
||||
@message_alls = ForgeMessage.where("forge_message_type in (?,?) and user_id =?", "News", "Comment", @user.id).order("created_at desc")
|
||||
when 'apply'
|
||||
@message_alls = ForgeMessage.where("forge_message_type in ('ProjectInvite', 'AppliedProject', 'JoinProject', 'RemoveFromProject') and user_id =?", @user.id).order("created_at desc")
|
||||
#贴吧消息
|
||||
when 'forum'
|
||||
@message_alls = MemoMessage.where("memo_type =? and user_id =?", "Memo", @user.id).order("created_at desc")
|
||||
#用户留言
|
||||
when 'user_feedback'
|
||||
@message_alls = UserFeedbackMessage.where("journals_for_message_type =? and user_id =?", "JournalsForMessage", @user.id).order("created_at desc")
|
||||
else
|
||||
render_404
|
||||
return
|
||||
end
|
||||
|
||||
@message_alls = paginateHelper @message_alls, 25
|
||||
case @msg_type
|
||||
when "all"
|
||||
@message_alls = user_all_messages
|
||||
when "course"
|
||||
@message_alls = user_all_messages.where(message_type: "CourseMessage")
|
||||
when "project"
|
||||
@message_alls = user_all_messages.where(message_type: "ForgeMessage")
|
||||
when "at"
|
||||
@message_alls = user_all_messages.where(message_type: %w(UserFeedbackMessage MemoMessage AtMessage BlogMessage))
|
||||
when "apply"
|
||||
@message_alls = user_all_messages.where(message_type: "AppliedMessage")
|
||||
else
|
||||
@message_alls = user_all_messages.where(message_type: %w(SystemMessage ContestMessage OrgMessage))
|
||||
end
|
||||
@unred_all_messages = @user.count_new_message
|
||||
@message_alls = @message_alls.order("created_at desc")
|
||||
|
||||
#点击进入tab后,全部更新为已读,全部页面除外
|
||||
|
||||
@limit = 20
|
||||
@message_count = @message_alls.count
|
||||
@message_all_pages = Paginator.new @message_count, @limit, params['page'] || 1
|
||||
@offset ||= @message_all_pages.offset
|
||||
@message_alls = paginateHelper @message_alls, @limit
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html{render :layout=>'new_base_user'}
|
||||
format.html{render layout: "base_user_message"}
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# 初始化/更新 点击按钮时间
|
||||
|
@ -2092,154 +2059,180 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
if User.current == @user
|
||||
# 点击小铃铛,更新点击时间
|
||||
update_onclick_time if params[:click_user_message] == 'true'
|
||||
# 全部设为已读
|
||||
# 自己的主页显示消息
|
||||
messages_all = MessageAll.where(:user_id => @user.id)
|
||||
@message_count = messages_all.count
|
||||
# REDO:已删除的内容应该在页面中显示不点击
|
||||
@message_all_pages = Paginator.new @message_count, per_page_option, params['page']
|
||||
@message_alls = messages_all.includes(:message).
|
||||
limit(@message_all_pages.per_page).
|
||||
offset(@message_all_pages.offset).
|
||||
reorder("#{MessageAll.table_name}.created_at desc")
|
||||
# @user_projects = @user.projects.order("updated_on desc")
|
||||
messages_all = @user.project_relate_messages
|
||||
@limit = 20
|
||||
|
||||
@unsolved_issues_count = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]).includes(:author, :project).count
|
||||
|
||||
my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).
|
||||
where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
|
||||
# 用户待完成的作业
|
||||
homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Time.now}'")
|
||||
homework_ids = homeworks.blank? ? "(-1)" : "(" + homeworks.map{|homework| homework.id}.join(",") + ")"
|
||||
student_works = StudentWork.where("user_id = #{@user.id} and homework_common_id in #{homework_ids} and work_status != 0")
|
||||
@unfinished_homework_count = homeworks.count - student_works.count
|
||||
# 用户待完成的测验
|
||||
exercises = Exercise.where("course_id in #{my_course_ids} and exercise_status = 2")
|
||||
exercise_users = ExerciseUser.where(:user_id => @user.id, :exercise_id => exercises.map{|ex| ex.id})
|
||||
@unfinished_test_count = exercises.count - exercise_users.count
|
||||
# 用户待完成的问卷
|
||||
polls = Poll.where("polls_type = 'Course' and polls_group_id in #{my_course_ids} and polls_status = 2")
|
||||
poll_users = PollUser.where(:user_id => @user.id, :poll_id => polls.map{|poll| poll.id})
|
||||
@unfinished_poll_count = polls.count - poll_users.count
|
||||
# 用户待匿评的作品
|
||||
homeworks = HomeworkCommon.includes(:homework_detail_manual).where("homework_commons.course_id in #{my_course_ids} and homework_detail_manuals.comment_status = 2")
|
||||
student_work_scores = @user.student_works_scores.where("reviewer_role = 3")
|
||||
anonymous_evaluation_ids = student_work_scores.blank? ? "(-1)" : "(" + student_work_scores.map{|st| st.student_work_id}.join(",") + ")"
|
||||
unfinished_evaluations = @user.student_works_evaluation_distributions.where("student_work_id not in #{anonymous_evaluation_ids}")
|
||||
@anonymous_evaluation_count = StudentWork.where(:id => unfinished_evaluations.map{|ev| ev.student_work_id}, :homework_common_id => homeworks.map{|hw| hw.id}).count
|
||||
# 待评阅的作业 暂不做
|
||||
# @unreview_homework = 1
|
||||
|
||||
# 待审批的申请
|
||||
#applied_message_count = AppliedMessage.where(:applied_type => ["Organization", "AppliedContest", "StudentWorksScoresAppeal", "AppliedProject", "ApplyAddSchools"], :user_id => User.current.id, :status => 0).count
|
||||
#applied_course_message_count = CourseMessage.where(:user_id => User.current.id, :course_message_type => "JoinCourseRequest", :status => 0).count
|
||||
# applied_pull_request_message_count = ForgeMessage.where(:user_id => User.current.id, :forge_message_type => "PullRequest", :status => [1,3]).count
|
||||
# @applied_message_alls_count = applied_message_count + applied_course_message_count + applied_pull_request_message_count
|
||||
user_id = User.current.id
|
||||
sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
|
||||
left join `course_messages` cm on ma.message_id=cm.id left join `applied_messages` apm on ma.message_id=apm.id
|
||||
where (ma.user_id =#{user_id} and ma.message_type = 'ForgeMessage' and fm.forge_message_type='PullRequest' and fm.status=0 and fm.user_id=#{user_id} ) or
|
||||
(ma.user_id=#{user_id} and ma.message_type='AppliedMessage' and apm.applied_type in ('Organization', 'AppliedContest', 'StudentWorksScoresAppeal', 'AppliedProject', 'ApplyAddSchools') and apm.user_id =#{user_id} and apm.status =0 ) or
|
||||
(ma.user_id=#{user_id} and ma.message_type='CourseMessage' and cm.course_message_type='JoinCourseRequest' and cm.status=0 and cm.user_id=#{user_id} );"
|
||||
message_alls = MessageAll.find_by_sql(sql)
|
||||
@applied_message_alls_count = message_alls.count
|
||||
else
|
||||
# 看别人的主页显示动态
|
||||
#更新用户申请成为课程老师或教辅消息的状态
|
||||
if params[:course_id] != nil
|
||||
join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?",
|
||||
params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false)
|
||||
join_course_messages.update_all(:viewed => true)
|
||||
end
|
||||
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
user_course_ids = (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
|
||||
project_types = "('Message','Issue','Project')"
|
||||
principal_types = "JournalsForMessage"
|
||||
container_type = ''
|
||||
act_type = ''
|
||||
# 他的动态
|
||||
sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
|
||||
if params[:type].present?
|
||||
case params[:type]
|
||||
when "course_homework"
|
||||
container_type = 'Course'
|
||||
act_type = 'HomeworkCommon'
|
||||
when "course_news"
|
||||
container_type = 'Course'
|
||||
act_type = 'News'
|
||||
when "course_message"
|
||||
container_type = 'Course'
|
||||
act_type = 'Message'
|
||||
when "course_poll"
|
||||
container_type = 'Course'
|
||||
act_type = 'Poll'
|
||||
when "course_journals"
|
||||
container_type = 'Course'
|
||||
act_type = 'JournalsForMessage'
|
||||
when "project_issue"
|
||||
container_type = 'Project'
|
||||
act_type = 'Issue'
|
||||
when "project_message"
|
||||
container_type = 'Project'
|
||||
act_type = 'Message'
|
||||
when "user_journals"
|
||||
container_type = 'Principal'
|
||||
act_type = 'JournalsForMessage'
|
||||
when "current_user"
|
||||
container_type = 'Principal'
|
||||
act_type = 'Principal'
|
||||
when "all"
|
||||
container_type = 'all'
|
||||
act_type = 'all'
|
||||
end
|
||||
end
|
||||
if container_type != '' && container_type != 'all'
|
||||
if container_type == 'Course'
|
||||
sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'"
|
||||
elsif container_type == 'Project'
|
||||
sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'"
|
||||
elsif container_type == 'Principal' && act_type == 'JournalsForMessage'
|
||||
sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}"
|
||||
elsif container_type == 'Principal' && act_type == 'Principal'
|
||||
sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
|
||||
end
|
||||
if User.current != @user
|
||||
sql += " and user_id = #{@user.id}"
|
||||
end
|
||||
else
|
||||
if User.current != @user
|
||||
blog_ids = "("+@user.blog.id.to_s+")"
|
||||
else
|
||||
blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
end
|
||||
sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
"or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
"or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
"or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
|
||||
if container_type != 'all' && User.current != @user
|
||||
sql = "user_id = #{@user.id} and(" + sql + ")"
|
||||
end
|
||||
end
|
||||
@user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count
|
||||
@user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
@type = params[:type]
|
||||
end
|
||||
@message_count = messages_all.count
|
||||
# REDO:已删除的内容应该在页面中显示不点击
|
||||
@message_all_pages = Paginator.new @message_count, @limit, params['page'] || 1
|
||||
@offset ||= @message_all_pages.offset
|
||||
@message_alls = messages_all
|
||||
@message_alls = paginateHelper @message_alls, @limit
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html {render :layout => 'new_base_user'}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# #以前的用户show页面,暂时不删除
|
||||
# def show
|
||||
# @user_projects = @user.projects.order("updated_on desc")
|
||||
# if User.current == @user
|
||||
# # 点击小铃铛,更新点击时间
|
||||
# update_onclick_time if params[:click_user_message] == 'true'
|
||||
# # 全部设为已读
|
||||
# # 自己的主页显示消息
|
||||
# messages_all = MessageAll.where(:user_id => @user.id)
|
||||
# @limit = 20
|
||||
#
|
||||
# @message_count = messages_all.count
|
||||
# # REDO:已删除的内容应该在页面中显示不点击
|
||||
# @message_all_pages = Paginator.new @message_count, @limit, params['page'] || 1
|
||||
# @offset ||= @message_all_pages.offset
|
||||
# @message_alls = messages_all.includes(:message).reorder("#{MessageAll.table_name}.created_at desc")
|
||||
# @message_alls = paginateHelper @message_alls, @limit
|
||||
#
|
||||
# @unsolved_issues_count = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]).includes(:author, :project).count
|
||||
#
|
||||
# my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).
|
||||
# where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
|
||||
# # 用户待完成的作业
|
||||
# homeworks = HomeworkCommon.where("course_id in #{my_course_ids} and publish_time <= '#{Time.now}'")
|
||||
# homework_ids = homeworks.blank? ? "(-1)" : "(" + homeworks.map{|homework| homework.id}.join(",") + ")"
|
||||
# student_works = StudentWork.where("user_id = #{@user.id} and homework_common_id in #{homework_ids} and work_status != 0")
|
||||
# @unfinished_homework_count = homeworks.count - student_works.count
|
||||
# # 用户待完成的测验
|
||||
# exercises = Exercise.where("course_id in #{my_course_ids} and exercise_status = 2")
|
||||
# exercise_users = ExerciseUser.where(:user_id => @user.id, :exercise_id => exercises.map{|ex| ex.id})
|
||||
# @unfinished_test_count = exercises.count - exercise_users.count
|
||||
# # 用户待完成的问卷
|
||||
# polls = Poll.where("polls_type = 'Course' and polls_group_id in #{my_course_ids} and polls_status = 2")
|
||||
# poll_users = PollUser.where(:user_id => @user.id, :poll_id => polls.map{|poll| poll.id})
|
||||
# @unfinished_poll_count = polls.count - poll_users.count
|
||||
# # 用户待匿评的作品
|
||||
# homeworks = HomeworkCommon.includes(:homework_detail_manual).where("homework_commons.course_id in #{my_course_ids} and homework_detail_manuals.comment_status = 2")
|
||||
# student_work_scores = @user.student_works_scores.where("reviewer_role = 3")
|
||||
# anonymous_evaluation_ids = student_work_scores.blank? ? "(-1)" : "(" + student_work_scores.map{|st| st.student_work_id}.join(",") + ")"
|
||||
# unfinished_evaluations = @user.student_works_evaluation_distributions.where("student_work_id not in #{anonymous_evaluation_ids}")
|
||||
# @anonymous_evaluation_count = StudentWork.where(:id => unfinished_evaluations.map{|ev| ev.student_work_id}, :homework_common_id => homeworks.map{|hw| hw.id}).count
|
||||
# # 待评阅的作业 暂不做
|
||||
# # @unreview_homework = 1
|
||||
#
|
||||
# # 待审批的申请
|
||||
# #applied_message_count = AppliedMessage.where(:applied_type => ["Organization", "AppliedContest", "StudentWorksScoresAppeal", "AppliedProject", "ApplyAddSchools"], :user_id => User.current.id, :status => 0).count
|
||||
# #applied_course_message_count = CourseMessage.where(:user_id => User.current.id, :course_message_type => "JoinCourseRequest", :status => 0).count
|
||||
# # applied_pull_request_message_count = ForgeMessage.where(:user_id => User.current.id, :forge_message_type => "PullRequest", :status => [1,3]).count
|
||||
# # @applied_message_alls_count = applied_message_count + applied_course_message_count + applied_pull_request_message_count
|
||||
# user_id = User.current.id
|
||||
# sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
|
||||
# left join `course_messages` cm on ma.message_id=cm.id left join `applied_messages` apm on ma.message_id=apm.id
|
||||
# where (ma.user_id =#{user_id} and ma.message_type = 'ForgeMessage' and fm.forge_message_type='PullRequest' and fm.status=0 and fm.user_id=#{user_id} ) or
|
||||
# (ma.user_id=#{user_id} and ma.message_type='AppliedMessage' and apm.applied_type in ('Organization', 'AppliedContest', 'StudentWorksScoresAppeal', 'AppliedProject', 'ApplyAddSchools') and apm.user_id =#{user_id} and apm.status =0 ) or
|
||||
# (ma.user_id=#{user_id} and ma.message_type='CourseMessage' and cm.course_message_type='JoinCourseRequest' and cm.status=0 and cm.user_id=#{user_id} );"
|
||||
# message_alls = MessageAll.find_by_sql(sql)
|
||||
# @applied_message_alls_count = message_alls.count
|
||||
# else
|
||||
# # 看别人的主页显示动态
|
||||
# #更新用户申请成为课程老师或教辅消息的状态
|
||||
# if params[:course_id] != nil
|
||||
# join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?",
|
||||
# params[:course_id], 'JoinCourseRequest', User.current.id, @user.id, false)
|
||||
# join_course_messages.update_all(:viewed => true)
|
||||
# end
|
||||
# shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Project'").map(&:shield_id)
|
||||
# shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{@user.id} and shield_type='Course'").map(&:shield_id)
|
||||
# @page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
# user_project_ids = (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).empty? ? "(-1)" : "(" + (@user.favorite_projects.visible.map{|project| project.id}-shield_project_ids).join(",") + ")"
|
||||
# user_course_ids = (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).empty? ? "(-1)" : "(" + (@user.favorite_courses.visible.where("is_delete = 0").map{|course| course.id}-shield_course_ids).join(",") + ")"
|
||||
# course_types = "('Message','News','HomeworkCommon','Poll','Course','JournalsForMessage')"
|
||||
# project_types = "('Message','Issue','Project')"
|
||||
# principal_types = "JournalsForMessage"
|
||||
# container_type = ''
|
||||
# act_type = ''
|
||||
# # 他的动态
|
||||
# sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
|
||||
# if params[:type].present?
|
||||
# case params[:type]
|
||||
# when "course_homework"
|
||||
# container_type = 'Course'
|
||||
# act_type = 'HomeworkCommon'
|
||||
# when "course_news"
|
||||
# container_type = 'Course'
|
||||
# act_type = 'News'
|
||||
# when "course_message"
|
||||
# container_type = 'Course'
|
||||
# act_type = 'Message'
|
||||
# when "course_poll"
|
||||
# container_type = 'Course'
|
||||
# act_type = 'Poll'
|
||||
# when "course_journals"
|
||||
# container_type = 'Course'
|
||||
# act_type = 'JournalsForMessage'
|
||||
# when "project_issue"
|
||||
# container_type = 'Project'
|
||||
# act_type = 'Issue'
|
||||
# when "project_message"
|
||||
# container_type = 'Project'
|
||||
# act_type = 'Message'
|
||||
# when "user_journals"
|
||||
# container_type = 'Principal'
|
||||
# act_type = 'JournalsForMessage'
|
||||
# when "current_user"
|
||||
# container_type = 'Principal'
|
||||
# act_type = 'Principal'
|
||||
# when "all"
|
||||
# container_type = 'all'
|
||||
# act_type = 'all'
|
||||
# end
|
||||
# end
|
||||
# if container_type != '' && container_type != 'all'
|
||||
# if container_type == 'Course'
|
||||
# sql = "container_type = '#{container_type}' and container_id in #{user_course_ids} and act_type = '#{act_type}'"
|
||||
# elsif container_type == 'Project'
|
||||
# sql = "container_type = '#{container_type}' and container_id in #{user_project_ids} and act_type = '#{act_type}'"
|
||||
# elsif container_type == 'Principal' && act_type == 'JournalsForMessage'
|
||||
# sql = "container_type = '#{container_type}' and act_type= '#{act_type}' and container_id = #{@user.id}"
|
||||
# elsif container_type == 'Principal' && act_type == 'Principal'
|
||||
# sql = "user_id = #{@user.id} and ((container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}))"
|
||||
# end
|
||||
# if User.current != @user
|
||||
# sql += " and user_id = #{@user.id}"
|
||||
# end
|
||||
# else
|
||||
# if User.current != @user
|
||||
# blog_ids = "("+@user.blog.id.to_s+")"
|
||||
# else
|
||||
# blog_ids = "("+@user.blog.id.to_s+","+((User.watched_by(@user.id).count == 0 )? '0' :User.watched_by(@user.id).map{|u| u.blog.id}.join(','))+")"
|
||||
# end
|
||||
# sql = "(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types})" +
|
||||
# "or (container_type = 'Course' and container_id in #{user_course_ids} and act_type in #{course_types}) "+
|
||||
# "or (container_type = 'Principal' and act_type= '#{principal_types}' and container_id = #{@user.id}) " +
|
||||
# "or (container_type = 'Blog' and act_type= 'BlogComment' and container_id in #{blog_ids})"
|
||||
# if container_type != 'all' && User.current != @user
|
||||
# sql = "user_id = #{@user.id} and(" + sql + ")"
|
||||
# end
|
||||
# end
|
||||
# @user_activities_count = UserActivity.where("#{sql}").order('updated_at desc').count
|
||||
# @user_activities = UserActivity.where("#{sql}").order('updated_at desc').limit(10).offset(@page * 10)
|
||||
# @type = params[:type]
|
||||
# end
|
||||
# respond_to do |format|
|
||||
# format.js
|
||||
# format.html {render :layout => 'new_base_user'}
|
||||
# # format.html {render :layout => 'base'}
|
||||
#
|
||||
# end
|
||||
# end
|
||||
|
||||
# 待解决的Issue
|
||||
def unsolved_issues_list
|
||||
@unsolved_issues = Issue.where(:assigned_to_id => @user.id, :status_id => [1, 2, 4, 6]).includes(:author, :project).order("updated_on desc")
|
||||
@undo_show_type = 1
|
||||
@unsolved_issues = @user.user_unsolve_issues
|
||||
@unsolved_issues_count = @unsolved_issues.count
|
||||
@message_count = @user.user_unsolve_messages.count
|
||||
|
||||
@limit = 20
|
||||
@is_remote = true
|
||||
@unsolved_issues_pages = Paginator.new @unsolved_issues_count, @limit, params['page'] || 1
|
||||
|
@ -2250,6 +2243,19 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 待审批的申请
|
||||
# 待审批的消息一般不多,可以特殊处理
|
||||
def unapproval_applied_list
|
||||
@undo_show_type = 2
|
||||
@message_alls = @user.user_unsolve_messages
|
||||
@message_count = @message_alls.count
|
||||
@unsolved_issues_count = @user.user_unsolve_issues.count
|
||||
@message_alls = paginateHelper @message_alls, 20
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
# 待完成的作业
|
||||
def unfinished_homework_list
|
||||
my_course_ids = StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").blank? ? "(-1)" : "(" + StudentsForCourse.includes(:course).where("student_id = #{@user.id} and courses.is_delete = 0").map{|sc| sc.course_id}.join(",") + ")"
|
||||
|
@ -2326,22 +2332,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 待审批的申请
|
||||
# 待审批的消息一般不多,可以特殊处理
|
||||
def unapproval_applied_list
|
||||
user_id = User.current.id
|
||||
sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
|
||||
left join `course_messages` cm on ma.message_id=cm.id left join `applied_messages` apm on ma.message_id=apm.id
|
||||
where (ma.user_id =#{user_id} and ma.message_type = 'ForgeMessage' and fm.forge_message_type='PullRequest' and fm.status=0 and fm.user_id=#{user_id} ) or
|
||||
(ma.user_id=#{user_id} and ma.message_type='AppliedMessage' and apm.applied_type in ('Organization', 'AppliedContest', 'StudentWorksScoresAppeal', 'AppliedProject', 'ApplyAddSchools') and apm.user_id =#{user_id} and apm.status =0 ) or
|
||||
(ma.user_id=#{user_id} and ma.message_type='CourseMessage' and cm.course_message_type='JoinCourseRequest' and cm.status=0 and cm.user_id=#{user_id}) order by ma.created_at desc;"
|
||||
@message_alls = MessageAll.find_by_sql(sql)
|
||||
@message_count = @message_alls.count
|
||||
@message_alls = paginateHelper @message_alls, 20
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
# 课程社区
|
||||
def course_community
|
||||
|
|
|
@ -4,15 +4,27 @@ class WebFooterCompaniesController < ApplicationController
|
|||
menu_item :plugins, :only => :plugins
|
||||
menu_item :info, :only => :info
|
||||
before_filter :require_admin
|
||||
before_filter :get_type
|
||||
before_filter :find_company, :except => [:index, :new, :create]
|
||||
|
||||
def index
|
||||
@companys =
|
||||
if @type == WebFooterCompany::RELATION_TYPE[1]
|
||||
WebFooterCompany.dedicators
|
||||
else
|
||||
@key = params[:key] || 'opensource'
|
||||
scope =
|
||||
case @key
|
||||
when 'partner'
|
||||
WebFooterCompany.partners
|
||||
when 'dedicator'
|
||||
WebFooterCompany.dedicators
|
||||
when 'opensource'
|
||||
WebFooterCompany.opensources
|
||||
end
|
||||
|
||||
@companies = paginateHelper scope, 25
|
||||
@page = (params['page'] || 1).to_i - 1
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html
|
||||
end
|
||||
end
|
||||
|
||||
def new
|
||||
|
@ -20,34 +32,38 @@ class WebFooterCompaniesController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
logger.info ""
|
||||
@company = WebFooterCompany.new(params[:web_footer_company])
|
||||
@company.key = (@type == WebFooterCompany::RELATION_TYPE[1]) ? WebFooterCompany::RELATION_TYPE[1] : WebFooterCompany::RELATION_TYPE[0]
|
||||
if @company.save
|
||||
@key = params[:web_footer_company][:key]
|
||||
if @company.save!
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
redirect_to web_footer_companies_url(key: @key)
|
||||
else
|
||||
flash[:error] = "#{l :web_footer_company_create_fail}: #{@company.errors.full_messages[0]}"
|
||||
respond_to do |format|
|
||||
format.html { redirect_to new_web_footer_company_path(type: @type) }
|
||||
format.html { redirect_to new_web_footer_company_path(key: @key) }
|
||||
format.api { render_validation_errors(@company) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def move
|
||||
if request.put? and @company.update_attributes(params[:company])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
else
|
||||
render :action => 'edit'
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
@company = WebFooterCompany.find(params[:id])
|
||||
@company.destroy
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
end
|
||||
|
||||
def edit
|
||||
@company = WebFooterCompany.find(params[:id])
|
||||
end
|
||||
|
||||
def update
|
||||
@company = WebFooterCompany.find(params[:id])
|
||||
if @company.update_attributes(params[:web_footer_company])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to web_footer_companies_url(type: @type)
|
||||
|
@ -59,8 +75,8 @@ class WebFooterCompaniesController < ApplicationController
|
|||
|
||||
private
|
||||
|
||||
def get_type
|
||||
@type = params[:type].to_s.strip
|
||||
def find_company
|
||||
@company = WebFooterCompany.find(params[:id])
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -23,9 +23,9 @@ module HomesHelper
|
|||
|
||||
def render_pool_name poll
|
||||
case poll
|
||||
when 'opensource' then '合作共建开源'
|
||||
when 'partner' then '合作机构'
|
||||
when 'dedicator' then '合作共建平台'
|
||||
else '合作机构'
|
||||
when 'dedicator' then '技术合作单位'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module UsersHelper
|
|||
end
|
||||
|
||||
def task_count(unsolved_issues_count, unfinished_homework_count, unfinished_test_count, unfinished_poll_count, anonymous_evaluation_count, unapproval_homework)
|
||||
result = unsolved_issues_count + unfinished_homework_count + unfinished_test_count + unfinished_poll_count + anonymous_evaluation_count + unapproval_homework
|
||||
result = unsolved_issues_count.to_i + unfinished_homework_count.to_i + unfinished_test_count.to_i + unfinished_poll_count.to_i + anonymous_evaluation_count.to_i + unapproval_homework.to_i
|
||||
end
|
||||
|
||||
# 判断某个时间再多少天前
|
||||
|
@ -132,13 +132,13 @@ module UsersHelper
|
|||
def pull_request_message_status ma
|
||||
case ma.status
|
||||
when 1
|
||||
"创建了PullRequest:"
|
||||
"创建了PullRequest"
|
||||
when 2
|
||||
"接受了PullRequest:"
|
||||
"接受了PullRequest"
|
||||
when 3
|
||||
"重新打开了PullRequest:"
|
||||
"重新打开了PullRequest"
|
||||
when 4
|
||||
"关闭了PullRequest:"
|
||||
"关闭了PullRequest"
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -169,11 +169,11 @@ module UsersHelper
|
|||
def applied_project_tip applied_message
|
||||
case applied_message.status
|
||||
when 4
|
||||
"拒绝申请加入:"
|
||||
"拒绝申请加入"
|
||||
when 5,3,2,1,7
|
||||
"申请加入:"
|
||||
"申请加入"
|
||||
when 6
|
||||
"同意申请加入:"
|
||||
"同意申请加入"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -187,9 +187,9 @@ module UsersHelper
|
|||
def applied_school_tip applied_message
|
||||
case applied_message.status
|
||||
when 1,2,3
|
||||
"您添加新的单位:"
|
||||
"您添加新的单位"
|
||||
when 0
|
||||
"申请了单位:"
|
||||
"申请了单位"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -202,7 +202,7 @@ module UsersHelper
|
|||
when 4
|
||||
"婉拒您"
|
||||
when 5,3,2,1,7
|
||||
"申请:"
|
||||
"申请"
|
||||
when 6
|
||||
"同意您"
|
||||
end
|
||||
|
|
|
@ -14,4 +14,8 @@ module WebFooterCompaniesHelper
|
|||
def label_edit_button_name type
|
||||
(@type == WebFooterCompany::RELATION_TYPE[1]) ? l(:label_new_open_source_company) : l(:label_edit_company)
|
||||
end
|
||||
|
||||
def hash_company_types
|
||||
{ "首页合作共建开源" => "opensource", "首页技术合作单位" => "dedicator", "网站页脚合作单位" => "partner" }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -341,6 +341,20 @@ class User < Principal
|
|||
(self.login.to_i.to_s == self.login || self.login.include?(".") || self.login.include?("%") || self.login.include?("?")) ? id : login
|
||||
end
|
||||
|
||||
def check_user_him(user_id)
|
||||
if id == user_id
|
||||
"我"
|
||||
else
|
||||
"TA"
|
||||
end
|
||||
end
|
||||
|
||||
#判断是否可以点击项目或issue
|
||||
def user_can_see_project(target)
|
||||
return false if target.blank?
|
||||
self.admin? || target.is_public || target.user_id == id || User.current.member_of?(target)
|
||||
end
|
||||
|
||||
|
||||
def my_blogs_count
|
||||
self.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count
|
||||
|
@ -391,14 +405,50 @@ class User < Principal
|
|||
@base_homepage
|
||||
end
|
||||
|
||||
def get_user_projects
|
||||
projects.order("updated_on desc")
|
||||
end
|
||||
|
||||
#未解决的issue
|
||||
def user_unsolve_issues
|
||||
Issue.where(:assigned_to_id => id, :status_id => [1, 2, 4, 6]).includes(:author, :project).order("updated_on desc")
|
||||
end
|
||||
|
||||
def project_relate_messages
|
||||
sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
|
||||
left join `applied_messages` apm on ma.message_id=apm.id
|
||||
where (ma.user_id =#{id} and ma.message_type = 'ForgeMessage' and fm.user_id=#{id} and fm.forge_message_type != 'News') or
|
||||
(ma.user_id=#{id} and ma.message_type='AppliedMessage' and apm.applied_type = 'AppliedProject' and apm.user_id =#{id}) ORDER BY ma.created_at desc;"
|
||||
MessageAll.find_by_sql(sql)
|
||||
end
|
||||
|
||||
#未处理的消息通知
|
||||
def user_unsolve_messages
|
||||
sql = "SELECT * FROM `message_alls` ma left join `forge_messages` fm on ma.message_id=fm.id
|
||||
left join `course_messages` cm on ma.message_id=cm.id left join `applied_messages` apm on ma.message_id=apm.id
|
||||
where (ma.user_id =#{id} and ma.message_type = 'ForgeMessage' and fm.forge_message_type='PullRequest' and fm.status=0 and fm.user_id=#{id}) or
|
||||
(ma.user_id=#{id} and ma.message_type='AppliedMessage' and apm.applied_type in ('Organization', 'AppliedContest', 'StudentWorksScoresAppeal', 'AppliedProject', 'ApplyAddSchools') and apm.user_id =#{id} and apm.status =0) or
|
||||
(ma.user_id=#{id} and ma.message_type='CourseMessage' and cm.course_message_type='JoinCourseRequest' and cm.status=0 and cm.user_id=#{id}) ORDER BY ma.created_at desc;"
|
||||
MessageAll.find_by_sql(sql)
|
||||
end
|
||||
|
||||
#用户的待办事项计数,包括通知和issue的数量
|
||||
def count_undo_items
|
||||
issues_count = user_unsolve_issues.count
|
||||
apply_messages_count = user_unsolve_messages.count
|
||||
issues_count + apply_messages_count
|
||||
end
|
||||
|
||||
|
||||
# 查询指派给我的缺陷记录
|
||||
def count_new_issue_assign_to
|
||||
self.issue_assigns
|
||||
end
|
||||
|
||||
# 新消息统计
|
||||
# 新消息统计,
|
||||
def count_new_message
|
||||
if OnclickTime.where("user_id =?", User.current).first.nil?
|
||||
message_new_time = OnclickTime.where("user_id =?", User.current).first
|
||||
if message_new_time.nil?
|
||||
message_new_time = OnclickTime.new
|
||||
message_new_time.user_id = User.current.id
|
||||
# 第一次初始化点击铃铛时间
|
||||
|
@ -418,7 +468,10 @@ class User < Principal
|
|||
org_count = OrgMessage.where("user_id=? and viewed =? and created_at >?", user.id,0, onclick_time).count
|
||||
applied_count = AppliedMessage.where("user_id=? and viewed =? and created_at >?", user.id, 0, onclick_time).count
|
||||
blog_message_count = BlogMessage.where("user_id=? and viewed=? and created_at >?", user.id, 0, onclick_time).count
|
||||
message_new_time.update_attribute(:onclick_time, Time.now)
|
||||
messages_count = course_count + contest_count + forge_count + user_feedback_count + user_memo_count + system_messages_count + at_count + org_count + applied_count + blog_message_count
|
||||
|
||||
|
||||
end
|
||||
|
||||
# 查询指派给我的缺陷记录
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
class WebFooterCompany < ActiveRecord::Base
|
||||
RELATION_TYPE = %w(partner dedicator) # partner: 首页的开源生态模块中的单位; partner:与平台的合作单位
|
||||
attr_accessible :logo_size, :name, :url
|
||||
# key字段说明:
|
||||
# partner:网站页脚合作单位(管理员页面页脚), dedicator: 首页技术合作单位; opensource: 首页共建开源单位
|
||||
RELATION_TYPE = %w(partner dedicator opensource)
|
||||
acts_as_list
|
||||
attr_accessible :logo_size, :name, :url, :position, :move_to, :key
|
||||
validates :name, presence: true, length: { maximum: 500 }
|
||||
validates :key, inclusion: { in: %w(partner dedicator opensource), message: "%{value} is not a valid value." }
|
||||
validates :url, length: { maximum: 500 },
|
||||
format: { with: /(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:\/~\+#]*[\w\-\@?^=%&\/~\+#])?/,
|
||||
message: :invalid
|
||||
}
|
||||
|
||||
scope :partners, -> { where(:key => WebFooterCompany::RELATION_TYPE[0]) }
|
||||
scope :dedicators, -> { where(:key => WebFooterCompany::RELATION_TYPE[1]) }
|
||||
scope :desc, -> { order('position ASC') }
|
||||
scope :partners, -> { desc.where(:key => 'partner') }
|
||||
scope :dedicators, -> { desc.where(:key => 'dedicator') }
|
||||
scope :opensources, -> { desc.where(:key => 'opensource') }
|
||||
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ class HomesService
|
|||
home.update_attributes!(users_count: home.users_count + sync_count)
|
||||
when "project"
|
||||
home.update_attributes!(projects_count: home.projects_count + sync_count)
|
||||
when 'scholl'
|
||||
when 'school'
|
||||
home.update_attributes!(scholls_count: home.scholls_count + sync_count)
|
||||
when "practical_training_project"
|
||||
home.update_attributes!(practical_training_projects_count: home.practical_training_projects_count + sync_count)
|
||||
|
|
|
@ -6,8 +6,7 @@
|
|||
<%= text_field_tag 'web_title', params[:wbe_title],:value => @first_page.web_title, :size => 30,:style => "font-size:small;width:490px;margin-left:10px;" %>
|
||||
</p>
|
||||
<%= render 'tab_partial' %>
|
||||
<div style="float:right"><%= link_to l(:label_cooperation_compnay), web_footer_companies_path %></div>
|
||||
<div style="float:right; margin-right: 10px"><%= link_to l(:label_open_source_compnay), web_footer_companies_path(type: WebFooterCompany::RELATION_TYPE[1]) %></div>
|
||||
<div style="float:right;"><%= link_to l(:label_cooperation_compnay), web_footer_companies_path %></div>
|
||||
<h4><%=l(:label_web_footer_page)%></h4>
|
||||
|
||||
<p style="margin-left:60px;padding-right: 20px;">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<div class="homepageRight mt0 ml10">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName break_word" style="width: 600px;">
|
||||
<%= @board.parent_id.nil? ? "班级讨论区" : "#{@board.name}" %>
|
||||
<%= @board.parent_id.nil? ? "班级讨论区" : "#{h @board.name}" %>
|
||||
</div>
|
||||
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@board.course)) %>
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
<div class="list-file">
|
||||
<div><span class="item_list fl"></span>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :target => '_blank', :class => "list-title-normal fl" %>
|
||||
<%= link_to h(activity.subject), User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :target => '_blank', :class => "list-title-normal fl" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :target => '_blank', :class => "list-title-normal f1" %>
|
||||
<%= link_to h(activity.parent.subject), User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :target => '_blank', :class => "list-title-normal f1" %>
|
||||
<% end %>
|
||||
<% if activity.sticky == 1 %>
|
||||
<span class="fl ml10 red-cir-btn">顶</span>
|
||||
|
@ -58,4 +58,4 @@
|
|||
<p class="sy_tab_con_p">没有数据可以显示!</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
<%# <% partners.each do |partner| %>
|
||||
<%#= link_to image_tag(url_to_avatar(partner),:alt=> partner.name ), partner.url, :target => "_blank" %>
|
||||
<%# end %>
|
||||
<a href="https://www.openi.org.cn/" target="_blank"><img src="/images/partner/main/p_5.png"></a>
|
||||
<a href="https://www.ihub.org.cn/" target="_blank"><img src="/images/partner/main/p_2.png"></a>
|
||||
<a href="http://opengcc.org/" target="_blank"><img src="/images/partner/main/p_1.png"></a>
|
||||
<a href="http://111.186.57.55/" target="_blank"><img src="/images/partner/main/p_3.png"></a>
|
||||
<a href="http://111.186.57.55/" target="_blank"><img src="/images/partner/main/p_6.png"></a>
|
||||
<% partners.each do |partner| %>
|
||||
<%= link_to image_tag(url_to_avatar(partner),:alt=> partner.name ), partner.url, :target => "_blank" %>
|
||||
<% end %>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<p class="f16">实训项目</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="data_number"><%= @home.practical_training_projects_count %></p>
|
||||
<p class="data_number"><%= @home.scholls_count %></p>
|
||||
<p class="f16">应用高校</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<a href="<%= homes_path %>" class="c_grey02">首页</a><span class="c_grey02 ml3 mr3">></span>
|
||||
<span>开源生态</span>
|
||||
</p>
|
||||
|
||||
<% @companies.each do |pool, coms| %>
|
||||
<p class="f28 lh24 mb20"><%= render_pool_name(pool) %></p>
|
||||
<ul class="partnerList clearfix mb30">
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: true,init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<script xmlns="http://www.w3.org/1999/html">
|
||||
function add_style(){
|
||||
if($("select[id='tracker_id']").val() != 0){
|
||||
|
@ -256,11 +255,7 @@
|
|||
</a>
|
||||
</li>
|
||||
<div class="cl"></div>
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<div class="issues_filter ">
|
||||
<div class="issues_form_filter mt5 mr5">
|
||||
<%= select( :issue,:user_id, @project.members.order("lower(users.login)").map{|c| [User.find(c.user_id).show_name, c.user_id]}.unshift(["发布人",0]),
|
||||
|
@ -309,6 +304,7 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
@ -319,13 +315,13 @@
|
|||
<%#= render :partial => 'issues/all_list', :locals => {:issues => @issues, :query => @query,:issue_pages=>@issue_pages,:issue_count=>@issue_count,:project=>@project,:subject=>@subject} %>
|
||||
</div><!--issues_con_list end-->
|
||||
<div class="cl"></div>
|
||||
</div><!--issues_filter end-->
|
||||
<!--issues_filter end-->
|
||||
<div id="issues_list_content_1">
|
||||
</div><!--issues_list_content_1 end-->
|
||||
<div id="issues_list_content_2" class="undis">
|
||||
</div><!--issues_list_content_2 end-->
|
||||
<div id="issues_list_content_3" class="undis">
|
||||
</div><!--issues_list_content_3 end-->
|
||||
</div><!--issues_list_content_3 end-->
|
||||
<!--issues_con_list end-->
|
||||
|
||||
<!--缺陷列表结束-->
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<li id="board_children_<%=board.id %>">
|
||||
<% count = board ? board.messages.count : 0 %>
|
||||
<a href="<%=contest_boards_path(@contest, :board_id =>board.id) %>">
|
||||
<font class="hidden dis" style="max-width: 120px;"><%=board.name %></font>
|
||||
<font class="hidden dis" style="max-width: 120px;"><%= h board.name %></font>
|
||||
<span style="vertical-align: top;"><%=count %></span>
|
||||
</a>
|
||||
<% if User.current.logged? && is_admin %>
|
||||
|
@ -14,4 +14,4 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="navHomepage">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%=link_to image_tag("../images/logo_blue.png",width:"51px", height: "45px",class: "mt3"), homes_path()%>
|
||||
<%=link_to image_tag("../images/logo_blue.png",width:"51px", height: "45px",class: "mt3"), ''%>
|
||||
</div>
|
||||
<div class="fl">
|
||||
<ul>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</div>
|
||||
|
||||
<div class="navHomepageNews" id="user_messages">
|
||||
<a href="<%= user_path(User.current, :click_user_message => true) %>" class="fl"><i class="iconfont icon-xiaoxilingdang fontGrey4 f22 fl mt7"></i></a>
|
||||
<a href="<%= user_message_path(User.current,click_user_message: true) %>" class="fl"><i class="iconfont icon-xiaoxilingdang fontGrey4 f22 fl mt7"></i></a>
|
||||
<% new_message_count = User.current.count_new_message.to_i %>
|
||||
<% if new_message_count > 0 %>
|
||||
<%#= link_to new_message_count, user_path(User.current, :click_user_message => true), :class => "newsActive", :target => "_Blank" %>
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
<!--<a onclick = "show_more();" id = "show_more_messages" style="display: none; cursor: pointer;" class = "shadowbox_news_all">展开更多</a>-->
|
||||
<%= link_to '查看全部', user_path(User.current), :id =>'show_all_messages', :class => "shadowbox_news_all", :target =>"_Blank" %>
|
||||
<%= link_to '查看全部', user_message_path(User.current), :id =>'show_all_messages', :class => "shadowbox_news_all", :target =>"_Blank" %>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<%#= render :partial => 'layouts/new_feedback' %>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
<%= yield %>
|
||||
<%= call_hook :view_layouts_base_content %>
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
|
@ -41,6 +40,7 @@
|
|||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="deploy-loading" style="display:none;"><span>部署中...</span></div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @project} %>
|
||||
|
@ -59,4 +59,3 @@
|
|||
</script>
|
||||
<%= javascript_include_tag 'cookie','project',"avatars", 'header','prettify','select_list_move','attachments' %>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
<!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','css/common', 'css/structure','css/public', 'prettify','css/project','css/courses','css/popup','css/syllabus','css/moduel', 'css/user', 'css/font-awesome.css','css/iconfont/iconfont', :media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
</head>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="pageContainer">
|
||||
<div class="navContainer">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<% else%>
|
||||
<%= render :partial => 'layouts/unlogin_header' %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<div class="mt15">
|
||||
<div class="df middlePanel">
|
||||
<div class="fl pagePanel_left">
|
||||
<%= render partial: "users/user_message_left" %>
|
||||
</div>
|
||||
<div class="fl pagePanel_right mb20">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -14,320 +14,32 @@
|
|||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
<!-- MathJax的配置 -->
|
||||
<script type="text/javascript"
|
||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
||||
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
|
||||
showMathMenu: false,
|
||||
showMathMenuMSIE: false,
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var onUserCard = false;
|
||||
var onImage = false;
|
||||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
});
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
});
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
});
|
||||
|
||||
//侧导航栏配置设置
|
||||
$(".homepageLeftMenuCoursesLine").mouseover(function(){
|
||||
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -82px -399px no-repeat");
|
||||
$(this).children().css("color","#ffffff");
|
||||
});
|
||||
$(".homepageLeftMenuCoursesLine").mouseout(function(){
|
||||
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -6px -354px no-repeat");
|
||||
$(this).children().css("color","#808080");
|
||||
});
|
||||
$(".subNavRow").mouseover(function(){
|
||||
$(this).css("background-color","#269ac9");
|
||||
$(this).children().css("color","#ffffff");
|
||||
});
|
||||
$(".subNavRow").mouseout(function(){
|
||||
$(this).css("background-color","#ffffff");
|
||||
$(this).children().css("color","#888888");
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
<body onload="prettyPrint();">
|
||||
<div class="pageContainer">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user %>
|
||||
<% if User.current.logged? %>
|
||||
<div class="navContainer">
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<% else%>
|
||||
<% else%>
|
||||
<%= render :partial => 'layouts/unlogin_header' %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<!--div class="homepageRightBannerImg"></div-->
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContent">
|
||||
<div class="homepageLeft mt10" id="LSide">
|
||||
<div class="home-user-new-img mb10">
|
||||
<% if User.current.logged? && User.current == @user %>
|
||||
<%= link_to image_tag(url_to_avatar(@user),width:"238", height: "238", :id => 'nh_source_tx'),
|
||||
my_clear_user_avatar_temp_path, :remote => true %>
|
||||
<% else %>
|
||||
<%=image_tag(url_to_avatar(@user),width:"238", height: "238", :id=>'nh_source_tx') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="home-user-newinfo-box mb10">
|
||||
<h3 class="mb5 fontGrey3 break_full_word">
|
||||
<%= link_to @user.show_name, user_path(@user), :class => "mb5 fontGrey3" %>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
(<%= get_user_roll @user %>)
|
||||
<% end%>
|
||||
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
|
||||
<span class="<%= @user.user_extensions.gender == 1 ? 'user_leftinfo_female fr' : 'user_leftinfo_male fr' %> "></span>
|
||||
<% end %>
|
||||
</h3>
|
||||
<h4 class="fontGrey2 mb5"><%= @user.login %></h4>
|
||||
<p class="fontGrey2">
|
||||
<% if !(@user.user_extensions.school_id.blank? || @user.user_extensions.school.nil?) %>
|
||||
<%= @user.user_extensions.school.name %>
|
||||
<% end %>
|
||||
</p>
|
||||
<span class="border-line mt10 mb10"></span>
|
||||
<ul class="home-user-newinfo-ul ">
|
||||
<li class="clear">
|
||||
<a href="<%= user_blogs_path(:user_id => @user) %>" class="fl linkGrey7 f14">技术文章</a>
|
||||
<span class="issues_nav_tag fr"><%= @user.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count %></span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<a href="<%= user_watchlist_user_path(@user) %>" class="fl linkGrey7 f14" >关注</a>
|
||||
<span class="issues_nav_tag fr" id="user_watchers_number"><%= User.watched_by(@user).count %></span>
|
||||
</li>
|
||||
<li class="clear">
|
||||
<a href="<%= user_fanslist_user_path(@user) %>" class="fl linkGrey7 f14">粉丝</a>
|
||||
<span class="issues_nav_tag fr" id="user_fans_number"><%= @user.watcher_users.count %></span>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clear">
|
||||
<% if User.current.logged?%>
|
||||
<% if User.current == @user %>
|
||||
<%= link_to '个人主页', homepage_user_path(@user), :class => "home-big-btn-grey", :target => '_blank' %>
|
||||
<% else %>
|
||||
<% if(@user.watched_by?(User.current)) %>
|
||||
<%= link_to "取消关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
|
||||
:class => "home-btn-grey fl mr12",
|
||||
:method => "delete",
|
||||
:remote => "true",
|
||||
:title => "取消关注" %>
|
||||
<% else %>
|
||||
<%= link_to "添加关注",
|
||||
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
|
||||
:class => "home-btn-grey fl mr12",
|
||||
:method => "post",
|
||||
:remote => "true",
|
||||
:title => "添加关注" %>
|
||||
<% end %>
|
||||
<% if @user.base_homepage.nil? %>
|
||||
<a href="javascript:void(0)" class ="home-btn-grey fl" title="该用户暂未设置主页">TA的主页</a>
|
||||
<% else %>
|
||||
<%= link_to "TA的主页", homepage_user_path(@user.login), :class => 'home-btn-grey fl', :target => '_blank' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="middlePanel">
|
||||
<div class="mt15">
|
||||
<div class="df middlePanel">
|
||||
<div class="fl pagePanel_left">
|
||||
<%= render partial: "users/user_show_left" %>
|
||||
</div>
|
||||
<div class="fl pagePanel_right mb20">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<% if is_current_user %>
|
||||
<% if hidden_unproject_infos && user_course_count > 0 %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "课程社区", user_course_community_path(User.current), :class => "fl" , :target => "_blank", :style => "color:#666" %>
|
||||
</h3>
|
||||
<%# if hidden_unproject_infos %>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-class clear">
|
||||
<%= link_to user_course_count > 0 ? "课程<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top: 9px;font-size: 11px;background-color:#f5f2f2;color:#666;'>#{user_course_count}</span>".html_safe : "课程",
|
||||
user_course_community_path(User.current), :id => "user_course_list", :target => "_blank" %>
|
||||
</li>
|
||||
<% if user_manage_homework_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-homework clear">
|
||||
<%= link_to user_manage_homework_count > 0 ? "我发布的作业<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_manage_homework_count}</span>".html_safe : "我发布的作业",
|
||||
user_manage_homeworks_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if user_receive_homework_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-homework clear">
|
||||
<%= link_to "我收到的作业<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_receive_homework_count}</span>".html_safe,
|
||||
user_receive_homeworks_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="home-user-leftnav-li icons-doc clear">
|
||||
<%= link_to "题库", user_homeworks_user_path(User.current), :target => "_blank", :class => "fl", :style => "color:#666" %>
|
||||
</li>
|
||||
<li class="home-user-leftnav-li icons-download clear">
|
||||
<%= link_to "资源库", user_resource_user_path(User.current, :type => 1), :target => "_blank", :class => "fl", :style => "color:#666" %>
|
||||
</li>
|
||||
</ul>
|
||||
<%# end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if user_project_count > 0%>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl", :target => "_blank", :style => "color:#666" %>
|
||||
</h3>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_project_count}</span>".html_safe : "项目",
|
||||
user_project_community_path(User.current), :id => 'user_project_list', :target => "_blank" %>
|
||||
</li>
|
||||
<% if issues_author_is_self_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_author_is_self_count > 0 ? "我发布的issue<span class='issues_nav_tag mr10 fr'style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:##666;'>#{issues_author_is_self_count}</span>".html_safe : "我发布的issue",
|
||||
user_manage_issues_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if issues_assigned_is_self_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-issue clear">
|
||||
<%= link_to issues_assigned_is_self_count > 0 ? "我收到的issue<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{issues_assigned_is_self_count}</span>".html_safe : "我收到的issue",
|
||||
user_receive_issues_user_path(@user), :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if hidden_unproject_infos && user_contest_count > 0 %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "竞赛社区", user_contest_community_path(User.current), :class => "fl" , :target => "_blank"%>
|
||||
</h3>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-contest clear">
|
||||
<%= link_to user_contest_count > 0 ? "竞赛<span class='issues_nav_tag mr10 fr' style='line-height:18px;margin-top: 9px;'>#{user_contest_count}</span>".html_safe : "竞赛",
|
||||
user_contest_community_path(User.current), :id => "user_contest_list", :target => "_blank" %>
|
||||
</li>
|
||||
</ul>
|
||||
<%# end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >Ta在确实
|
||||
<span class="fr mr5" style="font-size:12px;color: #7f7f7f;"><%= time_tag(@user.created_on).html_safe %></span>
|
||||
</h3>
|
||||
<ul>
|
||||
<% if hidden_unproject_infos && user_course_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-class clear">
|
||||
<%= link_to user_course_count > 0 ? "课程<span class='issues_nav_tag ml140' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_course_count}</span>".html_safe : "课程",
|
||||
user_course_community_path(@user), :id => "user_course_list", :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if user_project_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_project_count > 0 ? "项目<span class='issues_nav_tag ml140' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_project_count}</span>".html_safe : "项目",
|
||||
user_project_community_path(@user), :id => 'user_project_list', :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if hidden_unproject_infos && user_contest_count > 0 %>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
<%= link_to user_contest_count > 0 ? "竞赛<span class='issues_nav_tag ml140' style='line-height:18px;margin-top:9px;font-size:11px;background-color:#f5f2f2;color:#666;'>#{user_contest_count}</span>".html_safe : "竞赛",
|
||||
user_contest_community_path(@user), :id => 'user_contest_list', :class => "fl", :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="user_leftnav ">
|
||||
<ul class="users_accordion mb10">
|
||||
<li id="user_10" class="user_icons_mes">
|
||||
<%= link_to "留言", feedback_path(@user, :host=> Setting.host_user)%>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @user %>
|
||||
<div class="">
|
||||
<ul class="home-user-footerinfo">
|
||||
<% unless @user.user_extensions.location.blank? %>
|
||||
<li><i class="icon-map-marker mr5 ml10 f14"></i>
|
||||
<span><%= @user.user_extensions.location %>-<%= @user.user_extensions.location_city %></span>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><i class="icon-time mr5 ml10 f14"></i><span><%= @user.created_on.strftime('%Y-%m-%d') %>开始使用</span></li>
|
||||
<li style="color:#b3b3b3"><i class="icon-eye-open mr5 ml10 f14"></i><span><%= @user.visits.to_i %>次访问(自2016年5月)</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<% if hidden_unproject_infos %>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||
<%=render :partial => 'layouts/upload_avatar', :locals => {:source => @user} %>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#user_hide_project').hide();
|
||||
autoUrl("user_brief_introduction_show");
|
||||
if(<%= @is_course == 1 %>) {
|
||||
$("#user_course_list").addClass('active');
|
||||
} else if(<%= @is_project == 1 %>) {
|
||||
$("#user_project_list").addClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
$("#courseMenu").mouseenter(function(){
|
||||
$("#topnav_course_menu").show();
|
||||
});
|
||||
$("#courseMenu").mouseleave(function(){
|
||||
$("#topnav_course_menu").hide();
|
||||
});
|
||||
$("#projectMenu").mouseenter(function(){
|
||||
$("#topnav_project_menu").show();
|
||||
});
|
||||
$("#projectMenu").mouseleave(function(){
|
||||
$("#topnav_project_menu").hide();
|
||||
});
|
||||
// 如果是强制修改资料页面,则除退出按钮外,其他按钮的连接都失效
|
||||
<% if @force %>
|
||||
// 禁用所有a标签
|
||||
var t = document.getElementsByTagName("a");
|
||||
len = t.length;
|
||||
for(var i=0;i<len;i++){
|
||||
t[i].href = 'javascript:void(0)';
|
||||
// 火狐浏览器点击弹开空白页
|
||||
t[i].target = '_self';
|
||||
}
|
||||
// 退出按钮可用
|
||||
var d = document.getElementById("logout_trustie");
|
||||
d.href='<%= logout_url_without_domain %>';
|
||||
// 提问按钮不可用
|
||||
document.getElementById('inquiry_question').onclick = function (){return false;};
|
||||
<% end %>
|
||||
</script>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -65,7 +65,7 @@
|
|||
</div>
|
||||
<%end%>
|
||||
<div class="postDetailTitle fl break_full_word">
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= @topic.subject%></a>
|
||||
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="overflow:hidden;">主题: <%= h @topic.subject%></a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="postDetailCreater">
|
||||
|
@ -74,7 +74,7 @@
|
|||
<div class="postDetailDate mb5"><%= format_time( @topic.created_on)%></div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepagePostIntro memo-content upload_img break_full_word ke-block" id="message_description_<%= @topic.id %>" >
|
||||
<%= @topic.content.html_safe%>
|
||||
<%= h @topic.content %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Message', :user_activity_id => @topic.id}%>
|
||||
|
||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||
<%= reply.content.html_safe%>
|
||||
<%= h reply.content %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
|
@ -57,4 +57,4 @@
|
|||
<%= link_to '点击展开更多回复', board_message_path(@topic.board_id, @topic, :page => @page),:remote=>true %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -352,7 +352,7 @@
|
|||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<%= sanitize comment.notes %></div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
|
@ -423,4 +423,4 @@
|
|||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
<% else %>
|
||||
<%= link_to "重新分析", quality_analysis_path(:id => @project.id, :repository_id => @repository.identifier, :rev => @rev, :default_branch => @g_default_branch, :type => "2"), :remote => true, :class => "btn_zipdown fl ml10" %>
|
||||
<% end %>
|
||||
<% if @project.id == 5787 %>
|
||||
<%= link_to '云端编程', "http://106.75.119.131:8080/dashboard/#/ide/che/trustie_che_demo", :class => "btn_zipdown fl ml10"%>
|
||||
<%= link_to '云端部署', "javascript:void(0)", :class => "btn_zipdown fl ml10", :onclick => "deploy()", :remote => true%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% unless QualityAnalysis.where(:project_id => @project.id).first.nil? %>
|
||||
<%= link_to "代码分析结果", project_quality_analysis_path(:project_id => @project.id), :class => "btn_zipdown fl ml10" %>
|
||||
|
@ -72,3 +76,31 @@
|
|||
<%# end %>
|
||||
|
||||
<% html_title(l(:label_repository)) -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
var i=0;
|
||||
function deploy(){
|
||||
if (i == 0) {
|
||||
$.ajax({
|
||||
url: "<%= build_socks_shop_project_repositories_path(@project) %>",
|
||||
type:'post',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
success: function(){
|
||||
console.log('request success!')
|
||||
},
|
||||
beforeSend: function(){ },
|
||||
complete: function(){ }
|
||||
});
|
||||
}
|
||||
|
||||
i++;
|
||||
if(i<11) {
|
||||
$("#deploy-loading").show()
|
||||
setTimeout("deploy()",1000);
|
||||
}else {
|
||||
i = 0
|
||||
$("#deploy-loading").hide()
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -1,16 +1,34 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.applied), :width => "30", :height => "30"), organization_path(ma.applied_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.applied.name, organization_path(ma.applied_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class='homepageNewsType fl'>申请子域名:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<!--<div class="shortMessageWidth">-->
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<%#=link_to image_tag(url_to_avatar(ma.applied), :width => "30", :height => "30"), organization_path(ma.applied_id), :target => '_blank' %>
|
||||
<!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<%#=link_to ma.applied.name, organization_path(ma.applied_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<!-- <span class='homepageNewsType fl'>申请子域名:</span>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<%#= ma.name %>
|
||||
<!-- </li>-->
|
||||
<!--</div>-->
|
||||
<!--<li class="messageOperateContents fl">-->
|
||||
<!-- <span><%#= render :partial => "users/user_message_organization_applied_action", :locals => {:ma => ma} %></span>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="homepageNewsTime fr"><%#= time_tag(ma.updated_at).html_safe %> </li>-->
|
||||
|
||||
|
||||
<%=link_to image_tag(url_to_avatar(ma.applied), :width => "30", :height => "30"), organization_path(ma.applied_id), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to ma.applied.name, organization_path(ma.applied_id), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="ml20"><%= render :partial => "users/user_message_organization_applied_action", :locals => {:ma => ma} %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请子域名:
|
||||
</span>
|
||||
<%= ma.name %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<span><%= render :partial => "users/user_message_organization_applied_action", :locals => {:ma => ma} %></span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.updated_at).html_safe %> </li>
|
||||
</p>
|
||||
</div>
|
|
@ -1,20 +1,49 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% if ma.status == 4 || ma.status == 6 %>
|
||||
<%= link_to image_tag(url_to_avatar(User.where(:id => ma.user_id).first), :width => "30", :height => "30"), user_path(User.where(:id => ma.user_id).first), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to image_tag(url_to_avatar(applied_project_users(ma)), :width => "30", :height => "30"), user_path(applied_project_users(ma)), :target => '_blank' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<!--<div class="shortMessageWidth">-->
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<%# if ma.status == 4 || ma.status == 6 %>
|
||||
<%#= link_to image_tag(url_to_avatar(User.where(:id => ma.user_id).first), :width => "30", :height => "30"), user_path(User.where(:id => ma.user_id).first), :target => '_blank' %>
|
||||
<%# else %>
|
||||
<%#= link_to image_tag(url_to_avatar(applied_project_users(ma)), :width => "30", :height => "30"), user_path(applied_project_users(ma)), :target => '_blank' %>
|
||||
<%# end %>
|
||||
<!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<%#= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<%# project = Project.find(ma.project_id) %>
|
||||
<%#= link_to project.name, project_path(ma.project_id), :class => "link-blue", :target => '_blank', :title => "#{project.name}" %>
|
||||
<!-- </li>-->
|
||||
<!--</div>-->
|
||||
<!--<li class="messageOperateContents fl">-->
|
||||
<!-- <span><%#= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %></span>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="homepageNewsTime fr"><%#= time_tag(ma.created_at).html_safe %> </li>-->
|
||||
|
||||
|
||||
<!--</div>-->
|
||||
|
||||
<% if ma.status == 4 || ma.status == 6 %>
|
||||
<%= link_to image_tag(url_to_avatar(User.where(:id => ma.user_id).first), class: "r_list_img"), user_path(User.where(:id => ma.user_id).first), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to image_tag(url_to_avatar(applied_project_users(ma)), class: "r_list_img"), user_path(applied_project_users(ma)), :target => '_blank' %>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<!-- <span class="fontGrey4 f12"><%#= time_from_now(ma.updated_at) %></span>-->
|
||||
<span>
|
||||
<%= render :partial => "users/user_message_applide_users", :locals =>{:ma => ma} %>
|
||||
</span>
|
||||
<span class="ml15"><%= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请以“<%= applied_project_message_type(ma.role) %>”身份加入:
|
||||
</span>
|
||||
<% project = Project.find(ma.project_id) %>
|
||||
<%= link_to project.name, project_path(ma.project_id), :class => "link-blue", :target => '_blank', :title => "#{project.name}" %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<span><%= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %></span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
<% user_can_click = User.current.user_can_see_project(project) %>
|
||||
|
||||
<%= link_to project.name, "#{user_can_click ? project_path(ma.project_id) : "javascript:void(0)"}" ,
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
|
@ -1,35 +1,33 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(ma.apply_user_id)), :width => "30", :height => "30"), user_path(User.find(ma.apply_user_id)), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.apply_user_id).show_name, user_path(User.find(ma.apply_user_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">申请引用作业:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.apply_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "#{user.try(:show_name)}", user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%= ma.id %>" class="ml20">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', dealwith_apply_homework_user_path(User.current, :agree=>'Y', :msg_id=>ma.id), :remote=>'true'%>
|
||||
|
|
||||
<%= link_to '拒绝', dealwith_apply_homework_user_path(User.current, :agree=>'N', :msg_id=>ma.id), :remote=>'true'%>
|
||||
<% elsif ma.apply_result == 1 %> <!-- 同意 -->
|
||||
<span class="fs12 infoTips bg-green">您已同意申请</span>
|
||||
<% elsif ma.apply_result == 2 %> <!-- 拒绝 -->
|
||||
<span class="fs12 infoTips bg-refuse">您已拒绝申请</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请引用作业:
|
||||
</span>
|
||||
<% content = ma.content.nil? ? '' : ':'+ ma.content.to_s %>
|
||||
<%= link_to User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",
|
||||
student_work_index_path(:homework => ma.course_message.id),
|
||||
:title => User.find(ma.apply_user_id).show_name+"申请引用作业\""+"#{HomeworkCommon.find(ma.course_message_id).name}"+"\"#{content}",
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}",
|
||||
:target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</p>
|
||||
</div>
|
||||
<li class="messageApplyContents fl">
|
||||
<span id="deal_info_<%= ma.id %>">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', dealwith_apply_homework_user_path(User.current, :agree=>'Y', :msg_id=>ma.id), :remote=>'true'%>
|
||||
|
|
||||
<%= link_to '拒绝', dealwith_apply_homework_user_path(User.current, :agree=>'N', :msg_id=>ma.id), :remote=>'true'%>
|
||||
<% elsif ma.apply_result == 1 %> <!-- 同意 -->
|
||||
您已同意申请
|
||||
<% elsif ma.apply_result == 2 %> <!-- 拒绝 -->
|
||||
您已拒绝申请
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
@ -1,39 +1,38 @@
|
|||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.course_message.user.show_name, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="homepageNewsType fl">申请引用资源:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %>
|
||||
<% show_content = ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %>
|
||||
<% if ma.course_message.container_type == "Course" %>
|
||||
<% user = User.find(ma.apply_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "#{user.try(:show_name)}", user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%= ma.id %>" class="ml20">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> |
|
||||
<%= link_to '拒绝', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %>
|
||||
<% elsif ma.apply_result == 1 %>
|
||||
<span class="fs12 infoTips bg-green">您已同意申请</span>
|
||||
<% elsif ma.apply_result == 2 %>
|
||||
<span class="fs12 infoTips bg-refuse">您已拒绝申请</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请引用资源:
|
||||
</span>
|
||||
<% content = ma.course_message.content.nil? ? '' : ':'+ ma.course_message.content.to_s %>
|
||||
<% show_content = ma.course_message.user.show_name + "申请引用资源\""+"#{ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename)}"+"\"#{content}" %>
|
||||
<% if ma.course_message.container_type == "Course" %>
|
||||
<%= link_to show_content, course_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% elsif ma.course_message.container_type == "Project" %>
|
||||
<% elsif ma.course_message.container_type == "Project" %>
|
||||
<%= link_to show_content, project_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% elsif ma.course_message.container_type == "OrgSubfield" %>
|
||||
<% elsif ma.course_message.container_type == "OrgSubfield" %>
|
||||
<%= link_to show_content, org_subfield_files_path(ma.course_message.container_id), :title => show_content, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% else %>
|
||||
<% else %>
|
||||
<a title="<%= show_content %>" class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>">
|
||||
<%= show_content %>
|
||||
</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<li class="messageApplyContents fl">
|
||||
<span id="deal_info_<%= ma.id %>">
|
||||
<% if ma.apply_result == 0 || ma.apply_result.nil? %>
|
||||
<%= link_to '同意', deal_with_apply_resource_user_path(User.current, :agree => 'Y', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %> |
|
||||
<%= link_to '拒绝', deal_with_apply_resource_user_path(User.current, :agree => 'N', :msg_id => ma.id, :apply_user_id => ma.course_message.apply_user_id), :remote => 'true' %>
|
||||
<% elsif ma.apply_result == 1 %>
|
||||
您已同意申请
|
||||
<% elsif ma.apply_result == 2 %>
|
||||
您已拒绝申请
|
||||
<%end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
|
@ -1,31 +1,34 @@
|
|||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% owner = User.find(ma.course_message.apply_user_id) %>
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(owner), :width => "30", :height => "30", class: "mt3"), user_path(owner) %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to owner.show_name, user_path(owner), :class => "newsBlue homepageNewsPublisher" %>
|
||||
<span class="homepageNewsType fl"><%= ma.apply_result == 2 ? '同意' : '拒绝'%>引用资源:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user = User.find(ma.course_message.apply_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "#{user.try(:show_name)}", user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%= ma.id %>" class="ml20">
|
||||
<% if ma.apply_result == 2 %>
|
||||
<span class="fs12 infoTips bg-green">同意引用资源</span>
|
||||
<% else %>
|
||||
<span class="fs12 infoTips bg-refuse">拒绝引用资源</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<% link_str = ma.apply_result == 2 ?
|
||||
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过'
|
||||
:
|
||||
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请被婉拒' %>
|
||||
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请已通过'
|
||||
:
|
||||
'您申请引用资源"'+ ma.course_message.find_attachment(ma.course_message.attachment_id).try(:filename) + '"的申请被婉拒' %>
|
||||
<% if ma.course_message.container_type == "Course" %>
|
||||
<%= link_to link_str, course_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<%= link_to link_str, course_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% elsif ma.course_message.container_type == "Project" %>
|
||||
<%= link_to link_str, project_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<%= link_to link_str, project_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% elsif ma.course_message.container_type == "OrgSubfield" %>
|
||||
<%= link_to link_str, org_subfield_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<%= link_to link_str, org_subfield_files_path(ma.course_message.container_id), :title => link_str, :class => " #{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
<% else %>
|
||||
<a title="<%= link_str %>" class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>">
|
||||
<%= link_str %>
|
||||
</a>
|
||||
<a title="<%= link_str %>" class = "<%= ma.viewed == 0 ? "newsBlack" : "newsGrey "%>">
|
||||
<%= link_str %>
|
||||
</a>
|
||||
<% end %>
|
||||
<%= link_to link_str, user_resource_user_path(User.current, :type => 2), :title => link_str,:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey "}" %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</p>
|
||||
</div>
|
|
@ -17,9 +17,9 @@
|
|||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= comment.content_detail.html_safe %></P>
|
||||
<P><%= h comment.content_detail %></P>
|
||||
<% else %>
|
||||
<%= comment.content_detail.html_safe %>
|
||||
<%= h comment.content_detail %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="orig_reply mt-10 pr" style="height: 18px;">
|
||||
|
@ -66,4 +66,4 @@
|
|||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
<div class="list-file">
|
||||
<div><span class="item_list fl"></span>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title-normal fl" %>
|
||||
<%= link_to h(activity.subject), User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title-normal fl" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title-normal f1" %>
|
||||
<%= link_to h(activity.parent.subject), User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class => "list-title-normal f1" %>
|
||||
<% end %>
|
||||
<% if activity.sticky == 1 %>
|
||||
<span class="fl ml10 red-cir-btn">顶</span>
|
||||
|
@ -81,4 +81,4 @@
|
|||
$(".listbox").css("height",tmpHeight);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
</div>
|
||||
<div class="homepagePostTitle hidden m_w530 fl">
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board_id, activity), :class=> "postGrey" %>
|
||||
<%= link_to h(activity.subject.to_s), board_message_path(activity.board_id, activity), :class=> "postGrey" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board_id, activity), :class=> "postGrey" %>
|
||||
<%= link_to h(activity.parent.subject.to_s), board_message_path(activity.board_id, activity), :class=> "postGrey" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if activity.sticky == 1 %>
|
||||
|
@ -33,9 +33,9 @@
|
|||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if activity.parent_id.nil? %>
|
||||
<% content = activity.content %>
|
||||
<% content = h activity.content %>
|
||||
<% else %>
|
||||
<% content = activity.parent.content %>
|
||||
<% content = h activity.parent.content %>
|
||||
<% end %>
|
||||
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,96 +1,10 @@
|
|||
<div class="mt20">
|
||||
<div class="df middlePanel">
|
||||
<div class="fl pagePanel_left">
|
||||
<div class="mb15 l_headPhoto">
|
||||
<div class="l_img">
|
||||
<% if User.current.logged? && User.current == @user %>
|
||||
<%= link_to image_tag(url_to_avatar(@user),width:"238", height: "238", :id => 'nh_source_tx'),
|
||||
my_clear_user_avatar_temp_path, :remote => true %>
|
||||
<% else %>
|
||||
<%=image_tag(url_to_avatar(@user),width:"238", height: "238", :id=>'nh_source_tx') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p><%= link_to @user.show_name, user_path(@user), :class => "f22 color-grey3" %></p>
|
||||
<p>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<span class="f18"><%= get_user_roll @user %></span>
|
||||
<% end%>
|
||||
</p>
|
||||
</div>
|
||||
<div class="l_InfoNav mb20">
|
||||
<li class="clearfix active">
|
||||
<a href="javascript:void(0)" class="ml30">消息</a>
|
||||
<span class="readingNum">20</span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0)" class="ml30">私信</a>
|
||||
</li>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fl pagePanel_right mb20">
|
||||
<div class="r_infos_menu">
|
||||
<li class="active"><a href="javascript:void(0)">全部</a></li>
|
||||
<li><a href="javascript:void(0)">课堂提醒</a></li>
|
||||
<li><a href="javascript:void(0)">项目提醒</a></li>
|
||||
<li><a href="javascript:void(0)">互动提醒</a></li>
|
||||
<li><a href="javascript:void(0)">审核</a></li>
|
||||
<li><a href="javascript:void(0)">通知</a></li>
|
||||
</div>
|
||||
<ul class="p_list_ul">
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span><span class="infoTips tips_high ml15">高</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span>
|
||||
<span class="infoTips tips_rightNow ml15">立刻</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span>
|
||||
<span class="infoTips tips_normal ml15">正常</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span>
|
||||
<span class="infoTips tips_urgent ml15">紧急</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span><span class="infoTips tips_low ml15">低</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$(".l_InfoNav").on("click","li",function () {
|
||||
$(".l_InfoNav li").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
<%= render partial: "users/user_message_header" %>
|
||||
|
||||
<% if @message_count > 0 %>
|
||||
<ul class="p_list_ul">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= render partial: "users/no_data" %>
|
||||
<% end %>
|
||||
|
||||
$(".r_infos_menu").on("click","li",function () {
|
||||
$(".r_infos_menu li").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
})
|
||||
</script>
|
|
@ -1,40 +1,114 @@
|
|||
<div class="shortMessageWidth">
|
||||
<% applied_contest = ma.applied %>
|
||||
<% contest = Contest.find applied_contest.contest_id %>
|
||||
<% message_user = User.find(applied_contest.user_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(message_user), :width => "30", :height => "30"), user_path(message_user), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%=link_to message_user.show_name, user_path(applied_contest.user_id),
|
||||
<!--<div class="shortMessageWidth">-->
|
||||
<%# applied_contest = ma.applied %>
|
||||
<%# contest = Contest.find applied_contest.contest_id %>
|
||||
<%# message_user = User.find(applied_contest.user_id) %>
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<!-- <div class="navHomepageLogo fl">-->
|
||||
<%#= link_to image_tag(url_to_avatar(message_user), :width => "30", :height => "30"), user_path(message_user), :target => '_blank' %>
|
||||
<!-- </div>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<!-- <span class="newsBlue homepageNewsPublisher">-->
|
||||
<!-- <%#=link_to message_user.show_name, user_path(applied_contest.user_id),-->
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
</span>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+"," %>
|
||||
申请以"<%= get_role_str ma.role %>"的身份加入竞赛:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<#!-- </span>-->
|
||||
<!-- <span class="homepageNewsType fl">-->
|
||||
<%#= message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+"," %>
|
||||
<!-- 申请以"<%#= get_role_str ma.role %>"的身份加入竞赛:-->
|
||||
<!-- </span>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<%# content = message_user.show_name + "申请成为竞赛\"" + "#{contest.name}" + "\"的" + get_role_str(ma.role) %>
|
||||
<!-- <#%= link_to contest.name, contest_path(contest.id),-->
|
||||
<!-- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>-->
|
||||
<!-- </li>-->
|
||||
<!--</div>-->
|
||||
<!--<li class="messageOperateContents fl">-->
|
||||
<!-- <span id="deal_info_<%#=ma.id%>">-->
|
||||
<%# if ma.status == 0 %>
|
||||
<%#= link_to '同意',dealwith_apply_request_contest_path(contest,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<!-- |-->
|
||||
<%#= link_to '拒绝',dealwith_apply_request_contest_path(contest,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<!-- <%# elsif ma.status == 1%> <#!-- 同意 -->-->
|
||||
<!-- <span title="<%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已同意"><%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已同意</span>-->
|
||||
<!-- <%# elsif ma.status == 2%> <#!-- 拒绝 -->-->
|
||||
<!-- <span title="<%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已拒绝"><%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已拒绝</span>-->
|
||||
<%#end %>
|
||||
<!-- </span>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="homepageNewsTime fr"><%#= time_tag(ma.created_at).html_safe %> </li>-->
|
||||
|
||||
<% applied_contest = ma.applied %>
|
||||
<% contest = Contest.find applied_contest.contest_id %>
|
||||
<% message_user = User.find(applied_contest.user_id) %>
|
||||
<%= link_to image_tag(url_to_avatar(message_user), :width => "30", :height => "30"), user_path(message_user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to message_user.show_name, user_path(applied_contest.user_id), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_on) %></span>
|
||||
|
||||
<span class="fontGrey4 f12">
|
||||
<%= message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+"," %>
|
||||
申请以"<%= get_role_str ma.role %>"的身份加入竞赛:
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<% content = message_user.show_name + "申请成为竞赛\"" + "#{contest.name}" + "\"的" + get_role_str(ma.role) %>
|
||||
<%= link_to contest.name, contest_path(contest.id),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span id="deal_info_<%=ma.id%>">
|
||||
<% if ma.status == 0 %>
|
||||
<%= link_to '同意',dealwith_apply_request_contest_path(contest,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
|
|
||||
<%= link_to '拒绝',dealwith_apply_request_contest_path(contest,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
|
|
||||
<%= link_to '拒绝',dealwith_apply_request_contest_path(contest,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<% elsif ma.status == 1%> <!-- 同意 -->
|
||||
<span title="<%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已同意"><%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已同意</span>
|
||||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||||
<span title="<%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已拒绝"><%= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已拒绝</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--<div class="shortMessageWidth">-->
|
||||
<%# applied_contest = ma.applied %>
|
||||
<%# contest = Contest.find applied_contest.contest_id %>
|
||||
<%# message_user = User.find(applied_contest.user_id) %>
|
||||
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<!-- <span class="newsBlue homepageNewsPublisher">-->
|
||||
<!-- <%#=link_to message_user.show_name, user_path(applied_contest.user_id),-->
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<#!-- </span>-->
|
||||
<!-- <span class="homepageNewsType fl">-->
|
||||
<%#= message_user.user_extensions.school_id.blank? || message_user.user_extensions.school.nil? ? "" : "来自"+message_user.user_extensions.school.name+"," %>
|
||||
<!-- 申请以"<%#= get_role_str ma.role %>"的身份加入竞赛:-->
|
||||
<!-- </span>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<%# content = message_user.show_name + "申请成为竞赛\"" + "#{contest.name}" + "\"的" + get_role_str(ma.role) %>
|
||||
<!-- <#%= link_to contest.name, contest_path(contest.id),-->
|
||||
<!-- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>-->
|
||||
<!-- </li>-->
|
||||
<!--</div>-->
|
||||
<!--<li class="messageOperateContents fl">-->
|
||||
<!-- <span id="deal_info_<%#=ma.id%>">-->
|
||||
<%# if ma.status == 0 %>
|
||||
<%#= link_to '同意',dealwith_apply_request_contest_path(contest,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<!-- |-->
|
||||
<%#= link_to '拒绝',dealwith_apply_request_contest_path(contest,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<!-- <%# elsif ma.status == 1%> <#!-- 同意 -->-->
|
||||
<!-- <span title="<%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已同意"><%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已同意</span>-->
|
||||
<!-- <%# elsif ma.status == 2%> <#!-- 拒绝 -->-->
|
||||
<!-- <span title="<%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : '管理员' %>已拒绝"><%#= ma.applied_user_id ? User.find(ma.applied_user_id).show_name : "管理员" %>已拒绝</span>-->
|
||||
<%#end %>
|
||||
<!-- </span>-->
|
||||
<!--</li>-->
|
||||
<!--<li class="homepageNewsTime fr"><%#= time_tag(ma.created_at).html_safe %> </li>-->
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,26 +1,31 @@
|
|||
<div class="shortMessageWidth">
|
||||
<% message_user = User.find(ma.course_message_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(message_user), :width => "30", :height => "30"), user_path(message_user), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%=link_to message_user.show_name, user_path(ma.course_message_id),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% message_user = User.find(ma.course_message_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: message_user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to message_user.try(:show_name), user_path(message_user), :target => "_blank", :title => "#{message_user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="homepageNewsType fl">
|
||||
申请以<%= ma.content && ma.content.include?('9') ? "“教师”" : "“助教”" %>的身份加入班级:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%=ma.id%>" class="ml20">
|
||||
<% if ma.status == 0 || ma.status.nil?%>
|
||||
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
|
|
||||
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<% elsif ma.status == 1%> <!-- 同意 -->
|
||||
<span class="infoTips bg-green"><%= Course.find(ma.course_id).teacher.show_name %>已同意</span>
|
||||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||||
<span class="infoTips bg-refuse"><%= Course.find(ma.course_id).teacher.show_name %>已拒绝</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请以<%= ma.content && ma.content.include?('9') ? "“教师”" : "“助教”" %>的身份加入班级:
|
||||
</span>
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为班级\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content && ma.content.include?('9') ? "教师" : "助教"}" %>
|
||||
<%= link_to Course.find(ma.course_id).name, course_path(Course.find(ma.course_id)),
|
||||
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank', :title => "#{content}" %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</p>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<p>
|
||||
<%= User.current.lastname + User.current.firstname %>老师您好!您有了新的班级成员申请,信息如下:
|
||||
|
@ -32,18 +37,5 @@
|
|||
<p>申请职位:<%=ma.content && ma.content.include?('9') ? "教师" : "助教"%></p>
|
||||
</div>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<span id="deal_info_<%=ma.id%>">
|
||||
<% if ma.status == 0 || ma.status.nil?%>
|
||||
<%= link_to '同意',dealwith_apply_request_user_path(User.current,:agree=>'Y',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
|
|
||||
<%= link_to '拒绝',dealwith_apply_request_user_path(User.current,:agree=>'N',:msg_id=>ma.id),:remote=>'true',:class=>'linkBlue'%>
|
||||
<% elsif ma.status == 1%> <!-- 同意 -->
|
||||
<span title="<%= Course.find(ma.course_id).teacher.show_name %>已同意"><%= Course.find(ma.course_id).teacher.show_name %>已同意</span>
|
||||
<% elsif ma.status == 2%> <!-- 拒绝 -->
|
||||
<span title="<%= Course.find(ma.course_id).teacher.show_name %>已拒绝"><%= Course.find(ma.course_id).teacher.show_name %>已拒绝</span>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<% if !comment.content_detail.blank? %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content_detail.html_safe %>
|
||||
<%= h comment.content_detail %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
|
@ -115,4 +115,4 @@
|
|||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
|
@ -1,67 +1,79 @@
|
|||
<%# 系统消息总显示在最上面 %>
|
||||
<%= render :partial => 'users/user_message_system' if !@system_messages.nil? %>
|
||||
|
||||
<% message_alls.each do |ma| %>
|
||||
<% if @message_count > 0 %>
|
||||
<% message_alls.each do |ma| %>
|
||||
<% ma = ma.try(:message) if ma.is_a?(MessageAll) %>
|
||||
<% if ma.class == AtMessage && ma.at_valid? && ma.at_message %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_at_message', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 课程消息 %>
|
||||
<% if ma.class == CourseMessage %>
|
||||
<% if ma.class == CourseMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<!--项目消息-->
|
||||
<% if ma.class == ForgeMessage %>
|
||||
<% if ma.class == ForgeMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 竞赛消息 %>
|
||||
<% if ma.class == ContestMessage %>
|
||||
<% if ma.class == ContestMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 博客消息 %>
|
||||
<% if ma.class == BlogMessage %>
|
||||
<%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %>
|
||||
<% if ma.class == BlogMessage && ma.present? %>
|
||||
<%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--公共贴吧-->
|
||||
<% if ma.class == MemoMessage %>
|
||||
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
|
||||
<% if ma.class == MemoMessage && ma.present? %>
|
||||
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--用户留言-->
|
||||
<% if ma.class == UserFeedbackMessage %>
|
||||
<% if ma.class == UserFeedbackMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if ma.class == OrgMessage %>
|
||||
<!--子域名申请通知-->
|
||||
<% if ma.class == OrgMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 申请类消息 %>
|
||||
<% if ma.class == AppliedMessage %>
|
||||
<% if ma.class == AppliedMessage && ma.present? %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_applied', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<% if params[:action] == "unapproval_applied_list" %>
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% else %>
|
||||
<%= pagination_links_full @message_all_pages, @messages_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<script>
|
||||
$(function(){
|
||||
$(".messageInformationContents").each(function(){
|
||||
var parentWidth = $(this).parent().width();
|
||||
var eq0Width = $(this).parent().children().eq(0).width();
|
||||
var eq1Width = $(this).parent().children().eq(1).width();
|
||||
var classWidth = parentWidth - eq0Width - eq1Width - 20;
|
||||
$(this).css("max-width",classWidth + "px");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<% if params[:action] == "unapproval_applied_list" %>
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% else %>
|
||||
<%= pagination_links_full @message_all_pages, @message_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'users/no_data' %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
|
@ -19,12 +19,12 @@
|
|||
<% if comment.class == Journal %>
|
||||
<% if comment.details.any? %>
|
||||
<% details_to_strings(comment.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<p><%= sanitize string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= comment.notes.html_safe %></P>
|
||||
<P><%= h comment.notes %></P>
|
||||
<% else %>
|
||||
<%= comment.content_detail.html_safe %>
|
||||
<%= h comment.content_detail %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
|
@ -106,4 +106,4 @@
|
|||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<div class="pro_new_info mt50">
|
||||
<div class="icons_tishi"><img src="/images/new_project/icons_smile.png" width="110" height="110" alt=""></div>
|
||||
<p class="sy_tab_con_p ">没有数据可以显示!</p>
|
||||
</div>
|
|
@ -0,0 +1,76 @@
|
|||
<div class="df clearfix">
|
||||
<div class="flex1">
|
||||
<p class="clearfix pt30 pb30 t-center font-16 bor-bottom-greyE">
|
||||
<a href="javascript:void(0)">
|
||||
<i class="iconfont icon-zuojiantou font-14 fl ml25 color-grey-9" data-tip-down="返回到列表"></i>
|
||||
</a>
|
||||
陈晓婷与你的私信
|
||||
</p>
|
||||
<div class="letterBox">
|
||||
<p class="mt30 t-center"><span class="letter-time">2019-10-19</span></p>
|
||||
<div class="OtherSide clearfix" id="message_content_25148">
|
||||
<a href="javascript:void(0)"><img alt="头像" class="mr10 radius fl" height="48" width="48" src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1820523987,3798556096&fm=26&gp=0.jpg" /></a>
|
||||
<div class="fl pr OtherSide-info">
|
||||
<span class="trangle"></span>
|
||||
<div class="sms break_word markdown-body" id="Leftdialogue1">
|
||||
<p><a href="http://www.baidu.com" title="wwwbaidu">wwwbaidu</a></p>
|
||||
<ol>
|
||||
<li>kdajlkd</li>
|
||||
<li>dskdfjslakfj</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="edu-txt-right mt5">
|
||||
<a href="javascript:void(0)" class="color-grey-c">删除</a>
|
||||
</div>
|
||||
</div>
|
||||
<span class="fl ml15 color-grey-c lineh-15 mt15">9:53</span>
|
||||
</div>
|
||||
<div class="ThisSide clearfix" id="message_content_25149">
|
||||
<a href="javascript:void(0)"><img alt="头像" class="ml10 radius fr" height="48" width="48" src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1820523987,3798556096&fm=26&gp=0.jpg" /></a>
|
||||
<div class="fr pr ThisSide-info">
|
||||
<span class="trangle"></span>
|
||||
<div class="sms break_word markdown-body" id="Leftdialogue1">
|
||||
<p><a href="http://www.baidu.com" title="wwwbaidu">wwwbaidu</a></p>
|
||||
<ol>
|
||||
<li>kdajlkd</li>
|
||||
<li>dskdfjslakfj</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="edu-txt-left mt5">
|
||||
<a href="javascript:void(0)" class="color-grey-c">删除</a>
|
||||
</div>
|
||||
</div>
|
||||
<span class="fr mr15 color-grey-c lineh-15 mt15">9:53</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="repeatBox padding20">
|
||||
<div>
|
||||
<textarea></textarea>
|
||||
</div>
|
||||
<p class="clearfix mt15">
|
||||
<span class="fl ml5 color-orange f12 mt5">在问题反馈时,请同时发送问题发生页的网址链接,以便我们高效的为您服务</span>
|
||||
<a href="javascript:void(0)" class="fr task-btn task-btn-orange">回复</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bor-left-greyE" style="width: 290px;">
|
||||
<p class="pt30 pb30 pl30 edu-txt-left font-16 bor-bottom-greyE">私信列表</p>
|
||||
<div class="private-list">
|
||||
<div class="part-line">
|
||||
<img height="48" width="48" src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1820523987,3798556096&fm=26&gp=0.jpg" class="radius mr10">
|
||||
<div class="flex1">
|
||||
<p class="clearfix mb10 lineh-17">
|
||||
<span class="fl">
|
||||
<span class="task-hide privatePartName">陈晓婷</span>
|
||||
</span>
|
||||
<span class="color-grey-c fr">2小时前</span>
|
||||
</p>
|
||||
<p class="color-grey-6 lh20 justify break_word task-hide-2 markdown-body" id="MakedownHTML" style="word-break: break-word;">
|
||||
jhgjkhjkh
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,34 @@
|
|||
<p class="clearfix font-16 padding30-20 bor-bottom-greyE">
|
||||
<span class="fl">全部私信</span>
|
||||
<a class="c-blue fr" href="javascript:void(0)">写私信</a>
|
||||
</p>
|
||||
<div>
|
||||
<div class="private-item clearfix df">
|
||||
<a href="javascript:void(0)" class="fl mr10 private_message_a"><img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1820523987,3798556096&fm=26&gp=0.jpg" class="radius myimgw48 myimgh48"></a>
|
||||
<div class="fl flex1">
|
||||
<p>
|
||||
<a class="mr20 private_message_a f16">陈晓婷</a>
|
||||
<span>与你的私信</span>
|
||||
<span class="color-grey-c mr20">[3条]</span>
|
||||
<span class="color-grey-c">6天前</span>
|
||||
</p>
|
||||
<div class="color-grey-6 markdown-body mt10">
|
||||
呀呀呀呀呀呀晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕呀呀呀呀呀呀晕晕
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="private-item clearfix df">
|
||||
<a href="javascript:void(0)" class="fl mr10 private_message_a"><img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1820523987,3798556096&fm=26&gp=0.jpg" class="radius myimgw48 myimgh48"></a>
|
||||
<div class="fl flex1">
|
||||
<p>
|
||||
<a class="mr20 private_message_a f16">陈晓婷</a>
|
||||
<span>与你的私信</span>
|
||||
<span class="color-grey-c mr20">[3条]</span>
|
||||
<span class="color-grey-c">6天前</span>
|
||||
</p>
|
||||
<div class="color-grey-6 markdown-body mt10">
|
||||
呀呀呀呀呀呀晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕晕呀呀呀呀呀呀晕晕
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -20,9 +20,9 @@
|
|||
<div class="list-file">
|
||||
<div><span class="item_list fl"></span>
|
||||
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
|
||||
<%= link_to activity.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class=> "list-title-normal fl", :style => "max-width:950px;" %>
|
||||
<%= link_to h(activity.subject), User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class=> "list-title-normal fl", :style => "max-width:950px;" %>
|
||||
<% else %>
|
||||
<%= link_to activity.parent.subject.to_s.html_safe, User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class=> "list-title-normal f1", :style => "max-width:950px;" %>
|
||||
<%= link_to h(activity.parent.subject), User.current.logged? ? board_message_path(activity.board_id, activity) : signin_url_without_domain, :class=> "list-title-normal f1", :style => "max-width:950px;" %>
|
||||
<% end %>
|
||||
<% if activity.sticky == 1 %>
|
||||
<span class="fl ml10 red-cir-btn">顶</span>
|
||||
|
@ -76,4 +76,4 @@
|
|||
$(".listbox").css("height", tmpHeight);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">
|
||||
申请内容
|
||||
</div>
|
||||
</div>
|
||||
<div class="resources">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
<%= render partial: "users/undo_items_title" %>
|
||||
<div>
|
||||
<% if @message_count > 0 %>
|
||||
<ul class="p_list_ul">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<div>
|
||||
<%= render partial: "projects/no_data" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
$(".messageInformationContents").each(function(){
|
||||
var parentWidth = $(this).parent().width();
|
||||
var eq0Width = $(this).parent().children().eq(0).width();
|
||||
var eq1Width = $(this).parent().children().eq(1).width();
|
||||
var classWidth = parentWidth - eq0Width - eq1Width - 20;
|
||||
$(this).css("max-width",classWidth + "px");
|
||||
});
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,10 @@
|
|||
<div class="border-1-bottom width100">
|
||||
<ul>
|
||||
<li class="undo-item-title fl <%= @undo_show_type == 1 ? "active" : "" %>">
|
||||
<%= link_to "<span>待解决issue</span><span class='ml10'>#{@unsolved_issues_count}</span>".html_safe, unsolved_issues_list_user_path(@user),remote: true, class: "font-16" %>
|
||||
</li>
|
||||
<li class="undo-item-title fl <%= @undo_show_type == 2 ? "active" : "" %>">
|
||||
<%= link_to "<span>待审批事项</span><span class='ml10'>#{@message_count}</span>".html_safe, unapproval_applied_list_user_path(@user),remote: true, class: "font-16" %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
|
@ -1,57 +1,42 @@
|
|||
<div class="resources" >
|
||||
<div class="clear" >
|
||||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:40px"></th>
|
||||
<th><li class="fl ml5">标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">发布人</th>
|
||||
<th style="width:80px">优先度</th>
|
||||
<th style="width:80px">状态</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render partial: "users/undo_items_title" %>
|
||||
|
||||
<div>
|
||||
<% if @unsolved_issues_count > 0 %>
|
||||
<ul class="p_list_ul">
|
||||
<% @unsolved_issues.each do |ui| %>
|
||||
<tr>
|
||||
<td class="homepageTabAvatar">
|
||||
<%= link_to image_tag(url_to_avatar(ui.author), :width => "30", :height => "30"), user_path(ui.author), :target => '_blank' %>
|
||||
</td>
|
||||
<td>
|
||||
<li class="homepageTabTitle">
|
||||
<%= link_to ui.subject.to_s, issue_path(ui), :target => "_blank", :class => "homepageTabTitle fl ml5", :title => "#{ui.subject.to_s}" %>
|
||||
</li>
|
||||
</td>
|
||||
<td>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to ui.project.try(:name), project_path(ui.project_id), :target => "_blank", :title => "#{ui.project.try(:name)}" %>
|
||||
<li>
|
||||
</td>
|
||||
<td>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<% if ui.author.show_name == ' ' %>
|
||||
<%= link_to ui.try(:author), user_path(ui.author_id), :target => "_blank", :title => "#{ui.try(:author)}" %>
|
||||
<% else %>
|
||||
<%= link_to ui.author.show_name, user_path(ui.author_id), :target => "_blank", :title => "#{ui.author.show_name}" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</td>
|
||||
<td>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<%= ui.priority.name %>
|
||||
</li>
|
||||
</td>
|
||||
<td>
|
||||
<li class="homepageTabAuthor ml5" >
|
||||
<%= ui.status.name %>
|
||||
</li>
|
||||
</td>
|
||||
</tr>
|
||||
<li>
|
||||
<%#= render :partial => 'users/user_message_forge', :locals => {:ma => ui} %>
|
||||
|
||||
<%= link_to image_tag(url_to_avatar(ui.author), class:"r_list_img"), user_path(ui.author), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to ui.author.try(:show_name), user_path(ui.author_id), :target => "_blank", :title => "#{ui.author.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ui.updated_on) %></span>
|
||||
<span class="infoTips tips_issue_<%= ui.priority_id %> ml15"><%= get_issue_priority_api(ui.priority_id) %></span>
|
||||
<span class="color-grey3 ml15"><%= ui.status %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
指派了问题给你:
|
||||
</span>
|
||||
<%= link_to ui.try(:subject), ui, target: "_blank" %>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%= pagination_links_full @unsolved_issues_pages, @unsolved_issues_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div>
|
||||
<%= render partial: "projects/no_data" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<% if params[:action] == "unapproval_applied_list" %>
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% else %>
|
||||
<%= pagination_links_full @unsolved_issues_pages, @unsolved_issues_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<% user_activities.each do |user_activity|
|
||||
if user_activities %>
|
||||
<% user_activities.each do |user_activity| %>
|
||||
<% if user_activities %>
|
||||
<script>
|
||||
function expand_reply_input(id) {
|
||||
$(id).toggle();
|
||||
|
|
|
@ -1,33 +1,64 @@
|
|||
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"), user_path(ma.author) %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%= link_to ma.author.show_name, user_path(ma.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
</span><span class="homepageNewsType fl">提到了你:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
||||
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
|
||||
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
|
||||
:topic_id => ma.at_message.id),
|
||||
:title => "#{ma.subject.html_safe}",
|
||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
|
||||
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
||||
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
|
||||
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
|
||||
:topic_id => ma.at_message.id),
|
||||
:title => "#{ma.subject.html_safe}",
|
||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>
|
||||
<% else %>
|
||||
<%= link_to ma.subject.html_safe, ma.url,
|
||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
||||
:title => "#{ma.subject.html_safe}" %>
|
||||
<% end %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<!--<ul class="homepageNewsList fl">-->
|
||||
<!-- <div class="longMessageWidth">-->
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<%#= link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"), user_path(ma.author) %>
|
||||
<!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<!-- <span class="newsBlue homepageNewsPublisher">-->
|
||||
<%#= link_to ma.author.show_name, user_path(ma.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<!-- </span><span class="homepageNewsType fl">提到了你:</span>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<%# if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
||||
<!-- <#%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,-->
|
||||
<!-- :parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,-->
|
||||
<!-- :topic_id => ma.at_message.id),-->
|
||||
<!-- :title => "#{ma.subject.html_safe}",-->
|
||||
<!-- :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>-->
|
||||
<%# elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
||||
<!-- <#%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,-->
|
||||
<!-- :parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,-->
|
||||
<!-- :topic_id => ma.at_message.id),-->
|
||||
<!-- :title => "#{ma.subject.html_safe}",-->
|
||||
<!-- :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}" %>-->
|
||||
<%# else %>
|
||||
<!-- <#%= link_to ma.subject.html_safe, ma.url,-->
|
||||
<!-- :class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",-->
|
||||
<!-- :title => "#{ma.subject.html_safe}" %>-->
|
||||
<%# end %>
|
||||
<!-- </li>-->
|
||||
<!-- </div>-->
|
||||
<!-- <li class="homepageNewsTime fr"><%#= time_tag(ma.created_at).html_safe %> </li>-->
|
||||
<!--</ul>-->
|
||||
<%= link_to image_tag(url_to_avatar(ma.author), class:"r_list_img"), user_path(ma.author), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to ma.author.try(:show_name), user_path(ma.author), :target => "_blank", :title => "#{ma.author.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
提到了你:
|
||||
</span>
|
||||
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
||||
<%= link_to ma.subject.html_safe, course_boards_path(ma.at_message.course,
|
||||
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
|
||||
:topic_id => ma.at_message.id),
|
||||
:title => "#{ma.subject.html_safe}",
|
||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", target: "_blank" %>
|
||||
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
||||
<%= link_to ma.subject.html_safe, project_boards_path(ma.at_message.project,
|
||||
:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id,
|
||||
:topic_id => ma.at_message.id),
|
||||
:title => "#{ma.subject.html_safe}",
|
||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}", target: "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to ma.subject.html_safe, "javascript:void(0)",
|
||||
:class =>"#{ma.viewed? ? "newsGrey" : "newsBlack"}",
|
||||
:title => "#{ma.subject.html_safe}" %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<%= link_to image_tag(url_to_avatar(user), class:"r_list_img"), user_path(user), :target => '_blank' %>
|
|
@ -0,0 +1,6 @@
|
|||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(target_time) %></span>
|
||||
</p>
|
|
@ -5,29 +5,29 @@
|
|||
<%= link_to "拒绝", refused_allow_to_join_project_project_memberships_path(:project_id => ma.project_id, :applied_message_id => ma.id),
|
||||
:remote => true, :method => :get, :class => "link-blue",:style => "font-size: 14px;" %>
|
||||
<% elsif ma.status == 2 %>
|
||||
<span style="font-size:14px;">已处理</span>
|
||||
<span class="fs12 infoTips bg-green">已处理</span>
|
||||
<% elsif ma.status == 4 %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.user_id).first %>
|
||||
<% operator = User.find(operator_message.applied_user_id).try(:show_name) %>
|
||||
<span style="font-size:14px" title="<%= operator %>已拒绝">
|
||||
<%= operator %>已拒绝
|
||||
<span class="c_grey02 mr15"><%= operator %></span><span class="fs12 infoTips bg-refuse">已拒绝</span>
|
||||
</span>
|
||||
<% elsif ma.status == 5 && !AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.applied_user_id).first.nil? %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 4", ma.applied_id, ma.applied_user_id).first %>
|
||||
<% operator = User.find(operator_message.applied_user_id).try(:show_name) %>
|
||||
<span style="font-size:14px" title="<%= operator %>已拒绝">
|
||||
<%= operator %>已拒绝
|
||||
<span class="c_grey02 mr15"><%= operator %></span><span class="fs12 infoTips bg-refuse">已拒绝</span>
|
||||
</span>
|
||||
<% elsif ma.status == 6 %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 6", ma.applied_id, ma.user_id).first %>
|
||||
<% operator = User.find(operator_message.applied_user_id).show_name %>
|
||||
<span style="font-size:14px" title="<%= operator %>已同意">
|
||||
<%= operator %>已同意
|
||||
<span class="c_grey02 mr15"><%= operator %></span><span class="fs12 infoTips bg-green">已同意</span>
|
||||
</span>
|
||||
<% elsif ma.status == 7 %>
|
||||
<% operator_message = AppliedMessage.where("applied_id=? and user_id=? and status = 6", ma.applied_id, ma.applied_user_id).first %>
|
||||
<% operator = User.find(operator_message.applied_user_id).show_name %>
|
||||
<span style="font-size:14px" title="<%= operator %>已同意">
|
||||
<%= operator %>已同意
|
||||
<span class="c_grey02 mr15"><%= operator %></span><span class="fs12 infoTips bg-green">已同意</span>
|
||||
</span>
|
||||
<% end %>
|
|
@ -1,8 +1,9 @@
|
|||
<% if ma.status == 4 || ma.status == 6 %>
|
||||
<%= link_to User.where(:id => ma.user_id).first.show_name, user_path(User.where(:id => ma.user_id).first), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to applied_project_users(ma).show_name, user_path(applied_project_users(ma)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% end %>
|
||||
<span class="homepageNewsType fl">
|
||||
申请以“<%= applied_project_message_type(ma.role) %>”身份加入:
|
||||
</span>
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<% if ma.status == 4 || ma.status == 6 %>
|
||||
<%= link_to User.where(:id => ma.user_id).first.show_name, user_path(User.where(:id => ma.user_id).first), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to applied_project_users(ma).show_name, user_path(applied_project_users(ma)), :target => '_blank' %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
|
@ -1,56 +1,71 @@
|
|||
<!-- 申请添加单位 -->
|
||||
<% if ma.applied_type == "ApplyAddSchools" && ma.status != 4 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% if ma.status == 0 %>
|
||||
<% applied_user = User.find(ma.applied_user_id) %>
|
||||
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
|
||||
</li>
|
||||
<li class = "messageInformationContents">
|
||||
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
|
||||
</li>
|
||||
<% if ma.status == 0 %>
|
||||
<% applied_user = User.find(ma.applied_user_id) %>
|
||||
<%= link_to image_tag(url_to_avatar(applied_user), class:"r_list_img"), user_path(applied_user), :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= image_tag("/images/trustie_logo1.png", class:"r_list_img") %>
|
||||
<% end %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<%= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<%= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- <ul class="homepageNewsList fl">-->
|
||||
<!-- <div class="longMessageWidth">-->
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<%# if ma.status == 0 %>
|
||||
<%# applied_user = User.find(ma.applied_user_id) %>
|
||||
<%#= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
|
||||
<%# else %>
|
||||
<%#= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %>
|
||||
<%# end %>
|
||||
<!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<%#= render :partial => "users/user_message_applied_schools", :locals =>{:ma => ma} %>
|
||||
<!-- </li>-->
|
||||
<!-- <li class = "messageInformationContents">-->
|
||||
<%#= render :partial => "users/user_message_applied_school_action", :locals =>{:ma => ma} %>
|
||||
<!-- </li>-->
|
||||
|
||||
<!-- </div>-->
|
||||
<!-- <li class="homepageNewsTime fr"><%#= time_tag(ma.created_at).html_safe %> </li>-->
|
||||
<!-- </ul>-->
|
||||
<!-- 申请加入项目 -->
|
||||
<% elsif ma && ma.applied_type == "AppliedProject" %>
|
||||
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
</ul>
|
||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
|
||||
<!-- <ul class="homepageNewsList fl" id="applied_project_<%#= ma.id %>">-->
|
||||
<%#= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
<!-- </ul>-->
|
||||
<% elsif ma && ma.applied_type == "Organization" %>
|
||||
<ul class="homepageNewsList fl" id="applied_project_<%= ma.id %>">
|
||||
<%= render :partial => "users/applied_organization_sundomain", :locals =>{:ma => ma} %>
|
||||
</ul>
|
||||
<!-- 匿评成绩申诉 -->
|
||||
<%= render :partial => "users/applied_organization_sundomain", :locals =>{:ma => ma} %>
|
||||
|
||||
<% elsif ma && ma.applied_type == "StudentWorksScoresAppeal" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<% applied_user = User.find(ma.applied_user_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(applied_user), :width => "30", :height => "30"), user_path(applied_user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to applied_user.show_name, user_path(applied_user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申诉匿评成绩:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents fl">
|
||||
<% homework = ma.applied.student_works_score.student_work.homework_common %>
|
||||
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %>
|
||||
</li>
|
||||
</ul>
|
||||
<% applied_user = User.find(ma.applied_user_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: applied_user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: applied_user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申诉匿评成绩:
|
||||
</span>
|
||||
<% homework = ma.applied.student_works_score.student_work.homework_common %>
|
||||
<%= link_to homework.name, student_work_index_path(:homework => homework.id, :show_work_id => ma.applied.student_works_score.student_work_id, :tab => 2), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<% elsif ma && ma.applied_type == "AppliedContest" %>
|
||||
<ul class="homepageNewsList fl" id="contest_message_join_<%=ma.id %>">
|
||||
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
|
||||
</ul>
|
||||
<%= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
|
||||
|
||||
<!-- <ul class="homepageNewsList fl" id="contest_message_join_<%#=ma.id %>">-->
|
||||
<%#= render :partial => 'join_contest_applied_message', :locals => {:ma => ma} %>
|
||||
<!-- </ul>-->
|
||||
<% else %>
|
||||
<span class="c_grey02">内容已删除</span>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<% if ma.status != 0 %>
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<% else %>
|
||||
<%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.applied_user_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<% end %>
|
||||
<span class="homepageNewsType fl"><%= applied_school_tip(ma) %></span>
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<% if ma.status != 0 %>
|
||||
<span class="">系统提示</span>
|
||||
<% else %>
|
||||
<%=link_to User.where("id=?", ma.applied_user_id).first.show_name, user_path(ma.applied_user_id), :class => "", :target => '_blank' %>
|
||||
<% end %>
|
||||
</span>
|
||||
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="color-grey3 ml15 "><%= applied_school_tip(ma) %></span>
|
|
@ -1,23 +1,19 @@
|
|||
<% ma.nil? ? local_assigns[:ma] : ma %>
|
||||
<% if ma.class == BlogMessage %>
|
||||
<% if ma.blog_message_type == "BlogComment" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(ma.user_operator_id)), :width => "30", :height => "30"), user_path(ma.user_operator_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.user_operator_id).show_name, user_path(ma.user_operator_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">回复了博客:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<% user_id = User.find(BlogComment.find(ma.blog_message_id).blog.author_id) %>
|
||||
<% blog_id = BlogComment.find(ma.blog_message_id).root_id %>
|
||||
<%= link_to message_content(ma.content), user_blog_blog_comment_path(:user_id => user_id, :blog_id => ma.blog_id, :id => blog_id),
|
||||
:class => "#{ma.viewed == false ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = User.find(ma.user_operator_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
回复了博客:
|
||||
</span>
|
||||
<% user_id = User.find(BlogComment.find(ma.blog_message_id).blog.author_id) %>
|
||||
<% blog_id = BlogComment.find(ma.blog_message_id).root_id %>
|
||||
<%= link_to message_content(ma.content), user_blog_blog_comment_path(:user_id => user_id, :blog_id => ma.blog_id, :id => blog_id),
|
||||
:class => "#{ma.viewed == false ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -13,337 +13,290 @@
|
|||
role_str = "参赛者"
|
||||
end
|
||||
end %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30"), user_path(user), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%=link_to user.show_name, user_path(user),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+user.user_extensions.school.name+"," %>
|
||||
申请以"<%= role_str%>"的身份加入竞赛:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to Contest.find(ma.contest_id).name, contest_path(ma.contest_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<span id="deal_info_<%=ma.id%>">
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span id="deal_info_<%=ma.id%>" class="ml20">
|
||||
<% if ma.status == 1%> <!-- 同意 -->
|
||||
<span title="<%= User.find(ma.contest_message_id).show_name %>已同意"><%= User.find(ma.contest_message_id).show_name %>已同意</span>
|
||||
<span class="infoTips bg-green"><%= User.find(ma.contest_message_id).show_name %>已同意</span>
|
||||
<% else%> <!-- 拒绝 -->
|
||||
<span title="<%= User.find(ma.contest_message_id).show_name %>已拒绝"><%= User.find(ma.contest_message_id).show_name %>已拒绝</span>
|
||||
<span class="infoTips bg-refuse"><%= User.find(ma.contest_message_id).show_name %>已拒绝</span>
|
||||
<%end %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
</p>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+user.user_extensions.school.name+"," %>
|
||||
申请以"<%= role_str%>"的身份加入竞赛:
|
||||
</span>
|
||||
<%= link_to Contest.find(ma.contest_id).name, contest_path(ma.contest_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
<div style="display: none" class="message_title_red system_message_style">
|
||||
<% if ma.course.is_public? || User.current.member_of_course?(ma.course) || User.current.admin? %>
|
||||
<% teacher = User.find(ma.course_message_id) %>
|
||||
<p><%= teacher.show_name %>(<%= teacher %>)老师把您加入了班级,详情如下:</p>
|
||||
<p>班级名称:<%= ma.course.name %></p>
|
||||
<p>开课学期:<%= ma.course.time.to_s + '年'+ ma.course.term %></p>
|
||||
<p>班级ID:<%= ma.course.id %></p>
|
||||
<p>课时总数:<%= ma.course.class_period %></p>
|
||||
<% else %>
|
||||
<p>
|
||||
您已经被移出该私有班级,非班级成员没有权限访问私有班级
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--被管理员拉入竞赛:学生身份-->
|
||||
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 0 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(ma.contest_message_id)), :width => "30", :height => "30"), user_path(ma.contest_message_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.contest_message_id).show_name, user_path(User.find(ma.contest_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">将您加入了竞赛:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
将您加入了竞赛:
|
||||
</span>
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--被管理员拉入竞赛:老师身份-->
|
||||
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 1 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">系统提示</span>
|
||||
<span class="homepageNewsType fl">您增加了新的竞赛成员:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to User.find(ma.contest_message_id).login+"("+(User.find(ma.contest_message_id).realname ? User.find(ma.contest_message_id).realname : User.find(ma.contest_message_id).login) +")",
|
||||
{:controller => 'contests', :action => 'settings', :id => ma.contest_id, :tab=>'member'},
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<%= link_to image_tag(url_to_avatar(""), class:"r_list_img"),"javascript:void(0)" %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to "系统提示","javascript:void(0)" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
您增加了新的竞赛成员:
|
||||
</span>
|
||||
<%= link_to User.find(ma.contest_message_id).login+"("+(User.find(ma.contest_message_id).realname ? User.find(ma.contest_message_id).realname : User.find(ma.contest_message_id).login) +")",
|
||||
{:controller => 'contests', :action => 'settings', :id => ma.contest_id, :tab=>'member'},
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--主动加入竞赛-->
|
||||
<% elsif ma.contest_message_type == "JoinContest" and ma.status == 2 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "30", :height => "30"), user_path(user), :target => '_blank' %>
|
||||
</div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class="newsBlue homepageNewsPublisher">
|
||||
<%=link_to user.show_name, user_path(user),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %></span>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+user.user_extensions.school.name+"," %>
|
||||
以"参赛者"的身份加入了竞赛:
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= user.user_extensions.school_id.blank? || user.user_extensions.school.nil? ? "" : "来自"+user.user_extensions.school.name+"," %>
|
||||
以"参赛者"的身份加入了竞赛:
|
||||
</span>
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--被老师移出课程-->
|
||||
<% elsif ma.contest_message_type == "RemoveFromContest" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(User.find(ma.contest_message_id)), :width => "30", :height => "30"), user_path(ma.contest_message_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.contest_message_id).show_name, user_path(User.find(ma.contest_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">将您移出了竞赛:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = User.find(ma.contest_message_id) %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
将您移出了竞赛:
|
||||
</span>
|
||||
<%= link_to ma.contest.name, contest_path(ma.contest), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--发布竞赛题目-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status.nil? && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">发布了竞赛题:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
发布了竞赛题:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--竞赛截止时间快到了-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 1 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user),
|
||||
:class => "newsBlue homepageNewsPublisher",
|
||||
:title => "#{ma.contest_message.user.show_name}",
|
||||
:target => '_blank' %>
|
||||
<span class="homepageNewsType fl">发布的竞赛题:</span></li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl" title="截止时间快到啦">截止时间快到啦</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="ml20 fs12 infoTips bg-refuse">截止时间快到啦</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
发布的竞赛题:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--竞赛启动在线评审-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 2 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">启动了在线评审:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}"%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
启动了在线评审:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}"%>
|
||||
</p>
|
||||
</div>
|
||||
<!--关闭在线评审-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 3 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">关闭了在线评审:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => "_blank"%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
关闭了在线评审:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => "_blank"%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--在线评审启动失败-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 4 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">在线评审启动失败<font class="c_red">(评委数为0或作品数为0):</font></span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => "_blank" %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
在线评审启动失败<font class="c_red">(评委数为0或作品数为0):</font>
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id), :class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => "_blank" %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--在线评审时间快到了-->
|
||||
<% elsif ma.contest_message_type == "Work" && ma.status == 5 && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.user.show_name, user_path(ma.contest_message.user),
|
||||
:class => "newsBlue homepageNewsPublisher",
|
||||
:title => "#{ma.contest_message.user.show_name}",
|
||||
:target => '_blank' %>
|
||||
<span class="homepageNewsType fl">启动的在线评审:</span></li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl" title="截止时间快到啦">截止时间快到啦</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.user %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank", :title => "#{user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="ml20 fs12 infoTips bg-refuse">截止时间快到啦</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
启动的在线评审:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.name, contestant_works_path(:work => ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "竞赛题:#{ma.contest_message.name}"
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--发布竞赛通知-->
|
||||
<% elsif ma.contest_message_type == "News" && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"),user_path(ma.contest_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.author.try(:show_name), user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">发布了竞赛通知:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.id },
|
||||
:class =>"#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.title}"
|
||||
%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
发布了竞赛通知:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.id },
|
||||
:class =>"#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.title}"
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--回复了竞赛通知-->
|
||||
<% elsif ma.contest_message_type == "Comment" && ma.contest_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"), user_path(ma.contest_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.contest_message.author_id).show_name, user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">回复了竞赛通知:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.commented.id },
|
||||
:class =>"#{!ma.viewed ? "newsBlack" : "newsGrey"}" ,
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.commented.title}"
|
||||
%>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
回复了竞赛通知:
|
||||
</span>
|
||||
<%= link_to ma.contest_message.commented.title, {:controller => 'news', :action => 'show', :id => ma.contest_message.commented.id },
|
||||
:class =>"#{!ma.viewed ? "newsBlack" : "newsGrey"}" ,
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.commented.title}"
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--发布/回复了竞赛帖子-->
|
||||
<% elsif ma.contest_message_type == "Message" && !ma.nil? && !ma.contest_message.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.contest_message.author), :width => "30", :height => "30"), user_path(ma.contest_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.contest_message.author.try(:show_name), user_path(ma.contest_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.contest_message.parent_id.nil? ? "发布了竞赛帖子:" : "回复了竞赛帖子:" %></span></li>
|
||||
<% if ma.contest_message.parent_id.nil? %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.contest_message.subject, board_message_path(ma.contest_message.board_id, ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.subject}"
|
||||
%>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.contest_message.content), board_message_path(ma.contest_message.board_id, ma.contest_message.parent_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.contest_message.parent_id.nil? ? "发布了竞赛帖子:" : "回复了竞赛帖子:" %>
|
||||
</span>
|
||||
<% if ma.contest_message.parent_id.nil? %>
|
||||
<%= link_to ma.contest_message.subject, board_message_path(ma.contest_message.board_id, ma.contest_message.id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.contest_message.subject}"
|
||||
%>
|
||||
<% else %>
|
||||
<%= link_to message_content(ma.contest_message.content), board_message_path(ma.contest_message.board_id, ma.contest_message.parent_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!--发布/回复了竞赛留言-->
|
||||
<% elsif ma.contest_message_type == "JournalsForMessage" && ma.contest_message && ma.contest_message.jour_type == 'Contest' %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.contest_message.user), :width => "30", :height => "30"), user_path(ma.contest_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to ma.contest_message.user.try(:show_name), user_path(ma.contest_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl"><%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:" %></span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.contest_message.notes), feedback_contest_path(:id => ma.contest_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user = ma.contest_message.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.contest_message.m_parent_id.nil? ? "发布了竞赛留言:" : "回复了竞赛留言:" %>
|
||||
</span>
|
||||
<%= link_to message_content(ma.contest_message.notes), feedback_contest_path(:id => ma.contest_id),
|
||||
:class => "#{!ma.viewed ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,238 +1,239 @@
|
|||
<% if ma.forge_message_type == "AppliedProject" %>
|
||||
<%#= 这类数据其实已经不要了 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%= link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">申请加入:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<% if ma.forge_message_type == "AppliedProject" && ma.forge_message %>
|
||||
<% user_can_click = User.current.user_can_see_project(ma&.project) %>
|
||||
<%#= 这类数据其实已经不要了 %>
|
||||
<%= link_to image_tag(url_to_avatar(ma.forge_message.user), class:"r_list_img"), user_path(ma.forge_message.user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to ma.forge_message.user.try(:show_name), user_path(ma.forge_message.user), :target => "_blank", :title => "#{ma.forge_message.user.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
申请加入:
|
||||
</span>
|
||||
<%= link_to ma.project, "#{ user_can_click ? settings_project_path(:id => ma.project, :tab => "members") : "javascript:void(0)"}", :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<!--被管理员拉入项目-->
|
||||
<% if ma.forge_message_type == "JoinProject" %>
|
||||
<% unless ma.project.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">将您加入了项目:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.project, project_member_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% user = User.find(ma.forge_message_id) %>
|
||||
<% user_can_click = User.current.user_can_see_project(ma&.project) %>
|
||||
<% unless ma.project.nil? %>
|
||||
<%= link_to image_tag(url_to_avatar(user), class:"r_list_img"), user_path(user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
将您加入了项目:
|
||||
</span>
|
||||
<%= link_to ma.project, "#{user_can_click ? project_member_path(ma.project) : "javascript:void(0)"}", :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!--被管理员移出项目-->
|
||||
<% if ma.forge_message_type == "RemoveFromProject" %>
|
||||
<% unless ma.project.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(User.find(ma.forge_message_id)), :width => "30", :height => "30"), user_path(ma.forge_message_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message_id).show_name, user_path(User.find(ma.forge_message_id)), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">将您移出了项目:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.project, member_project_path(ma.project), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% user = User.find(ma.forge_message_id) %>
|
||||
<% user_can_click = User.current.user_can_see_project(ma&.project) %>
|
||||
|
||||
<% unless ma.project.nil? %>
|
||||
<%= link_to image_tag(url_to_avatar(user), class:"r_list_img"), user_path(user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
将您移出了项目:
|
||||
</span>
|
||||
<%= link_to ma.project, "#{user_can_click ? member_project_path(ma.project) : "javascript:void(0)"}", :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!--邀请加入项目-->
|
||||
<% if ma.forge_message_type == "ProjectInvite" %>
|
||||
<% inviter = User.find(ma.forge_message_id) %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.project, project_path(ma.project),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "ma.project"
|
||||
%>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<% unless User.current.member_of?(ma.project) %>
|
||||
<li class="messageOperateContents fl">
|
||||
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
|
||||
:value => ma.secret_key,
|
||||
:class => "green_btn_cir",
|
||||
:style => "color:#fff",
|
||||
:target => '_blank' %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "Issue" %>
|
||||
<% if ma.status == 1%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.forge_message.subject}"
|
||||
%>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl" title="截止时间快到了!">截止时间快到啦</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% else %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.forge_message.author_id).show_name, user_path(ma.forge_message.author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.forge_message.tracker_id == 5 ? "发布了周报:" : "指派了问题给你:"%>
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.forge_message.subject,
|
||||
issue_path(:id => ma.forge_message.id),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "#{ma.forge_message.subject}"
|
||||
%>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% user_can_click = User.current.user_can_see_project(ma&.project) %>
|
||||
|
||||
<%# inviter = User.find(ma.forge_message_id) %>
|
||||
<% unless ma.project.nil? %>
|
||||
<% user = User.find(ma.forge_message_id) %>
|
||||
<%= link_to image_tag(url_to_avatar(user), class:"r_list_img"), user_path(user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to user.try(:show_name), user_path(user), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
邀请你加入项目:
|
||||
</span>
|
||||
<%= link_to ma.project, "#{user_can_click ? project_path(ma.project) : "javascript:void(0)"}",
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "ma.project"
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless User.current.member_of?(ma.project) %>
|
||||
<li class="messageOperateContents fl">
|
||||
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
|
||||
:value => ma.secret_key,
|
||||
:class => "green_btn_cir",
|
||||
:style => "color:#fff",
|
||||
:target => '_blank' %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "Issue" && ma.forge_message %>
|
||||
<% author = ma.forge_message.author %>
|
||||
<% user_can_click = User.current.user_can_see_project(ma.forge_message&.project) %>
|
||||
|
||||
<% if ma.status == 1%>
|
||||
<%= link_to image_tag(url_to_avatar(author), class:"r_list_img"), user_path(author), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to author.try(:show_name), user_path(author), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
<span class="fontGrey4 f12 ml15 text-red">截止时间快到啦</span>
|
||||
<% if ma.forge_message_type == "Issue" %>
|
||||
<% issue = ma.forge_message %>
|
||||
<span class="infoTips tips_issue_<%= issue.priority_id %> ml15"><%= get_issue_priority_api(issue.priority_id) %></span>
|
||||
<span class="color-grey3 ml15"><%= issue.status %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>
|
||||
</span>
|
||||
<%= link_to ma.forge_message.try(:subject), "#{user_can_click ? issue_path(ma.forge_message) : "javascript:void(0)"}", target: "_blank", class: "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
</p>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= link_to image_tag(url_to_avatar(author), class:"r_list_img"), user_path(author), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to author.try(:show_name), user_path(author), :target => "_blank", :title => "#{author.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<% if ma.forge_message_type == "Issue" %>
|
||||
<% issue = ma.forge_message %>
|
||||
<span class="infoTips tips_issue_<%= issue.priority_id %> ml15"><%= get_issue_priority_api(issue.priority_id) %></span>
|
||||
<span class="color-grey3 ml15"><%= issue.status %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>
|
||||
</span>
|
||||
<%= link_to ma.forge_message.try(:subject), "#{user_can_click ? issue_path(ma.forge_message) : "javascript:void(0)"}", target: "_blank", class: "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}" %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "Journal" && ma.forge_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(ma.forge_message.user_id).show_name, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">更新了问题状态:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.forge_message.journalized.subject,
|
||||
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% ma_user = ma.forge_message.user %>
|
||||
<% issue = ma.forge_message.issue %>
|
||||
<% user_can_click = User.current.user_can_see_project(issue&.project) %>
|
||||
|
||||
<%= link_to image_tag(url_to_avatar(ma_user), class:"r_list_img"), user_path(ma_user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to ma_user.try(:show_name), user_path(ma_user), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
<span class="infoTips tips_issue_<%= issue.priority_id %> ml15"><%= get_issue_priority_api(issue.priority_id) %></span>
|
||||
<span class="color-grey3 ml15 tips_issue_status"><%= issue.status %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
更新了问题状态:
|
||||
</span>
|
||||
<%= link_to ma.forge_message.journalized.subject,"#{user_can_click ? issue_path(ma.forge_message.journalized_id) : "javascript:void(0)"}", :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "Message" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "Comment" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.forge_message.author.try(:show_name), user_path(ma.forge_message.author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">评论了新闻:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to "#{ma.forge_message.commented.title}",
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover => "message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% if ma.forge_message_type == "Message" && ma.forge_message %>
|
||||
<% ma_auth = ma.forge_message.author %>
|
||||
<%= link_to image_tag(url_to_avatar(ma_auth), class:"r_list_img"), user_path(ma_auth), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to ma_auth.try(:show_name), user_path(ma_auth), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
|
||||
</span>
|
||||
<%= link_to ma.forge_message.subject, board_message_path(ma.forge_message.board_id, ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if ma.forge_message_type == "PullRequest" && PullRequest.where(:pull_request_id => ma.forge_message_id).count != 0 %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
|
||||
<% author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
|
||||
<%= link_to image_tag(url_to_avatar(author), :width => "30", :height => "30"), user_path(author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%= link_to User.find(author.id).show_name, user_path(author),
|
||||
:class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">
|
||||
<%= pull_request_message_status(ma) %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to "#{send_message_user[0].title}", project_pull_request_path(ma.forge_message_id, :project_id => ma.project_id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<% if ma.forge_message_type == "Comment" && ma.forge_message %>
|
||||
<% ma_auth = ma.forge_message.author %>
|
||||
<%= link_to image_tag(url_to_avatar(ma_auth), class:"r_list_img"), user_path(ma_auth), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to ma_auth.try(:show_name), user_path(ma_auth), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
评论了新闻:
|
||||
</span>
|
||||
<%= link_to "#{ma.forge_message.commented.title}",
|
||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %> </p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.updated_at).html_safe %> </li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if ma.forge_message_type == "PullRequest" && PullRequest.exists?(:pull_request_id => ma.forge_message_id) %>
|
||||
<% send_message_user = PullRequest.where(:pull_request_id => ma.forge_message_id) %>
|
||||
<% ma_author = User.find(ma.operate_user_id.nil? ? 2 : ma.operate_user_id) %>
|
||||
<% user_can_click = User.current.user_can_see_project(ma.forge_message&.project) %>
|
||||
|
||||
<%= link_to image_tag(url_to_avatar(ma_author), class:"r_list_img"), user_path(ma_author), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to ma_author.try(:show_name), user_path(ma_author), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= pull_request_message_status(ma) %>:
|
||||
</span>
|
||||
<%= link_to "#{send_message_user[0].title}", "#{user_can_click ? project_pull_request_path(ma.forge_message_id, :project_id => ma.project_id) : "javascript:void(0)"}" ,
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -1,28 +1,19 @@
|
|||
|
||||
<% if ma.memo_type == "Memo" && !ma.memo.nil? && !ma.memo.author.nil? %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.memo.author_id).show_name, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
|
||||
</li>
|
||||
<% if ma.memo.parent_id.nil? %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.memo.content), forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<!--:onmouseover =>"message_titile_show($(this),event)",-->
|
||||
<!--:onmouseout => "message_titile_hide($(this))" %>-->
|
||||
</li>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
|
||||
<% user = ma.memo.author %>
|
||||
<%= render partial: "users/user_info_message_avatar", locals: {user: user} %>
|
||||
<div>
|
||||
<%= render partial: "users/user_info_message_header", locals: {user: user, target_time: ma.updated_at} %>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %>
|
||||
</span>
|
||||
<% if ma.memo.parent_id.nil? %>
|
||||
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<% else %>
|
||||
<%= link_to message_content(ma.memo.content), forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<div class="r_infos_menu">
|
||||
<li class="<%= @msg_type == "all" ? "active" : "" %>">
|
||||
<%= link_to "全部", user_message_path(current_user, type: "all"), remote: true %>
|
||||
</li>
|
||||
<li class="<%= @msg_type == "course" ? "active" : "" %>"><%= link_to "课堂提醒", user_message_path(current_user, type: "course"), remote: true %></li>
|
||||
<li class="<%= @msg_type == "project" ? "active" : "" %>"><%= link_to "项目提醒", user_message_path(current_user, type: "project"), remote: true %></li>
|
||||
<li class="<%= @msg_type == "at" ? "active" : "" %>"><%= link_to "互动提醒", user_message_path(current_user, type: "at"), remote: true %></li>
|
||||
<li class="<%= @msg_type == "apply" ? "active" : "" %>"><%= link_to "审核", user_message_path(current_user, type: "apply"), remote: true %></li>
|
||||
<li class="<%= @msg_type == "notice" ? "active" : "" %>"><%= link_to "通知", user_message_path(current_user, type: "notice"), remote: true %></li>
|
||||
</div>
|
|
@ -0,0 +1,25 @@
|
|||
<div class="mb15 l_headPhoto">
|
||||
<div class="l_img">
|
||||
<% if User.current.logged? && User.current == @user %>
|
||||
<%= link_to image_tag(url_to_avatar(@user),width:"238", height: "238", :id => 'nh_source_tx'),
|
||||
my_clear_user_avatar_temp_path, :remote => true %>
|
||||
<% else %>
|
||||
<%=image_tag(url_to_avatar(@user),width:"238", height: "238", :id=>'nh_source_tx') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p><%= link_to @user.show_name, user_path(@user), :class => "f22 color-grey3" %></p>
|
||||
<p>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<span class="f18"><%= get_user_roll @user %></span>
|
||||
<% end%>
|
||||
</p>
|
||||
</div>
|
||||
<div class="l_InfoNav mb20">
|
||||
<li class="clearfix active">
|
||||
<%= link_to "消息", user_message_path(current_user), remote: true, class: "ml30" %>
|
||||
<span class="readingNum" id="unread-message-count-<%= @user.login %>"><%= @unred_all_messages %></span>
|
||||
</li>
|
||||
<li class="clearfix">
|
||||
<a href="javascript:void(0)" class="ml30">私信</a>
|
||||
</li>
|
||||
</div>
|
|
@ -1,59 +1,57 @@
|
|||
|
||||
<% if ma.message_type == 'ApplySubdomain'%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="shortMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.organization), :width => "30", :height => "30"), organization_path(ma.organization_id), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to ma.organization.name, organization_path(ma.organization_id), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class='homepageNewsType fl'>申请子域名:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= ma.content %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="messageOperateContents fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.organization), class: "r_list_img"), organization_path(ma.organization_id), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%=link_to ma.organization.name, organization_path(ma.organization_id), :target => '_blank' %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
<span class="ml15">
|
||||
<%=link_to (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准",
|
||||
agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
|
||||
:id => "agree_apply_subdomain_#{ma.id}",
|
||||
:method => 'post',
|
||||
:remote => true,
|
||||
:class => 'link-blue'
|
||||
%>
|
||||
</li>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
agree_apply_subdomain_organizations_path( :organization_id => ma.organization_id, :org_domain => ma.content, :user_id => ma.sender_id, :act_id => ma.id ),
|
||||
:id => "agree_apply_subdomain_#{ma.id}",
|
||||
:method => 'post',
|
||||
:remote => true,
|
||||
:class => 'fs12 infoTips bg-green text-white'
|
||||
%>
|
||||
</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14 break_word">
|
||||
<span class="homepageNewsType fl">
|
||||
申请子域名:
|
||||
</span>
|
||||
<%= ma.content %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if ma.message_type == 'AgreeApplySubdomain'%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class='homepageNewsType fl'>管理员同意了您的子域名申请:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= ma.content %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<%=link_to image_tag("/images/trustie_logo1.png", class: "r_list_img"), "javascript:void(0)" %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
管理员
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14 break_word">
|
||||
<span class="c_grey02 fs12">同意了您的子域名申请:</span>
|
||||
<%= ma.content %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if ma.message_type == 'DisagreeApplySubdomain'%>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span class='homepageNewsType fl'>管理员拒绝了您的子域名申请:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= ma.content %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<%=link_to image_tag("/images/trustie_logo1.png", class: "r_list_img"), "javascript:void(0)" %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
管理员
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_at) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14 break_word">
|
||||
<span class="c_grey02 fs12">拒绝了您的子域名申请:</span>
|
||||
<%= ma.content %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= link_to "拒绝", refused_apply_subdomain_organizations_path(:organization_id => ma.applied_id, :org_domain => ma.name, :user_id => ma.applied_user_id, :ma_id => ma.id),
|
||||
:remote => true, :method => :post, :class => "link-blue",:style => "font-size: 14px;" %>
|
||||
<% elsif ma.status == 2 %>
|
||||
<span style="font-size:14px;">已同意</span>
|
||||
<span class="fs12 infoTips bg-green">已同意</span>
|
||||
<% elsif ma.status == 4 %>
|
||||
<span style="font-size:14px;">已拒绝</span>
|
||||
<span class="fs12 infoTips bg-refuse">已拒绝</span>
|
||||
<% end %>
|
|
@ -1,19 +1,33 @@
|
|||
<% @system_messages.each do |ma| %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<div class="navHomepageLogo fl"><%= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<span style="color: red;float: left">系统消息:</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current, :anchor => "position_#{ma.id}"),
|
||||
:id => "content_link_#{ma.id}", :target => '_blank' %>
|
||||
</li>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||
</ul>
|
||||
<!-- <ul class="homepageNewsList fl">-->
|
||||
<!-- <div class="longMessageWidth">-->
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<!-- <div class="navHomepageLogo fl"><%#= image_tag("/images/trustie_logo1.png", width: "30px", height: "30px", class: "mt3") %></div>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<!-- <span style="color: red;float: left">系统消息:</span>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<!-- <#%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current, :anchor => "position_#{ma.id}"),-->
|
||||
<!-- :id => "content_link_#{ma.id}", :target => '_blank' %>-->
|
||||
<!-- </li>-->
|
||||
<!-- </div>-->
|
||||
<!-- <li class="homepageNewsTime fr"><%#= time_tag(ma.created_at).html_safe %> </li>-->
|
||||
<!-- </ul>-->
|
||||
|
||||
<li>
|
||||
<%= image_tag("/images/trustie_logo1.png", class:"r_list_img") %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
系统消息
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ui.updated_on) %></span>
|
||||
<%= link_to ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject, user_system_messages_path(User.current, :anchor => "position_#{ma.id}"),
|
||||
:id => "content_link_#{ma.id}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
|
|
@ -1,35 +1,66 @@
|
|||
|
||||
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<div class="longMessageWidth">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"),
|
||||
<% user = ma.journals_for_message.user %>
|
||||
<%= link_to image_tag(url_to_avatar(user), class:"r_list_img"), user_path(user), :target => '_blank' %>
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">
|
||||
<%= link_to user.try(:show_name), user_path(user), :target => "_blank" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.try(:updated_at)) %></span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.journals_for_message.reply_id == 0 ? "给你留言了" : "回复了你的留言" %>:
|
||||
</span>
|
||||
<%= link_to message_content(ma.journals_for_message.notes),
|
||||
feedback_path(ma.journals_for_message.reply_id == 0 ? ma.journals_for_message.jour_id : ma.journals_for_message.user_id,
|
||||
:anchor => "user_activity_#{ma.journals_for_message.id}"),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank'%>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<% if ma.journals_for_message.reply_id == 0 %>
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
<% else %>
|
||||
<div class="fl"><strong>您的留言:</strong></div>
|
||||
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
||||
<div class="fl"><strong>回复内容:</strong></div>
|
||||
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- <ul class="homepageNewsList fl">-->
|
||||
<!-- <div class="longMessageWidth">-->
|
||||
<!-- <li class="homepageNewsPortrait fl">-->
|
||||
<!-- <%#=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"),-->
|
||||
user_path(ma.journals_for_message.user), :target => '_blank' %>
|
||||
</li>
|
||||
<li class="homepageNewsPubType fl">
|
||||
<%=link_to User.find(ma.journals_for_message.user_id).show_name, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
|
||||
</span>
|
||||
</li>
|
||||
<li class="messageInformationContents">
|
||||
<%= link_to message_content(ma.journals_for_message.notes),
|
||||
feedback_path(ma.journals_for_message.reply_id == 0 ? ma.journals_for_message.jour_id : ma.journals_for_message.user_id,
|
||||
:anchor => "user_activity_#{ma.journals_for_message.id}"),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank'%>
|
||||
</li>
|
||||
</div>
|
||||
<div style="display: none" class="message_title_red system_message_style" >
|
||||
<% if ma.journals_for_message.reply_id == 0 %>
|
||||
<%= ma.journals_for_message.notes.html_safe %>
|
||||
<% else %>
|
||||
<div class="fl"><strong>您的留言:</strong></div>
|
||||
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
|
||||
<div class="fl"><strong>回复内容:</strong></div>
|
||||
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<li class="homepageNewsTime fr"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||
</ul>
|
||||
<#!-- </li>-->
|
||||
<!-- <li class="homepageNewsPubType fl">-->
|
||||
<%#=link_to User.find(ma.journals_for_message.user_id).show_name, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher", :target => '_blank' %>
|
||||
<!-- <span class="homepageNewsType fl">-->
|
||||
<%#= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
|
||||
<!-- </span>-->
|
||||
<!-- </li>-->
|
||||
<!-- <li class="messageInformationContents">-->
|
||||
<!-- <#%= link_to message_content(ma.journals_for_message.notes),-->
|
||||
<!-- feedback_path(ma.journals_for_message.reply_id == 0 ? ma.journals_for_message.jour_id : ma.journals_for_message.user_id,-->
|
||||
<!-- :anchor => "user_activity_#{ma.journals_for_message.id}"),-->
|
||||
<!-- :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",-->
|
||||
<!-- :target => '_blank'%>-->
|
||||
<!-- </li>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div style="display: none" class="message_title_red system_message_style" >-->
|
||||
<%# if ma.journals_for_message.reply_id == 0 %>
|
||||
<%#= ma.journals_for_message.notes.html_safe %>
|
||||
<%# else %>
|
||||
<!-- <div class="fl"><strong>您的留言:</strong></div>-->
|
||||
<!-- <div class="ml60"><%#= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>-->
|
||||
<!-- <div class="fl"><strong>回复内容:</strong></div>-->
|
||||
<!-- <div class="ml60"><%#= ma.journals_for_message.notes.html_safe %></div>-->
|
||||
<%# end %>
|
||||
<!-- </div>-->
|
||||
<!-- <li class="homepageNewsTime fr"><%#= time_tag(ma.journals_for_message.created_on).html_safe %> </li>-->
|
||||
<!-- </ul>-->
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
<div class="mb15 l_headPhoto">
|
||||
<div class="l_img">
|
||||
<% if User.current.logged? && User.current == @user %>
|
||||
<%= link_to image_tag(url_to_avatar(@user),width:"238", height: "238", :id => 'nh_source_tx'),
|
||||
my_clear_user_avatar_temp_path, :remote => true %>
|
||||
<% else %>
|
||||
<%=image_tag(url_to_avatar(@user),width:"238", height: "238", :id=>'nh_source_tx') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p><%= link_to @user.show_name, user_path(@user), :class => "f22 color-grey3" %></p>
|
||||
<p>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<span class="f18"><%= get_user_roll @user %></span>
|
||||
<% end%>
|
||||
</p>
|
||||
</div>
|
||||
<div class="l_backlog">
|
||||
<% if @user == User.current %>
|
||||
<li class="l_backlog_title">
|
||||
<%= link_to "<p class='color-grey3 f28'>#{@user.count_undo_items}</p><p class='f18 fontGrey4'>待办事项</p>".html_safe, unsolved_issues_list_user_path(@user),remote: true %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if @user.get_user_projects.size > 0 %>
|
||||
<ul class="l_backlog_list">
|
||||
<li><%= @user.check_user_him(User.current.id) %>的项目</li>
|
||||
<% @user.get_user_projects.each do |project| %>
|
||||
<li class="l_backlog_list_item">
|
||||
<%= link_to project.name, project, target: "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="l_issues">
|
||||
<li><%= link_to "#{@user.check_user_him(User.current.id)}发布的issue",user_manage_issues_user_path(@user), target: "_blank" %></li>
|
||||
<li><%= link_to "#{@user.check_user_him(User.current.id)}收到的issue", user_receive_issues_user_path(@user), target: "_blank" %></li>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$(".l_backlog_list").on("click",".l_backlog_list_item",function () {
|
||||
$(".l_backlog_list .l_backlog_list_item").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
})
|
||||
|
||||
$(window).load(function () {
|
||||
if($(".l_backlog_list li").length > 7){
|
||||
$(".l_backlog_list").after('<a href="javascript:void(0)" class="l_all_backlog">查看全部<i class="iconfont icon-xiajiantou"></i></a>');
|
||||
$(".l_all_backlog").on("click",function () {
|
||||
if($(".l_backlog_list").hasClass('active')){
|
||||
$(".l_backlog_list").removeClass("active");
|
||||
}else{
|
||||
$(".l_backlog_list").addClass("active");
|
||||
$(this).remove();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
|
@ -1,108 +1,31 @@
|
|||
<div class="mt20">
|
||||
<div class="df middlePanel">
|
||||
<div class="fl pagePanel_left">
|
||||
<div class="mb15 l_headPhoto">
|
||||
<div class="l_img">
|
||||
<% if User.current.logged? && User.current == @user %>
|
||||
<%= link_to image_tag(url_to_avatar(@user),width:"238", height: "238", :id => 'nh_source_tx'),
|
||||
my_clear_user_avatar_temp_path, :remote => true %>
|
||||
<% else %>
|
||||
<%=image_tag(url_to_avatar(@user),width:"238", height: "238", :id=>'nh_source_tx') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<p><%= link_to @user.show_name, user_path(@user), :class => "f22 color-grey3" %></p>
|
||||
<p>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<span class="f18"><%= get_user_roll @user %></span>
|
||||
<% end%>
|
||||
</p>
|
||||
</div>
|
||||
<div class="l_backlog">
|
||||
<li class="l_backlog_title">
|
||||
<p class="color-grey3 f28">57</p>
|
||||
<p class="f18 fontGrey4">待办事项</p>
|
||||
</li>
|
||||
<ul class="l_backlog_list">
|
||||
<li>我的项目</li>
|
||||
<li class="l_backlog_list_item active">启智Visual</li>
|
||||
<li class="l_backlog_list_item">Openi珊瑚</li>
|
||||
<li class="l_backlog_list_item">eduCoder</li>
|
||||
<li class="l_backlog_list_item">Openi珊瑚</li>
|
||||
<li class="l_backlog_list_item">eduCoder</li>
|
||||
<li class="l_backlog_list_item">Openi珊瑚</li>
|
||||
<li class="l_backlog_list_item">Openi珊瑚</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="l_issues">
|
||||
<li><a href="javascript:void(0)">我发布的issue</a></li>
|
||||
<li><a href="javascript:void(0)">我收到的issue</a></li>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fl pagePanel_right mb20">
|
||||
<ul class="p_list_ul">
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span><span class="infoTips tips_high ml15">高</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span>
|
||||
<span class="infoTips tips_rightNow ml15">立刻</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10">
|
||||
<span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span>
|
||||
<span class="infoTips tips_normal ml15">正常</span>
|
||||
</p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span>
|
||||
<span class="infoTips tips_urgent ml15">紧急</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<img src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3276179142,1686381254&fm=26&gp=0.jpg" class="r_list_img" />
|
||||
<div>
|
||||
<p class="lh25 mb10"><span class="mr20 f16 color-grey3">阿黄</span><span class="fontGrey4 f12">1个月前</span><span class="infoTips tips_low ml15">低</span></p>
|
||||
<p class="c_grey02 f14">更新了issue: 首次创建实训后没有默认脚本</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$(".l_backlog_list").on("click",".l_backlog_list_item",function () {
|
||||
$(".l_backlog_list .l_backlog_list_item").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
})
|
||||
})
|
||||
|
||||
$(window).load(function () {
|
||||
if($(".l_backlog_list li").length > 7){
|
||||
$(".l_backlog_list").after('<a href="javascript:void(0)" class="l_all_backlog">查看全部<i class="iconfont icon-xiajiantou"></i></a>');
|
||||
$(".l_all_backlog").on("click",function () {
|
||||
if($(".l_backlog_list").hasClass('active')){
|
||||
$(".l_backlog_list").removeClass("active");
|
||||
}else{
|
||||
$(".l_backlog_list").addClass("active");
|
||||
$(this).remove();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<div>
|
||||
<ul class="p_list_ul">
|
||||
<% if @message_count > 0 %>
|
||||
<% @message_alls.each do |ma| %>
|
||||
<% ma = ma.try(:message) if ma.is_a?(MessageAll) %>
|
||||
<!--项目申请消息-->
|
||||
<% if ma.present? && ma.class == AppliedMessage %>
|
||||
<li>
|
||||
<%= render :partial => "users/applied_project_content", :locals =>{:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
<!--项目消息-->
|
||||
<% if ma.present? && ma.class == ForgeMessage %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<ul class="pages" style="width: auto;display: table;margin-left: auto;margin-right: auto; padding-top: 10px">
|
||||
<%= pagination_links_full @message_all_pages, @message_count, :per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'users/no_data' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%#= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls, messages_all_count: @message_count } %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,48 +1,55 @@
|
|||
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
|
||||
<input type="hidden" value="<%= @type %>" name="type" id="user_activities_type">
|
||||
<script>
|
||||
$(function(){
|
||||
$($(".homepage_tab_div")[$(".homepage_tab_div").length - 1]).css("border", "none");
|
||||
});
|
||||
// 个人主页的tab
|
||||
function g(o){
|
||||
return document.getElementById(o);
|
||||
}
|
||||
function HoverLi(n){
|
||||
// g('message_all_list').className='undis';
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i = 1; i <= 6; i++){
|
||||
if (g('user_homepage_tab_'+i) != null)
|
||||
g('user_homepage_tab_'+i).className='flex-cell_homepage';
|
||||
// if(g('message_list_content_'+i) != null)
|
||||
// g('message_list_content_'+i).className='undis';
|
||||
}
|
||||
// g('message_list_content_'+n).className='dis';
|
||||
g('user_homepage_tab_'+n).className='homepageClickBackground';
|
||||
}
|
||||
</script>
|
||||
<% if is_current_user %>
|
||||
<% if task_count(@unsolved_issues_count, @unfinished_homework_count, @unfinished_test_count, @unfinished_poll_count, @anonymous_evaluation_count, @applied_message_alls_count) > 0 %>
|
||||
<div class="homepagetopBanner mb10" style="width:748px;">
|
||||
<div class="flex-container_homepage">
|
||||
<%= render :partial => "users/task_tip" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div id="user_homepage_message_list">
|
||||
<%= render :partial => 'users/user_message_list'%>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">Ta的动态</div>
|
||||
</div>
|
||||
<!--显示个人主页-->
|
||||
<% if @user_activities_count > 0 %>
|
||||
<%= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} %>
|
||||
<% else %>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'users/no_data' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div id="user-info-right-<%= @user.login %>">
|
||||
<%= render partial: "users/usersInfo" %>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!--<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>-->
|
||||
<!--<input type="hidden" value="<%#= @type %>" name="type" id="user_activities_type">-->
|
||||
<!--<script>-->
|
||||
<!-- $(function(){-->
|
||||
<!-- $($(".homepage_tab_div")[$(".homepage_tab_div").length - 1]).css("border", "none");-->
|
||||
<!-- });-->
|
||||
<!-- // 个人主页的tab-->
|
||||
<!-- function g(o){-->
|
||||
<!-- return document.getElementById(o);-->
|
||||
<!-- }-->
|
||||
<!-- function HoverLi(n){-->
|
||||
<!-- // g('message_all_list').className='undis';-->
|
||||
<!-- //如果有N个标签,就将i<=N;-->
|
||||
<!-- for(var i = 1; i <= 6; i++){-->
|
||||
<!-- if (g('user_homepage_tab_'+i) != null)-->
|
||||
<!-- g('user_homepage_tab_'+i).className='flex-cell_homepage';-->
|
||||
<!-- // if(g('message_list_content_'+i) != null)-->
|
||||
<!-- // g('message_list_content_'+i).className='undis';-->
|
||||
<!-- }-->
|
||||
<!--// g('message_list_content_'+n).className='dis';-->
|
||||
<!-- g('user_homepage_tab_'+n).className='homepageClickBackground';-->
|
||||
<!-- }-->
|
||||
<!--</script>-->
|
||||
<%# if is_current_user %>
|
||||
<%# if task_count(@unsolved_issues_count, @unfinished_homework_count, @unfinished_test_count, @unfinished_poll_count, @anonymous_evaluation_count, @applied_message_alls_count) > 0 %>
|
||||
<!-- <div class="homepagetopBanner mb10" style="width:748px;">-->
|
||||
<!-- <div class="flex-container_homepage">-->
|
||||
<%#= render :partial => "users/task_tip" %>
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<%# end %>
|
||||
|
||||
<!-- <div id="user_homepage_message_list">-->
|
||||
<%#= render :partial => 'users/user_message_list'%>
|
||||
<!-- </div>-->
|
||||
<%# else %>
|
||||
<!-- <div class="homepageRightBanner">-->
|
||||
<!-- <div class="NewsBannerName">Ta的动态</div>-->
|
||||
<!-- </div>-->
|
||||
<!-- 显示个人主页-->
|
||||
<%# if @user_activities_count > 0 %>
|
||||
<%#= render :partial => 'users/user_activities', :locals => {:user_activities => @user_activities, :page => 0, :type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} %>
|
||||
<%# else %>
|
||||
<!-- <div class="mb10">-->
|
||||
<%#= render :partial => 'users/no_data' %>
|
||||
<!-- </div>-->
|
||||
<%# end %>
|
||||
<%# end %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if is_current_user %>
|
||||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/user_message_list') %>");
|
||||
$("#user-info-right-<%= @user.login %>").html("<%= j render partial: "users/usersInfo" %>");
|
||||
<% else %>
|
||||
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'users/user_activities',:locals => {:user_activities => @user_activities, :page => @page,:type => @type, :user_id => (@user.type == "AnonymousUser" ? User.current.id : @user.id), :action => "user_activities"} )%>");
|
||||
<% end %>
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/unapproval_applied_list') %>");
|
||||
$("#applied_message_num").html("<%= @message_count %>");
|
||||
//$("#user_homepage_message_list").html("<#%= escape_javascript( render :partial => 'users/unapproval_applied_list') %>");
|
||||
//$("#applied_message_num").html("<#%= @message_count %>");
|
||||
|
||||
$("#user-info-right-<%= @user.login %>").html("<%= escape_javascript( render :partial => 'users/unapproval_applied_list') %>");
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
$("#user_homepage_message_list").html("<%= escape_javascript( render :partial => 'users/unsolved_issues_list') %>");
|
||||
$("#unsolved_issues_num").html("<%= @unsolved_issues_count %>");
|
||||
//$("#user_homepage_message_list").html("<#%= escape_javascript( render :partial => 'users/unsolved_issues_list') %>");
|
||||
//$("#unsolved_issues_num").html("<#%= @unsolved_issues_count %>");
|
||||
|
||||
$("#user-info-right-<%= @user.login %>").html("<%= escape_javascript( render :partial => 'users/unsolved_issues_list') %>");
|
||||
|
|
|
@ -1,59 +1,10 @@
|
|||
<%= render :partial => 'users/selector_for_messages'%>
|
||||
<div class="resources mt10" id="users_setting">
|
||||
<div>
|
||||
<% if (!@message_alls.nil? && @message_alls.count >0) %>
|
||||
<% if params[:type].nil? || params[:type] == "unviewed" %>
|
||||
<div class="newsReadSetting">
|
||||
<% count = unviewed_message(@user) %>
|
||||
有 <span class="c_red"><%= count %></span> 条未读
|
||||
<% unless (count == 0 || User.current != @user) %>
|
||||
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<!--总消息列表-->
|
||||
<div id="all_message_list">
|
||||
<% unless @message_alls.nil? %>
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<!--项目消息-->
|
||||
<% else %>
|
||||
<div class="flash notice">您目前还没有相关消息!</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="user-messages-<%= current_user.try(:login) %>">
|
||||
<%= render partial: "users/infos" %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function message_titile_show(obj,e)
|
||||
{
|
||||
obj.parent().next("div").show();
|
||||
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
||||
}
|
||||
function message_titile_hide(obj)
|
||||
{
|
||||
obj.parent().next("div").hide();
|
||||
}
|
||||
|
||||
function show_more_system_messages(list,content, id2, id3) {
|
||||
$(list).toggleClass("show_more_li");
|
||||
$(content).toggleClass("show_more_system_message");
|
||||
var information = $(id2);
|
||||
var val = information.attr("value");
|
||||
if (val == "show_more") {
|
||||
$(id2).text("[收起]");
|
||||
information.attr("value", "hide_more");
|
||||
information.attr("style", "color:#3ca5c6");
|
||||
}
|
||||
else {
|
||||
$(id2).text("[展开]");
|
||||
information.attr("value", "show_more");
|
||||
information.attr("style", "color:#0781b4;");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<%#= render partial: "users/private_box" %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
$("#all_message_list").html("<%= escape_javascript( render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls }) %>");
|
||||
$("#unread-message-count-<%= @user.login %>").html("<%= @unred_all_messages %>")
|
||||
|
||||
$("#user-messages-<%= current_user.try(:login) %>").html("<%= escape_javascript( render :partial => 'users/infos', :locals => { :message_alls => @message_alls }) %>");
|
|
@ -0,0 +1,13 @@
|
|||
<% companies.each do |company| %>
|
||||
<tr class="<%= cycle("odd", "even")%>" align="center">
|
||||
<td> <%= link_to image_tag(url_to_avatar(company),:size=>"30x30",:alt=>company.name),company.url, :target => "_blank" %> </td>
|
||||
<td style="vertical-align: middle;"><%= company.name %></td>
|
||||
<td style="width:15%; vertical-align: middle;">
|
||||
<%= reorder_links('company', {:action => 'move', :id => company, type: @type}, :put) %>
|
||||
</td>
|
||||
<td class="buttons" style="vertical-align: middle;">
|
||||
<%= link_to l(:button_edit),edit_web_footer_company_path(company, type: @type) %>
|
||||
<%= delete_link web_footer_company_path(company, type: @type) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
|
@ -4,6 +4,7 @@
|
|||
<input type="hidden" name="type" value="<%= @type %>" />
|
||||
<div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.select :key, options_for_select(hash_company_types, @company.key), :required => true %></p>
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
<p><%= f.text_field :url, :required => true %></p>
|
||||
<p><%= l(:label_url_prompt) %></p>
|
||||
|
|
|
@ -1,11 +1,42 @@
|
|||
<div class="contextual"><%= link_to label_new_button_name(@type), new_web_footer_company_path(type: @type),:class => "icon icon-add" %></div>
|
||||
<div class="contextual"><%= link_to label_new_button_name(@type), new_web_footer_company_path,:class => "icon icon-add" %></div>
|
||||
<h3><%= label_title_name(@type) %></h3>
|
||||
|
||||
<div id="logo_link">
|
||||
<% @companys.each do |company| %>
|
||||
<span class="footer_logo_link"><%= link_to image_tag(url_to_avatar(company),:size=>"100x30",:alt=>company.name),company.url, :target => "_blank" %></span>
|
||||
<%= link_to l(:button_edit),edit_web_footer_company_path(company, type: @type) %>
|
||||
<%= delete_link web_footer_company_path(company, type: @type) %>
|
||||
<hr/>
|
||||
<% end %>
|
||||
<%= form_tag({}, :method => :get, :remote => true) do %>
|
||||
<fieldset>
|
||||
<label for='status'>
|
||||
类别 :
|
||||
</label>
|
||||
<%= select_tag 'key', options_for_select(hash_company_types), :class => "small", :onchange => "remote_search();", :id => "company_type" %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th>LOGO</th>
|
||||
<th>单位名称</th>
|
||||
<th>排序</th>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody id="web_footer_companies_list">
|
||||
<%= render :partial => 'list', :locals => {:companies => @companies} %>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pagination">
|
||||
<%= pagination_links_full @obj_pages, @obj_count ,:per_page_links => false, :remote => true, :flag => true, :is_new => true %>
|
||||
</div>
|
||||
|
||||
<% html_title(l(:label_role_plural)) -%>
|
||||
|
||||
<script type="text/javascript">
|
||||
function remote_search(){
|
||||
var options=$("#company_type option:selected");
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "<%= web_footer_companies_path %>",
|
||||
data: {key: options.val()},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
$("#web_footer_companies_list").html("<%=escape_javascript(render :partial => 'list', :locals => {:companies => @companies}) %>")
|
||||
$(".pagination").html('<%= pagination_links_full @obj_pages, @obj_count ,:per_page_links => false, :remote => true, :flag => true, :is_new => true %>');
|
|
@ -4,6 +4,7 @@
|
|||
<input type="hidden" name="type" value="<%= @type %>" />
|
||||
<div>
|
||||
<div class="box tabular">
|
||||
<p><%= f.select :key, options_for_select(hash_company_types), :required => true %></p>
|
||||
<p><%= f.text_field :name, :required => true %></p>
|
||||
<p><%= f.text_field :url, :required => true %></p>
|
||||
<p><%= l(:label_url_prompt) %></p>
|
||||
|
|
|
@ -18,7 +18,7 @@ module RedmineApp
|
|||
# -- all .rb files in that directory are automatically loaded.
|
||||
|
||||
#verifier if email is real
|
||||
|
||||
|
||||
|
||||
config.generators do |g|
|
||||
g.test_framework :rspec,
|
||||
|
@ -80,7 +80,7 @@ module RedmineApp
|
|||
allow do
|
||||
origins '*'
|
||||
# location of your API
|
||||
resource '/api/*', :headers => :any, :methods => [:get, :post, :options, :put]
|
||||
resource '*', :headers => :any, :methods => [:get, :post, :options, :put]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ zh:
|
|||
field_hide_mail: 隐藏我的邮件地址
|
||||
field_comments: 注释
|
||||
field_url: 路径
|
||||
field_key: 类别
|
||||
field_logo_size: logo大小
|
||||
field_start_page: 起始页
|
||||
field_subproject: 子项目
|
||||
|
|
|
@ -1091,6 +1091,7 @@ RedmineApp::Application.routes.draw do
|
|||
member do
|
||||
match 'committers', :via => [:get, :post]
|
||||
end
|
||||
match 'build_socks_shop', :via => :post, :on => :collection
|
||||
end
|
||||
resources :repositories, :except => [:index, :show] do
|
||||
member do
|
||||
|
@ -1308,7 +1309,9 @@ RedmineApp::Application.routes.draw do
|
|||
match 'permissions', :via => [:get, :post]
|
||||
end
|
||||
end
|
||||
resources :web_footer_companies, :except => :show
|
||||
resources :web_footer_companies, :except => :show do
|
||||
put 'move', :on => :member
|
||||
end
|
||||
resources :enumerations, :except => :show
|
||||
match 'enumerations/:type', :to => 'enumerations#index', :via => :get
|
||||
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
class AddPositionToWebFooterCompanies < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :web_footer_companies, :position, :integer
|
||||
|
||||
WebFooterCompany.order(:updated_at).each.with_index(1) do |item, index|
|
||||
item.update_attributes(position: index)
|
||||
end
|
||||
end
|
||||
end
|
17
db/schema.rb
17
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20191023031103) do
|
||||
ActiveRecord::Schema.define(:version => 20191026085118) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -1954,6 +1954,20 @@ ActiveRecord::Schema.define(:version => 20191023031103) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "private_messages", :force => true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "target_id"
|
||||
t.integer "sender_id"
|
||||
t.integer "receiver_id"
|
||||
t.text "content"
|
||||
t.datetime "send_time"
|
||||
t.integer "status"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
add_index "private_messages", ["user_id"], :name => "index_private_messages_on_user_id"
|
||||
|
||||
create_table "professional_levels", :force => true do |t|
|
||||
t.string "level"
|
||||
t.datetime "created_at", :null => false
|
||||
|
@ -2808,6 +2822,7 @@ ActiveRecord::Schema.define(:version => 20191023031103) do
|
|||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "key"
|
||||
t.integer "position"
|
||||
end
|
||||
|
||||
add_index "web_footer_companies", ["key"], :name => "index_web_footer_companies_on_key"
|
||||
|
|
|
@ -2876,3 +2876,9 @@ a:hover.Blue-btn{ background:#3598db; color:#fff;}
|
|||
|
||||
.lab_left{width: 80px;text-align: center;line-height: 30px;display: block;float: left}
|
||||
.input_center{height: 30px;line-height: 30px;border-radius: 3px;margin:0px 20px;border:1px solid #ddd;padding-left: 5px ;box-sizing: border-box;width: 200px; }
|
||||
|
||||
.pagination .active {
|
||||
background-color: #3b94d6;
|
||||
border: 1px solid #3b94d6;
|
||||
color: #fff;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/* 2015-06-26 */
|
||||
html,body{height: 100%;}
|
||||
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; background:#eaebec;}
|
||||
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:14px;line-height:1.5; background:#eaebec;}
|
||||
div,img,tr,td,table{ border:0;}
|
||||
table,tr,td{border:0;}
|
||||
ol,ul,li{ list-style-type:none}
|
||||
|
@ -124,8 +124,11 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
|||
.mb5{ margin-bottom:5px;}.mb8 {margin-bottom:8px !important;}.pb5{ padding-bottom: 5px;}.mb10{ margin-bottom:10px !important;}.mb12 {margin-bottom:12px !important;}
|
||||
.mb15{margin-bottom: 15px;}.mb20{ margin-bottom:20px;}.mb25{ margin-bottom:25px;}.mb30 {margin-bottom:30px;}.mb40 {margin-bottom:40px;}.pl5{ padding-left:5px;}
|
||||
.mb70{ margin-bottom:70px;}.mb60{ margin-bottom:60px;}.mb90{ margin-bottom:90px;}.mb80{ margin-bottom:80px;}.mb100{ margin-bottom:100px;}
|
||||
.pl10 {padding-left:10px;}.pr5 {padding-right:5px;}.pr10{padding-right: 10px;}.pl62 {padding-left: 62px;}.pl15{ padding-left:15px;}.pt5{ padding-top:5px;}
|
||||
.pt10{ padding-top:10px;}.pt20{ padding-top:20px;}.pb5{ padding-bottom: 5px;}.w20{ width:20px;}.w40{width: 40px;}.w45{ width: 45px;}.w46{ width: 46px;}.w48{width:48px;}.w50 {width:50px;}
|
||||
.pl10 {padding-left:10px;}.pl30 {padding-left:30px;}.pr5 {padding-right:5px;}.pr10{padding-right: 10px;}.pl62 {padding-left: 62px;}.pl15{ padding-left:15px;}.pt5{ padding-top:5px;}
|
||||
.pt10{ padding-top:10px;}.pt30{padding-top: 30px;}
|
||||
.pt20{ padding-top:20px;}
|
||||
|
||||
.pb5{ padding-bottom: 5px;}.pb30{padding-bottom: 30px}.w20{ width:20px;}.w40{width: 40px;}.w45{ width: 45px;}.w46{ width: 46px;}.w48{width:48px;}.w50 {width:50px;}
|
||||
.w56 {width:56px;}.w60{ width:60px;}.w61{ width:61px;}.w65{ width:65px;}.w70{ width:70px;}.w80{ width:80px;}.w90{ width:90px;}.w100 {width: 100px;}.w110{width:110px !important;}
|
||||
.w108 {width:108px;}.w125{width:125px;}.w128{ width:128px;}.w130{ width:130px;}.w140{ width:140px;}.w145{ width:145px;}.w150{ width:150px;}
|
||||
.w160{width:160px !important;}.w170{width:170px;}.w180{width:180px;}.w186{ width:186px;}.w190{width: 190px;}.w196{ width:196px;}.w200{width: 200px;}.w210{ width:210px;}
|
||||
|
@ -158,12 +161,24 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
|
|||
.wb60{width: 59%;}.wb40{width: 40%;}.wb45{width: 45%;}
|
||||
.wb50{width: 49%;}.wb50{width: 50%;}.wb35{width: 35%;}
|
||||
|
||||
|
||||
|
||||
.task-hide {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.task-hide-2 {
|
||||
height: 40px;
|
||||
overflow: hidden;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
/*该高度会写入配置文件*/
|
||||
.maxh360 {max-height: 810px;}
|
||||
.maxh300 { max-height: 300px; }
|
||||
.lh18 { line-height: 18px;}
|
||||
.color-grey-c{color: #ccc;}
|
||||
/* Font & background Color */
|
||||
.color-grey3{color:#333!important;}
|
||||
.color-grey8{color: #888!important;}
|
||||
|
@ -224,6 +239,9 @@ a:hover.c_grey{ color:#333;}
|
|||
.b_red {background:#d60308;}
|
||||
.b_lblue{ background:#3b94d6;}
|
||||
|
||||
.edu-txt-right{text-align: right}
|
||||
.edu-txt-center{text-align: center}
|
||||
.edu-txt-left{text-align: left}
|
||||
|
||||
.task-hide-2{overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;}
|
||||
/*font&color add by Tim*/
|
||||
|
@ -289,7 +307,7 @@ a.submit_btn2:hover {background-color: #2788d0;}
|
|||
input.submit_btn {border:1px solid #3498db; padding:3px 10px; border-radius:3px; color:#3498db;}
|
||||
input.submit_btn:hover {background-color:#3498db; color:#ffffff;}
|
||||
a.yellowBtn{ display:inline-block;color:#0d90c3; height:22px;}
|
||||
|
||||
.radius{border-radius: 50%}
|
||||
/* commonBtn */
|
||||
.grey_btn{background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px;}
|
||||
a.grey_btn{background:#d9d9d9; color:#656565; font-weight:normal; text-align:center;padding:2px 10px; display: inline-block; border-radius: 3px;}
|
||||
|
@ -502,6 +520,7 @@ a.btn_green_64_width{ width: 64px; display:inline-block; color: #fff; background
|
|||
a:hover.btn_green_64_width{ background: #14ad5a; color: #fff;}
|
||||
|
||||
.padding10{padding:10px;box-sizing: border-box}
|
||||
.padding20{padding:20px;box-sizing: border-box}
|
||||
.f12 {font-size:12px;}
|
||||
.f13 {font-size:13px;}
|
||||
.f14 {font-size:14px;}
|
||||
|
@ -545,10 +564,17 @@ a:hover.btn_green_64_width{ background: #14ad5a; color: #fff;}
|
|||
.c-grey4 {color:#888888;}
|
||||
.c-grey5 {color:#aaaaaa;}
|
||||
.c-grey6 {color:#777777;}
|
||||
.c-blue {color:#3b94d6;}
|
||||
.c-blue {color:#3b94d6!important;}
|
||||
.c-white {color:#ffffff;}
|
||||
.c-black {color:#333}
|
||||
|
||||
.color-orange {
|
||||
color: #ff6800!important;
|
||||
}
|
||||
.padding30-20{padding:30px 20px;}
|
||||
.bor-bottom-greyE{border-bottom: 1px solid #eee;}
|
||||
.bor-left-greyE {
|
||||
border-left: 1px solid #EEEEEE!important;
|
||||
}
|
||||
.bg_white_bor{background-color: #fff;border:1px solid #dddddd}
|
||||
|
||||
#intro_content p{word-break:break-word!important;}
|
||||
|
@ -558,3 +584,7 @@ a:hover.btn_green_64_width{ background: #14ad5a; color: #fff;}
|
|||
|
||||
/* Home 首页相关样式*/
|
||||
.floating_color{color: #fff}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -99,6 +99,13 @@ a.opnionButton:hover{background: #297fb8; }
|
|||
padding:0.6em; z-index:100000; opacity: 0.5;}
|
||||
html>body #ajax-indicator { position: fixed; }
|
||||
#ajax-indicator span { background-position: 0% 40%; background-repeat: no-repeat; background-image: url(/images/loading.gif); padding-left: 26px; vertical-align: bottom;}
|
||||
|
||||
#deploy-loading { position: absolute; /* fixed not supported by IE */ background-color:#eee;border: 1px solid #bbb; top:35%; left:40%; width:20%; font-weight:bold; text-align:center; color: blue;
|
||||
padding:0.6em; z-index:100000; opacity: 0.5;}
|
||||
html>body #deploy-loading { position: fixed; }
|
||||
#deploy-loading span { background-position: 0% 40%; background-repeat: no-repeat; background-image: url(/images/loading.gif); padding-left: 26px; vertical-align: bottom;}
|
||||
|
||||
|
||||
div.modal { border-radius: 5px; background: #fff; z-index: 50; padding: 4px;}
|
||||
.ui-widget-content { border: 1px solid #ddd; color: #333;}
|
||||
.ui-widget { font-family: Verdana, sans-serif; font-size: 1.1em;}
|
||||
|
@ -1003,4 +1010,4 @@ span.down{display: block;position: absolute;top: 13px;right: 4px;width: 12px;hei
|
|||
.data_showdetail .detail_part{margin-bottom: 15px;}
|
||||
.data_showdetail .detail_part label{width: 13%;padding-right: 10px;box-sizing: border-box;text-align: right;display: block;float: left}
|
||||
.detail_des{border:none;padding: 0px;float: left;width: 818px;word-wrap: break-word;font-size: 14px;outline: none;}
|
||||
.attachment_notice{color: #888888; font-size: 12px; line-height: 20px;}
|
||||
.attachment_notice{color: #888888; font-size: 12px; line-height: 20px;}
|
||||
|
|
|
@ -444,6 +444,14 @@ a.topnav_login_box:hover {color:#a1ebff;}
|
|||
.copyright{ width:100%; text-align: center; }
|
||||
a.f_grey {color:#666666;}
|
||||
a.f_grey:hover {color:#000000;}
|
||||
.undo-item-title{padding:20px; text-align:center;}
|
||||
.undo-item-title.active a, .undo-item-title:hover a{color: #317DFF}
|
||||
.border-1-bottom{border-bottom: 1px solid rgba(224,224,224,1)}
|
||||
.width100{width:100%; display: inline-block}
|
||||
.font-16{font-size:16px;}
|
||||
.pd5{padding:5px;}
|
||||
.ml10{margin-left: 10px;}
|
||||
.bg-gray{background: #eee;}
|
||||
/*----------------------tac_footer*/
|
||||
|
||||
.tac_footer{
|
||||
|
@ -540,8 +548,117 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
|
|||
.homepageBackground{ background-color:#90C5EC; flex:1; text-align: center }
|
||||
.homepageClickBackground{ background-color:#3b94d6; flex:1; text-align: center }
|
||||
.flex-cell_homepage:hover{ background-color:#3b94d6;}
|
||||
|
||||
|
||||
/*私信*/
|
||||
.flex1{flex:1;}
|
||||
.private-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.private-item {
|
||||
padding: 30px 30px 30px 25px;
|
||||
border-bottom: 1px solid #F5F5F5;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.private_message_a img{
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.private-item:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
/*私信对话框*/
|
||||
.letterBox {
|
||||
padding: 0px 20px;
|
||||
height: 545px;
|
||||
overflow-y: auto;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
}
|
||||
.letter-time {
|
||||
width: auto;
|
||||
padding: 0px 10px;
|
||||
background-color: #999;
|
||||
color: #fff;
|
||||
border-radius: 10px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.OtherSide-info,.ThisSide-info{
|
||||
font-size: 14px;
|
||||
}
|
||||
.OtherSide-info .trangle {
|
||||
position: absolute;
|
||||
left: -5px;
|
||||
top: 10px;
|
||||
width: 0;
|
||||
height: 0px;
|
||||
border-top: 6px solid transparent;
|
||||
border-right: 5px solid #f5f5f5;
|
||||
border-bottom: 6px solid transparent;
|
||||
}
|
||||
.ThisSide-info .trangle{
|
||||
position: absolute;
|
||||
right:-5px;
|
||||
top: 10px;
|
||||
width: 0;
|
||||
height: 0px;
|
||||
border-top: 6px solid transparent;
|
||||
border-left: 5px solid #f5f5f5;
|
||||
border-bottom: 6px solid transparent;
|
||||
}
|
||||
.OtherSide-info .sms,.ThisSide-info .sms {
|
||||
max-width: 300px;
|
||||
padding: 10px 15px;
|
||||
box-sizing: border-box;
|
||||
background-color: #F5F5F5;
|
||||
color: #666;
|
||||
border-radius: 6px;
|
||||
text-align: justify;
|
||||
}
|
||||
.OtherSide, .ThisSide {
|
||||
margin-top: 30px;
|
||||
}
|
||||
a.task-btn-orange {
|
||||
background: #4CACFF!important;
|
||||
color: #fff!important;
|
||||
}
|
||||
a.task-btn {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
border: none;
|
||||
padding: 0 12px;
|
||||
color: #fff;
|
||||
background: #CDCDCD;
|
||||
letter-spacing: 1px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
border-radius: 2px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.private-list {
|
||||
min-height: 660px;
|
||||
max-height: 831px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.part-line {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
}
|
||||
.part-line:hover {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.private-part:last-child .part-line {
|
||||
border: none;
|
||||
}
|
||||
.privatePartName {
|
||||
max-width: 70px;
|
||||
float: left;
|
||||
}
|
||||
/*oschina授权页*/
|
||||
.authTop{width: 100%;position: fixed;left: 0px;top:0px;background-color: #51B7EC;height: 58px;color: #fff;}
|
||||
.authmain{width: 1000px;margin:0px auto;display: block!important;}
|
||||
|
@ -551,7 +668,11 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
|
|||
.l-r-trustie p{line-height: 40px;font-size: 15px;}
|
||||
.checked-choose{margin-right: 5px;margin-top: 13px;float: left}
|
||||
|
||||
|
||||
/*背景颜色*/
|
||||
.bg-green{background:#60B25E;}
|
||||
.bg-refuse{background:#E74C3B;}
|
||||
.fs12{font-size:12px !important;}
|
||||
.text-white{color: #fff !important;}
|
||||
/*introduce页面*/
|
||||
.content_Intruduce{min-width: 1200px;}
|
||||
.inline{width: auto;display: inline-block;}
|
||||
|
@ -778,6 +899,10 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
|
|||
font-size: 16px;
|
||||
padding:0px 20px;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
}
|
||||
.l_backlog_list li:first-child{
|
||||
font-size: 20px;
|
||||
|
@ -876,11 +1001,12 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
|
|||
color: white;
|
||||
border-radius:2px;
|
||||
}
|
||||
.tips_normal{background: #60B25E}
|
||||
.tips_urgent{background:#E74C3B }
|
||||
.tips_high{background:#E67E23 }
|
||||
.tips_low{background:#1ABC9C }
|
||||
.tips_rightNow{background:#E74C3B }
|
||||
.tips_issue_1{background: #06BEF9}
|
||||
.tips_issue_2{background:#60B25E }
|
||||
.tips_issue_3{background:#E67E23 }
|
||||
.tips_issue_4{background:#1ABC9C }
|
||||
.tips_issue_5{background:#E74C3B }
|
||||
.text-red{color: #E74C3B}
|
||||
|
||||
/*---------------------------------------项目主页改版-cs--20191016*/
|
||||
.t_project_banner{
|
||||
|
@ -1042,5 +1168,3 @@ a.user_editinfo{border-top:1px solid #e5e5e5; height:30px; line-height:30px; tex
|
|||
left: 0px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -926,7 +926,8 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
|
|||
/*a.f_grey:hover {color:#000000;}*/
|
||||
|
||||
/*资源库*/
|
||||
.resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right}
|
||||
/*.resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right}*/
|
||||
.resources {background-color:#ffffff; padding:15px;}
|
||||
.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:24px; float:right; position:relative; margin-top:-6px;}
|
||||
|
|
Loading…
Reference in New Issue