From 809e7023eecaf7837af0f29294be5134310e2b57 Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Thu, 26 Dec 2013 16:06:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E7=95=99=E8=A8=80=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _message.html.erb, _journal_reply_items.html.erb 调用words的destroy方法。 --- app/views/words/_journal_reply_items.html.erb | 12 +++++++---- app/views/words/_message.html.erb | 21 ++++++++++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb index da10e5c9b..4a3a72aba 100644 --- a/app/views/words/_journal_reply_items.html.erb +++ b/app/views/words/_journal_reply_items.html.erb @@ -12,10 +12,14 @@

<%= format_time reply.created_on %>

diff --git a/app/views/words/_message.html.erb b/app/views/words/_message.html.erb index 5ba80f698..f0d5a651e 100644 --- a/app/views/words/_message.html.erb +++ b/app/views/words/_message.html.erb @@ -8,20 +8,25 @@ <%= link_to journal.user, user_path(journal.user)%> <% if @user == User.current %> - <%= l(:label_leave_me_message) %> + <%= l(:label_leave_me_message) %> : <% else %> - <%= l(:label_leave_others_message) %> + <%= l(:label_leave_others_message) %> : <% end %>

<%= textilizable journal.notes%>

<%= l :label_comment_time %>:  <%= format_time journal.created_on %> - <% ids = 'project_respond_form_'+ journal.id.to_s%> - <%#= toggle_link l(:label_projects_feedback_respond), ids, {:focus => 'project_respond'} %> - - <%= link_to l(:label_projects_feedback_respond),'', - {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}:'); return false;"} - %> + <% ids = 'project_respond_form_'+ journal.id.to_s%> + + <%= link_to l(:label_projects_feedback_respond),'', + {:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}:'); return false;"} + %> + + <% if @user == User.current %> + <%= link_to(l(:label_newfeedback_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)) if remove_allowed || journal.jour_id == User.current.id %> + <% end %> +
class="respond-form">