2015-12-06 15:03:36 +08:00
|
|
|
<%= content_for(:header_tags) do %>
|
2015-12-14 17:13:57 +08:00
|
|
|
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
|
2015-12-06 15:03:36 +08:00
|
|
|
<% end %>
|
2016-01-07 10:10:24 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$("#relateProject,.relatePInfo").mouseover(function(){
|
|
|
|
$(".relatePInfo").css("display","block");
|
|
|
|
})
|
|
|
|
$("#relateProject,.relatePInfo").mouseout(function(){
|
|
|
|
$(".relatePInfo").css("display","none");
|
|
|
|
})
|
|
|
|
$(".homepagePostPortrait").mouseover(function(){
|
|
|
|
$(this).children(".userCard").css("display","block");
|
|
|
|
})
|
|
|
|
$(".homepagePostPortrait").mouseout(function(){
|
|
|
|
$(this).children(".userCard").css("display","none");
|
|
|
|
})
|
|
|
|
$(".userCard").mouseover(function(){
|
2016-01-29 16:55:07 +08:00
|
|
|
|
2016-01-07 10:10:24 +08:00
|
|
|
$(this).css("display","block");
|
|
|
|
})
|
|
|
|
$(".userCard").mouseout(function(){
|
|
|
|
$(this).css("display","none");
|
|
|
|
})
|
|
|
|
$(".coursesLineGrey").mouseover(function(){
|
|
|
|
$(this).css("color","#ffffff");
|
|
|
|
})
|
|
|
|
$(".coursesLineGrey").mouseout(function(){
|
|
|
|
$(this).css("color","#808080");
|
|
|
|
})
|
|
|
|
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
|
|
|
$(this).prev().css("color","#ffffff");
|
|
|
|
$(this).css("z-index", "9999");
|
|
|
|
})
|
|
|
|
$(".homepagePostSetting").mouseout(function(){
|
|
|
|
$(this).prev().css("color","#808080");
|
|
|
|
$(this).css("z-index", "1");
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
2015-09-16 10:16:25 +08:00
|
|
|
<style type="text/css">
|
|
|
|
/*回复框*/
|
2016-01-29 16:55:07 +08:00
|
|
|
/*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;}*/
|
2015-09-16 10:16:25 +08:00
|
|
|
</style>
|
|
|
|
<% 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);
|
2015-10-14 14:19:59 +08:00
|
|
|
btn.html('收起回复');
|
2015-09-16 10:16:25 +08:00
|
|
|
target.show();
|
|
|
|
}else{
|
|
|
|
btn.data('init',0);
|
2015-10-14 14:19:59 +08:00
|
|
|
btn.html('展开更多');
|
2015-09-16 10:16:25 +08:00
|
|
|
target.hide();
|
|
|
|
target.eq(0).show();
|
|
|
|
target.eq(1).show();
|
2015-10-14 14:19:59 +08:00
|
|
|
target.eq(2).show();
|
2015-09-16 10:16:25 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-09-17 14:58:10 +08:00
|
|
|
function expand_reply_input(id) {
|
|
|
|
$(id).toggle();
|
|
|
|
}
|
|
|
|
|
2015-09-16 10:16:25 +08:00
|
|
|
$(function() {
|
2016-01-29 16:55:07 +08:00
|
|
|
sd_create_editor_from_data(<%= user_activity.id %>, null, "100%", "<%= user_activity.class.to_s %>");
|
2015-09-16 10:16:25 +08:00
|
|
|
});
|
|
|
|
</script>
|
2015-10-19 14:58:44 +08:00
|
|
|
<% unless user_activity.act_type == "ProjectCreateInfo" %>
|
|
|
|
<% act= user_activity.act %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% case user_activity.container_type.to_s %>
|
|
|
|
<% when 'Course' %>
|
|
|
|
<% if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'HomeworkCommon' %>
|
2015-11-04 10:54:09 +08:00
|
|
|
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:course_activity => 0} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'News' %>
|
2015-11-04 10:54:09 +08:00
|
|
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'Message'%>
|
2015-12-31 17:53:05 +08:00
|
|
|
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'Poll' %>
|
2015-11-04 10:54:09 +08:00
|
|
|
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
2015-10-19 14:58:44 +08:00
|
|
|
<% when 'Course'%>
|
|
|
|
<%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => act.id} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% when 'Project' %>
|
|
|
|
<% if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'Issue' %>
|
2015-11-04 10:54:09 +08:00
|
|
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% when 'Message' %>
|
2015-12-31 17:53:05 +08:00
|
|
|
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
|
2015-10-19 14:58:44 +08:00
|
|
|
<% when 'ProjectCreateInfo'%>
|
2015-11-04 10:54:09 +08:00
|
|
|
<%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-10-14 11:38:16 +08:00
|
|
|
<% when 'Principal' %>
|
|
|
|
<% if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'JournalsForMessage' %>
|
2016-01-08 09:41:56 +08:00
|
|
|
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
|
2016-01-22 21:41:17 +08:00
|
|
|
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_activity=>1} %>
|
2016-01-08 09:41:56 +08:00
|
|
|
<% end %>
|
2015-10-14 11:38:16 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-10-28 10:58:37 +08:00
|
|
|
<% when 'Blog'%>
|
|
|
|
<%if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'BlogComment' %>
|
|
|
|
<%= render :partial => 'user_blog', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end %>
|
2015-10-19 14:58:44 +08:00
|
|
|
<% else %>
|
2015-11-04 10:54:09 +08:00
|
|
|
<%= render :partial => 'project_create', :locals => {:activity => user_activity,:user_activity_id =>user_activity.id} %>
|
2015-10-19 14:58:44 +08:00
|
|
|
<% end %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if user_activities.count == 10%>
|
2015-12-22 15:14:03 +08:00
|
|
|
<!--
|
|
|
|
<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"%>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% end%>
|
|
|
|
|
2015-12-22 15:14:03 +08:00
|
|
|
<!--
|
2015-09-16 10:16:25 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
$("#show_more_activities").mouseover(function(){
|
|
|
|
$("#more_activities_link").click();
|
|
|
|
});
|
2015-12-22 15:14:03 +08:00
|
|
|
</script>-->
|