|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
class SubDocumentCommentsController < ApplicationController
|
|
|
|
|
before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit]
|
|
|
|
|
before_filter :find_subfield_content, :only => [:show, :index]
|
|
|
|
|
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
|
|
|
|
helper :attachments,:organizations
|
|
|
|
|
layout 'base_sub_domain'
|
|
|
|
|
|
|
|
|
@ -207,4 +208,11 @@ class SubDocumentCommentsController < ApplicationController
|
|
|
|
|
def find_subfield_content
|
|
|
|
|
@subfield_content = @organization.org_subfields.order("priority")
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def authorize_allowed
|
|
|
|
|
unless User.current.logged?
|
|
|
|
|
redirect_to signin_url
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|