|
|
|
@ -10,7 +10,7 @@
|
|
|
|
|
<div class="homepagePostReplyPortrait">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyDes">
|
|
|
|
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=activity_id %>_<%=comment.id %>').hide();">
|
|
|
|
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
|
|
|
|
|
|
|
|
|
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
|
|
|
@ -44,7 +44,7 @@
|
|
|
|
|
</span>
|
|
|
|
|
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
|
|
|
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course, :user_activity_id => user_activity_id, :course_activity => course_activity},
|
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
|
|
|
|
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% elsif type == 'News' %>
|
|
|
|
|
<span style="position: relative" class="fr mr20">
|
|
|
|
@ -56,8 +56,8 @@
|
|
|
|
|
:title => l(:button_reply)) %>
|
|
|
|
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
|
|
|
|
</span>
|
|
|
|
|
<%= link_to('删除', {:controller => 'comments', :action => 'destroy', :id => activity_id, :comment_id => comment, :user_activity_id => user_activity_id},
|
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) if News.find(activity_id).author == User.current %>
|
|
|
|
|
<%= link_to('删除', {:controller => 'comments', :action => 'destroy', :id=>activity_id, :comment_id => comment, :user_activity_id => user_activity_id},
|
|
|
|
|
:id => "delete_reply_#{activity_id}_#{comment.id}",:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) if News.find(activity_id).author == User.current %>
|
|
|
|
|
<% elsif type == 'Issue' %>
|
|
|
|
|
<span style="position: relative" class="fr mr20">
|
|
|
|
|
<%= link_to(
|
|
|
|
@ -74,7 +74,8 @@
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:confirm => l(:text_are_you_sure),
|
|
|
|
|
:remote=>true,
|
|
|
|
|
:class => 'fr mr20',
|
|
|
|
|
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
|
|
|
|
:class => 'fr mr20 undis',
|
|
|
|
|
:title => l(:button_delete)
|
|
|
|
|
) if comment.user_id == User.current.id %>
|
|
|
|
|
<% elsif type == 'Syllabus' %>
|
|
|
|
@ -88,8 +89,8 @@
|
|
|
|
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
|
|
|
|
</span>
|
|
|
|
|
<% if User.current.admin? || User.current == Syllabus.find(activity_id).user || comment.user == User.current%>
|
|
|
|
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user},
|
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
|
|
|
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user},:id => "delete_reply_#{activity_id}_#{comment.id}",
|
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|