课程论坛回复刷新
This commit is contained in:
parent
bbf4478fc0
commit
2538797a52
|
@ -50,16 +50,15 @@
|
|||
<div class="homepagePostReplyBanner">
|
||||
<% count=0 %>
|
||||
<div class="homepagePostReplyBannerCount">回复(
|
||||
<% if activity.parent_id.nil? %>
|
||||
<% count=activity.replies_count%>
|
||||
<%=count %>
|
||||
<% else %>
|
||||
<% count=activity.parent.replies_count%>
|
||||
<%=count %>
|
||||
<% if activity.parent %>
|
||||
<% count=activity.parent.children.count%>
|
||||
<% else %>
|
||||
<% count=activity.children.count%>
|
||||
<% end %>
|
||||
<%= count %>
|
||||
)</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count>2 %>
|
||||
<%if count > 2 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
点击展开更多回复(<%= count.to_s%>)
|
||||
|
@ -83,9 +82,9 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity:activity.parent%>
|
||||
<% activity= activity.parent ? activity.parent : activity%>
|
||||
<% 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|%>
|
||||
|
@ -102,17 +101,10 @@
|
|||
<%= 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 class="homepagePostReplyContent break_word">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue