socialforge/app/views/users/show.html.erb

58 lines
3.0 KiB
Plaintext
Raw Normal View History

2015-08-18 11:47:22 +08:00
<div class="resources">
<div class="homepageRightBanner">
<div class="NewsBannerName">最新动态</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
2015-08-19 15:18:12 +08:00
<ul class="homepagePostType">
<li>
<ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</li>
<li><a href="javascript:void(0);" class="homepagePostTypeAssignment postTypeGrey">作业动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeNotice postTypeGrey">通知动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
2015-08-20 17:24:34 +08:00
<!--<li><a href="javascript:void(0);" class="homepagePostTypeQuiz postTypeGrey">问卷动态</a></li>-->
2015-08-19 15:18:12 +08:00
</ul>
</li>
<li>
<ul class="homepagePostTypeProject fl">
<li class="f14">项目动态</li>
<li><a href="javascript:void(0);" class="homepagePostTypeQuestion postTypeGrey">问题动态</a></li>
<li><a href="javascript:void(0);" class="homepagePostTypeForum postTypeGrey">论坛动态</a></li>
</ul>
</li>
2015-08-18 11:47:22 +08:00
</ul>
</li>
</ul>
</div>
2015-08-21 16:07:18 +08:00
</div>
<% @user_activities.each do |user_activity|
unless @user_activities.nil? %>
<% case user_activity.act_type.to_s %>
<% when 'CourseActivity' %>
<% @course_act= CourseActivity.where("id=#{user_activity.act_id}").first %>
2015-08-24 17:45:09 +08:00
<% unless @course_act.nil? %>
2015-08-21 16:07:18 +08:00
<% case @course_act.course_act_type.to_s %>
<% when 'HomeworkCommon' %>
<% @activity=HomeworkCommon.where("id=#{@course_act.course_act_id}").first %>
2015-08-21 17:26:52 +08:00
<%= render :partial => 'course_homework', :locals => {:activity => @activity,:user_activity =>user_activity} %>
2015-08-21 16:07:18 +08:00
<% when 'News' %>
<% @activity=News.where("id=#{@course_act.course_act_id}").first %>
2015-08-21 17:26:52 +08:00
<%= render :partial => 'course_news', :locals => {:activity => @activity,:user_activity =>user_activity} %>
2015-08-21 16:07:18 +08:00
<% when 'Message'%>
<% @activity=Message.where("id=#{@course_act.course_act_id}").first %>
2015-08-21 17:26:52 +08:00
<%= render :partial => 'course_message', :locals => {:activity => @activity,:user_activity =>user_activity} %>
2015-08-21 16:07:18 +08:00
<% end %>
2015-08-24 17:45:09 +08:00
<% end %>
2015-08-21 16:07:18 +08:00
<% when 'ForgeActivity' %>
<% @project_act= ForgeActivity.where("id=#{user_activity.act_id}").first %>
<% case @project_act.forge_act_type.to_s %>
<% when 'Issue' %>
<% @activity=Issue.where("id=#{@project_act.forge_act_id}").first %>
2015-08-21 17:26:52 +08:00
<%= render :partial => 'project_issue', :locals => {:activity => @activity,:user_activity =>user_activity} %>
2015-08-21 16:07:18 +08:00
<% when 'Message' %>
2015-08-21 17:26:52 +08:00
<% @activity=Message.where("id=#{@project_act.forge_act_id}").first %>
<%= render :partial => 'project_message', :locals => {:activity => @activity,:user_activity =>user_activity} %>
2015-08-21 16:07:18 +08:00
<% end %>
2015-08-20 17:24:34 +08:00
<% end %>
2015-08-21 16:07:18 +08:00
<% end %>
<% end %>