2015-11-16 15:02:57 +08:00
|
|
|
<% unless org_activities.nil? %>
|
|
|
|
<% org_activities.each do |act| %>
|
2015-11-16 17:21:26 +08:00
|
|
|
<script>
|
|
|
|
$(function() {
|
2015-12-14 17:13:57 +08:00
|
|
|
init_activity_KindEditor_data(<%= act.id%>, null, "87%", "<%=act.class.to_s%>");
|
2015-11-16 17:21:26 +08:00
|
|
|
});
|
|
|
|
</script>
|
2015-11-16 15:02:57 +08:00
|
|
|
<% if act.container_type == 'Organization' %>
|
|
|
|
<% if act.org_act_type == 'CreateOrganization' %>
|
|
|
|
<div class="resources mt10">
|
|
|
|
<div class="homepagePostBrief">
|
|
|
|
<div class="homepagePostPortrait">
|
|
|
|
<a href="javascript:void(0);"><%= image_tag(url_to_avatar(User.find(act.user_id)), :width => "45", :height => "45") %></a>
|
|
|
|
</div>
|
|
|
|
<div class="homepagePostDes">
|
|
|
|
<div class="homepagePostTo"><%= link_to User.find(act.user_id), user_path(act.user_id) %> 创建了 <a href="<%= organization_path(@organization)%>" class="newsBlue ml10"><%= Organization.find(act.org_act_id).name %>
|
|
|
|
| 组织</a></div>
|
|
|
|
<div class="homepagePostDate"> 创建时间:<%= format_activity_day(act.created_at) %> <%= format_time(act.created_at, false) %> </div>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% if act.org_act_type == 'OrgDocumentComment' && act.org_act_id != @organization.home_id %>
|
2015-12-09 10:48:15 +08:00
|
|
|
<%= render :partial => 'show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %>
|
2015-11-16 15:02:57 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if act.container_type == 'Project' %>
|
|
|
|
<% case act.org_act_type.to_s %>
|
|
|
|
<% when 'Issue' %>
|
|
|
|
<%= render :partial => 'organizations/org_project_issue', :locals => {:activity => Issue.find(act.org_act_id),:user_activity_id =>act.id} %>
|
|
|
|
<% when 'Message' %>
|
|
|
|
<%= render :partial => 'organizations/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
2015-11-17 09:51:16 +08:00
|
|
|
<% when 'ProjectCreateInfo'%>
|
|
|
|
<%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %>
|
2015-11-16 15:02:57 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-11-18 16:05:08 +08:00
|
|
|
<% if act.container_type == 'Course' %>
|
|
|
|
<% case act.org_act_type.to_s %>
|
|
|
|
<% when 'HomeworkCommon' %>
|
|
|
|
<%= render :partial => 'org_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %>
|
|
|
|
<% when 'News' %>
|
|
|
|
<%= render :partial => 'org_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %>
|
|
|
|
<% when 'Message'%>
|
|
|
|
<%= render :partial => 'org_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
|
|
|
<% when 'Poll' %>
|
|
|
|
<%= render :partial => 'org_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %>
|
|
|
|
<% when 'Course'%>
|
|
|
|
<%= render :partial => 'org_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-11-16 15:02:57 +08:00
|
|
|
<% end %>
|
|
|
|
<!--<ul class="wlist" style=" border:none; padding-top: 15px;">-->
|
|
|
|
<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
|
|
|
<!--</ul>-->
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if org_act_count == 10 %>
|
2015-12-05 12:01:04 +08:00
|
|
|
<div id="show_more_activities" class="loadMore mt10 f_grey">展开更多<%=link_to "", organization_path(org,:page => page.to_i + 1, :show_homepage =>params[:show_homepage],:type => params[:type]),:id => "more_org_activities_link",:remote => "true",:class => "none" %></div>
|
2015-11-16 15:02:57 +08:00
|
|
|
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
|
|
|
<% end%>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
$("#show_more_activities").mouseover(function(){
|
|
|
|
$("#more_org_activities_link").click();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
</script>
|