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

78 lines
4.8 KiB
Plaintext

<div class="resources">
<div class="homepageRightBanner">
<div class="NewsBannerName">最新动态</div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="homepagePostType">
<li>
<ul class="homepagePostTypeHomework fl">
<li class="f14">课程动态</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><%= 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>
</li>
</ul>
</div>
</div>
<% @user_activities.each do |user_activity|
unless @user_activities.nil? %>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
<% case user_activity.container_type.to_s %>
<% when 'Course' %>
<% if act %>
<% case user_activity.act_type.to_s %>
<% when 'HomeworkCommon' %>
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity =>user_activity} %>
<% when 'News' %>
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity =>user_activity} %>
<% when 'Message'%>
<%= 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 'Project' %>
<% case user_activity.act_type.to_s %>
<% when 'Issue' %>
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
<% when 'Message' %>
<%= 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 %>
<div class="pagination">
</div>