2015-09-18 16:34:37 +08:00
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<style type="text/css">
|
|
|
|
/*回复框*/
|
|
|
|
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
|
|
|
|
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
|
|
|
|
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
|
|
|
|
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
|
|
|
|
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
|
|
|
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
|
|
|
div.ke-toolbar .ke-outline{border:none;}
|
|
|
|
.ke-inline-block{display: none;}
|
|
|
|
div.ke-container{float:left;}
|
|
|
|
</style>
|
2015-09-17 14:58:10 +08:00
|
|
|
<% first_user_activity = user_activities.first.id unless user_activities.first.nil? %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% user_activities.each do |user_activity|
|
|
|
|
if user_activities %>
|
|
|
|
<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-17 14:58:10 +08:00
|
|
|
function expand_reply_input(id) {
|
|
|
|
$(id).toggle();
|
|
|
|
}
|
|
|
|
|
2015-09-16 10:16:25 +08:00
|
|
|
$(function() {
|
2015-09-19 11:18:41 +08:00
|
|
|
init_activity_KindEditor_data(<%= user_activity.id%>,"","87%");
|
2015-09-16 10:16:25 +08:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<% 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' %>
|
2015-09-17 14:58:10 +08:00
|
|
|
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'News' %>
|
2015-09-17 14:58:10 +08:00
|
|
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'Message'%>
|
2015-09-17 14:58:10 +08:00
|
|
|
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'Poll' %>
|
2015-09-17 14:58:10 +08:00
|
|
|
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% when 'Project' %>
|
|
|
|
<% if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'Issue' %>
|
2015-09-17 14:58:10 +08:00
|
|
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'Message' %>
|
2015-09-17 14:58:10 +08:00
|
|
|
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:first_user_activity =>first_user_activity,:page => page} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if user_activities.count == 10%>
|
|
|
|
<div id="show_more_activities" class="loadMore mt10 f_grey">展开更多<%=link_to "", user_activities_path(@user.id,:type => type,:page => page),:id => "more_activities_link",:remote => "true",:class => "none" %></div>
|
|
|
|
<%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
|
|
|
<% end%>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$("#show_more_activities").mouseover(function(){
|
|
|
|
$("#more_activities_link").click();
|
|
|
|
});
|
2015-09-10 10:01:43 +08:00
|
|
|
</script>
|