diff --git a/app/controllers/org_document_comments_controller.rb b/app/controllers/org_document_comments_controller.rb index c938a2d4b..dd237de17 100644 --- a/app/controllers/org_document_comments_controller.rb +++ b/app/controllers/org_document_comments_controller.rb @@ -1,6 +1,6 @@ class OrgDocumentCommentsController < ApplicationController before_filter :find_organization, :only => [:new, :create, :show, :index] - before_filter :authorize_allowed, :only => [:create] + before_filter :authorize_allowed, :only => [:create, :add_reply] helper :attachments,:organizations layout 'base_org' diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index 3042ca9ae..594063629 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -115,17 +115,21 @@ <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
-
- <%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %> - -
- - + <% if User.current.logged? %> +
+ <%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %> + +
+ + -
-

- <% end %> -
+
+

+ <% end %> +
+ <% else %> + <%= render :partial => "users/show_unlogged" %> + <% end %>
diff --git a/app/views/users/_show_unlogged.html.erb b/app/views/users/_show_unlogged.html.erb new file mode 100644 index 000000000..e69de29bb