From 6b8e51211ab807f65ed8d0350ef02b69aaa7638e Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Tue, 11 Mar 2014 09:30:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E8=AE=A8=E8=AE=BA=E5=90=A7=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E5=88=A0=E9=99=A4=E7=AC=A6=E5=8F=B7=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/show.html.erb | 39 ++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index 05f81f89c..db1f33c48 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -12,7 +12,13 @@ :method => 'get', :title => l(:button_quote) )if !@memo.locked? && User.current.logged? %> --> - <%= link_to(l(:button_quote))if !@memo.locked? && User.current.logged? %> + <%= link_to( + l(:button_quote), + {:action => 'quote', :id => @memo}, + :remote => true, + :method => 'get', + :title => l(:button_quote) + )if !@memo.locked? && User.current.logged? %> <%= link_to( image_tag('edit.png'), @@ -20,13 +26,22 @@ :method => 'get', :title => l(:button_edit) ) if @memo.editable_by?(User.current) %> - <%= link_to( + + <%= link_to( + l(:button_delete), + {:action => 'destroy', :id => @memo}, + :method => :delete, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete) ) if @memo.destroyable_by?(User.current) %> + +
<%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
@@ -59,20 +74,34 @@ :method => 'get', :title => l(:button_quote) )if !@memo.locked? && User.current.logged? %> --> - <%= link_to(l(:button_quote))if !@memo.locked? && User.current.logged? %> + <%= link_to( + l(:button_quote), + {:action => 'quote', :id => reply}, + :remote => true, + :method => 'get', + :title => l(:button_quote) + )if !@memo.locked? && User.current.logged? %> <%= link_to( image_tag('edit.png'), {:action => 'edit', :id => reply}, :title => l(:button_edit) ) if reply.editable_by?(User.current) %> - <%= link_to( + + <%= link_to( + l(:button_delete), + {:action => 'destroy', :id => reply}, + :method => :delete, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete) + ) if reply.destroyable_by?(User.current) %> +