个人主页
This commit is contained in:
parent
ffe40b399d
commit
bd00870eba
|
@ -550,9 +550,27 @@ class UsersController < ApplicationController
|
|||
|
||||
def show
|
||||
@page = (params[:page] || -1).to_i + 1
|
||||
@type = params[:type]
|
||||
user_project_ids = "(" + @user.projects.visible.map{|project| project.id}.join(",") + ")"
|
||||
user_course_ids = "(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
|
||||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids}) or (container_type = 'Course' and container_id in #{user_course_ids})").order('created_at desc').limit(10).offset(@page * 10)
|
||||
if @type
|
||||
case @type
|
||||
when "course_homework"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'HomeworkCommon'").order('created_at desc').limit(10).offset(@page * 10)
|
||||
when "course_news"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'News'").order('created_at desc').limit(10).offset(@page * 10)
|
||||
when "course_message"
|
||||
@user_activities = UserActivity.where("container_type = 'Course' and container_id in #{user_course_ids} and act_type = 'Message'").order('created_at desc').limit(10).offset(@page * 10)
|
||||
when "project_issue"
|
||||
@user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Issue'").order('created_at desc').limit(10).offset(@page * 10)
|
||||
when "project_message"
|
||||
@user_activities = UserActivity.where("container_type = 'Project' and container_id in #{user_project_ids} and act_type = 'Message'").order('created_at desc').limit(10).offset(@page * 10)
|
||||
end
|
||||
else
|
||||
course_types = "('Message','News','HomeworkCommon')"
|
||||
project_types = "('Message','Issue')"
|
||||
@user_activities = UserActivity.where("(container_type = 'Project' and container_id in #{user_project_ids} and act_type in #{project_types}) or (container_type = 'Course' and container_id in #{user_course_ids}) and act_type in #{course_types}").order('created_at desc').limit(10).offset(@page * 10)
|
||||
end
|
||||
# @user_activities = paginateHelper @user_activities,500
|
||||
render :layout=>'new_base_user'
|
||||
end
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "90", :height => "90"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to activity.course.name.to_s+"(课程名称)", course_path(activity.container_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
||||
</div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey"><%=activity.filename.to_s(附件名称)%></a>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_on) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(附件描述)<%=activity.description.to_s%></div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(课程创建)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(留言)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,39 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<!-- <a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a>-->
|
||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "90", :height => "90"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id), :class => "newsBlue mr15" %>
|
||||
<% end %>
|
||||
TO
|
||||
<%= link_to Course.find(activity.polls_group_id).name.to_s+"(课程名称)", course_path(activity.polls_group_id), :class => "newsBlue ml15", :style=>"word-break:break-all" %>
|
||||
<!--<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a>-->
|
||||
</div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey"><%=activity.polls_name.to_s%>(问卷名称)</a>
|
||||
</div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostDeadline">时间:<%= format_date(activity.created_at) %></div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(问卷描述)<%=activity.polls_description.to_s%></div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(项目附件)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(项目创建)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(文档名称)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(项目日志)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="resources mt15">
|
||||
<div class="homepagePostBrief" onmouseover="$('#act-<%=user_activity.id %>').css('visibility','visible')" onmouseout="$('.homepagePostSetting').css('visibility','hidden')">
|
||||
<div class="homepagePostPortrait">
|
||||
<a href="javascript:void(0);"><img src="images/homepageImage.jpg" width="90" height="90" alt="用户头像"/></a></div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo"><a href="javascript:void(0);" class="newsBlue mr15">尹教授</a> TO
|
||||
<a href="javascript:void(0);" class="newsBlue ml15">分布式计算环境(课程名称)</a></div>
|
||||
<div class="homepagePostTitle">
|
||||
<a href="javascript:void(0);" class="postGrey">ckeditor值设置的默认在光标聚焦控件后应自动消失的处理(项目新闻)</a></div>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<div class="homepagePostSubmit"><a href="javascript:void(0);" class="c_blue">提交(10)</a></div>
|
||||
<div class="homepagePostDeadline">截止时间:2015-08-20</div>
|
||||
</div>
|
||||
<div class="homepagePostIntro">(作业描述)系统中有多个ckeditor,且每个ckeditor的id未知,怎么样做到当光标聚焦某个ckeditor的文本框中,该编辑器的默认值应自动消失的处理;网络拓扑图开发;</div>
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity.id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
|
||||
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
|
@ -7,17 +7,22 @@
|
|||
<li>
|
||||
<ul class="homepagePostTypeHomework fl">
|
||||
<li class="f14">课程动态</li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
|
||||
<li><%= link_to "作业动态", {:controller => "users", :action => "show", :type => "course_homework"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
|
||||
<!--<a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a>--></li>
|
||||
<li><%= link_to "通知动态", {:controller => "users", :action => "show", :type => "course_news"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>-->
|
||||
<li><%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "course_message"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<ul class="homepagePostTypeProject fl">
|
||||
<li class="f14">项目动态</li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
|
||||
<li><%= link_to "问题动态", {:controller => "users", :action => "show", :type => "project_issue"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
|
||||
<li><%= link_to "论坛动态", {:controller => "users", :action => "show", :type => "project_message"}, :class => "homepagePostTypeAssignment postTypeGrey"%>
|
||||
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
|
||||
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>-->
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -27,28 +32,47 @@
|
|||
</div>
|
||||
<% @user_activities.each do |user_activity|
|
||||
unless @user_activities.nil? %>
|
||||
<% act= user_activity.act %>
|
||||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'CourseActivity' %>
|
||||
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
|
||||
<% case user_activity.container_type.to_s %>
|
||||
<% when 'Course' %>
|
||||
<% if act %>
|
||||
<% activity= act.course_act %>
|
||||
<% case act.course_act_type.to_s %>
|
||||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'HomeworkCommon' %>
|
||||
<%= render :partial => 'course_homework', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<% when 'News' %>
|
||||
<%= render :partial => 'course_news', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<% when 'Message'%>
|
||||
<%= render :partial => 'course_message', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Course'%>
|
||||
<%#= render :partial => 'course_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Attachment' %>
|
||||
<%#= render :partial => 'course_attachment', :locals => {:activity => act, :user_activity => user_activity} %>
|
||||
<%# when 'JournalsForMessage' %>
|
||||
<%#= render :partial => 'course_journalsformessage', :locals => {:activity => act, :user_activity => user_activity} %>
|
||||
<%# when 'Poll' %>
|
||||
<%#= render :partial => 'course_poll', :locals => {:activity => act, :user_activity => user_activity} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% when 'ForgeActivity' %>
|
||||
<% activity= act.forge_act unless act.forge_act_type == "ProjectCreateInfo" %>
|
||||
<% case act.forge_act_type.to_s %>
|
||||
<% when 'Project' %>
|
||||
<% case user_activity.act_type.to_s %>
|
||||
<% when 'Issue' %>
|
||||
<%= render :partial => 'project_issue', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => activity,:user_activity =>user_activity} %>
|
||||
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Journal' %>
|
||||
<%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'News' %>
|
||||
<%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Document' %>
|
||||
<%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'Attachment' %>
|
||||
<%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<%# when 'ProjectCreateInfo' %>
|
||||
<%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="pagination">
|
||||
|
||||
</div>
|
|
@ -474,13 +474,6 @@ ActiveRecord::Schema.define(:version => 20150820025358) do
|
|||
|
||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||
|
||||
create_table "discuss_demos", :force => true do |t|
|
||||
t.string "title"
|
||||
t.text "body"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "documents", :force => true do |t|
|
||||
t.integer "project_id", :default => 0, :null => false
|
||||
t.integer "category_id", :default => 0, :null => false
|
||||
|
@ -903,6 +896,7 @@ ActiveRecord::Schema.define(:version => 20150820025358) do
|
|||
t.datetime "created_on"
|
||||
t.integer "comments_count", :default => 0, :null => false
|
||||
t.integer "course_id"
|
||||
t.datetime "updated_on"
|
||||
end
|
||||
|
||||
add_index "news", ["author_id"], :name => "index_news_on_author_id"
|
||||
|
|
Loading…
Reference in New Issue