项目讨论区回复刷新

This commit is contained in:
sw 2015-09-02 13:46:33 +08:00
parent c4da4b6c09
commit 8acc432f91
2 changed files with 8 additions and 28 deletions

View File

@ -52,7 +52,7 @@
<div class="homepagePostReplyBannerCount">回复(
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% else %>
<% count=activity.children.count%>
<% end %>
<%= count %>

View File

@ -33,30 +33,19 @@
<%= activity.parent.content.to_s.html_safe%>
<% end %>
</div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li><a href="javascript:void(0);" class="postOptionLink">编辑</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">复制</a></li>
<li><a href="javascript:void(0);" class="postOptionLink">删除</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="cl"></div>
</div>
<div class="homepagePostReply">
<div class="homepagePostReplyBanner"><% count=0 %>
<div class="homepagePostReplyBanner">
<% count = 0 %>
<div class="homepagePostReplyBannerCount">回复(
<% if activity.parent_id.nil? %>
<% count=activity.replies_count%>
<%=count %>
<% if activity.parent %>
<% count=activity.parent.children.count%>
<% else %>
<% count=activity.parent.replies_count%>
<%=count %>
<% count=activity.children.count%>
<% end %>
<%=count %>
)</div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<%if count>2 %>
@ -81,7 +70,7 @@
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
<% replies_all_i = 0 %>
<% unless activity.children.empty? %>
<% if count > 0 %>
<div class="homepagePostReplyContainer" id="reply_div_<%= user_activity_id %>">
<ul>
<% activity.children.reorder("created_on desc").each do |reply| %>
@ -98,15 +87,6 @@
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_date(reply.created_on) %>
<%#= link_to(
l(:button_delete),
{:controller => 'messages', :action => 'destroy', :id => reply.id, :board_id => reply.board_id, :is_board => 'false'},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete),
:class => 'replyGrey fr ml10'
) if reply.course_destroyable_by?(User.current) %>
<!--<a href="javascript:void(0);" class="replyGrey fr ml10">删除</a>-->
</div>
<div class="homepagePostReplyContent break_word"><%= reply.content.html_safe %></div>
</div>