2015-09-01 10:43:30 +08:00
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
|
2015-08-25 20:08:52 +08:00
|
|
|
<% user_activities.each do |user_activity|
|
2015-09-01 10:43:30 +08:00
|
|
|
if user_activities %>
|
2015-08-28 17:25:42 +08:00
|
|
|
<script>
|
|
|
|
function expand_reply(container,btnid){
|
|
|
|
var target = $(container);
|
|
|
|
var btn = $(btnid);
|
|
|
|
if(btn.data('init')=='0'){
|
|
|
|
btn.data('init',1);
|
|
|
|
btn.html('收起回复('+btn.data('count')+')');
|
|
|
|
target.show();
|
|
|
|
}else{
|
|
|
|
btn.data('init',0);
|
|
|
|
btn.html('点击展开更多回复('+btn.data('count')+')');
|
|
|
|
target.hide();
|
|
|
|
target.eq(0).show();
|
|
|
|
target.eq(1).show();
|
|
|
|
}
|
|
|
|
}
|
2015-09-01 10:43:30 +08:00
|
|
|
|
|
|
|
$(function() {
|
|
|
|
init_KindEditor_data(<%= user_activity.id%>);
|
|
|
|
});
|
2015-08-28 17:25:42 +08:00
|
|
|
</script>
|
2015-08-25 20:08:52 +08:00
|
|
|
<% 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' %>
|
2015-09-01 10:43:30 +08:00
|
|
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2015-08-25 20:08:52 +08:00
|
|
|
<% when 'Message'%>
|
|
|
|
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
2015-08-26 15:24:57 +08:00
|
|
|
<% when 'Poll' %>
|
|
|
|
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity => user_activity} %>
|
2015-08-25 20:08:52 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% when 'Project' %>
|
2015-08-26 17:02:54 +08:00
|
|
|
<% if act %>
|
|
|
|
<% 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} %>
|
|
|
|
<% end %>
|
2015-08-25 20:08:52 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<input type="hidden" value="<%= page%>" id="show_more_activities" />
|