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");
|
2016-05-25 16:19:41 +08:00
|
|
|
});
|
2016-01-07 10:10:24 +08:00
|
|
|
$("#relateProject,.relatePInfo").mouseout(function(){
|
|
|
|
$(".relatePInfo").css("display","none");
|
2016-05-25 16:19:41 +08:00
|
|
|
});
|
2016-01-07 10:10:24 +08:00
|
|
|
$(".coursesLineGrey").mouseover(function(){
|
|
|
|
$(this).css("color","#ffffff");
|
2016-05-25 16:19:41 +08:00
|
|
|
});
|
2016-01-07 10:10:24 +08:00
|
|
|
$(".coursesLineGrey").mouseout(function(){
|
|
|
|
$(this).css("color","#808080");
|
2016-05-25 16:19:41 +08:00
|
|
|
});
|
2016-01-07 10:10:24 +08:00
|
|
|
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
|
|
|
$(this).prev().css("color","#ffffff");
|
|
|
|
$(this).css("z-index", "9999");
|
2016-05-25 16:19:41 +08:00
|
|
|
});
|
2016-01-07 10:10:24 +08:00
|
|
|
$(".homepagePostSetting").mouseout(function(){
|
|
|
|
$(this).prev().css("color","#808080");
|
|
|
|
$(this).css("z-index", "1");
|
2016-05-25 16:19:41 +08:00
|
|
|
});
|
2016-01-07 10:10:24 +08:00
|
|
|
})
|
|
|
|
</script>
|
2016-02-23 16:17:14 +08:00
|
|
|
|
2015-09-16 10:16:25 +08:00
|
|
|
<% user_activities.each do |user_activity|
|
|
|
|
if user_activities %>
|
|
|
|
<script>
|
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>
|
2016-05-19 15:26:23 +08:00
|
|
|
<% if user_activity.act_type == "Project" %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<%= render :partial => 'project_create', :locals => {:activity => user_activity,:user_activity_id =>user_activity.id} %>
|
|
|
|
<% else %>
|
|
|
|
<% act= user_activity.act %>
|
|
|
|
<%if act %>
|
|
|
|
|
|
|
|
<% case user_activity.container_type.to_s %>
|
|
|
|
<% when 'Course' %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'HomeworkCommon' %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# cache (act) do %>
|
2016-04-24 14:23:08 +08:00
|
|
|
<% hidden_courses = Setting.find_by_name("hidden_courses") %>
|
|
|
|
<% unvisiable = hidden_courses && hidden_courses.value == "1"%>
|
|
|
|
<% if !unvisiable %>
|
2016-09-19 17:14:14 +08:00
|
|
|
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id,:hw_status => 1} %>
|
2016-04-24 14:23:08 +08:00
|
|
|
<% end %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# end %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% when 'News' %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# cache [act, act.comments.count] do %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# end %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% when 'Message'%>
|
|
|
|
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
|
|
|
|
<% when 'Poll' %>
|
|
|
|
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
|
|
|
<% when 'Course'%>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# cache (act) do %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<%= render :partial => 'users/course_create', :locals => {:activity => act, :user_activity_id => act.id} %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# end%>
|
2016-03-25 17:34:32 +08:00
|
|
|
<% when 'JournalsForMessage'%>
|
|
|
|
<%= render :partial => 'users/course_journalsformessage', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% end %>
|
|
|
|
<% when 'Project' %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'Issue' %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# cache [act, act.journals.count, act.attachments.count] do%>
|
2016-03-25 16:06:14 +08:00
|
|
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id, :user_id => user_id} %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# end %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% when 'Message' %>
|
|
|
|
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id,:is_course=>0,:is_board=>0} %>
|
2016-05-19 15:26:23 +08:00
|
|
|
<% when 'Project'%>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# cache (act) do %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<%= render :partial => 'project_create', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# end %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% end %>
|
|
|
|
<% when 'Principal' %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'JournalsForMessage' %>
|
|
|
|
<% unless act.private == 1 && (!User.current || (User.current && act.jour_id != User.current.id && act.user_id != User.current.id)) %>
|
2016-06-23 14:47:22 +08:00
|
|
|
<%= render :partial => 'user_journalsformessage', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% when 'Blog'%>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# cache (act) do %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'BlogComment' %>
|
2016-10-19 18:07:19 +08:00
|
|
|
<%# if !(act.blog.homepage_id and act.id == act.blog.homepage_id) %>
|
2016-07-07 10:42:51 +08:00
|
|
|
<%= render :partial => 'user_blog', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
2016-10-19 18:07:19 +08:00
|
|
|
<%# end %>
|
2016-03-25 16:06:14 +08:00
|
|
|
<% end %>
|
2016-03-29 17:39:20 +08:00
|
|
|
<%# end %>
|
2016-01-08 09:41:56 +08:00
|
|
|
<% end %>
|
2016-03-25 16:06:14 +08:00
|
|
|
|
|
|
|
<% end %>
|
2015-10-14 11:38:16 +08:00
|
|
|
<% end %>
|
2015-10-19 14:58:44 +08:00
|
|
|
<% end %>
|
2015-09-16 10:16:25 +08:00
|
|
|
<% 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>-->
|