change user page
This commit is contained in:
parent
0c98a7f5aa
commit
8f9f0215e3
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'
|
||||
|
|
|
@ -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
|
||||
|
@ -2091,20 +2091,24 @@ class UsersController < ApplicationController
|
|||
render :layout=>nil,:locals => {:feed_list=>@list}
|
||||
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, 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")
|
||||
@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
|
||||
|
||||
|
@ -2233,13 +2237,18 @@ class UsersController < ApplicationController
|
|||
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 +2259,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 +2348,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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -336,6 +336,14 @@ 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
|
||||
|
||||
|
||||
def my_blogs_count
|
||||
self.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count
|
||||
|
@ -386,6 +394,28 @@ class User < Principal
|
|||
@base_homepage
|
||||
end
|
||||
|
||||
#未解决的issue
|
||||
def user_unsolve_issues
|
||||
Issue.where(:assigned_to_id => id, :status_id => [1, 2, 4, 6]).includes(:author, :project)
|
||||
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} );"
|
||||
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
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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"), home_path()%>
|
||||
<%#=link_to image_tag("../images/logo_blue.png",width:"51px", height: "45px",class: "mt3"), home_path()%>
|
||||
</div>
|
||||
<div class="fl">
|
||||
<ul>
|
||||
|
|
|
@ -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="homepageContentContainer">
|
||||
<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>
|
|
@ -1,20 +1,43 @@
|
|||
<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), :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 %>
|
||||
<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><%= render :partial => "users/user_message_applide_action", :locals =>{:ma => ma} %></span>
|
||||
|
||||
</p>
|
||||
<p class="lh25 mb10">
|
||||
<% 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>
|
||||
</p>
|
||||
</div>
|
|
@ -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,67 +1,74 @@
|
|||
<%# 系统消息总显示在最上面 %>
|
||||
<%= 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 %>
|
||||
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
|
||||
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--项目消息-->
|
||||
<% if ma.class == ForgeMessage %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<%# 竞赛消息 %>
|
||||
<% if ma.class == ContestMessage %>
|
||||
<%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %>
|
||||
<%= render :partial => 'users/user_message_contest', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<%# 博客消息 %>
|
||||
<% if ma.class == BlogMessage %>
|
||||
<%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %>
|
||||
<%= render :partial => 'users/user_message_blog', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--公共贴吧-->
|
||||
<% if ma.class == MemoMessage %>
|
||||
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
|
||||
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<!--用户留言-->
|
||||
<% if ma.class == UserFeedbackMessage %>
|
||||
<li>
|
||||
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
|
||||
<!--子域名申请通知-->
|
||||
<% if ma.class == OrgMessage %>
|
||||
<%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
|
||||
<%= render :partial => 'users/user_message_org', :locals => {:ma => ma} %>
|
||||
<% end %>
|
||||
|
||||
<%# 申请类消息 %>
|
||||
<% if ma.class == AppliedMessage %>
|
||||
<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 %>
|
|
@ -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>
|
|
@ -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_id), :target => "_blank", :title => "#{ma.author.try(:show_name)}" %>
|
||||
</span>
|
||||
<span class="fontGrey4 f12"><%= time_from_now(ma.updated_on) %></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"}" %>
|
||||
<% 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 %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -1,56 +1,76 @@
|
|||
<!-- 申请添加单位 -->
|
||||
<% 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>
|
||||
<% 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_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>-->
|
||||
<!-- 匿评成绩申诉 -->
|
||||
<% 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>
|
||||
<%# 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>-->
|
||||
<% 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>-->
|
||||
<% 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,238 +1,217 @@
|
|||
<% user = User.find(ma.forge_message_id) %>
|
||||
<% 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>
|
||||
<%#= 这类数据其实已经不要了 %>
|
||||
<%= 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, settings_project_path(:id => ma.project, :tab => "members"), :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 %>
|
||||
<% 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, project_member_path(ma.project), :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 %>
|
||||
<% 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, member_project_path(ma.project), :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>
|
||||
<%# inviter = 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, project_path(ma.project),
|
||||
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||
:target => '_blank',
|
||||
:title => "ma.project"
|
||||
%>
|
||||
</p>
|
||||
</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 %>
|
||||
|
||||
<% 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>
|
||||
<% end %>
|
||||
<% author = ma.forge_message.author %>
|
||||
<% 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>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
<%= ma.forge_message.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>:
|
||||
</span>
|
||||
<%= 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}"
|
||||
%>
|
||||
</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' %>
|
||||
</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.tracker_id == 5 ? "发布的周报:" : "指派给你的问题:"%>:
|
||||
</span>
|
||||
<%= 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}"
|
||||
%>
|
||||
</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 %>
|
||||
<%= 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>
|
||||
</p>
|
||||
<p class="c_grey02 f14">
|
||||
<span class="homepageNewsType fl">
|
||||
更新了问题状态
|
||||
</span>
|
||||
<%= link_to ma.forge_message.journalized.subject,
|
||||
issue_path(:id => ma.forge_message.journalized_id), :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>
|
||||
<% 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 == "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>
|
||||
<% 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 %>
|
||||
|
||||
<% 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' %>
|
||||
|
||||
</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) %>
|
||||
<%= 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}", project_pull_request_path(ma.forge_message_id, :project_id => ma.project_id),
|
||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :target => '_blank' %>
|
||||
</p>
|
||||
</div>
|
||||
<% 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_projects.size > 0 %>
|
||||
<ul class="l_backlog_list">
|
||||
<li><%= @user.check_user_him(User.current.id) %>的项目</li>
|
||||
<% @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,8 @@
|
|||
<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">
|
||||
<%= render :partial => 'users/new_user_message', :locals => { :message_alls => @message_alls, messages_all_count: @message_count } %>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -1,48 +1,68 @@
|
|||
<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>
|
||||
<% if is_current_user %>
|
||||
<div id="user-info-right-<%= @user.login %>">
|
||||
<%= render partial: "users/usersInfo" %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">Ta的动态</div>
|
||||
</div>
|
||||
<!--显示个人主页-->
|
||||
<div id="user-info-right-<%= @user.login %>">
|
||||
<% 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"} %>
|
||||
<%= 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>
|
||||
<div class="mb10">
|
||||
<%= render :partial => 'users/no_data' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
<!--<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') %>");
|
||||
|
|
|
@ -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{
|
||||
|
@ -776,6 +784,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;
|
||||
|
@ -874,11 +886,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{
|
||||
|
|
|
@ -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