- <% if @topic.author.id == User.current.id%>
+ <% if User.current.logged? %>
-
- -
- <%= link_to(
- l(:button_edit),
- {:action => 'edit', :id => @topic},
- :class => 'postOptionLink'
- ) if @message.course_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.course_destroyable_by?(User.current) %>
- <%= link_to "发送",messages_join_org_subfield_path(:message_id => @topic.id) , :remote=> true,:class => 'postOptionLink' %>
-
+ <% if @topic.author.id == User.current.id %>
+ -
+ <%= link_to(
+ l(:button_edit),
+ {:action => 'edit', :id => @topic},
+ :class => 'postOptionLink'
+ ) if @message.course_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.course_destroyable_by?(User.current) %>
+
+ <% end %>
+ - <%= link_to "发送",messages_join_org_subfield_path(:message_id => @topic.id) , :remote=> true,:class => 'postOptionLink' %>
diff --git a/app/views/messages/_project_show.html.erb b/app/views/messages/_project_show.html.erb
index 1cbd606ab..e5aba7c02 100644
--- a/app/views/messages/_project_show.html.erb
+++ b/app/views/messages/_project_show.html.erb
@@ -99,20 +99,22 @@
<%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
- <% if @topic.author.id == User.current.id%>
+ <% if User.current.logged? %>
-
- -
- <%= 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 @topic.author.id == User.current.id %>
+ -
+ <%= 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) %>
+
+ <% end %>
- <%= link_to "发送",messages_join_org_subfield_path(:message_id => @topic.id) , :remote=> true,:class => 'postOptionLink' %>