|
|
@ -1,51 +1,21 @@
|
|
|
|
|
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
|
|
|
|
|
|
|
|
<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;}
|
|
|
|
|
|
|
|
</style>
|
|
|
|
<% user_activities.each do |user_activity|
|
|
|
|
<% user_activities.each do |user_activity|
|
|
|
|
unless user_activities.nil? %>
|
|
|
|
if user_activities %>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
//$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}});
|
|
|
|
|
|
|
|
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
|
|
|
|
|
|
|
/*$(function(){
|
|
|
|
|
|
|
|
function nh_show_btn(){
|
|
|
|
|
|
|
|
if($("#activity_message_<%#= user_activity.id%>").is(':hidden')){
|
|
|
|
|
|
|
|
if($("#activity_description_<%#= user_activity.id%>").height()>120){
|
|
|
|
|
|
|
|
$("#activity_description_<%#= user_activity.id%>").toggleClass("activity_description_maxHeight");
|
|
|
|
|
|
|
|
$("#activity_message_<%#= user_activity.id%>").show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var div = $("#activity_description_<%#= user_activity.id%>");
|
|
|
|
|
|
|
|
var imgs = $('img',div);
|
|
|
|
|
|
|
|
var lens = imgs.length;
|
|
|
|
|
|
|
|
function nh_load_img_end(){
|
|
|
|
|
|
|
|
nh_show_btn();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(lens > 0){
|
|
|
|
|
|
|
|
$('img',div).load(function(){
|
|
|
|
|
|
|
|
nh_load_img_end();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
nh_show_btn();
|
|
|
|
|
|
|
|
});*/
|
|
|
|
|
|
|
|
/*function show_more_reply(contentid, id2, id3) {
|
|
|
|
|
|
|
|
$(contentid).toggleClass("activity_description_maxHeight");
|
|
|
|
|
|
|
|
$(contentid).toggleClass("course_description_none");
|
|
|
|
|
|
|
|
var information = $(id2);
|
|
|
|
|
|
|
|
var arrow = $(id3);
|
|
|
|
|
|
|
|
var val = information.attr("value");
|
|
|
|
|
|
|
|
if (val == "show_more") {
|
|
|
|
|
|
|
|
$(id2).text("[收起]");
|
|
|
|
|
|
|
|
information.attr("value", "hide_more");
|
|
|
|
|
|
|
|
arrow.attr("src", "/images/jiantouup.jpg")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
$(id2).text("[展开]");
|
|
|
|
|
|
|
|
information.attr("value", "show_more");
|
|
|
|
|
|
|
|
arrow.attr("src", "/images/jiantou.jpg")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
function expand_reply(container,btnid){
|
|
|
|
function expand_reply(container,btnid){
|
|
|
|
var target = $(container);
|
|
|
|
var target = $(container);
|
|
|
|
var btn = $(btnid);
|
|
|
|
var btn = $(btnid);
|
|
|
|
//var jumpobj = $("#reply_div_<%#= activity.id %>");
|
|
|
|
|
|
|
|
if(btn.data('init')=='0'){
|
|
|
|
if(btn.data('init')=='0'){
|
|
|
|
btn.data('init',1);
|
|
|
|
btn.data('init',1);
|
|
|
|
btn.html('收起回复('+btn.data('count')+')');
|
|
|
|
btn.html('收起回复('+btn.data('count')+')');
|
|
|
@ -58,6 +28,10 @@
|
|
|
|
target.eq(1).show();
|
|
|
|
target.eq(1).show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
|
|
|
init_KindEditor_data(<%= user_activity.id%>);
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
|
|
|
|
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>
|
|
|
|
<% case user_activity.container_type.to_s %>
|
|
|
|
<% case user_activity.container_type.to_s %>
|
|
|
@ -65,41 +39,26 @@
|
|
|
|
<% if act %>
|
|
|
|
<% if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'HomeworkCommon' %>
|
|
|
|
<% when 'HomeworkCommon' %>
|
|
|
|
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
<%= render :partial => 'course_homework', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
|
|
|
<% when 'News' %>
|
|
|
|
<% when 'News' %>
|
|
|
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
<%= render :partial => 'course_news', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
|
|
|
<% when 'Message'%>
|
|
|
|
<% when 'Message'%>
|
|
|
|
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
<%= render :partial => 'course_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
|
|
|
<%# when 'Course'%>
|
|
|
|
|
|
|
|
<%#= render :partial => 'course_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
|
|
|
|
<%# when 'Attachment' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'course_attachment', :locals => {:activity => act, :user_activity => user_activity} %>
|
|
|
|
|
|
|
|
<%# when 'JournalsForMessage' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'course_journalsformessage', :locals => {:activity => act, :user_activity => user_activity} %>
|
|
|
|
|
|
|
|
<% when 'Poll' %>
|
|
|
|
<% when 'Poll' %>
|
|
|
|
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity => user_activity} %>
|
|
|
|
<%= render :partial => 'course_poll', :locals => {:activity => act, :user_activity_id => user_activity.id} %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% when 'Project' %>
|
|
|
|
<% when 'Project' %>
|
|
|
|
<% if act %>
|
|
|
|
<% if act %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% case user_activity.act_type.to_s %>
|
|
|
|
<% when 'Issue' %>
|
|
|
|
<% when 'Issue' %>
|
|
|
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
<%= render :partial => 'project_issue', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
|
|
|
<% when 'Message' %>
|
|
|
|
<% when 'Message' %>
|
|
|
|
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
<%= render :partial => 'project_message', :locals => {:activity => act,:user_activity_id =>user_activity.id} %>
|
|
|
|
<%# when 'Journal' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'project_journal', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
|
|
|
|
<%# when 'News' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'project_news', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
|
|
|
|
<%# when 'Document' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'project_document', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
|
|
|
|
<%# when 'Attachment' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'project_attachment', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
|
|
|
|
<%# when 'ProjectCreateInfo' %>
|
|
|
|
|
|
|
|
<%#= render :partial => 'project_create', :locals => {:activity => act,:user_activity =>user_activity} %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<input type="hidden" value="<%= page%>" id="show_more_activities" />
|
|
|
|
<input type="hidden" value="<%= page%>"/>
|
|
|
|
|
|
|
|
<%= link_to "加载更多",user_activities_path(@user.id),:id => "show_more_activities",:remote => "true"%>
|