2016-01-29 16:55:07 +08:00
|
|
|
|
<%= import_ke(enable_at: true, prettify: false, init_activity: true) %>
|
2016-01-07 15:58:22 +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(){
|
|
|
|
|
$(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>
|
2016-02-23 16:17:14 +08:00
|
|
|
|
|
2015-12-04 10:59:09 +08:00
|
|
|
|
<% unless forge_acts.empty? %>
|
|
|
|
|
<% forge_acts.each do |activity| -%>
|
|
|
|
|
<script>
|
|
|
|
|
function expand_reply(container, btnid) {
|
|
|
|
|
var target = $(container);
|
|
|
|
|
var btn = $(btnid);
|
|
|
|
|
if (btn.data('init') == '0') {
|
|
|
|
|
btn.data('init', 1);
|
|
|
|
|
btn.html('收起回复');
|
|
|
|
|
target.show();
|
|
|
|
|
} else {
|
|
|
|
|
btn.data('init', 0);
|
|
|
|
|
btn.html('展开更多');
|
|
|
|
|
target.hide();
|
|
|
|
|
target.eq(0).show();
|
|
|
|
|
target.eq(1).show();
|
|
|
|
|
target.eq(2).show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(function () {
|
2016-01-29 16:26:00 +08:00
|
|
|
|
sd_create_editor_from_data(<%= activity.id %>, null, "100%", "<%= activity.class.to_s %>");
|
2015-12-04 10:59:09 +08:00
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<!--创建-->
|
|
|
|
|
<% case activity.forge_act_type %>
|
|
|
|
|
<% when "ProjectCreateInfo" %>
|
|
|
|
|
<%= render :partial => 'projects/project_create', :locals => {:activity => activity, :user_activity_id => activity.id} %>
|
|
|
|
|
<!--缺陷动态-->
|
|
|
|
|
<% when "Issue" %>
|
|
|
|
|
<%= render :partial => 'users/project_issue', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id} %>
|
|
|
|
|
|
|
|
|
|
<!--message -->
|
|
|
|
|
<% when "Message" %>
|
2015-12-31 17:53:05 +08:00
|
|
|
|
<%= render :partial => 'users/project_message', :locals => {:activity => activity.forge_act,:user_activity_id =>activity.id,:is_course=>1,:is_board=>0} %>
|
2015-12-04 10:59:09 +08:00
|
|
|
|
<!--new 新闻-->
|
|
|
|
|
<% when "News" %>
|
|
|
|
|
<% if !activity.forge_act.nil? and activity.forge_act.project %>
|
|
|
|
|
<%= render :partial => 'projects/project_news', :locals => {:activity=>activity.forge_act, :user_activity_id=>activity.id} %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<!--Attachment -->
|
|
|
|
|
<% when "Attachment" %>
|
|
|
|
|
<%= render :partial => 'projects/attachment_acts', :locals => {:activity => activity.forge_act, :user_activity_id => activity.id } %>
|
|
|
|
|
<!--<div class="problem_main">-->
|
|
|
|
|
<!--<a class="problem_pic fl"><%#= image_tag(url_to_avatar(activity.user), :width => "42", :height => "42") %></a>-->
|
|
|
|
|
|
|
|
|
|
<!--<div class="problem_txt fl mt5 break_word">-->
|
|
|
|
|
<!--<a class="problem_name fl ">-->
|
|
|
|
|
<!--<%#= h(e.project) if @project.nil? || @project.id != e.project_id %>-->
|
|
|
|
|
<!--<%#= link_to h(activity.user), user_path(activity.user_id), :class => "problem_name c_orange fl" %></a><span class="fl"> <%#= l(:label_new_activity) %>-->
|
|
|
|
|
<!--:</span>-->
|
|
|
|
|
<%#= link_to format_activity_title("#{l(:label_attachment)}: #{act.filename}"), {:controller => 'attachments', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %>
|
|
|
|
|
<!--<br/>-->
|
|
|
|
|
|
|
|
|
|
<!--<p class="mt5 break_word"><#%= textAreailizable act, :description %><br/>-->
|
|
|
|
|
<!--<%#= l :label_create_time %>-->
|
|
|
|
|
<!--:<%#= format_activity_day(act.created_on) %> <%#= format_time(act.created_on, false) %></p>-->
|
|
|
|
|
<!--</div>-->
|
|
|
|
|
<!--<div class="cl"></div>-->
|
|
|
|
|
<!--</div>-->
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if forge_acts.count == 10 %>
|
2015-12-22 15:14:03 +08:00
|
|
|
|
<!--<div id="show_more_forge_activities" class="loadMore mt10 f_grey">点击展开更多<%#= link_to "", project_path(@project.id, :type => type, :page => page), :id => "more_forge_activities_link", :remote => "true", :class => "none" %></div>-->
|
|
|
|
|
<%= link_to "点击展开更多",project_path(@project.id, :type => type, :page => page),:id => "show_more_forge_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
2015-12-04 10:59:09 +08:00
|
|
|
|
<% end %>
|
|
|
|
|
|
2015-12-22 15:14:03 +08:00
|
|
|
|
<!--
|
2015-12-04 10:59:09 +08:00
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$("#show_more_forge_activities").mouseover(function () {
|
|
|
|
|
$("#more_forge_activities_link").click();
|
|
|
|
|
});
|
2015-12-22 15:14:03 +08:00
|
|
|
|
</script>-->
|