diff --git a/app/views/layouts/_logined_header.html.erb b/app/views/layouts/_logined_header.html.erb index a51551d0b..fe5885250 100644 --- a/app/views/layouts/_logined_header.html.erb +++ b/app/views/layouts/_logined_header.html.erb @@ -17,7 +17,7 @@ <% memo = Memo.where(:id => 1168).first %> <% unless memo.nil? %> <% end %> <% else %> diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index f191e2d44..e4346c6c5 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -91,7 +91,9 @@
<%= reply.author.show_name%><%= format_date(reply.created_at) %>
<%= reply.content.gsub(/script/, "script ").html_safe %>
- <%= link_to "删除", forum_memo_path(@memo.forum, reply), :class => "fr mt-10 mb10", :method => "delete", :confirm => l(:text_are_you_sure) %> + <% if @memo.author.id == User.current.id || User.current.admin? %> + <%= link_to "删除", forum_memo_path(@memo.forum, reply), :class => "fr mt-10 mb10", :method => "delete", :confirm => l(:text_are_you_sure) %> + <% end %>