Merge branch 'develop' into 'develop'
个人主页功能 个人主页功能 See merge request !67
This commit is contained in:
commit
353073c82a
|
@ -1820,7 +1820,7 @@ class UsersController < ApplicationController
|
|||
# 自己的主页显示消息
|
||||
# 系统消息为管理员发送,我的消息中包含有系统消息
|
||||
@message_alls = []
|
||||
messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" ,@user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc")
|
||||
messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" , @user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc")
|
||||
messages.each do |message_all|
|
||||
mess = message_all.message
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
|
@ -1872,7 +1872,7 @@ class UsersController < ApplicationController
|
|||
@applied_message_alls << mess
|
||||
end
|
||||
elsif message_all.message_type == "CourseMessage"
|
||||
if (mess.course_message_type == "JoinCourse" && mess.status == 0)
|
||||
if mess.course_message_type == "JoinCourseRequest" && mess.status == 0
|
||||
@applied_message_alls << mess
|
||||
end
|
||||
end
|
||||
|
@ -2079,11 +2079,11 @@ class UsersController < ApplicationController
|
|||
@message_alls << mess
|
||||
end
|
||||
elsif (message_all.message_type == "AppliedMessage" )
|
||||
if (mess.applied_type == "AppliedProject" && mess.status == 1) || (mess.applied_type == "ApplyAddSchools" && mess.status == 0)
|
||||
if (mess.applied_type == "AppliedProject" && mess.status == 1) || ( mess.applied_type == "ApplyAddSchools" && ApplyAddSchools.where(:school_id => mess.applied_id, :status => 0).count != 0 )
|
||||
@message_alls << mess
|
||||
end
|
||||
elsif message_all.message_type == "CourseMessage"
|
||||
if (mess.course_message_type == "JoinCourse" && mess.status == 0)
|
||||
if mess.course_message_type == "JoinCourseRequest" && mess.status == 0
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
|
|
|
@ -167,7 +167,7 @@
|
|||
<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;'>#{user_course_count}</span>".html_safe : "课程",
|
||||
{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list" %>
|
||||
{:controller => "users", :action => "user_courselist", :id => @user}, :id => "user_course_list", :target => "_blank" %>
|
||||
<!-- <div class="user_navmore_box" >
|
||||
<ul>
|
||||
<li class="user_navmore_icons">
|
||||
|
@ -203,7 +203,7 @@
|
|||
|
||||
<div class="home-user-leftnav">
|
||||
<h3 >
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl" %>
|
||||
<%= link_to "项目社区", user_project_community_path(User.current), :class => "fl", :target => "_blank" %>
|
||||
</h3>
|
||||
<ul>
|
||||
<li class="home-user-leftnav-li icons-project clear">
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
<p>
|
||||
<span class="c_blue" style="color:#1b55a7;">
|
||||
|
||||
<%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %>
|
||||
</span>给你留言了
|
||||
</p>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pro_new_info">
|
||||
<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>
|
||||
<p class="sy_tab_con_p ">没有数据可以显示~</p>
|
||||
</div>
|
|
@ -3,10 +3,10 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th><li class="fl ml5">作业标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">类型</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
<th style="width:120px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to ae.course.try(:name),"", :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<%= link_to ae.course.try(:name),"", :target => "_blank", :class => "homepageTabTitle ml5", :target => "_blank"%>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<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>
|
||||
<p class="sy_tab_con_p ">没有数据可以显示~</p>
|
||||
</div>
|
|
@ -1,4 +0,0 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<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,4 +0,0 @@
|
|||
<div class="pro_new_info mt50" style="width:748px;height:405px;">
|
||||
<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>
|
|
@ -3,10 +3,10 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>作业标题</th>
|
||||
<th><li class="fl ml5">作业标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">类型</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
<th style="width:120px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</th>
|
||||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5"%>
|
||||
<%= link_to uh.course.try(:name), course_path(uh.course_id), :target => "_blank", :class => "homepageTabTitle ml5", :target => "_blank"%>
|
||||
<li>
|
||||
</th>
|
||||
<th>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<th>
|
||||
<li class="homepageTabProjectName ml5">
|
||||
<% if up.polls_type == "Course" %>
|
||||
<%= link_to Course.find(up.polls_group_id).name, course_path(Course.find(up.polls_group_id)) %>
|
||||
<%= link_to Course.find(up.polls_group_id).name, course_path(Course.find(up.polls_group_id)), :target => "_blank" %>
|
||||
<% end %>
|
||||
<li>
|
||||
</th>
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>测验标题</th>
|
||||
<th><li class="fl ml5">测验标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">测验时长</th>
|
||||
<th style="width:160px">截止剩余时间</th>
|
||||
<th style="width:120px">截止剩余时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<table class="sy_new_table clear" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>标题</th>
|
||||
<th><li class="fl ml5">标题</li></th>
|
||||
<th style="width:160px">来源</th>
|
||||
<th style="width:80px">发布人</th>
|
||||
<th style="width:80px">优先度</th>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<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">
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">消息动态</div>
|
||||
<div class="NewsBannerName">最新动态</div>
|
||||
<ul class="resourcesSelect">
|
||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||
<ul class="homepagePostType" style="margin-left:95px; width:80px" >
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
$("#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 => "project_community"} )%>");
|
|
@ -1,6 +0,0 @@
|
|||
$("#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 => "project_community"} )%>");
|
Loading…
Reference in New Issue