-
- -
- <%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
-
- <% if @topic.author.id == User.current.id %>
- -
- <%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :class => 'postOptionLink'
- ) if @message.destroyable_by?(User.current) %>
-
- <% end %>
+ -
+ <%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'postOptionLink') if @message.editable_by?(User.current) %>
+
+ -
+ <%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic},:method => :post,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :class => 'postOptionLink'
+ ) if @message.destroyable_by?(User.current) %>
+
<% if hidden_unproject_infos %>
- <%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{@message.id},#{User.current.id},'message');", :class => 'postOptionLink' %>
<% else %>
@@ -202,7 +199,7 @@
:class => 'fr mr20',
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
- ) if reply.course_destroyable_by?(User.current) %>
+ ) if reply.destroyable_by?(User.current) %>
diff --git a/app/views/news/_course_show.html.erb b/app/views/news/_course_show.html.erb
index c8068e425..7fb6bad7f 100644
--- a/app/views/news/_course_show.html.erb
+++ b/app/views/news/_course_show.html.erb
@@ -82,7 +82,7 @@
- <%= render :partial => 'news/news_all_replies' %>
+ <%= render :partial => 'news/news_all_replies', :locals => {:object => @course} %>