回复的删除按钮当鼠标放上去才显示
This commit is contained in:
parent
f803a23298
commit
623dadaea1
|
@ -134,7 +134,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<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) %>
|
<%= 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>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
|
@ -161,7 +161,8 @@
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:controller => 'blog_comments', :action => 'destroy', :id => comment.id},
|
{:controller => 'blog_comments', :action => 'destroy', :id => comment.id},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) %>
|
) %>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="ping_dispic">
|
<div class="ping_dispic">
|
||||||
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
|
<%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="ping_discon upload_img" style="width: 610px;">
|
<div class="ping_discon upload_img" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||||
<div class="ping_distop f14">
|
<div class="ping_distop f14">
|
||||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||||
<span>
|
<span>
|
||||||
|
@ -28,17 +28,17 @@
|
||||||
<span id="reply_praise_count_<%=journal.id %>">
|
<span id="reply_praise_count_<%=journal.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
|
|
||||||
<%= link_to(l(:label_bid_respond_delete),
|
|
||||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
|
||||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
|
||||||
:class => "delete", :title => l(:button_delete)) %>
|
|
||||||
<% end %>
|
|
||||||
<% if reply_allow %>
|
<% if reply_allow %>
|
||||||
<%#= link_to l(:label_bid_respond_quote),'',
|
<%#= link_to l(:label_bid_respond_quote),'',
|
||||||
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
||||||
<%= link_to l(:label_bid_respond_quote),'javascript:;',{:nhname=>"reply_btn"} %>
|
<%= link_to l(:label_bid_respond_quote),'javascript:;',{:nhname=>"reply_btn"} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% if journal.user == User.current|| User.current.admin? || (@course && User.current.allowed_to?(:as_teacher,@course)) %>
|
||||||
|
<%= link_to(l(:label_bid_respond_delete),
|
||||||
|
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :id => "delete_reply_#{journal.id}",
|
||||||
|
:class => "delete undis", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="homepagePostReplyPortrait" >
|
<div class="homepagePostReplyPortrait" >
|
||||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||||
|
|
||||||
<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 %>">
|
||||||
|
@ -40,7 +40,8 @@
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>comment.id},
|
{:controller => 'issues',:action => 'delete_journal', :id => issue.id,:journal_id=>comment.id},
|
||||||
:method => :get,
|
:method => :get,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if comment.user_id == User.current.id %>
|
) if comment.user_id == User.current.id %>
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<div class="homepagePostReplyPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||||
|
@ -134,7 +134,8 @@
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:action => 'destroy', :id => reply},
|
{:action => 'destroy', :id => reply},
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{reply.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if reply.course_destroyable_by?(User.current) %>
|
) if reply.course_destroyable_by?(User.current) %>
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<div class="homepagePostReplyPortrait">
|
||||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
||||||
</div>
|
</div>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
|
||||||
|
|
||||||
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
<div class="homepagePostReplyContent upload_img break_word table_maxWidth" id="reply_message_description_<%= reply.id %>">
|
||||||
|
@ -195,7 +195,8 @@
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:action => 'destroy', :id => reply},
|
{:action => 'destroy', :id => reply},
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{reply.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if reply.course_destroyable_by?(User.current) %>
|
) if reply.course_destroyable_by?(User.current) %>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<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) %>
|
<%= 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>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
|
||||||
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
|
@ -47,7 +47,8 @@
|
||||||
:action => 'destroy', :id => @news,
|
:action => 'destroy', :id => @news,
|
||||||
:comment_id => comment},
|
:comment_id => comment},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if @news.author == User.current %>
|
) if @news.author == User.current %>
|
||||||
|
|
|
@ -102,7 +102,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<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) %>
|
<%= 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>
|
||||||
<div class="homepagePostReplyDes">
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id%>').show();" onmouseout="$('#delete_reply_<%=comment.id%>').hide();">
|
||||||
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
|
@ -129,7 +129,8 @@
|
||||||
l(:button_delete),
|
l(:button_delete),
|
||||||
{:controller => 'org_document_comments',:action => 'delete_reply', :id => comment.id},
|
{:controller => 'org_document_comments',:action => 'delete_reply', :id => comment.id},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)) %>
|
:title => l(:button_delete)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% for journal in journals %>
|
<% for journal in journals %>
|
||||||
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
<div class="ping_C" id='word_li_<%= journal.id.to_s %>'>
|
||||||
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %></div>
|
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(journal.user),:width => '46',:height => '46'), user_path(journal.user) %></div>
|
||||||
<div class="ping_discon" style="width: 610px;">
|
<div class="ping_discon" style="width: 610px;" onmouseover="$('#delete_reply_<%=journal.id %>').show();" onmouseout="$('#delete_reply_<%=journal.id %>').hide();">
|
||||||
<div class="ping_distop f14">
|
<div class="ping_distop f14">
|
||||||
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
<!-- <a style=" font-weight:bold; color:#15bccf; margin-right:30px; background:none;" target="_blank" href="#">gugu01</a> -->
|
||||||
<span><%= link_to journal.user.show_name, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
|
<span><%= link_to journal.user.show_name, user_path(journal.user), :class => 'c_blue fb fl mb10 f14', :target => "_blank" %>
|
||||||
|
@ -20,16 +20,16 @@
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>journal, :user_activity_id=>journal.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if journal.user == User.current|| User.current.admin? %>
|
<% if journal.user == User.current|| User.current.admin? %>
|
||||||
<%= link_to(l(:label_bid_respond_delete),
|
<% if reply_allow %>
|
||||||
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
|
||||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
|
||||||
:class => "delete", :title => l(:button_delete)) %>
|
|
||||||
<% end %>
|
|
||||||
<% if reply_allow %>
|
|
||||||
<%#= link_to l(:label_bid_respond_quote),'',
|
<%#= link_to l(:label_bid_respond_quote),'',
|
||||||
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea')); $('##{ids} textarea') ;return false;"} %>
|
||||||
<%= link_to l(:label_bid_respond_quote),'javascript:;', {:nhname=>"reply_btn"} %>
|
<%= link_to l(:label_bid_respond_quote),'javascript:;', {:nhname=>"reply_btn"} %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
<%= link_to(l(:label_bid_respond_delete),
|
||||||
|
{:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => @user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :id => "delete_reply_#{journal.id}",
|
||||||
|
:class => "delete undis", :title => l(:button_delete)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
|
@ -295,7 +295,7 @@
|
||||||
<% comments = activity.journals_for_messages.reorder("created_on desc").limit(3) %>
|
<% comments = activity.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => -1,:course_activity=>course_activity, :is_teacher => is_teacher, :user_activity_id => user_activity_id} %>
|
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => -1,:course_activity=>course_activity, :is_teacher => is_teacher, :user_activity_id => user_activity_id, :activity_id => activity.id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<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) %>
|
<%= 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>
|
||||||
<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/message_contents', :locals => {:comment => comment}%>
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? %>
|
<% if !comment.content_detail.blank? %>
|
||||||
|
@ -39,7 +39,8 @@
|
||||||
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board),
|
delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board),
|
||||||
:method => :post,
|
:method => :post,
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) %>
|
) %>
|
||||||
|
@ -56,7 +57,7 @@
|
||||||
</span>
|
</span>
|
||||||
<% if comment.creator_user == User.current || User.current.admin? %>
|
<% if comment.creator_user == User.current || User.current.admin? %>
|
||||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user, :user_activity_id => user_activity_id, :activity_id => activity_id},
|
||||||
: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 %>
|
<% end %>
|
||||||
<% elsif type == 'OrgDocumentComment' %>
|
<% elsif type == 'OrgDocumentComment' %>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
@ -74,7 +75,8 @@
|
||||||
{:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
{:controller => 'org_document_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)) %>
|
:title => l(:button_delete)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -94,7 +96,8 @@
|
||||||
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id, :homepage => homepage, :user_id => user_id},
|
{:controller => 'blog_comments',:action => 'destroy', :id => comment.id, :user_activity_id => user_activity_id, :homepage => homepage, :user_id => user_id},
|
||||||
:method => :delete,
|
:method => :delete,
|
||||||
:remote => true,
|
:remote => true,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:data => {:confirm => l(:text_are_you_sure)},
|
:data => {:confirm => l(:text_are_you_sure)},
|
||||||
:title => l(:button_delete)) %>
|
:title => l(:button_delete)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="homepagePostReplyPortrait">
|
<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) %>
|
<%= 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>
|
||||||
<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}%>
|
<%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>
|
||||||
|
|
||||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</span>
|
</span>
|
||||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
<% 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},
|
<%= 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 %>
|
<% end %>
|
||||||
<% elsif type == 'News' %>
|
<% elsif type == 'News' %>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
|
@ -56,8 +56,8 @@
|
||||||
:title => l(:button_reply)) %>
|
:title => l(:button_reply)) %>
|
||||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
<%= link_to('删除', {:controller => 'comments', :action => 'destroy', :id => activity_id, :comment_id => comment, :user_activity_id => user_activity_id},
|
<%= 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 %>
|
: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' %>
|
<% elsif type == 'Issue' %>
|
||||||
<span style="position: relative" class="fr mr20">
|
<span style="position: relative" class="fr mr20">
|
||||||
<%= link_to(
|
<%= link_to(
|
||||||
|
@ -74,7 +74,8 @@
|
||||||
:method => 'get',
|
:method => 'get',
|
||||||
:confirm => l(:text_are_you_sure),
|
:confirm => l(:text_are_you_sure),
|
||||||
:remote=>true,
|
:remote=>true,
|
||||||
:class => 'fr mr20',
|
:id => "delete_reply_#{activity_id}_#{comment.id}",
|
||||||
|
:class => 'fr mr20 undis',
|
||||||
:title => l(:button_delete)
|
:title => l(:button_delete)
|
||||||
) if comment.user_id == User.current.id %>
|
) if comment.user_id == User.current.id %>
|
||||||
<% elsif type == 'Syllabus' %>
|
<% elsif type == 'Syllabus' %>
|
||||||
|
@ -88,8 +89,8 @@
|
||||||
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
<span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||||
</span>
|
</span>
|
||||||
<% if User.current.admin? || User.current == Syllabus.find(activity_id).user || comment.user == User.current%>
|
<% 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},
|
<%= 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", :title => l(:button_delete)) %>
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20 undis", :title => l(:button_delete)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -307,7 +307,7 @@
|
||||||
<% comments = homework_common.journals_for_messages.reorder("created_on desc").limit(3) %>
|
<% comments = homework_common.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||||
<% if count > 0 %>
|
<% if count > 0 %>
|
||||||
<div class="" id="reply_div_<%= homework_common.id %>">
|
<div class="" id="reply_div_<%= homework_common.id %>">
|
||||||
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => is_in_course,:course_activity=>-1, :is_teacher => is_teacher, :user_activity_id => -1} %>
|
<%=render :partial => 'users/news_replies', :locals => {:comments => comments, :type => 'HomeworkCommon', :is_in_course => is_in_course,:course_activity=>-1, :is_teacher => is_teacher, :user_activity_id => -1, :activity_id => homework_common.id} %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<% if params[:type] == 'HomeworkCommon' %>
|
<% if params[:type] == 'HomeworkCommon' %>
|
||||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :type => @type, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id}) %>');
|
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/news_replies', :locals => {:comments => @journals, :type => @type, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id, :activity_id => params[:id].to_i}) %>');
|
||||||
<% elsif params[:type] == 'JournalsForMessage' %>
|
<% elsif params[:type] == 'JournalsForMessage' %>
|
||||||
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id =>params[:id].to_i}) %>');
|
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id =>params[:id].to_i}) %>');
|
||||||
<% elsif params[:type] == 'Message' %>
|
<% elsif params[:type] == 'Message' %>
|
||||||
|
|
|
@ -39,15 +39,15 @@
|
||||||
<span id="reply_praise_count_<%=reply.id %>">
|
<span id="reply_praise_count_<%=reply.id %>">
|
||||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||||
</span>
|
</span>
|
||||||
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
|
||||||
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
|
||||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
|
||||||
<% end %>
|
|
||||||
<% if reply_allow %>
|
<% if reply_allow %>
|
||||||
<%#= link_to l(:button_reply),'',
|
<%#= link_to l(:button_reply),'',
|
||||||
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
||||||
<%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %>
|
<%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %>
|
||||||
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
||||||
|
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
||||||
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
||||||
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div id='<%=id%>' class="respond-form">
|
<div id='<%=id%>' class="respond-form">
|
||||||
|
|
Loading…
Reference in New Issue