作业动态的回复删除功能只在鼠标进入时显示
This commit is contained in:
parent
79ce5c9ac5
commit
8e999ed9f0
|
@ -142,7 +142,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% replies_all_i = replies_all_i + 1 %>
|
<% replies_all_i = replies_all_i + 1 %>
|
||||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||||
<div class="homepagePostReplyPortrait">
|
<div class="homepagePostReplyPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -154,10 +154,12 @@
|
||||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= format_time(comment.created_on) %>
|
<%= format_time(comment.created_on) %>
|
||||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
<div id="message_edit_<%=comment.id %>" style="display: none" class="fr">
|
||||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity},
|
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity},
|
||||||
<% end %>
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
<%= comment.notes.html_safe %></div>
|
<%= comment.notes.html_safe %></div>
|
||||||
|
|
|
@ -149,7 +149,7 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<% replies_all_i = replies_all_i + 1 %>
|
<% replies_all_i = replies_all_i + 1 %>
|
||||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||||
<div class="homepagePostReplyPortrait">
|
<div class="homepagePostReplyPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -161,10 +161,12 @@
|
||||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= format_time(comment.created_on) %>
|
<%= format_time(comment.created_on) %>
|
||||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
<div class="fr" id="message_edit_<%=comment.id %>" style="display: none">
|
||||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course,:course_activity=>-1},
|
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course,:course_activity=>-1},
|
||||||
<% end %>
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||||
<%= comment.notes.html_safe %></div>
|
<%= comment.notes.html_safe %></div>
|
||||||
|
|
Loading…
Reference in New Issue