<%# @comment ||= commentable.comments.build %> <% if @comment %> <% authorized_tag(:div, :create, @comment, :id => 'comment_form_wrapper') do %>

<%= @comment.new_record? ? t(:'adva.comments.titles.add_reply') : t(:'adva.comments.titles.edit') %>

<%= form_for :comment, @comment, :url => (@comment.new_record? ? comments_path : comment_path(@comment)), :html => { :id => 'comment_form', :method => (@comment.new_record? ? :post : :put) } do |f| -%> <%= comment_form_hidden_fields commentable %> <%= fields_for @comment.author do |author| %>

<%= author.label :name, 'Name' %> <%= author.text_field :name %>

<%= author.label :email, 'E-Mail' %> <%= author.text_field :email %>

<%= author.label :homepage %> <%= author.text_field :homepage %>

<% end %>

<%= f.text_area :body %>

<%= submit_tag (@comment.new_record? ? t(:'adva.comments.titles.submit_comment') : t(:'adva.comments.titles.save_comment')) %> <%= link_to_remote_comment_preview %>

<% end %> <% end %> <% end %>