59 lines
2.8 KiB
Plaintext
59 lines
2.8 KiB
Plaintext
|
<% @replies.each_with_index do |reply, i| %>
|
||
|
<script type="text/javascript">
|
||
|
$(function () {
|
||
|
showNormalImage('reply_message_description_<%= reply.id %>');
|
||
|
autoUrl('reply_message_description_<%= reply.id %>');
|
||
|
});
|
||
|
</script>
|
||
|
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
||
|
<div class="homepagePostReplyPortrait">
|
||
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33, :height => 33), user_path(reply.author) %>
|
||
|
</div>
|
||
|
<div class="homepagePostReplyDes">
|
||
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply} %>
|
||
|
|
||
|
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||
|
<%= reply.content.html_safe %>
|
||
|
</div>
|
||
|
<div class="orig_reply mb10 mt-10">
|
||
|
<div class="reply">
|
||
|
<span class="reply-right">
|
||
|
<span id="reply_praise_count_<%= reply.id %>">
|
||
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
||
|
</span>
|
||
|
<span style="position: relative" class="fr mr20">
|
||
|
<%= link_to(
|
||
|
l(:button_reply),
|
||
|
{:action => 'quote', :id => reply},
|
||
|
:remote => true,
|
||
|
:method => 'get',
|
||
|
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
|
||
|
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||
|
</span>
|
||
|
<%= link_to(
|
||
|
l(:button_delete),
|
||
|
{:action => 'destroy', :id => reply},
|
||
|
:method => :post,
|
||
|
:class => 'fr mr20',
|
||
|
:data => {:confirm => l(:text_are_you_sure)},
|
||
|
:title => l(:button_delete)
|
||
|
) if reply.course_destroyable_by?(User.current) %>
|
||
|
</span>
|
||
|
|
||
|
<div class="cl"></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<p id="reply_message_<%= reply.id %>"></p>
|
||
|
</div>
|
||
|
<div class="cl"></div>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<% if @reply_count > @page * @limit + 10 %>
|
||
|
<div id="more_message_replies">
|
||
|
<div class="detail_cont_hide clearfix">
|
||
|
<span class="orig_icon" >↓ </span>
|
||
|
<span class="orig_icon" style="display:none;" > ↑</span>
|
||
|
<%= link_to '点击展开更多回复', board_message_path(@topic.board_id, @topic, :page => @page),:remote=>true %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<% end %>
|